From a96f0e6c71ae35def77f6485749893047655a0db Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 23 Sep 2022 06:29:44 +0000 Subject: [PATCH] Update dependencies --- go.mod | 44 +- go.sum | 91 +- tests/e2e/go.mod | 20 +- tests/e2e/go.sum | 43 +- .../aws/aws-sdk-go/aws/endpoints/defaults.go | 185 +- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/service/ec2/api.go | 663 ++-- .../github.com/digitalocean/godo/CHANGELOG.md | 16 + .../github.com/digitalocean/godo/apps.gen.go | 144 +- vendor/github.com/digitalocean/godo/apps.go | 229 ++ .../digitalocean/godo/apps_accessors.go | 2863 +++++++++++++++++ .../github.com/digitalocean/godo/databases.go | 1 + .../digitalocean/godo/floating_ips.go | 9 +- vendor/github.com/digitalocean/godo/godo.go | 2 +- .../digitalocean/godo/reserved_ips.go | 9 +- vendor/github.com/digitalocean/godo/tags.go | 2 +- .../github.com/hashicorp/vault/api/README.md | 1 + .../github.com/hashicorp/vault/api/client.go | 112 +- vendor/github.com/hashicorp/vault/api/kv.go | 6 + .../github.com/hashicorp/vault/api/kv_v1.go | 2 +- .../github.com/hashicorp/vault/api/kv_v2.go | 58 +- .../hashicorp/vault/api/lifetime_watcher.go | 36 +- .../hashicorp/vault/api/output_string.go | 10 +- .../hashicorp/vault/api/plugin_helpers.go | 94 +- .../hashicorp/vault/api/ssh_agent.go | 9 +- .../hashicorp/vault/api/sys_audit.go | 3 +- .../hashicorp/vault/api/sys_mounts.go | 5 + .../hashicorp/vault/api/sys_plugins.go | 36 +- .../hashicorp/vault/api/sys_seal.go | 30 +- .../vault/sdk/helper/certutil/helpers.go | 116 +- .../vault/sdk/helper/certutil/types.go | 5 + .../sdk/helper/consts/deprecation_status.go | 31 + .../vault/sdk/helper/locksutil/locks.go | 1 - .../vault/sdk/helper/logging/logging.go | 7 +- .../vault/sdk/helper/pluginutil/env.go | 10 +- .../sdk/helper/pluginutil/multiplexing.go | 40 +- .../sdk/helper/pluginutil/multiplexing.pb.go | 4 +- .../vault/sdk/helper/pluginutil/run_config.go | 13 +- .../vault/sdk/helper/pluginutil/runner.go | 22 +- .../vault/sdk/logical/identity.pb.go | 4 +- .../hashicorp/vault/sdk/logical/logical.go | 17 + .../vault/sdk/logical/managed_key.go | 17 +- .../hashicorp/vault/sdk/logical/plugin.pb.go | 4 +- .../hashicorp/vault/sdk/logical/request.go | 2 +- .../hashicorp/vault/sdk/logical/response.go | 9 + .../vault/sdk/logical/system_view.go | 18 +- .../hashicorp/vault/sdk/logical/version.pb.go | 204 ++ .../hashicorp/vault/sdk/logical/version.proto | 17 + .../vault/sdk/logical/version_grpc.pb.go | 103 + .../hashicorp/vault/sdk/physical/entry.go | 9 + .../vault/sdk/physical/inmem/inmem.go | 32 +- .../vault/sdk/physical/transactions.go | 21 +- .../hetznercloud/hcloud-go/hcloud/client.go | 15 +- .../hcloud-go/hcloud/metadata/client.go | 4 +- vendor/golang.org/x/crypto/ssh/cipher.go | 3 +- vendor/golang.org/x/crypto/ssh/session.go | 7 +- vendor/golang.org/x/net/http2/server.go | 48 +- vendor/golang.org/x/net/http2/transport.go | 24 +- .../x/sys/windows/syscall_windows.go | 4 + .../golang.org/x/sys/windows/types_windows.go | 26 + .../x/sys/windows/zsyscall_windows.go | 19 + .../api/container/v1/container-api.json | 54 +- .../api/container/v1/container-gen.go | 82 +- .../google.golang.org/api/dns/v1/dns-api.json | 46 +- .../google.golang.org/api/dns/v1/dns-gen.go | 97 +- .../api/internal/gensupport/media.go | 29 +- .../api/internal/gensupport/send.go | 37 +- .../google.golang.org/api/internal/version.go | 2 +- .../helm/v3/internal/version/version.go | 2 +- vendor/helm.sh/helm/v3/pkg/cli/environment.go | 75 +- .../helm.sh/helm/v3/pkg/cli/values/options.go | 13 +- vendor/helm.sh/helm/v3/pkg/strvals/parser.go | 104 +- .../plugin/pkg/client/auth/exec/exec.go | 30 +- vendor/k8s.io/client-go/rest/request.go | 85 +- vendor/k8s.io/client-go/transport/cache.go | 25 +- vendor/k8s.io/client-go/transport/config.go | 21 +- .../k8s.io/client-go/transport/transport.go | 25 + vendor/k8s.io/kubectl/pkg/cmd/util/helpers.go | 28 +- vendor/modules.txt | 50 +- 79 files changed, 5554 insertions(+), 832 deletions(-) create mode 100644 vendor/github.com/digitalocean/godo/apps_accessors.go create mode 100644 vendor/github.com/hashicorp/vault/sdk/helper/consts/deprecation_status.go create mode 100644 vendor/github.com/hashicorp/vault/sdk/logical/version.pb.go create mode 100644 vendor/github.com/hashicorp/vault/sdk/logical/version.proto create mode 100644 vendor/github.com/hashicorp/vault/sdk/logical/version_grpc.pb.go diff --git a/go.mod b/go.mod index d9ab253ced..67fa110999 100644 --- a/go.mod +++ b/go.mod @@ -14,10 +14,10 @@ require ( github.com/Masterminds/sprig/v3 v3.2.2 github.com/apparentlymart/go-cidr v1.1.0 github.com/aws/amazon-ec2-instance-selector/v2 v2.4.0 - github.com/aws/aws-sdk-go v1.44.99 + github.com/aws/aws-sdk-go v1.44.104 github.com/blang/semver/v4 v4.0.0 github.com/cert-manager/cert-manager v1.9.1 - github.com/digitalocean/godo v1.83.0 + github.com/digitalocean/godo v1.85.0 github.com/go-ini/ini v1.67.0 github.com/go-logr/logr v1.2.3 github.com/gogo/protobuf v1.3.2 @@ -28,8 +28,8 @@ require ( github.com/google/uuid v1.3.0 github.com/gophercloud/gophercloud v1.0.0 github.com/hashicorp/hcl/v2 v2.14.0 - github.com/hashicorp/vault/api v1.7.2 - github.com/hetznercloud/hcloud-go v1.35.2 + github.com/hashicorp/vault/api v1.8.0 + github.com/hetznercloud/hcloud-go v1.35.3 github.com/jacksontj/memberlistmesh v0.0.0-20190905163944-93462b9d2bb7 github.com/mitchellh/mapstructure v1.5.0 github.com/pelletier/go-toml v1.9.5 @@ -44,29 +44,29 @@ require ( github.com/weaveworks/mesh v0.0.0-20191105120815-58dbcc3e8e63 github.com/zclconf/go-cty v1.11.0 go.uber.org/multierr v1.8.0 - golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 - golang.org/x/net v0.0.0-20220909164309-bea034e7d591 + golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0 + golang.org/x/net v0.0.0-20220921203646-d300de134e69 golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 golang.org/x/sync v0.0.0-20220907140024-f12130a52804 - golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41 - google.golang.org/api v0.96.0 + golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 + google.golang.org/api v0.97.0 gopkg.in/gcfg.v1 v1.2.3 gopkg.in/inf.v0 v0.9.1 gopkg.in/square/go-jose.v2 v2.6.0 - helm.sh/helm/v3 v3.9.4 - k8s.io/api v0.25.0 - k8s.io/apimachinery v0.25.0 - k8s.io/cli-runtime v0.25.0 - k8s.io/client-go v0.25.0 + helm.sh/helm/v3 v3.10.0 + k8s.io/api v0.25.2 + k8s.io/apimachinery v0.25.2 + k8s.io/cli-runtime v0.25.2 + k8s.io/client-go v0.25.2 k8s.io/cloud-provider-aws v1.25.0 - k8s.io/component-base v0.25.0 + k8s.io/component-base v0.25.2 k8s.io/gengo v0.0.0-20220913193501-391367153a38 k8s.io/klog/v2 v2.80.1 - k8s.io/kubectl v0.25.0 - k8s.io/kubelet v0.25.0 - k8s.io/legacy-cloud-providers v0.25.0 - k8s.io/mount-utils v0.25.0 - k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73 + k8s.io/kubectl v0.25.2 + k8s.io/kubelet v0.25.2 + k8s.io/legacy-cloud-providers v0.25.2 + k8s.io/mount-utils v0.25.2 + k8s.io/utils v0.0.0-20220922133306-665eaaec4324 sigs.k8s.io/controller-runtime v0.13.0 sigs.k8s.io/yaml v1.3.0 ) @@ -153,7 +153,7 @@ require ( github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/memberlist v0.3.1 // indirect - github.com/hashicorp/vault/sdk v0.5.1 // indirect + github.com/hashicorp/vault/sdk v0.6.0 // indirect github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb // indirect github.com/huandu/xstrings v1.3.2 // indirect github.com/imdario/mergo v0.3.12 // indirect @@ -237,8 +237,8 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.25.0 // indirect - k8s.io/cloud-provider v0.25.0 // indirect - k8s.io/csi-translation-lib v0.25.0 // indirect + k8s.io/cloud-provider v0.25.2 // indirect + k8s.io/csi-translation-lib v0.25.2 // indirect k8s.io/klog v1.0.0 // indirect k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect oras.land/oras-go v1.2.0 // indirect diff --git a/go.sum b/go.sum index 3d701666aa..a669b90d27 100644 --- a/go.sum +++ b/go.sum @@ -179,8 +179,8 @@ github.com/aws/amazon-ec2-instance-selector/v2 v2.4.0/go.mod h1:AEJrtkLkCkfIBIaz github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.99 h1:ITZ9q/fmH+Ksaz2TbyMU2d19vOOWs/hAlt8NbXAieHw= -github.com/aws/aws-sdk-go v1.44.99/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.104 h1:NiPYL60aOSH0TsAzQngx/aBdxC12TXhgw07DQFh76GU= +github.com/aws/aws-sdk-go v1.44.104/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -276,8 +276,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/denis-tingajkin/go-header v0.4.2/go.mod h1:eLRHAVXzE5atsKAnNRDB90WHCFFnBUn4RN0nRcs1LJA= 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.83.0 h1:K9CveJyECNLwrQnGZG+ovgapr7l5OuvQ6xZSKKW9Nz0= -github.com/digitalocean/godo v1.83.0/go.mod h1:BPCqvwbjbGqxuUnIKB4EvS/AX7IDnNmt5fwvIkWo+ew= +github.com/digitalocean/godo v1.85.0 h1:25H79kPw4+WY5PGeJp8oISJJ0Qylx+UtGeYdz6UCzfc= +github.com/digitalocean/godo v1.85.0/go.mod h1:jELt1jkHVifd0rKaY0pt/m1QxGzbkkvoVVrDkR15/5A= github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U= github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= github.com/distribution/distribution/v3 v3.0.0-20220526142353-ffbd94cbe269 h1:hbCT8ZPPMqefiAWD2ZKjn7ypokIGViTvBBg/ExLSdCk= @@ -669,14 +669,14 @@ github.com/hashicorp/memberlist v0.3.1 h1:MXgUXLqva1QvpVEDQW1IQLG0wivQAtmFlHRQ+1 github.com/hashicorp/memberlist v0.3.1/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= -github.com/hashicorp/vault/api v1.7.2 h1:kawHE7s/4xwrdKbkmwQi0wYaIeUhk5ueek7ljuezCVQ= -github.com/hashicorp/vault/api v1.7.2/go.mod h1:xbfA+1AvxFseDzxxdWaL0uO99n1+tndus4GCrtouy0M= -github.com/hashicorp/vault/sdk v0.5.1 h1:zly/TmNgOXCGgWIRA8GojyXzG817POtVh3uzIwzZx+8= -github.com/hashicorp/vault/sdk v0.5.1/go.mod h1:DoGraE9kKGNcVgPmTuX357Fm6WAx1Okvde8Vp3dPDoU= +github.com/hashicorp/vault/api v1.8.0 h1:7765sW1XBt+qf4XKIYE4ebY9qc/yi9V2/egzGSUNMZU= +github.com/hashicorp/vault/api v1.8.0/go.mod h1:uJrw6D3y9Rv7hhmS17JQC50jbPDAZdjZoTtrCCxxs7E= +github.com/hashicorp/vault/sdk v0.6.0 h1:6Z+In5DXHiUfZvIZdMx7e2loL1PPyDjA4bVh9ZTIAhs= +github.com/hashicorp/vault/sdk v0.6.0/go.mod h1:+DRpzoXIdMvKc88R4qxr+edwy/RvH5QK8itmxLiDHLc= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb h1:b5rjCoWHc7eqmAS4/qyk21ZsHyb6Mxv/jykxvNTkU4M= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hetznercloud/hcloud-go v1.35.2 h1:eEDtmDiI2plZ2UQmj4YpiYse5XbtpXOUBpAdIOLxzgE= -github.com/hetznercloud/hcloud-go v1.35.2/go.mod h1:mepQwR6va27S3UQthaEPGS86jtzSY9xWL1e9dyxXpgA= +github.com/hetznercloud/hcloud-go v1.35.3 h1:WCmFAhLRooih2QHAsbCbEdpIHnshQQmrPqsr3rHE1Ow= +github.com/hetznercloud/hcloud-go v1.35.3/go.mod h1:mepQwR6va27S3UQthaEPGS86jtzSY9xWL1e9dyxXpgA= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= @@ -922,14 +922,14 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= +github.com/onsi/ginkgo/v2 v2.1.6 h1:Fx2POJZfKRQcM1pH49qSZiYeu319wji004qX+GDovrU= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= 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.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.14.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= +github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.3-0.20220114050600-8b9d41f48198 h1:+czc/J8SlhPKLOtVLMQc+xDCFBT73ZStMsRhSsUhsSg= @@ -1254,8 +1254,8 @@ golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0 h1:a5Yg6ylndHHYJqIPrdq0AhvR6KTvDTAvgBtaidhEevY= +golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 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= @@ -1363,8 +1363,9 @@ golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220909164309-bea034e7d591 h1:D0B/7al0LLrVC8aWF4+oxpv/m8bc7ViFfVS8/gXGdqI= golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20220921203646-d300de134e69 h1:hUJpGDpnfwdJW8iNypFjmSY0sCBEL+spFTZ2eO+Sfps= +golang.org/x/net v0.0.0-20220921203646-d300de134e69/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1512,8 +1513,8 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41 h1:ohgcoMbSofXygzo6AD2I1kz3BFmW1QArPYTtwEM3UXc= -golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 h1:h+EGohizhe9XlX18rfpa8k8RAc5XyaeamM+0VHRd4lc= +golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1698,8 +1699,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.96.0 h1:F60cuQPJq7K7FzsxMYHAUJSiXh2oKctHxBMbDygxhfM= -google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.97.0 h1:x/vEL1XDF/2V4xzdNgFPaKHluRESo2aTsL7QzHnBtGQ= +google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= 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= @@ -1906,8 +1907,8 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= -helm.sh/helm/v3 v3.9.4 h1:TCI1QhJUeLVOdccfdw+vnSEO3Td6gNqibptB04QtExY= -helm.sh/helm/v3 v3.9.4/go.mod h1:3eaWAIqzvlRSD06gR9MMwmp2KBKwlu9av1/1BZpjeWY= +helm.sh/helm/v3 v3.10.0 h1:y/MYONZ/bsld9kHwqgBX2uPggnUr5hahpjwt9/jrHlI= +helm.sh/helm/v3 v3.10.0/go.mod h1:paPw0hO5KVfrCMbi1M8+P8xdfBri3IiJiVKATZsFR94= 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= @@ -1918,33 +1919,33 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.2.1/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY= k8s.io/api v0.21.3/go.mod h1:hUgeYHUbBp23Ue4qdX9tR8/ANi/g3ehylAqDn9NWVOg= k8s.io/api v0.22.1/go.mod h1:bh13rkTp3F1XEaLGykbyRD2QaTTzPm0e/BMd8ptFONY= -k8s.io/api v0.25.0 h1:H+Q4ma2U/ww0iGB78ijZx6DRByPz6/733jIuFpX70e0= -k8s.io/api v0.25.0/go.mod h1:ttceV1GyV1i1rnmvzT3BST08N6nGt+dudGrquzVQWPk= +k8s.io/api v0.25.2 h1:v6G8RyFcwf0HR5jQGIAYlvtRNrxMJQG1xJzaSeVnIS8= +k8s.io/api v0.25.2/go.mod h1:qP1Rn4sCVFwx/xIhe+we2cwBLTXNcheRyYXwajonhy0= k8s.io/apiextensions-apiserver v0.21.3/go.mod h1:kl6dap3Gd45+21Jnh6utCx8Z2xxLm8LGDkprcd+KbsE= k8s.io/apiextensions-apiserver v0.25.0 h1:CJ9zlyXAbq0FIW8CD7HHyozCMBpDSiH7EdrSTCZcZFY= k8s.io/apiextensions-apiserver v0.25.0/go.mod h1:3pAjZiN4zw7R8aZC5gR0y3/vCkGlAjCazcg1me8iB/E= k8s.io/apimachinery v0.21.3/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= k8s.io/apimachinery v0.22.1/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= -k8s.io/apimachinery v0.25.0 h1:MlP0r6+3XbkUG2itd6vp3oxbtdQLQI94fD5gCS+gnoU= -k8s.io/apimachinery v0.25.0/go.mod h1:qMx9eAk0sZQGsXGu86fab8tZdffHbwUfsvzqKn4mfB0= +k8s.io/apimachinery v0.25.2 h1:WbxfAjCx+AeN8Ilp9joWnyJ6xu9OMeS/fsfjK/5zaQs= +k8s.io/apimachinery v0.25.2/go.mod h1:hqqA1X0bsgsxI6dXsJ4HnNTBOmJNxyPp8dw3u2fSHwA= k8s.io/apiserver v0.21.3/go.mod h1:eDPWlZG6/cCCMj/JBcEpDoK+I+6i3r9GsChYBHSbAzU= -k8s.io/cli-runtime v0.25.0 h1:XBnTc2Fi+w818jcJGzhiJKQuXl8479sZ4FhtV5hVJ1Q= -k8s.io/cli-runtime v0.25.0/go.mod h1:bHOI5ZZInRHhbq12OdUiYZQN8ml8aKZLwQgt9QlLINw= +k8s.io/cli-runtime v0.25.2 h1:XOx+SKRjBpYMLY/J292BHTkmyDffl/qOx3YSuFZkTuc= +k8s.io/cli-runtime v0.25.2/go.mod h1:OQx3+/0st6x5YpkkJQlEWLC73V0wHsOFMC1/roxV8Oc= k8s.io/client-go v0.21.3/go.mod h1:+VPhCgTsaFmGILxR/7E1N0S+ryO010QBeNCv5JwRGYU= k8s.io/client-go v0.22.1/go.mod h1:BquC5A4UOo4qVDUtoc04/+Nxp1MeHcVc1HJm1KmG8kk= -k8s.io/client-go v0.25.0 h1:CVWIaCETLMBNiTUta3d5nzRbXvY5Hy9Dpl+VvREpu5E= -k8s.io/client-go v0.25.0/go.mod h1:lxykvypVfKilxhTklov0wz1FoaUZ8X4EwbhS6rpRfN8= -k8s.io/cloud-provider v0.25.0 h1:ONX5BON6f1Mxa2GWvPyKn+QsZXaLauPUte7MZxfWUro= -k8s.io/cloud-provider v0.25.0/go.mod h1:afVfVCIYOUER914WmSp0QpAtJn12gv4qu9NMT4XBxZo= +k8s.io/client-go v0.25.2 h1:SUPp9p5CwM0yXGQrwYurw9LWz+YtMwhWd0GqOsSiefo= +k8s.io/client-go v0.25.2/go.mod h1:i7cNU7N+yGQmJkewcRD2+Vuj4iz7b30kI8OcL3horQ4= +k8s.io/cloud-provider v0.25.2 h1:KwglzrTOz5oR4ImT9aSgCo5T0GlK+FqeOXbus3D/TUQ= +k8s.io/cloud-provider v0.25.2/go.mod h1:PTroa0bNv5Ik4whks5Cl/QX7adrl4I1mnydrM6vAhaU= k8s.io/cloud-provider-aws v1.25.0 h1:kTnNfMA4FDDAdPXWjc+aj8IzSn3iqMUqWTMmzElyCIs= k8s.io/cloud-provider-aws v1.25.0/go.mod h1:RaSxyc4nlJkBLSuKEf6rLA2gLhfbU7GrTGhGSYvVFsY= k8s.io/code-generator v0.21.3/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= k8s.io/code-generator v0.22.0/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= k8s.io/component-base v0.21.3/go.mod h1:kkuhtfEHeZM6LkX0saqSK8PbdO7A0HigUngmhhrwfGQ= -k8s.io/component-base v0.25.0 h1:haVKlLkPCFZhkcqB6WCvpVxftrg6+FK5x1ZuaIDaQ5Y= -k8s.io/component-base v0.25.0/go.mod h1:F2Sumv9CnbBlqrpdf7rKZTmmd2meJq0HizeyY/yAFxk= -k8s.io/csi-translation-lib v0.25.0 h1:Jh3kn5p3kEGGA/q1fovTNIG9fypzt2c34sm+qij2W/8= -k8s.io/csi-translation-lib v0.25.0/go.mod h1:Wb80CDywP4753F6wWkIyOuJIQtQAbhgw985veSgAn/4= +k8s.io/component-base v0.25.2 h1:Nve/ZyHLUBHz1rqwkjXm/Re6IniNa5k7KgzxZpTfSQY= +k8s.io/component-base v0.25.2/go.mod h1:90W21YMr+Yjg7MX+DohmZLzjsBtaxQDDwaX4YxDkl60= +k8s.io/csi-translation-lib v0.25.2 h1:DU0ipV1VrqF+R4QuJyEP1jKsXaIxyGBE7WEl97DGp4A= +k8s.io/csi-translation-lib v0.25.2/go.mod h1:q2OfTClapLeLlFeQBOklmyP/w4I2hvBZg6O3iHZcuSg= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201203183100-97869a43a9d9/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= @@ -1965,20 +1966,20 @@ k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iL k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 h1:MQ8BAZPZlWk3S9K4a9NCkIFQtZShWqoha7snGixVgEA= k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU= -k8s.io/kubectl v0.25.0 h1:/Wn1cFqo8ik3iee1EvpxYre3bkWsGLXzLQI6uCCAkQc= -k8s.io/kubectl v0.25.0/go.mod h1:n16ULWsOl2jmQpzt2o7Dud1t4o0+Y186ICb4O+GwKAU= -k8s.io/kubelet v0.25.0 h1:eTS5B1u1o63ndExAHKLJytzz/GBy86ROcxYtu0VK3RA= -k8s.io/kubelet v0.25.0/go.mod h1:J6aQxrZdSsGPrskYrhZdEn6PCnGha+GNvF0g9aWfQnw= -k8s.io/legacy-cloud-providers v0.25.0 h1:c+boKaCw/2ZzvA8/XgTIeDrGUJJ2Ucy+jLJFf02+huE= -k8s.io/legacy-cloud-providers v0.25.0/go.mod h1:bnmUgHHeBmK3M9JgQzu+ne6UCUVURDzkpF0Y7VeypVE= -k8s.io/mount-utils v0.25.0 h1:dx+SKXBVjskPgkpv9Mk0mAfbLNOxz8jAqTXGTZJnd8I= -k8s.io/mount-utils v0.25.0/go.mod h1:WTYq8Ev/JrnkqK2h1jFUnC8qWGuqzMb9XDC+Lu3WNU0= +k8s.io/kubectl v0.25.2 h1:2993lTeVimxKSWx/7z2PiJxUILygRa3tmC4QhFaeioA= +k8s.io/kubectl v0.25.2/go.mod h1:eoBGJtKUj7x38KXelz+dqVtbtbKwCqyKzJWmBHU0prg= +k8s.io/kubelet v0.25.2 h1:L0PXLc2kTfIf6bm+wv4/1dIWwgXWDRTxTErxqFR4nqc= +k8s.io/kubelet v0.25.2/go.mod h1:/ASc/pglUA3TeRMG4hRKSjTa7arT0D6yqLzwqSxwMlY= +k8s.io/legacy-cloud-providers v0.25.2 h1:Yt9m20ChxFW9o/90JDphUjAP9Axs6rQk878AUj/5cw8= +k8s.io/legacy-cloud-providers v0.25.2/go.mod h1:H9JjCeCuPv5GSmLD5lPzG7BXJr02D8BDYXabRHJZV1o= +k8s.io/mount-utils v0.25.2 h1:ZNIHSaPaaPqFqtZzaTbgH3oHKoWZHoNBnTKafQRj6A4= +k8s.io/mount-utils v0.25.2/go.mod h1:WTYq8Ev/JrnkqK2h1jFUnC8qWGuqzMb9XDC+Lu3WNU0= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210820185131-d34e5cb4466e/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73 h1:H9TCJUUx+2VA0ZiD9lvtaX8fthFsMoD+Izn93E/hm8U= -k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20220922133306-665eaaec4324 h1:i+xdFemcSNuJvIfBlaYuXgRondKxK4z4prVPKzEaelI= +k8s.io/utils v0.0.0-20220922133306-665eaaec4324/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= mvdan.cc/gofumpt v0.1.1/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= diff --git a/tests/e2e/go.mod b/tests/e2e/go.mod index cb87c53f37..a80812a781 100644 --- a/tests/e2e/go.mod +++ b/tests/e2e/go.mod @@ -12,8 +12,8 @@ require ( github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/octago/sflags v0.2.0 github.com/spf13/pflag v1.0.5 - k8s.io/api v0.25.0 - k8s.io/apimachinery v0.25.0 + k8s.io/api v0.25.2 + k8s.io/apimachinery v0.25.2 k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible k8s.io/klog/v2 v2.80.1 k8s.io/kops v1.24.1 @@ -38,7 +38,7 @@ require ( github.com/apparentlymart/go-cidr v1.1.0 // indirect github.com/armon/go-metrics v0.3.10 // indirect github.com/armon/go-radix v1.0.0 // indirect - github.com/aws/aws-sdk-go v1.44.99 // indirect + github.com/aws/aws-sdk-go v1.44.104 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver v3.5.1+incompatible // indirect github.com/cenkalti/backoff/v3 v3.0.0 // indirect @@ -95,8 +95,8 @@ require ( github.com/hashicorp/go-version v1.2.1 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hashicorp/vault/api v1.7.2 // indirect - github.com/hashicorp/vault/sdk v0.5.1 // indirect + github.com/hashicorp/vault/api v1.8.0 // indirect + github.com/hashicorp/vault/sdk v0.6.0 // indirect github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect @@ -146,16 +146,16 @@ require ( go.opencensus.io v0.23.0 // indirect go.uber.org/atomic v1.9.0 // indirect go4.org v0.0.0-20201209231011-d4a079459e60 // indirect - golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect - golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect + golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0 // indirect + golang.org/x/net v0.0.0-20220921203646-d300de134e69 // indirect golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect golang.org/x/sync v0.0.0-20220907140024-f12130a52804 // indirect - golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41 // indirect + golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect - google.golang.org/api v0.96.0 // indirect + google.golang.org/api v0.97.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de // indirect google.golang.org/grpc v1.48.0 // indirect @@ -168,7 +168,7 @@ require ( k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect k8s.io/release v0.7.1-0.20210204090829-09fb5e3883b8 // indirect k8s.io/test-infra v0.0.0-20210730160938-8ad9b8c53bd8 // indirect - k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73 // indirect + k8s.io/utils v0.0.0-20220922133306-665eaaec4324 // indirect sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect ) diff --git a/tests/e2e/go.sum b/tests/e2e/go.sum index a77f2476f4..6cb07155a3 100644 --- a/tests/e2e/go.sum +++ b/tests/e2e/go.sum @@ -346,8 +346,8 @@ github.com/aws/aws-sdk-go v1.31.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZve github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.37.22/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.99 h1:ITZ9q/fmH+Ksaz2TbyMU2d19vOOWs/hAlt8NbXAieHw= -github.com/aws/aws-sdk-go v1.44.99/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.104 h1:NiPYL60aOSH0TsAzQngx/aBdxC12TXhgw07DQFh76GU= +github.com/aws/aws-sdk-go v1.44.104/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= github.com/bazelbuild/buildtools v0.0.0-20190917191645-69366ca98f89/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU= github.com/bazelbuild/buildtools v0.0.0-20200922170545-10384511ce98/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU= @@ -1322,10 +1322,10 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= -github.com/hashicorp/vault/api v1.7.2 h1:kawHE7s/4xwrdKbkmwQi0wYaIeUhk5ueek7ljuezCVQ= -github.com/hashicorp/vault/api v1.7.2/go.mod h1:xbfA+1AvxFseDzxxdWaL0uO99n1+tndus4GCrtouy0M= -github.com/hashicorp/vault/sdk v0.5.1 h1:zly/TmNgOXCGgWIRA8GojyXzG817POtVh3uzIwzZx+8= -github.com/hashicorp/vault/sdk v0.5.1/go.mod h1:DoGraE9kKGNcVgPmTuX357Fm6WAx1Okvde8Vp3dPDoU= +github.com/hashicorp/vault/api v1.8.0 h1:7765sW1XBt+qf4XKIYE4ebY9qc/yi9V2/egzGSUNMZU= +github.com/hashicorp/vault/api v1.8.0/go.mod h1:uJrw6D3y9Rv7hhmS17JQC50jbPDAZdjZoTtrCCxxs7E= +github.com/hashicorp/vault/sdk v0.6.0 h1:6Z+In5DXHiUfZvIZdMx7e2loL1PPyDjA4bVh9ZTIAhs= +github.com/hashicorp/vault/sdk v0.6.0/go.mod h1:+DRpzoXIdMvKc88R4qxr+edwy/RvH5QK8itmxLiDHLc= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb h1:b5rjCoWHc7eqmAS4/qyk21ZsHyb6Mxv/jykxvNTkU4M= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -1721,7 +1721,7 @@ github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9k github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= +github.com/onsi/ginkgo/v2 v2.1.6 h1:Fx2POJZfKRQcM1pH49qSZiYeu319wji004qX+GDovrU= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= 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= @@ -1740,7 +1740,7 @@ github.com/onsi/gomega v1.10.5/go.mod h1:gza4q3jKQJijlu05nKWRCW/GavJumGt8aNRxWg7 github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= +github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -2358,8 +2358,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0 h1:a5Yg6ylndHHYJqIPrdq0AhvR6KTvDTAvgBtaidhEevY= +golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 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= @@ -2495,8 +2495,9 @@ golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220909164309-bea034e7d591 h1:D0B/7al0LLrVC8aWF4+oxpv/m8bc7ViFfVS8/gXGdqI= golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20220921203646-d300de134e69 h1:hUJpGDpnfwdJW8iNypFjmSY0sCBEL+spFTZ2eO+Sfps= +golang.org/x/net v0.0.0-20220921203646-d300de134e69/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -2697,8 +2698,8 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41 h1:ohgcoMbSofXygzo6AD2I1kz3BFmW1QArPYTtwEM3UXc= -golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 h1:h+EGohizhe9XlX18rfpa8k8RAc5XyaeamM+0VHRd4lc= +golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -2943,8 +2944,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.96.0 h1:F60cuQPJq7K7FzsxMYHAUJSiXh2oKctHxBMbDygxhfM= -google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.97.0 h1:x/vEL1XDF/2V4xzdNgFPaKHluRESo2aTsL7QzHnBtGQ= +google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -3245,8 +3246,8 @@ k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= k8s.io/api v0.22.5/go.mod h1:mEhXyLaSD1qTOf40rRiKXkc+2iCem09rWLlFwhCEiAs= k8s.io/api v0.24.2/go.mod h1:AHqbSkTm6YrQ0ObxjO3Pmp/ubFF/KuM7jU+3khoBsOg= -k8s.io/api v0.25.0 h1:H+Q4ma2U/ww0iGB78ijZx6DRByPz6/733jIuFpX70e0= -k8s.io/api v0.25.0/go.mod h1:ttceV1GyV1i1rnmvzT3BST08N6nGt+dudGrquzVQWPk= +k8s.io/api v0.25.2 h1:v6G8RyFcwf0HR5jQGIAYlvtRNrxMJQG1xJzaSeVnIS8= +k8s.io/api v0.25.2/go.mod h1:qP1Rn4sCVFwx/xIhe+we2cwBLTXNcheRyYXwajonhy0= k8s.io/apiextensions-apiserver v0.0.0-20190918201827-3de75813f604/go.mod h1:7H8sjDlWQu89yWB3FhZfsLyRCRLuoXoCoY5qtwW1q6I= k8s.io/apiextensions-apiserver v0.16.4/go.mod h1:HYQwjujEkXmQNhap2C9YDdIVOSskGZ3et0Mvjcyjbto= k8s.io/apiextensions-apiserver v0.17.2/go.mod h1:4KdMpjkEjjDI2pPfBA15OscyNldHWdBCfsWMDWAmSTs= @@ -3275,8 +3276,8 @@ k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswP k8s.io/apimachinery v0.22.1/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= k8s.io/apimachinery v0.22.5/go.mod h1:xziclGKwuuJ2RM5/rSFQSYAj0zdbci3DH8kj+WvyN0U= k8s.io/apimachinery v0.24.2/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= -k8s.io/apimachinery v0.25.0 h1:MlP0r6+3XbkUG2itd6vp3oxbtdQLQI94fD5gCS+gnoU= -k8s.io/apimachinery v0.25.0/go.mod h1:qMx9eAk0sZQGsXGu86fab8tZdffHbwUfsvzqKn4mfB0= +k8s.io/apimachinery v0.25.2 h1:WbxfAjCx+AeN8Ilp9joWnyJ6xu9OMeS/fsfjK/5zaQs= +k8s.io/apimachinery v0.25.2/go.mod h1:hqqA1X0bsgsxI6dXsJ4HnNTBOmJNxyPp8dw3u2fSHwA= k8s.io/apiserver v0.0.0-20190918200908-1e17798da8c1/go.mod h1:4FuDU+iKPjdsdQSN3GsEKZLB/feQsj1y9dhhBDVV2Ns= k8s.io/apiserver v0.16.4/go.mod h1:kbLJOak655g6W7C+muqu1F76u9wnEycfKMqbVaXIdAc= k8s.io/apiserver v0.17.0/go.mod h1:ABM+9x/prjINN6iiffRVNCBR2Wk7uY4z+EtEGZD48cg= @@ -3406,8 +3407,8 @@ k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/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-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73 h1:H9TCJUUx+2VA0ZiD9lvtaX8fthFsMoD+Izn93E/hm8U= -k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20220922133306-665eaaec4324 h1:i+xdFemcSNuJvIfBlaYuXgRondKxK4z4prVPKzEaelI= +k8s.io/utils v0.0.0-20220922133306-665eaaec4324/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= knative.dev/caching v0.0.0-20190719140829-2032732871ff/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg= knative.dev/caching v0.0.0-20200116200605-67bca2c83dfa/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg= knative.dev/eventing-contrib v0.6.1-0.20190723221543-5ce18048c08b/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g= diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index 4df415be5d..f420acd074 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -5822,12 +5822,42 @@ var awsPartition = partition{ endpointKey{ Region: "eu-west-2", }: endpoint{}, + endpointKey{ + Region: "fips-us-east-1", + }: endpoint{ + Hostname: "connect-campaigns-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "fips-us-west-2", + }: endpoint{ + Hostname: "connect-campaigns-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + Deprecated: boxedTrue, + }, endpointKey{ Region: "us-east-1", }: endpoint{}, + endpointKey{ + Region: "us-east-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "connect-campaigns-fips.us-east-1.amazonaws.com", + }, endpointKey{ Region: "us-west-2", }: endpoint{}, + endpointKey{ + Region: "us-west-2", + Variant: fipsVariant, + }: endpoint{ + Hostname: "connect-campaigns-fips.us-west-2.amazonaws.com", + }, }, }, "contact-lens": service{ @@ -7283,6 +7313,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-southeast-2", }: endpoint{}, + endpointKey{ + Region: "ap-southeast-3", + }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, @@ -9484,6 +9517,12 @@ var awsPartition = partition{ endpointKey{ Region: "ap-northeast-1", }: endpoint{}, + endpointKey{ + Region: "ap-southeast-1", + }: endpoint{}, + endpointKey{ + Region: "eu-central-1", + }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, @@ -9496,6 +9535,15 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "fips-us-east-2", + }: endpoint{ + Hostname: "emr-serverless-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + Deprecated: boxedTrue, + }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ @@ -9514,6 +9562,15 @@ var awsPartition = partition{ }: endpoint{ Hostname: "emr-serverless-fips.us-east-1.amazonaws.com", }, + endpointKey{ + Region: "us-east-2", + }: endpoint{}, + endpointKey{ + Region: "us-east-2", + Variant: fipsVariant, + }: endpoint{ + Hostname: "emr-serverless-fips.us-east-2.amazonaws.com", + }, endpointKey{ Region: "us-west-2", }: endpoint{}, @@ -10570,24 +10627,9 @@ var awsPartition = partition{ }, "fsx": service{ Endpoints: serviceEndpoints{ - endpointKey{ - Region: "af-south-1", - }: endpoint{}, - endpointKey{ - Region: "ap-east-1", - }: endpoint{}, endpointKey{ Region: "ap-northeast-1", }: endpoint{}, - endpointKey{ - Region: "ap-northeast-2", - }: endpoint{}, - endpointKey{ - Region: "ap-northeast-3", - }: endpoint{}, - endpointKey{ - Region: "ap-south-1", - }: endpoint{}, endpointKey{ Region: "ap-southeast-1", }: endpoint{}, @@ -10606,21 +10648,12 @@ var awsPartition = partition{ endpointKey{ Region: "eu-central-1", }: endpoint{}, - endpointKey{ - Region: "eu-north-1", - }: endpoint{}, - endpointKey{ - Region: "eu-south-1", - }: endpoint{}, endpointKey{ Region: "eu-west-1", }: endpoint{}, endpointKey{ Region: "eu-west-2", }: endpoint{}, - endpointKey{ - Region: "eu-west-3", - }: endpoint{}, endpointKey{ Region: "fips-ca-central-1", }: endpoint{ @@ -10657,15 +10690,6 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, - endpointKey{ - Region: "fips-prod-us-west-1", - }: endpoint{ - Hostname: "fsx-fips.us-west-1.amazonaws.com", - CredentialScope: credentialScope{ - Region: "us-west-1", - }, - Deprecated: boxedTrue, - }, endpointKey{ Region: "fips-prod-us-west-2", }: endpoint{ @@ -10693,15 +10717,6 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, - endpointKey{ - Region: "fips-us-west-1", - }: endpoint{ - Hostname: "fsx-fips.us-west-1.amazonaws.com", - CredentialScope: credentialScope{ - Region: "us-west-1", - }, - Deprecated: boxedTrue, - }, endpointKey{ Region: "fips-us-west-2", }: endpoint{ @@ -10711,9 +10726,6 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, - endpointKey{ - Region: "me-south-1", - }: endpoint{}, endpointKey{ Region: "prod-ca-central-1", }: endpoint{ @@ -10768,24 +10780,6 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, - endpointKey{ - Region: "prod-us-west-1", - }: endpoint{ - CredentialScope: credentialScope{ - Region: "us-west-1", - }, - Deprecated: boxedTrue, - }, - endpointKey{ - Region: "prod-us-west-1", - Variant: fipsVariant, - }: endpoint{ - Hostname: "fsx-fips.us-west-1.amazonaws.com", - CredentialScope: credentialScope{ - Region: "us-west-1", - }, - Deprecated: boxedTrue, - }, endpointKey{ Region: "prod-us-west-2", }: endpoint{ @@ -10804,9 +10798,6 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, - endpointKey{ - Region: "sa-east-1", - }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, @@ -10825,15 +10816,6 @@ var awsPartition = partition{ }: endpoint{ Hostname: "fsx-fips.us-east-2.amazonaws.com", }, - endpointKey{ - Region: "us-west-1", - }: endpoint{}, - endpointKey{ - Region: "us-west-1", - Variant: fipsVariant, - }: endpoint{ - Hostname: "fsx-fips.us-west-1.amazonaws.com", - }, endpointKey{ Region: "us-west-2", }: endpoint{}, @@ -17604,6 +17586,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-southeast-2", }: endpoint{}, + endpointKey{ + Region: "ap-southeast-3", + }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, @@ -26719,6 +26704,16 @@ var awscnPartition = partition{ }: endpoint{}, }, }, + "rbin": service{ + Endpoints: serviceEndpoints{ + endpointKey{ + Region: "cn-north-1", + }: endpoint{}, + endpointKey{ + Region: "cn-northwest-1", + }: endpoint{}, + }, + }, "rds": service{ Endpoints: serviceEndpoints{ endpointKey{ @@ -30695,6 +30690,46 @@ var awsusgovPartition = partition{ }, }, }, + "rbin": service{ + Endpoints: serviceEndpoints{ + endpointKey{ + Region: "fips-us-gov-east-1", + }: endpoint{ + Hostname: "rbin-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "fips-us-gov-west-1", + }: endpoint{ + Hostname: "rbin-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "us-gov-east-1", + }: endpoint{}, + endpointKey{ + Region: "us-gov-east-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "rbin-fips.us-gov-east-1.amazonaws.com", + }, + endpointKey{ + Region: "us-gov-west-1", + }: endpoint{}, + endpointKey{ + Region: "us-gov-west-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "rbin-fips.us-gov-west-1.amazonaws.com", + }, + }, + }, "rds": service{ Defaults: endpointDefaults{ defaultKey{}: endpoint{}, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 517eae5d9e..aba2334c8b 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.44.99" +const SDKVersion = "1.44.104" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go index 5ce17212aa..d26bcc0203 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go @@ -626,9 +626,8 @@ func (c *EC2) AllocateAddressRequest(input *AllocateAddressInput) (req *request. // telecommunication carrier, to a network interface which resides in a subnet // in a Wavelength Zone (for example an EC2 instance). // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) +// We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic +// to a VPC. For more information, see Migrate from EC2-Classic to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1148,9 +1147,8 @@ func (c *EC2) AssociateAddressRequest(input *AssociateAddressInput) (req *reques // the Elastic IP address is remapped to the same instance. For more information, // see the Elastic IP Addresses section of Amazon EC2 Pricing (http://aws.amazon.com/ec2/pricing/). // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) +// We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic +// to a VPC. For more information, see Migrate from EC2-Classic to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1399,7 +1397,7 @@ func (c *EC2) AssociateEnclaveCertificateIamRoleRequest(input *AssociateEnclaveC // in the Amazon Web Services Nitro Enclaves User Guide. // // When the IAM role is associated with the ACM certificate, the certificate, -// certificate chain, and encrypted private key are placed in an Amazon S3 bucket +// certificate chain, and encrypted private key are placed in an Amazon S3 location // that only the associated IAM role can access. The private key of the certificate // is encrypted with an Amazon Web Services managed key that has an attached // attestation-based key policy. @@ -2779,9 +2777,8 @@ func (c *EC2) AuthorizeSecurityGroupIngressRequest(input *AuthorizeSecurityGroup // For more information about VPC security group quotas, see Amazon VPC quotas // (https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html). // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) +// We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic +// to a VPC. For more information, see Migrate from EC2-Classic to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6833,9 +6830,14 @@ func (c *EC2) CreateNetworkInterfaceRequest(input *CreateNetworkInterfaceInput) // // Creates a network interface in the specified subnet. // -// For more information about network interfaces, see Elastic Network Interfaces +// The number of IP addresses you can assign to a network interface varies by +// instance type. For more information, see IP Addresses Per ENI Per Instance +// Type (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI) +// in the Amazon Virtual Private Cloud User Guide. +// +// For more information about network interfaces, see Elastic network interfaces // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html) in the -// Amazon Virtual Private Cloud User Guide. +// Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -7595,9 +7597,8 @@ func (c *EC2) CreateSecurityGroupRequest(input *CreateSecurityGroupInput) (req * // For more information about VPC security group limits, see Amazon VPC Limits // (https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html). // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) +// We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic +// to a VPC. For more information, see Migrate from EC2-Classic to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -7785,7 +7786,10 @@ func (c *EC2) CreateSnapshotsRequest(input *CreateSnapshotsInput) (req *request. // Creates crash-consistent snapshots of multiple EBS volumes and stores the // data in S3. Volumes are chosen by specifying an instance. Any attached volumes // will produce one snapshot each that is crash-consistent across the instance. -// Boot volumes can be excluded by changing the parameters. +// +// You can include all of the volumes currently attached to the instance, or +// you can exclude the root volume or specific data (non-root) volumes from +// the multi-volume snapshot set. // // You can create multi-volume snapshots of instances in a Region and instances // on an Outpost. If you create snapshots from an instance in a Region, the @@ -13083,9 +13087,8 @@ func (c *EC2) DeleteSecurityGroupRequest(input *DeleteSecurityGroupInput) (req * // or is referenced by another security group, the operation fails with InvalidGroup.InUse // in EC2-Classic or DependencyViolation in EC2-VPC. // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) +// We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic +// to a VPC. For more information, see Migrate from EC2-Classic to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -16012,9 +16015,8 @@ func (c *EC2) DescribeAddressesRequest(input *DescribeAddressesInput) (req *requ // a VPC. For more information, see Elastic IP Addresses (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) // in the Amazon Elastic Compute Cloud User Guide. // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) +// We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic +// to a VPC. For more information, see Migrate from EC2-Classic to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -21506,11 +21508,6 @@ func (c *EC2) DescribeInstancesRequest(input *DescribeInstancesInput) (req *requ // If you describe instances and specify only instance IDs that are in an unaffected // zone, the call works normally. // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) -// in the Amazon EC2 User Guide. -// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -25491,11 +25488,6 @@ func (c *EC2) DescribeReservedInstancesRequest(input *DescribeReservedInstancesI // For more information about Reserved Instances, see Reserved Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html) // in the Amazon EC2 User Guide. // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) -// in the Amazon Elastic Compute Cloud User Guide. -// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -25675,11 +25667,6 @@ func (c *EC2) DescribeReservedInstancesModificationsRequest(input *DescribeReser // For more information, see Modifying Reserved Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html) // in the Amazon EC2 User Guide. // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) -// in the Amazon Elastic Compute Cloud User Guide. -// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -25821,11 +25808,6 @@ func (c *EC2) DescribeReservedInstancesOfferingsRequest(input *DescribeReservedI // For more information, see Reserved Instance Marketplace (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) // in the Amazon EC2 User Guide. // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) -// in the Amazon Elastic Compute Cloud User Guide. -// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -26102,11 +26084,6 @@ func (c *EC2) DescribeScheduledInstanceAvailabilityRequest(input *DescribeSchedu // After you find a schedule that meets your needs, call PurchaseScheduledInstances // to purchase Scheduled Instances with that schedule. // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) -// in the Amazon Elastic Compute Cloud User Guide. -// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -26237,11 +26214,6 @@ func (c *EC2) DescribeScheduledInstancesRequest(input *DescribeScheduledInstance // // Describes the specified Scheduled Instances or all your Scheduled Instances. // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) -// in the Amazon Elastic Compute Cloud User Guide. -// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -26583,9 +26555,8 @@ func (c *EC2) DescribeSecurityGroupsRequest(input *DescribeSecurityGroupsInput) // VPC (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html) // in the Amazon Virtual Private Cloud User Guide. // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) +// We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic +// to a VPC. For more information, see Migrate from EC2-Classic to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -33252,9 +33223,8 @@ func (c *EC2) DisassociateAddressRequest(input *DisassociateAddressInput) (req * // a VPC. For more information, see Elastic IP Addresses (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) // in the Amazon Elastic Compute Cloud User Guide. // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) +// We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic +// to a VPC. For more information, see Migrate from EC2-Classic to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) // in the Amazon Elastic Compute Cloud User Guide. // // This is an idempotent operation. If you perform the operation more than once, @@ -39236,6 +39206,11 @@ func (c *EC2) ImportImageRequest(input *ImportImageInput) (req *request.Request, // Import single or multi-volume disk images or EBS snapshots into an Amazon // Machine Image (AMI). // +// Amazon Web Services VM Import/Export strongly recommends specifying a value +// for either the --license-type or --usage-operation parameter when you create +// a new VM Import task. This ensures your operating system is licensed appropriately +// and your billing is optimized. +// // For more information, see Importing a VM as an image using VM Import/Export // (https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html) // in the VM Import/Export User Guide. @@ -42314,17 +42289,16 @@ func (c *EC2) ModifyReservedInstancesRequest(input *ModifyReservedInstancesInput // ModifyReservedInstances API operation for Amazon Elastic Compute Cloud. // -// Modifies the Availability Zone, instance count, instance type, or network -// platform (EC2-Classic or EC2-VPC) of your Reserved Instances. The Reserved -// Instances to be modified must be identical, except for Availability Zone, -// network platform, and instance type. +// Modifies the configuration of your Reserved Instances, such as the Availability +// Zone, instance count, or instance type. The Reserved Instances to be modified +// must be identical, except for Availability Zone, network platform, and instance +// type. // // For more information, see Modifying Reserved Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html) // in the Amazon EC2 User Guide. // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) +// We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic +// to a VPC. For more information, see Migrate from EC2-Classic to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -44526,9 +44500,8 @@ func (c *EC2) MoveAddressToVpcRequest(input *MoveAddressToVpcInput) (req *reques // You cannot move an Elastic IP address that was originally allocated for use // in the EC2-VPC platform to the EC2-Classic platform. // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) +// We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic +// to a VPC. For more information, see Migrate from EC2-Classic to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -45015,6 +44988,10 @@ func (c *EC2) PurchaseReservedInstancesOfferingRequest(input *PurchaseReservedIn // and Reserved Instance Marketplace (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) // in the Amazon EC2 User Guide. // +// We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic +// to a VPC. For more information, see Migrate from EC2-Classic to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) +// in the Amazon Elastic Compute Cloud User Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -45086,6 +45063,8 @@ func (c *EC2) PurchaseScheduledInstancesRequest(input *PurchaseScheduledInstance // PurchaseScheduledInstances API operation for Amazon Elastic Compute Cloud. // +// You can no longer purchase Scheduled Instances. +// // Purchases the Scheduled Instances with the specified schedule. // // Scheduled Instances enable you to purchase Amazon EC2 compute capacity by @@ -45997,9 +45976,8 @@ func (c *EC2) ReleaseAddressRequest(input *ReleaseAddressInput) (req *request.Re // disassociates it from any instance that it's associated with. To disassociate // an Elastic IP address without releasing it, use DisassociateAddress. // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) +// We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic +// to a VPC. For more information, see Migrate from EC2-Classic to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) // in the Amazon Elastic Compute Cloud User Guide. // // [Nondefault VPC] You must use DisassociateAddress to disassociate the Elastic @@ -46909,9 +46887,8 @@ func (c *EC2) RequestSpotInstancesRequest(input *RequestSpotInstancesInput) (req // see Which is the best Spot request method to use? (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-best-practices.html#which-spot-request-method-to-use) // in the Amazon EC2 User Guide for Linux Instances. // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) +// We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic +// to a VPC. For more information, see Migrate from EC2-Classic to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) // in the Amazon EC2 User Guide for Linux Instances. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -47527,9 +47504,8 @@ func (c *EC2) RestoreAddressToClassicRequest(input *RestoreAddressToClassicInput // was originally allocated for use in EC2-VPC. The Elastic IP address must // not be associated with an instance or network interface. // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) +// We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic +// to a VPC. For more information, see Migrate from EC2-Classic to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -48095,9 +48071,8 @@ func (c *EC2) RevokeSecurityGroupIngressRequest(input *RevokeSecurityGroupIngres // Rule changes are propagated to instances within the security group as quickly // as possible. However, a small delay might occur. // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) +// We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic +// to a VPC. For more information, see Migrate from EC2-Classic to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -48224,9 +48199,8 @@ func (c *EC2) RunInstancesRequest(input *RunInstancesInput) (req *request.Reques // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_InstanceStraightToTerminated.html), // and Troubleshooting connecting to your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html). // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) +// We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic +// to a VPC. For more information, see Migrate from EC2-Classic to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) // in the Amazon EC2 User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -51794,7 +51768,8 @@ type AllocateIpamPoolCidrInput struct { // A description for the allocation. Description *string `type:"string"` - // Exclude a particular CIDR range from being returned by the pool. + // Exclude a particular CIDR range from being returned by the pool. Disallowed + // CIDRs are only allowed if using netmask length for allocation. DisallowedCidrs []*string `locationName:"DisallowedCidr" locationNameList:"item" type:"list"` // A check for whether you have the required permissions for the action without @@ -52377,6 +52352,13 @@ type AnalysisRouteTableRoute struct { // * EnableVgwRoutePropagation - The route was propagated by route propagation. Origin *string `locationName:"origin" type:"string"` + // The state. The following are the possible values: + // + // * active + // + // * blackhole + State *string `locationName:"state" type:"string"` + // The ID of a transit gateway. TransitGatewayId *string `locationName:"transitGatewayId" type:"string"` @@ -52450,6 +52432,12 @@ func (s *AnalysisRouteTableRoute) SetOrigin(v string) *AnalysisRouteTableRoute { return s } +// SetState sets the State field's value. +func (s *AnalysisRouteTableRoute) SetState(v string) *AnalysisRouteTableRoute { + s.State = &v + return s +} + // SetTransitGatewayId sets the TransitGatewayId field's value. func (s *AnalysisRouteTableRoute) SetTransitGatewayId(v string) *AnalysisRouteTableRoute { s.TransitGatewayId = &v @@ -52671,8 +52659,8 @@ type AssignIpv6AddressesInput struct { // use this option if specifying specific IPv6 addresses. Ipv6AddressCount *int64 `locationName:"ipv6AddressCount" type:"integer"` - // One or more specific IPv6 addresses to be assigned to the network interface. - // You can't use this option if you're specifying a number of IPv6 addresses. + // The IPv6 addresses to be assigned to the network interface. You can't use + // this option if you're specifying a number of IPv6 addresses. Ipv6Addresses []*string `locationName:"ipv6Addresses" locationNameList:"item" type:"list"` // The number of IPv6 prefixes that Amazon Web Services automatically assigns @@ -52823,8 +52811,8 @@ type AssignPrivateIpAddressesInput struct { // NetworkInterfaceId is a required field NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` - // One or more IP addresses to be assigned as a secondary private IP address - // to the network interface. You can't specify this parameter when also specifying + // The IP addresses to be assigned as a secondary private IP address to the + // network interface. You can't specify this parameter when also specifying // a number of secondary IP addresses. // // If you don't specify an IP address, Amazon EC2 automatically selects an IP @@ -55764,7 +55752,9 @@ type AuthorizeSecurityGroupIngressInput struct { GroupId *string `type:"string"` // [EC2-Classic, default VPC] The name of the security group. You must specify - // either the security group ID or the security group name in the request. + // either the security group ID or the security group name in the request. For + // security groups in a nondefault VPC, you must specify the security group + // ID. GroupName *string `type:"string"` // The sets of IP permissions. @@ -57689,6 +57679,50 @@ func (s *CancelledSpotInstanceRequest) SetState(v string) *CancelledSpotInstance return s } +// Information about instance capacity usage for a Capacity Reservation. +type CapacityAllocation struct { + _ struct{} `type:"structure"` + + // The usage type. used indicates that the instance capacity is in use by instances + // that are running in the Capacity Reservation. + AllocationType *string `locationName:"allocationType" type:"string" enum:"AllocationType"` + + // The amount of instance capacity associated with the usage. For example a + // value of 4 indicates that instance capacity for 4 instances is currently + // in use. + Count *int64 `locationName:"count" type:"integer"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CapacityAllocation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CapacityAllocation) GoString() string { + return s.String() +} + +// SetAllocationType sets the AllocationType field's value. +func (s *CapacityAllocation) SetAllocationType(v string) *CapacityAllocation { + s.AllocationType = &v + return s +} + +// SetCount sets the Count field's value. +func (s *CapacityAllocation) SetCount(v int64) *CapacityAllocation { + s.Count = &v + return s +} + // Describes a Capacity Reservation. type CapacityReservation struct { _ struct{} `type:"structure"` @@ -57703,6 +57737,9 @@ type CapacityReservation struct { // in the Capacity Reservation. AvailableInstanceCount *int64 `locationName:"availableInstanceCount" type:"integer"` + // Information about instance capacity usage. + CapacityAllocations []*CapacityAllocation `locationName:"capacityAllocationSet" locationNameList:"item" type:"list"` + // The Amazon Resource Name (ARN) of the Capacity Reservation. CapacityReservationArn *string `locationName:"capacityReservationArn" type:"string"` @@ -57855,6 +57892,12 @@ func (s *CapacityReservation) SetAvailableInstanceCount(v int64) *CapacityReserv return s } +// SetCapacityAllocations sets the CapacityAllocations field's value. +func (s *CapacityReservation) SetCapacityAllocations(v []*CapacityAllocation) *CapacityReservation { + s.CapacityAllocations = v + return s +} + // SetCapacityReservationArn sets the CapacityReservationArn field's value. func (s *CapacityReservation) SetCapacityReservationArn(v string) *CapacityReservation { s.CapacityReservationArn = &v @@ -66872,7 +66915,6 @@ func (s *CreateNetworkInsightsPathOutput) SetNetworkInsightsPath(v *NetworkInsig return s } -// Contains the parameters for CreateNetworkInterface. type CreateNetworkInterfaceInput struct { _ struct{} `type:"structure"` @@ -66898,32 +66940,50 @@ type CreateNetworkInterfaceInput struct { InterfaceType *string `type:"string" enum:"NetworkInterfaceCreationType"` // The number of IPv4 prefixes that Amazon Web Services automatically assigns - // to the network interface. You cannot use this option if you use the Ipv4 - // Prefixes option. + // to the network interface. + // + // You can't specify a count of IPv4 prefixes if you've specified one of the + // following: specific IPv4 prefixes, specific private IPv4 addresses, or a + // count of private IPv4 addresses. Ipv4PrefixCount *int64 `type:"integer"` - // One or more IPv4 prefixes assigned to the network interface. You cannot use - // this option if you use the Ipv4PrefixCount option. + // The IPv4 prefixes assigned to the network interface. + // + // You can't specify IPv4 prefixes if you've specified one of the following: + // a count of IPv4 prefixes, specific private IPv4 addresses, or a count of + // private IPv4 addresses. Ipv4Prefixes []*Ipv4PrefixSpecificationRequest `locationName:"Ipv4Prefix" locationNameList:"item" type:"list"` // The number of IPv6 addresses to assign to a network interface. Amazon EC2 - // automatically selects the IPv6 addresses from the subnet range. You can't - // use this option if specifying specific IPv6 addresses. If your subnet has - // the AssignIpv6AddressOnCreation attribute set to true, you can specify 0 - // to override this setting. + // automatically selects the IPv6 addresses from the subnet range. + // + // You can't specify a count of IPv6 addresses using this parameter if you've + // specified one of the following: specific IPv6 addresses, specific IPv6 prefixes, + // or a count of IPv6 prefixes. + // + // If your subnet has the AssignIpv6AddressOnCreation attribute set, you can + // override that setting by specifying 0 as the IPv6 address count. Ipv6AddressCount *int64 `locationName:"ipv6AddressCount" type:"integer"` - // One or more specific IPv6 addresses from the IPv6 CIDR block range of your - // subnet. You can't use this option if you're specifying a number of IPv6 addresses. + // The IPv6 addresses from the IPv6 CIDR block range of your subnet. + // + // You can't specify IPv6 addresses using this parameter if you've specified + // one of the following: a count of IPv6 addresses, specific IPv6 prefixes, + // or a count of IPv6 prefixes. Ipv6Addresses []*InstanceIpv6Address `locationName:"ipv6Addresses" locationNameList:"item" type:"list"` // The number of IPv6 prefixes that Amazon Web Services automatically assigns - // to the network interface. You cannot use this option if you use the Ipv6Prefixes - // option. + // to the network interface. + // + // You can't specify a count of IPv6 prefixes if you've specified one of the + // following: specific IPv6 prefixes, specific IPv6 addresses, or a count of + // IPv6 addresses. Ipv6PrefixCount *int64 `type:"integer"` - // One or more IPv6 prefixes assigned to the network interface. You cannot use - // this option if you use the Ipv6PrefixCount option. + // The IPv6 prefixes assigned to the network interface. + // + // You can't specify IPv6 prefixes if you've specified one of the following: + // a count of IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses. Ipv6Prefixes []*Ipv6PrefixSpecificationRequest `locationName:"Ipv6Prefix" locationNameList:"item" type:"list"` // The primary private IPv4 address of the network interface. If you don't specify @@ -66933,7 +66993,11 @@ type CreateNetworkInterfaceInput struct { // as primary). PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - // One or more private IPv4 addresses. + // The private IPv4 addresses. + // + // You can't specify private IPv4 addresses if you've specified one of the following: + // a count of private IPv4 addresses, specific IPv4 prefixes, or a count of + // IPv4 prefixes. PrivateIpAddresses []*PrivateIpAddressSpecification `locationName:"privateIpAddresses" locationNameList:"item" type:"list"` // The number of secondary private IPv4 addresses to assign to a network interface. @@ -66941,10 +67005,9 @@ type CreateNetworkInterfaceInput struct { // these IP addresses within the subnet's IPv4 CIDR range. You can't specify // this option and specify more than one private IP address using privateIpAddresses. // - // The number of IP addresses you can assign to a network interface varies by - // instance type. For more information, see IP Addresses Per ENI Per Instance - // Type (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI) - // in the Amazon Virtual Private Cloud User Guide. + // You can't specify a count of private IPv4 addresses if you've specified one + // of the following: specific private IPv4 addresses, specific IPv4 prefixes, + // or a count of IPv4 prefixes. SecondaryPrivateIpAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"` // The ID of the subnet to associate with the network interface. @@ -67083,7 +67146,6 @@ func (s *CreateNetworkInterfaceInput) SetTagSpecifications(v []*TagSpecification return s } -// Contains the output of CreateNetworkInterface. type CreateNetworkInterfaceOutput struct { _ struct{} `type:"structure"` @@ -76814,7 +76876,8 @@ type DeleteSecurityGroupInput struct { GroupId *string `type:"string"` // [EC2-Classic, default VPC] The name of the security group. You can specify - // either the security group name or the security group ID. + // either the security group name or the security group ID. For security groups + // in a nondefault VPC, you must specify the security group ID. GroupName *string `type:"string"` } @@ -85561,12 +85624,12 @@ type DescribeImagesInput struct { // Default: Describes all images available to you. ImageIds []*string `locationName:"ImageId" locationNameList:"ImageId" type:"list"` - // If true, all deprecated AMIs are included in the response. If false, no deprecated - // AMIs are included in the response. If no value is specified, the default - // value is false. + // Specifies whether to include deprecated AMIs. + // + // Default: No deprecated AMIs are included in the response. // // If you are the AMI owner, all deprecated AMIs appear in the response regardless - // of the value (true or false) that you set for this parameter. + // of what you specify for this parameter. IncludeDeprecated *bool `type:"boolean"` // Scopes the results to images with the specified owners. You can specify a @@ -90300,10 +90363,10 @@ type DescribeNetworkInsightsAnalysesInput struct { // The filters. The following are the possible values: // - // * PathFound - A Boolean value that indicates whether a feasible path is - // found. + // * path-found - A Boolean value that indicates whether a feasible path + // is found. // - // * Status - The status of the analysis (running | succeeded | failed). + // * status - The status of the analysis (running | succeeded | failed). Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // The maximum number of results to return with a single call. To retrieve the @@ -90452,15 +90515,13 @@ type DescribeNetworkInsightsPathsInput struct { // The filters. The following are the possible values: // - // * Destination - The ID of the resource. + // * destination - The ID of the resource. // - // * DestinationPort - The destination port. + // * destination-port - The destination port. // - // * Name - The path name. + // * protocol - The protocol. // - // * Protocol - The protocol. - // - // * Source - The ID of the resource. + // * source - The ID of the resource. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // The maximum number of results to return with a single call. To retrieve the @@ -90738,7 +90799,7 @@ type DescribeNetworkInterfacePermissionsInput struct { // this parameter is not specified, up to 50 results are returned by default. MaxResults *int64 `min:"5" type:"integer"` - // One or more network interface permission IDs. + // The network interface permission IDs. NetworkInterfacePermissionIds []*string `locationName:"NetworkInterfacePermissionId" type:"list"` // The token to request the next page of results. @@ -90968,7 +91029,7 @@ type DescribeNetworkInterfacesInput struct { // parameter in the same request. MaxResults *int64 `min:"5" type:"integer"` - // One or more network interface IDs. + // The network interface IDs. // // Default: Describes all your network interfaces. NetworkInterfaceIds []*string `locationName:"NetworkInterfaceId" locationNameList:"item" type:"list"` @@ -94944,10 +95005,21 @@ type DescribeSubnetsInput struct { // must exactly match the subnet's CIDR block for information to be returned // for the subnet. You can also use cidr or cidrBlock as the filter names. // + // * customer-owned-ipv4-pool - The customer-owned IPv4 address pool associated + // with the subnet. + // // * default-for-az - Indicates whether this is the default subnet for the // Availability Zone (true | false). You can also use defaultForAz as the // filter name. // + // * enable-dns64 - Indicates whether DNS queries made to the Amazon-provided + // DNS Resolver in this subnet should return synthetic IPv6 addresses for + // IPv4-only destinations. + // + // * enable-lni-at-device-index - Indicates the device position for local + // network interfaces in this subnet. For example, 1 indicates local network + // interfaces in this subnet are the secondary network interface (eth1). + // // * ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated // with the subnet. // @@ -94960,10 +95032,31 @@ type DescribeSubnetsInput struct { // * ipv6-native - Indicates whether this is an IPv6 only subnet (true | // false). // + // * map-customer-owned-ip-on-launch - Indicates whether a network interface + // created in this subnet (including a network interface created by RunInstances) + // receives a customer-owned IPv4 address. + // + // * map-public-ip-on-launch - Indicates whether instances launched in this + // subnet receive a public IPv4 address. + // // * outpost-arn - The Amazon Resource Name (ARN) of the Outpost. // // * owner-id - The ID of the Amazon Web Services account that owns the subnet. // + // * private-dns-name-options-on-launch.hostname-type - The type of hostname + // to assign to instances in the subnet at launch. For IPv4-only and dual-stack + // (IPv4 and IPv6) subnets, an instance DNS name can be based on the instance + // IPv4 address (ip-name) or the instance ID (resource-name). For IPv6 only + // subnets, an instance DNS name must be based on the instance ID (resource-name). + // + // * private-dns-name-options-on-launch.enable-resource-name-dns-a-record + // - Indicates whether to respond to DNS queries for instance hostnames with + // DNS A records. + // + // * private-dns-name-options-on-launch.enable-resource-name-dns-aaaa-record + // - Indicates whether to respond to DNS queries for instance hostnames with + // DNS AAAA records. + // // * state - The state of the subnet (pending | available). // // * subnet-arn - The Amazon Resource Name (ARN) of the subnet. @@ -103036,7 +103129,7 @@ type EbsBlockDevice struct { // RunInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html), // RequestSpotFleet (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotFleet.html), // and RequestSpotInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html). - KmsKeyId *string `type:"string"` + KmsKeyId *string `locationName:"kmsKeyId" type:"string"` // The ARN of the Outpost on which the snapshot is stored. // @@ -105438,6 +105531,12 @@ type Explanation struct { // The component. Component *AnalysisComponent `locationName:"component" type:"structure"` + // The Amazon Web Services account for the component. + ComponentAccount *string `locationName:"componentAccount" type:"string"` + + // The Region for the component. + ComponentRegion *string `locationName:"componentRegion" type:"string"` + // The customer gateway. CustomerGateway *AnalysisComponent `locationName:"customerGateway" type:"structure"` @@ -105635,6 +105734,18 @@ func (s *Explanation) SetComponent(v *AnalysisComponent) *Explanation { return s } +// SetComponentAccount sets the ComponentAccount field's value. +func (s *Explanation) SetComponentAccount(v string) *Explanation { + s.ComponentAccount = &v + return s +} + +// SetComponentRegion sets the ComponentRegion field's value. +func (s *Explanation) SetComponentRegion(v string) *Explanation { + s.ComponentRegion = &v + return s +} + // SetCustomerGateway sets the CustomerGateway field's value. func (s *Explanation) SetCustomerGateway(v *AnalysisComponent) *Explanation { s.CustomerGateway = v @@ -107753,12 +107864,12 @@ type FleetLaunchTemplateOverrides struct { // The attributes for the instance types. When you specify instance attributes, // Amazon EC2 will identify instance types with those attributes. // - // If you specify InstanceRequirements, you can't specify InstanceTypes. + // If you specify InstanceRequirements, you can't specify InstanceType. InstanceRequirements *InstanceRequirements `locationName:"instanceRequirements" type:"structure"` // The instance type. // - // If you specify InstanceTypes, you can't specify InstanceRequirements. + // If you specify InstanceType, you can't specify InstanceRequirements. InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` // The maximum price per unit hour that you are willing to pay for a Spot Instance. @@ -107873,12 +107984,12 @@ type FleetLaunchTemplateOverridesRequest struct { // The attributes for the instance types. When you specify instance attributes, // Amazon EC2 will identify instance types with those attributes. // - // If you specify InstanceRequirements, you can't specify InstanceTypes. + // If you specify InstanceRequirements, you can't specify InstanceType. InstanceRequirements *InstanceRequirementsRequest `type:"structure"` // The instance type. // - // If you specify InstanceTypes, you can't specify InstanceRequirements. + // If you specify InstanceType, you can't specify InstanceRequirements. InstanceType *string `type:"string" enum:"InstanceType"` // The maximum price per unit hour that you are willing to pay for a Spot Instance. @@ -115479,10 +115590,11 @@ type ImportImageInput struct { // The license type to be used for the Amazon Machine Image (AMI) after importing. // - // By default, we detect the source-system operating system (OS) and apply the - // appropriate license. Specify AWS to replace the source-system license with - // an Amazon Web Services license, if appropriate. Specify BYOL to retain the - // source-system license, if appropriate. + // Specify AWS to replace the source-system license with an Amazon Web Services + // license or BYOL to retain the source-system license. Leaving this parameter + // undefined is the same as choosing AWS when importing a Windows Server operating + // system, and the same as choosing BYOL when importing a Windows client operating + // system (such as Windows 10) or a Linux operating system. // // To use BYOL, you must have existing licenses with rights to use these licenses // in a third party cloud, such as Amazon Web Services. For more information, @@ -118703,12 +118815,12 @@ type InstanceMetadataOptionsRequest struct { // The state of token usage for your instance metadata requests. // // If the state is optional, you can choose to retrieve instance metadata with - // or without a signed token header on your request. If you retrieve the IAM - // role credentials without a token, the version 1.0 role credentials are returned. - // If you retrieve the IAM role credentials using a valid signed token, the + // or without a session token on your request. If you retrieve the IAM role + // credentials without a token, the version 1.0 role credentials are returned. + // If you retrieve the IAM role credentials using a valid session token, the // version 2.0 role credentials are returned. // - // If the state is required, you must send a signed token header with any instance + // If the state is required, you must send a session token with any instance // metadata retrieval requests. In this state, retrieving the IAM role credentials // always returns the version 2.0 credentials; the version 1.0 credentials are // not available. @@ -118798,13 +118910,13 @@ type InstanceMetadataOptionsResponse struct { // The state of token usage for your instance metadata requests. // // If the state is optional, you can choose to retrieve instance metadata with - // or without a signed token header on your request. If you retrieve the IAM - // role credentials without a token, the version 1.0 role credentials are returned. - // If you retrieve the IAM role credentials using a valid signed token, the + // or without a session token on your request. If you retrieve the IAM role + // credentials without a token, the version 1.0 role credentials are returned. + // If you retrieve the IAM role credentials using a valid session token, the // version 2.0 role credentials are returned. // - // If the state is required, you must send a signed token header with any instance - // metadata retrieval requests. In this state, retrieving the IAM role credential + // If the state is required, you must send a session token with any instance + // metadata retrieval requests. In this state, retrieving the IAM role credentials // always returns the version 2.0 credentials; the version 1.0 credentials are // not available. // @@ -118934,7 +119046,7 @@ type InstanceNetworkInterface struct { // The description. Description *string `locationName:"description" type:"string"` - // One or more security groups. + // The security groups. Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` // The type of network interface. @@ -118945,7 +119057,7 @@ type InstanceNetworkInterface struct { // The IPv4 delegated prefixes that are assigned to the network interface. Ipv4Prefixes []*InstanceIpv4Prefix `locationName:"ipv4PrefixSet" locationNameList:"item" type:"list"` - // One or more IPv6 addresses associated with the network interface. + // The IPv6 addresses associated with the network interface. Ipv6Addresses []*InstanceIpv6Address `locationName:"ipv6AddressesSet" locationNameList:"item" type:"list"` // The IPv6 delegated prefixes that are assigned to the network interface. @@ -118966,7 +119078,7 @@ type InstanceNetworkInterface struct { // The IPv4 address of the network interface within the subnet. PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - // One or more private IPv4 addresses associated with the network interface. + // The private IPv4 addresses associated with the network interface. PrivateIpAddresses []*InstancePrivateIpAddress `locationName:"privateIpAddressesSet" locationNameList:"item" type:"list"` // Indicates whether source/destination checking is enabled. @@ -119301,8 +119413,8 @@ type InstanceNetworkInterfaceSpecification struct { // network interface. You cannot use this option if you use the Ipv4Prefix option. Ipv4PrefixCount *int64 `type:"integer"` - // One or more IPv4 delegated prefixes to be assigned to the network interface. - // You cannot use this option if you use the Ipv4PrefixCount option. + // The IPv4 delegated prefixes to be assigned to the network interface. You + // cannot use this option if you use the Ipv4PrefixCount option. Ipv4Prefixes []*Ipv4PrefixSpecificationRequest `locationName:"Ipv4Prefix" locationNameList:"item" type:"list"` // A number of IPv6 addresses to assign to the network interface. Amazon EC2 @@ -119312,18 +119424,18 @@ type InstanceNetworkInterfaceSpecification struct { // of instances to launch. Ipv6AddressCount *int64 `locationName:"ipv6AddressCount" type:"integer"` - // One or more IPv6 addresses to assign to the network interface. You cannot - // specify this option and the option to assign a number of IPv6 addresses in - // the same request. You cannot specify this option if you've specified a minimum - // number of instances to launch. + // The IPv6 addresses to assign to the network interface. You cannot specify + // this option and the option to assign a number of IPv6 addresses in the same + // request. You cannot specify this option if you've specified a minimum number + // of instances to launch. Ipv6Addresses []*InstanceIpv6Address `locationName:"ipv6AddressesSet" queryName:"Ipv6Addresses" locationNameList:"item" type:"list"` // The number of IPv6 delegated prefixes to be automatically assigned to the // network interface. You cannot use this option if you use the Ipv6Prefix option. Ipv6PrefixCount *int64 `type:"integer"` - // One or more IPv6 delegated prefixes to be assigned to the network interface. - // You cannot use this option if you use the Ipv6PrefixCount option. + // The IPv6 delegated prefixes to be assigned to the network interface. You + // cannot use this option if you use the Ipv6PrefixCount option. Ipv6Prefixes []*Ipv6PrefixSpecificationRequest `locationName:"Ipv6Prefix" locationNameList:"item" type:"list"` // The index of the network card. Some instance types support multiple network @@ -119348,10 +119460,9 @@ type InstanceNetworkInterfaceSpecification struct { // request. PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - // One or more private IPv4 addresses to assign to the network interface. Only - // one private IPv4 address can be designated as primary. You cannot specify - // this option if you're launching more than one instance in a RunInstances - // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html) + // The private IPv4 addresses to assign to the network interface. Only one private + // IPv4 address can be designated as primary. You cannot specify this option + // if you're launching more than one instance in a RunInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html) // request. PrivateIpAddresses []*PrivateIpAddressSpecification `locationName:"privateIpAddressesSet" queryName:"PrivateIpAddresses" locationNameList:"item" type:"list"` @@ -119562,12 +119673,12 @@ func (s *InstancePrivateIpAddress) SetPrivateIpAddress(v string) *InstancePrivat // The attributes for the instance types. When you specify instance attributes, // Amazon EC2 will identify instance types with these attributes. // -// When you specify multiple parameters, you get instance types that satisfy -// all of the specified parameters. If you specify multiple values for a parameter, +// When you specify multiple attributes, you get instance types that satisfy +// all of the specified attributes. If you specify multiple values for an attribute, // you get instance types that satisfy any of the specified values. // -// You must specify VCpuCount and MemoryMiB. All other parameters are optional. -// Any unspecified optional parameter is set to its default. +// You must specify VCpuCount and MemoryMiB. All other attributes are optional. +// Any unspecified optional attribute is set to its default. // // For more information, see Attribute-based instance type selection for EC2 // Fleet (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-selection.html), @@ -119614,6 +119725,11 @@ type InstanceRequirements struct { // // * For instance types with Xilinx VU9P FPGAs, specify vu9p. // + // * For instance types with Amazon Web Services Inferentia chips, specify + // inferentia. + // + // * For instance types with NVIDIA GRID K520 GPUs, specify k520. + // // Default: Any accelerator AcceleratorNames []*string `locationName:"acceleratorNameSet" locationNameList:"item" type:"list" enum:"AcceleratorName"` @@ -119679,10 +119795,11 @@ type InstanceRequirements struct { // Default: Any manufacturer CpuManufacturers []*string `locationName:"cpuManufacturerSet" locationNameList:"item" type:"list" enum:"CpuManufacturer"` - // The instance types to exclude. You can use strings with one or more wild - // cards, represented by an asterisk (*), to exclude an instance type, size, - // or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, - // *3*. + // The instance types to exclude. + // + // You can use strings with one or more wild cards, represented by an asterisk + // (*), to exclude an instance type, size, or generation. The following are + // examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*. // // For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance // family, which includes all C5a and C5n instance types. If you specify m5a.*, @@ -119944,12 +120061,12 @@ func (s *InstanceRequirements) SetVCpuCount(v *VCpuCountRange) *InstanceRequirem // The attributes for the instance types. When you specify instance attributes, // Amazon EC2 will identify instance types with these attributes. // -// When you specify multiple parameters, you get instance types that satisfy -// all of the specified parameters. If you specify multiple values for a parameter, +// When you specify multiple attributes, you get instance types that satisfy +// all of the specified attributes. If you specify multiple values for an attribute, // you get instance types that satisfy any of the specified values. // -// You must specify VCpuCount and MemoryMiB. All other parameters are optional. -// Any unspecified optional parameter is set to its default. +// You must specify VCpuCount and MemoryMiB. All other attributes are optional. +// Any unspecified optional attribute is set to its default. // // For more information, see Attribute-based instance type selection for EC2 // Fleet (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-selection.html), @@ -119996,6 +120113,11 @@ type InstanceRequirementsRequest struct { // // * For instance types with Xilinx VU9P FPGAs, specify vu9p. // + // * For instance types with Amazon Web Services Inferentia chips, specify + // inferentia. + // + // * For instance types with NVIDIA GRID K520 GPUs, specify k520. + // // Default: Any accelerator AcceleratorNames []*string `locationName:"AcceleratorName" locationNameList:"item" type:"list" enum:"AcceleratorName"` @@ -120061,10 +120183,11 @@ type InstanceRequirementsRequest struct { // Default: Any manufacturer CpuManufacturers []*string `locationName:"CpuManufacturer" locationNameList:"item" type:"list" enum:"CpuManufacturer"` - // The instance types to exclude. You can use strings with one or more wild - // cards, represented by an asterisk (*), to exclude an instance family, type, - // size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, - // r*, *3*. + // The instance types to exclude. + // + // You can use strings with one or more wild cards, represented by an asterisk + // (*), to exclude an instance family, type, size, or generation. The following + // are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*. // // For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance // family, which includes all C5a and C5n instance types. If you specify m5a.*, @@ -120431,6 +120554,11 @@ type InstanceSpecification struct { // Excludes the root volume from being snapshotted. ExcludeBootVolume *bool `type:"boolean"` + // The IDs of the data (non-root) volumes to exclude from the multi-volume snapshot + // set. If you specify the ID of the root volume, the request fails. To exclude + // the root volume, use ExcludeBootVolume. + // + // You can specify up to 40 volume IDs per request. ExcludeDataVolumeIds []*string `locationName:"ExcludeDataVolumeId" locationNameList:"VolumeId" type:"list"` // The instance to specify which volumes should be snapshotted. @@ -122856,7 +122984,7 @@ func (s *Ipv4PrefixSpecificationRequest) SetIpv4Prefix(v string) *Ipv4PrefixSpec type Ipv4PrefixSpecificationResponse struct { _ struct{} `type:"structure"` - // One or more IPv4 delegated prefixes assigned to the network interface. + // The IPv4 delegated prefixes assigned to the network interface. Ipv4Prefix *string `locationName:"ipv4Prefix" type:"string"` } @@ -123084,7 +123212,7 @@ func (s *Ipv6PrefixSpecificationRequest) SetIpv6Prefix(v string) *Ipv6PrefixSpec type Ipv6PrefixSpecificationResponse struct { _ struct{} `type:"structure"` - // One or more IPv6 delegated prefixes assigned to the network interface. + // The IPv6 delegated prefixes assigned to the network interface. Ipv6Prefix *string `locationName:"ipv6Prefix" type:"string"` } @@ -123410,11 +123538,6 @@ func (s *LaunchPermissionModifications) SetRemove(v []*LaunchPermission) *Launch } // Describes the launch specification for an instance. -// -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) -// in the Amazon EC2 User Guide for Linux Instances. type LaunchSpecification struct { _ struct{} `type:"structure"` @@ -125475,7 +125598,7 @@ type LaunchTemplateOverrides struct { // these instance types, in the same way as when you specify a list of instance // types. // - // If you specify InstanceRequirements, you can't specify InstanceTypes. + // If you specify InstanceRequirements, you can't specify InstanceType. InstanceRequirements *InstanceRequirements `locationName:"instanceRequirements" type:"structure"` // The instance type. @@ -129577,7 +129700,12 @@ func (s ModifyImageAttributeOutput) GoString() string { type ModifyInstanceAttributeInput struct { _ struct{} `type:"structure"` - // The name of the attribute. + // The name of the attribute to modify. + // + // You can modify the following attributes only: disableApiTermination | instanceType + // | kernel | ramdisk | instanceInitiatedShutdownBehavior | blockDeviceMapping + // | userData | sourceDestCheck | groupSet | ebsOptimized | sriovNetSupport + // | enaSupport | nvmeSupport | disableApiStop | enclaveOptions Attribute *string `locationName:"attribute" type:"string" enum:"InstanceAttributeName"` // Modifies the DeleteOnTermination attribute for volumes that are currently @@ -130438,13 +130566,13 @@ type ModifyInstanceMetadataOptionsInput struct { // is not specified in the request, the default state is optional. // // If the state is optional, you can choose to retrieve instance metadata with - // or without a signed token header on your request. If you retrieve the IAM - // role credentials without a token, the version 1.0 role credentials are returned. - // If you retrieve the IAM role credentials using a valid signed token, the + // or without a session token on your request. If you retrieve the IAM role + // credentials without a token, the version 1.0 role credentials are returned. + // If you retrieve the IAM role credentials using a valid session token, the // version 2.0 role credentials are returned. // - // If the state is required, you must send a signed token header with any instance - // metadata retrieval requests. In this state, retrieving the IAM role credential + // If the state is required, you must send a session token with any instance + // metadata retrieval requests. In this state, retrieving the IAM role credentials // always returns the version 2.0 credentials; the version 1.0 credentials are // not available. HttpTokens *string `type:"string" enum:"HttpTokensState"` @@ -133216,6 +133344,10 @@ type ModifyTransitGatewayOptions struct { // A private Autonomous System Number (ASN) for the Amazon side of a BGP session. // The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 // for 32-bit ASNs. + // + // The modify ASN operation is not allowed on a transit gateway with active + // BGP sessions. You must first delete all transit gateway attachments that + // have BGP configured prior to modifying the ASN on the transit gateway. AmazonSideAsn *int64 `type:"long"` // The ID of the default association route table. @@ -136020,9 +136152,8 @@ func (s *MoveByoipCidrToIpamOutput) SetByoipCidr(v *ByoipCidr) *MoveByoipCidrToI // Describes the status of a moving Elastic IP address. // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) +// We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic +// to a VPC. For more information, see Migrate from EC2-Classic to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) // in the Amazon Elastic Compute Cloud User Guide. type MovingAddressStatus struct { _ struct{} `type:"structure"` @@ -138439,6 +138570,12 @@ type PathComponent struct { // The destination VPC. DestinationVpc *AnalysisComponent `locationName:"destinationVpc" type:"structure"` + // The load balancer listener. + ElasticLoadBalancerListener *AnalysisComponent `locationName:"elasticLoadBalancerListener" type:"structure"` + + // The explanation codes. + Explanations []*Explanation `locationName:"explanationSet" locationNameList:"item" type:"list"` + // The inbound header. InboundHeader *AnalysisPacketHeader `locationName:"inboundHeader" type:"structure"` @@ -138518,6 +138655,18 @@ func (s *PathComponent) SetDestinationVpc(v *AnalysisComponent) *PathComponent { return s } +// SetElasticLoadBalancerListener sets the ElasticLoadBalancerListener field's value. +func (s *PathComponent) SetElasticLoadBalancerListener(v *AnalysisComponent) *PathComponent { + s.ElasticLoadBalancerListener = v + return s +} + +// SetExplanations sets the Explanations field's value. +func (s *PathComponent) SetExplanations(v []*Explanation) *PathComponent { + s.Explanations = v + return s +} + // SetInboundHeader sets the InboundHeader field's value. func (s *PathComponent) SetInboundHeader(v *AnalysisPacketHeader) *PathComponent { s.InboundHeader = v @@ -140327,7 +140476,7 @@ type PrivateIpAddressSpecification struct { // Only one IPv4 address can be designated as primary. Primary *bool `locationName:"primary" type:"boolean"` - // The private IPv4 addresses. + // The private IPv4 address. PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` } @@ -144553,13 +144702,13 @@ type RequestLaunchTemplateData struct { // The attributes for the instance types. When you specify instance attributes, // Amazon EC2 will identify instance types with these attributes. // - // If you specify InstanceRequirements, you can't specify InstanceTypes. + // If you specify InstanceRequirements, you can't specify InstanceType. InstanceRequirements *InstanceRequirementsRequest `type:"structure"` // The instance type. For more information, see Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) // in the Amazon Elastic Compute Cloud User Guide. // - // If you specify InstanceTypes, you can't specify InstanceRequirements. + // If you specify InstanceType, you can't specify InstanceRequirements. InstanceType *string `type:"string" enum:"InstanceType"` // The ID of the kernel. @@ -145435,11 +145584,6 @@ func (s *RequestSpotLaunchSpecification) SetUserData(v string) *RequestSpotLaunc // Describes a launch request for one or more instances, and includes owner, // requester, and security group information that applies to all instances in // the launch request. -// -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) -// in the Amazon EC2 User Guide. type Reservation struct { _ struct{} `type:"structure"` @@ -145949,11 +146093,6 @@ func (s *ReservedInstances) SetUsagePrice(v float64) *ReservedInstances { } // Describes the configuration settings for the modified Reserved Instances. -// -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) -// in the Amazon Elastic Compute Cloud User Guide. type ReservedInstancesConfiguration struct { _ struct{} `type:"structure"` @@ -148509,7 +148648,9 @@ type RevokeSecurityGroupIngressInput struct { GroupId *string `type:"string"` // [EC2-Classic, default VPC] The name of the security group. You must specify - // either the security group ID or the security group name in the request. + // either the security group ID or the security group name in the request. For + // security groups in a nondefault VPC, you must specify the security group + // ID. GroupName *string `type:"string"` // The sets of IP permissions. You can't specify a source security group and @@ -149945,11 +150086,6 @@ func (s *S3Storage) SetUploadPolicySignature(v string) *S3Storage { } // Describes a Scheduled Instance. -// -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) -// in the Amazon Elastic Compute Cloud User Guide. type ScheduledInstance struct { _ struct{} `type:"structure"` @@ -150108,11 +150244,6 @@ func (s *ScheduledInstance) SetTotalScheduledInstanceHours(v int64) *ScheduledIn } // Describes a schedule that is available for your Scheduled Instances. -// -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) -// in the Amazon Elastic Compute Cloud User Guide. type ScheduledInstanceAvailability struct { _ struct{} `type:"structure"` @@ -153539,11 +153670,6 @@ func (s *SpotDatafeedSubscription) SetState(v string) *SpotDatafeedSubscription // include On-Demand capacity in your fleet request or want to specify an EFA // network device, you can't use SpotFleetLaunchSpecification; you must use // LaunchTemplateConfig (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_LaunchTemplateConfig.html). -// -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) -// in the Amazon EC2 User Guide for Linux Instances. type SpotFleetLaunchSpecification struct { _ struct{} `type:"structure"` @@ -153575,7 +153701,7 @@ type SpotFleetLaunchSpecification struct { // The attributes for the instance types. When you specify instance attributes, // Amazon EC2 will identify instance types with those attributes. // - // If you specify InstanceRequirements, you can't specify InstanceTypes. + // If you specify InstanceRequirements, you can't specify InstanceType. InstanceRequirements *InstanceRequirements `locationName:"instanceRequirements" type:"structure"` // The instance type. @@ -153892,26 +154018,34 @@ func (s *SpotFleetRequestConfig) SetTags(v []*Tag) *SpotFleetRequestConfig { type SpotFleetRequestConfigData struct { _ struct{} `type:"structure"` - // Indicates how to allocate the target Spot Instance capacity across the Spot - // Instance pools specified by the Spot Fleet request. + // The strategy that determines how to allocate the target Spot Instance capacity + // across the Spot Instance pools specified by the Spot Fleet launch configuration. + // For more information, see Allocation strategies for Spot Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-allocation-strategy.html) + // in the Amazon EC2 User Guide for Linux Instances. // - // If the allocation strategy is lowestPrice, Spot Fleet launches instances - // from the Spot Instance pools with the lowest price. This is the default allocation - // strategy. + // lowestPrice - Spot Fleet launches instances from the lowest-price Spot Instance + // pool that has available capacity. If the cheapest pool doesn't have available + // capacity, the Spot Instances come from the next cheapest pool that has available + // capacity. If a pool runs out of capacity before fulfilling your desired capacity, + // Spot Fleet will continue to fulfill your request by drawing from the next + // cheapest pool. To ensure that your desired capacity is met, you might receive + // Spot Instances from several pools. // - // If the allocation strategy is diversified, Spot Fleet launches instances - // from all the Spot Instance pools that you specify. + // diversified - Spot Fleet launches instances from all of the Spot Instance + // pools that you specify. // - // If the allocation strategy is capacityOptimized (recommended), Spot Fleet - // launches instances from Spot Instance pools with optimal capacity for the - // number of instances that are launching. To give certain instance types a - // higher chance of launching first, use capacityOptimizedPrioritized. Set a - // priority for each instance type by using the Priority parameter for LaunchTemplateOverrides. - // You can assign the same priority to different LaunchTemplateOverrides. EC2 - // implements the priorities on a best-effort basis, but optimizes for capacity - // first. capacityOptimizedPrioritized is supported only if your Spot Fleet - // uses a launch template. Note that if the OnDemandAllocationStrategy is set - // to prioritized, the same priority is applied when fulfilling On-Demand capacity. + // capacityOptimized (recommended) - Spot Fleet launches instances from Spot + // Instance pools with optimal capacity for the number of instances that are + // launching. To give certain instance types a higher chance of launching first, + // use capacityOptimizedPrioritized. Set a priority for each instance type by + // using the Priority parameter for LaunchTemplateOverrides. You can assign + // the same priority to different LaunchTemplateOverrides. EC2 implements the + // priorities on a best-effort basis, but optimizes for capacity first. capacityOptimizedPrioritized + // is supported only if your Spot Fleet uses a launch template. Note that if + // the OnDemandAllocationStrategy is set to prioritized, the same priority is + // applied when fulfilling On-Demand capacity. + // + // Default: lowestPrice AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"AllocationStrategy"` // A unique, case-sensitive identifier that you provide to ensure the idempotency @@ -154295,7 +154429,7 @@ type SpotFleetTagSpecification struct { // The type of resource. Currently, the only resource type that is supported // is instance. To tag the Spot Fleet request on creation, use the TagSpecifications - // parameter in SpotFleetRequestConfigData (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetRequestConfigData.html). + // parameter in SpotFleetRequestConfigData (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetRequestConfigData.html) . ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` // The tags. @@ -154769,10 +154903,17 @@ type SpotOptions struct { _ struct{} `type:"structure"` // The strategy that determines how to allocate the target Spot Instance capacity - // across the Spot Instance pools specified by the EC2 Fleet. + // across the Spot Instance pools specified by the EC2 Fleet launch configuration. + // For more information, see Allocation strategies for Spot Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html) + // in the Amazon EC2 User Guide. // - // lowest-price - EC2 Fleet launches instances from the Spot Instance pools - // with the lowest price. + // lowest-price - EC2 Fleet launches instances from the lowest-price Spot Instance + // pool that has available capacity. If the cheapest pool doesn't have available + // capacity, the Spot Instances come from the next cheapest pool that has available + // capacity. If a pool runs out of capacity before fulfilling your desired capacity, + // EC2 Fleet will continue to fulfill your request by drawing from the next + // cheapest pool. To ensure that your desired capacity is met, you might receive + // Spot Instances from several pools. // // diversified - EC2 Fleet launches instances from all of the Spot Instance // pools that you specify. @@ -154917,10 +155058,17 @@ type SpotOptionsRequest struct { _ struct{} `type:"structure"` // The strategy that determines how to allocate the target Spot Instance capacity - // across the Spot Instance pools specified by the EC2 Fleet. + // across the Spot Instance pools specified by the EC2 Fleet launch configuration. + // For more information, see Allocation strategies for Spot Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html) + // in the Amazon EC2 User Guide. // - // lowest-price - EC2 Fleet launches instances from the Spot Instance pools - // with the lowest price. + // lowest-price - EC2 Fleet launches instances from the lowest-price Spot Instance + // pool that has available capacity. If the cheapest pool doesn't have available + // capacity, the Spot Instances come from the next cheapest pool that has available + // capacity. If a pool runs out of capacity before fulfilling your desired capacity, + // EC2 Fleet will continue to fulfill your request by drawing from the next + // cheapest pool. To ensure that your desired capacity is met, you might receive + // Spot Instances from several pools. // // diversified - EC2 Fleet launches instances from all of the Spot Instance // pools that you specify. @@ -161459,7 +161607,7 @@ type UnassignIpv6AddressesInput struct { // The IPv6 addresses to unassign from the network interface. Ipv6Addresses []*string `locationName:"ipv6Addresses" locationNameList:"item" type:"list"` - // One or more IPv6 prefixes to unassign from the network interface. + // The IPv6 prefixes to unassign from the network interface. Ipv6Prefixes []*string `locationName:"Ipv6Prefix" locationNameList:"item" type:"list"` // The ID of the network interface. @@ -162032,7 +162180,9 @@ type UpdateSecurityGroupRuleDescriptionsIngressInput struct { GroupId *string `type:"string"` // [EC2-Classic, default VPC] The name of the security group. You must specify - // either the security group ID or the security group name in the request. + // either the security group ID or the security group name in the request. For + // security groups in a nondefault VPC, you must specify the security group + // ID. GroupName *string `type:"string"` // The IP permissions for the security group rule. You must specify either IP @@ -162241,9 +162391,8 @@ func (s *UserData) SetData(v string) *UserData { // Describes a security group and Amazon Web Services account ID pair. // -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic -// to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) +// We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic +// to a VPC. For more information, see Migrate from EC2-Classic to a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) // in the Amazon Elastic Compute Cloud User Guide. type UserIdGroupPair struct { _ struct{} `type:"structure"` @@ -165713,6 +165862,18 @@ func AllocationStrategy_Values() []string { } } +const ( + // AllocationTypeUsed is a AllocationType enum value + AllocationTypeUsed = "used" +) + +// AllocationType_Values returns all elements of the AllocationType enum +func AllocationType_Values() []string { + return []string{ + AllocationTypeUsed, + } +} + const ( // AllowsMultipleInstanceTypesOn is a AllowsMultipleInstanceTypes enum value AllowsMultipleInstanceTypesOn = "on" diff --git a/vendor/github.com/digitalocean/godo/CHANGELOG.md b/vendor/github.com/digitalocean/godo/CHANGELOG.md index 5459d60c59..c13feadac4 100644 --- a/vendor/github.com/digitalocean/godo/CHANGELOG.md +++ b/vendor/github.com/digitalocean/godo/CHANGELOG.md @@ -1,5 +1,21 @@ # Change Log +## [v1.85.0] - 2022-09-21 + +- #560 - @andrewsomething - Bump golang.org/x/net (fixes: #557). +- #559 - @kamaln7 - apps: update component spec interfaces +- #555 - @kamaln7 - apps: add accessor methods and spec helpers +- #556 - @kamaln7 - update CI for go 1.18 & 1.19 + +## [v1.84.1] - 2022-09-16 + +- #554 - @andrewsomething - reserved IPs: project_id should have omitempty in create req. + +## [v1.84.0] - 2022-09-16 + +- #552 - @andrewsomething - reserved IPs: Expose project_id and locked attributes. +- #549 - @rpmoore - adding the replica id to the database replica model + ## [v1.83.0] - 2022-08-10 - #546 - @DWizGuy58 - Add support for database options diff --git a/vendor/github.com/digitalocean/godo/apps.gen.go b/vendor/github.com/digitalocean/godo/apps.gen.go index 2889358751..bb12933d39 100644 --- a/vendor/github.com/digitalocean/godo/apps.gen.go +++ b/vendor/github.com/digitalocean/godo/apps.gen.go @@ -1,5 +1,4 @@ -// Code generated by golang.org/x/tools/cmd/bundle. DO NOT EDIT. -// $ bundle -pkg godo -prefix ./dev/dist/godo +// Code generated automatically. DO NOT EDIT. package godo @@ -77,23 +76,24 @@ type AppAlertSlackWebhook struct { // App An application's configuration and status. type App struct { - ID string `json:"id,omitempty"` - OwnerUUID string `json:"owner_uuid,omitempty"` - Spec *AppSpec `json:"spec"` - LastDeploymentActiveAt time.Time `json:"last_deployment_active_at,omitempty"` - DefaultIngress string `json:"default_ingress,omitempty"` - CreatedAt time.Time `json:"created_at,omitempty"` - UpdatedAt time.Time `json:"updated_at,omitempty"` - ActiveDeployment *Deployment `json:"active_deployment,omitempty"` - InProgressDeployment *Deployment `json:"in_progress_deployment,omitempty"` - LastDeploymentCreatedAt time.Time `json:"last_deployment_created_at,omitempty"` - LiveURL string `json:"live_url,omitempty"` - Region *AppRegion `json:"region,omitempty"` - TierSlug string `json:"tier_slug,omitempty"` - LiveURLBase string `json:"live_url_base,omitempty"` - LiveDomain string `json:"live_domain,omitempty"` - Domains []*AppDomain `json:"domains,omitempty"` - PinnedDeployment *Deployment `json:"pinned_deployment,omitempty"` + ID string `json:"id,omitempty"` + OwnerUUID string `json:"owner_uuid,omitempty"` + Spec *AppSpec `json:"spec"` + LastDeploymentActiveAt time.Time `json:"last_deployment_active_at,omitempty"` + DefaultIngress string `json:"default_ingress,omitempty"` + CreatedAt time.Time `json:"created_at,omitempty"` + UpdatedAt time.Time `json:"updated_at,omitempty"` + ActiveDeployment *Deployment `json:"active_deployment,omitempty"` + InProgressDeployment *Deployment `json:"in_progress_deployment,omitempty"` + LastDeploymentCreatedAt time.Time `json:"last_deployment_created_at,omitempty"` + LiveURL string `json:"live_url,omitempty"` + Region *AppRegion `json:"region,omitempty"` + TierSlug string `json:"tier_slug,omitempty"` + LiveURLBase string `json:"live_url_base,omitempty"` + LiveDomain string `json:"live_domain,omitempty"` + Domains []*AppDomain `json:"domains,omitempty"` + PinnedDeployment *Deployment `json:"pinned_deployment,omitempty"` + BuildConfig *AppBuildConfig `json:"build_config,omitempty"` } // AppAlertSpec Configuration of an alert for the app or a individual component. @@ -150,6 +150,17 @@ const ( AppAlertSpecWindow_OneHour AppAlertSpecWindow = "ONE_HOUR" ) +// AppBuildConfig struct for AppBuildConfig +type AppBuildConfig struct { + CNBVersioning *AppBuildConfigCNBVersioning `json:"cnb_versioning,omitempty"` +} + +// AppBuildConfigCNBVersioning struct for AppBuildConfigCNBVersioning +type AppBuildConfigCNBVersioning struct { + // List of versioned buildpacks used for the application. Buildpacks are only versioned based on the major semver version, therefore exact versions will not be available at the app build config. + Buildpacks []*Buildpack `json:"buildpacks,omitempty"` +} + // AppDatabaseSpec struct for AppDatabaseSpec type AppDatabaseSpec struct { // The name. Must be unique across all components within the same app. @@ -283,6 +294,7 @@ const ( // AppLogDestinationSpec struct for AppLogDestinationSpec type AppLogDestinationSpec struct { + // Name of the log destination. Name string `json:"name"` Papertrail *AppLogDestinationSpecPapertrail `json:"papertrail,omitempty"` Datadog *AppLogDestinationSpecDataDog `json:"datadog,omitempty"` @@ -368,15 +380,15 @@ type AppServiceSpec struct { type AppServiceSpecHealthCheck struct { // Deprecated. Use http_path instead. Path string `json:"path,omitempty"` - // The number of seconds to wait before beginning health checks. + // The number of seconds to wait before beginning health checks. Default: 0 seconds; start health checks as soon as the service starts. InitialDelaySeconds int32 `json:"initial_delay_seconds,omitempty"` - // The number of seconds to wait between health checks. + // The number of seconds to wait between health checks. Default: 10 seconds. PeriodSeconds int32 `json:"period_seconds,omitempty"` - // The number of seconds after which the check times out. + // The number of seconds after which the check times out. Default: 1 second. TimeoutSeconds int32 `json:"timeout_seconds,omitempty"` - // The number of successful health checks before considered healthy. + // The number of successful health checks before considered healthy. Default: 1. SuccessThreshold int32 `json:"success_threshold,omitempty"` - // The number of failed health checks before considered unhealthy. + // The number of failed health checks before considered unhealthy. Default: 9. FailureThreshold int32 `json:"failure_threshold,omitempty"` // The route path used for the HTTP health check ping. If not set, the HTTP health check will be disabled and a TCP health check used instead. HTTPPath string `json:"http_path,omitempty"` @@ -479,6 +491,24 @@ type AppWorkerSpec struct { LogDestinations []*AppLogDestinationSpec `json:"log_destinations,omitempty"` } +// Buildpack struct for Buildpack +type Buildpack struct { + // The ID of the buildpack. + ID string `json:"id,omitempty"` + // Full semver version string. + Version string `json:"version,omitempty"` + // The major version line that the buildpack is pinned to. Example: a value of `1` indicates that the buildpack is pinned to versions `>=1.0.0 and <2.0.0`. + MajorVersion int32 `json:"major_version,omitempty"` + // Indicates whether the buildpack is on the latest major version line available. + Latest bool `json:"latest,omitempty"` + // A human friendly name. + Name string `json:"name,omitempty"` + // A description of the buildpack's purpose and steps performed at build time. + Description []string `json:"description,omitempty"` + // A link to the buildpack's documentation. + DocsLink string `json:"docs_link,omitempty"` +} + // DeploymentCauseDetailsDigitalOceanUser struct for DeploymentCauseDetailsDigitalOceanUser type DeploymentCauseDetailsDigitalOceanUser struct { UUID string `json:"uuid,omitempty"` @@ -585,6 +615,8 @@ type DeploymentFunctions struct { type DeploymentJob struct { Name string `json:"name,omitempty"` SourceCommitHash string `json:"source_commit_hash,omitempty"` + // The list of resolved buildpacks used for a given deployment component. + Buildpacks []*Buildpack `json:"buildpacks,omitempty"` } // DeploymentPhase the model 'DeploymentPhase' @@ -649,18 +681,24 @@ const ( type DeploymentService struct { Name string `json:"name,omitempty"` SourceCommitHash string `json:"source_commit_hash,omitempty"` + // The list of resolved buildpacks used for a given deployment component. + Buildpacks []*Buildpack `json:"buildpacks,omitempty"` } // DeploymentStaticSite struct for DeploymentStaticSite type DeploymentStaticSite struct { Name string `json:"name,omitempty"` SourceCommitHash string `json:"source_commit_hash,omitempty"` + // The list of resolved buildpacks used for a given deployment component. + Buildpacks []*Buildpack `json:"buildpacks,omitempty"` } // DeploymentWorker struct for DeploymentWorker type DeploymentWorker struct { Name string `json:"name,omitempty"` SourceCommitHash string `json:"source_commit_hash,omitempty"` + // The list of resolved buildpacks used for a given deployment component. + Buildpacks []*Buildpack `json:"buildpacks,omitempty"` } // DetectRequest struct for DetectRequest @@ -693,30 +731,41 @@ type DetectResponseComponent struct { RunCommand string `json:"run_command,omitempty"` EnvironmentSlug string `json:"environment_slug,omitempty"` // A list of HTTP ports that this component may listen on. The recommendation is to use the last port in the list. - HTTPPorts []int64 `json:"http_ports,omitempty"` - EnvVars []*AppVariableDefinition `json:"env_vars,omitempty"` + HTTPPorts []int64 `json:"http_ports,omitempty"` + EnvVars []*AppVariableDefinition `json:"env_vars,omitempty"` + // List of serverless packages detected. ServerlessPackages []*DetectResponseServerlessPackage `json:"serverless_packages,omitempty"` SourceDir string `json:"source_dir,omitempty"` + // The list of detected buildpacks that will be used for the component build. + Buildpacks []*Buildpack `json:"buildpacks,omitempty"` } // DetectResponseServerlessFunction struct for DetectResponseServerlessFunction type DetectResponseServerlessFunction struct { - Name string `json:"name,omitempty"` - Package string `json:"package,omitempty"` + // Name of the function. + Name string `json:"name,omitempty"` + // Package that the function belongs to. + Package string `json:"package,omitempty"` + // Runtime detected for the function. Runtime string `json:"runtime,omitempty"` Limits *DetectResponseServerlessFunctionLimits `json:"limits,omitempty"` } // DetectResponseServerlessFunctionLimits struct for DetectResponseServerlessFunctionLimits type DetectResponseServerlessFunctionLimits struct { + // Timeout for function invocation in milliseconds. Timeout string `json:"timeout,omitempty"` - Memory string `json:"memory,omitempty"` - Logs string `json:"logs,omitempty"` + // Max memory allocation for function invocation in megabytes. + Memory string `json:"memory,omitempty"` + // Max log size usage for function invocation in kilobytes. + Logs string `json:"logs,omitempty"` } // DetectResponseServerlessPackage struct for DetectResponseServerlessPackage type DetectResponseServerlessPackage struct { - Name string `json:"name,omitempty"` + // Name of the serverless package. + Name string `json:"name,omitempty"` + // List of functions detected in the serverless package. Functions []*DetectResponseServerlessFunction `json:"functions,omitempty"` } @@ -743,15 +792,19 @@ const ( DeploymentCauseDetailsDigitalOceanUserActionName_ResetDatabasePassword DeploymentCauseDetailsDigitalOceanUserActionName = "RESET_DATABASE_PASSWORD" DeploymentCauseDetailsDigitalOceanUserActionName_RollbackApp DeploymentCauseDetailsDigitalOceanUserActionName = "ROLLBACK_APP" DeploymentCauseDetailsDigitalOceanUserActionName_RevertAppRollback DeploymentCauseDetailsDigitalOceanUserActionName = "REVERT_APP_ROLLBACK" + DeploymentCauseDetailsDigitalOceanUserActionName_UpgradeBuildpack DeploymentCauseDetailsDigitalOceanUserActionName = "UPGRADE_BUILDPACK" ) // AppDomain struct for AppDomain type AppDomain struct { - ID string `json:"id,omitempty"` - Spec *AppDomainSpec `json:"spec,omitempty"` - Phase AppDomainPhase `json:"phase,omitempty"` - Progress *AppDomainProgress `json:"progress,omitempty"` - Validation *AppDomainValidation `json:"validation,omitempty"` + ID string `json:"id,omitempty"` + Spec *AppDomainSpec `json:"spec,omitempty"` + Phase AppDomainPhase `json:"phase,omitempty"` + Progress *AppDomainProgress `json:"progress,omitempty"` + Validation *AppDomainValidation `json:"validation,omitempty"` + Validations []*AppDomainValidation `json:"validations,omitempty"` + RotateValidationRecords bool `json:"rotate_validation_records,omitempty"` + CertificateExpiresAt time.Time `json:"certificate_expires_at,omitempty"` } // AppDomainPhase the model 'AppDomainPhase' @@ -934,6 +987,25 @@ type AppTier struct { BuildSeconds string `json:"build_seconds,omitempty"` } +// UpgradeBuildpackRequest struct for UpgradeBuildpackRequest +type UpgradeBuildpackRequest struct { + // The ID of the app to upgrade buildpack versions for. + AppID string `json:"app_id,omitempty"` + // The ID of the buildpack to upgrade. + BuildpackID string `json:"buildpack_id,omitempty"` + // The Major Version to upgrade the buildpack to. If omitted, the latest available major version will be used. + MajorVersion int32 `json:"major_version,omitempty"` + // Whether or not to trigger a deployment for the app after upgrading the buildpack. + TriggerDeployment bool `json:"trigger_deployment,omitempty"` +} + +// UpgradeBuildpackResponse struct for UpgradeBuildpackResponse +type UpgradeBuildpackResponse struct { + // The components that were affected by the upgrade. + AffectedComponents []string `json:"affected_components,omitempty"` + Deployment *Deployment `json:"deployment,omitempty"` +} + // AppVariableScope the model 'AppVariableScope' type AppVariableScope string diff --git a/vendor/github.com/digitalocean/godo/apps.go b/vendor/github.com/digitalocean/godo/apps.go index 023ef29f78..a9195d4e9e 100644 --- a/vendor/github.com/digitalocean/godo/apps.go +++ b/vendor/github.com/digitalocean/godo/apps.go @@ -2,6 +2,7 @@ package godo import ( "context" + "errors" "fmt" "net/http" ) @@ -442,3 +443,231 @@ func (s *AppsServiceOp) Detect(ctx context.Context, detect *DetectRequest) (*Det } return res, resp, nil } + +// AppComponentType is an app component type. +type AppComponentType string + +const ( + // AppComponentTypeService is the type for a service component. + AppComponentTypeService AppComponentType = "service" + // AppComponentTypeWorker is the type for a worker component. + AppComponentTypeWorker AppComponentType = "worker" + // AppComponentTypeJob is the type for a job component. + AppComponentTypeJob AppComponentType = "job" + // AppComponentTypeStaticSite is the type for a static site component. + AppComponentTypeStaticSite AppComponentType = "static_site" + // AppComponentTypeDatabase is the type for a database component. + AppComponentTypeDatabase AppComponentType = "database" + // AppComponentTypeFunctions is the type for a functions component. + AppComponentTypeFunctions AppComponentType = "functions" +) + +// GetType returns the Service component type. +func (s *AppServiceSpec) GetType() AppComponentType { + return AppComponentTypeService +} + +// GetType returns the Worker component type. +func (s *AppWorkerSpec) GetType() AppComponentType { + return AppComponentTypeWorker +} + +// GetType returns the Job component type. +func (s *AppJobSpec) GetType() AppComponentType { + return AppComponentTypeJob +} + +// GetType returns the StaticSite component type. +func (s *AppStaticSiteSpec) GetType() AppComponentType { + return AppComponentTypeStaticSite +} + +// GetType returns the Database component type. +func (s *AppDatabaseSpec) GetType() AppComponentType { + return AppComponentTypeDatabase +} + +// GetType returns the Functions component type. +func (s *AppFunctionsSpec) GetType() AppComponentType { + return AppComponentTypeFunctions +} + +// AppComponentSpec represents a component's spec. +type AppComponentSpec interface { + GetName() string + GetType() AppComponentType +} + +// AppBuildableComponentSpec is a component that is buildable from source. +type AppBuildableComponentSpec interface { + AppComponentSpec + + GetGit() *GitSourceSpec + GetGitHub() *GitHubSourceSpec + GetGitLab() *GitLabSourceSpec + + GetSourceDir() string + + GetEnvs() []*AppVariableDefinition +} + +// AppDockerBuildableComponentSpec is a component that is buildable from source using Docker. +type AppDockerBuildableComponentSpec interface { + AppBuildableComponentSpec + + GetDockerfilePath() string +} + +// AppCNBBuildableComponentSpec is a component that is buildable from source using cloud native buildpacks. +type AppCNBBuildableComponentSpec interface { + AppBuildableComponentSpec + + GetBuildCommand() string +} + +// AppContainerComponentSpec is a component that runs in a cluster. +type AppContainerComponentSpec interface { + AppBuildableComponentSpec + + GetImage() *ImageSourceSpec + GetRunCommand() string + GetInstanceSizeSlug() string + GetInstanceCount() int64 +} + +// AppRoutableComponentSpec is a component that defines routes. +type AppRoutableComponentSpec interface { + AppComponentSpec + + GetRoutes() []*AppRouteSpec + GetCORS() *AppCORSPolicy +} + +// AppSourceType is an app source type. +type AppSourceType string + +const ( + AppSourceTypeGitHub AppSourceType = "github" + AppSourceTypeGitLab AppSourceType = "gitlab" + AppSourceTypeGit AppSourceType = "git" + AppSourceTypeImage AppSourceType = "image" +) + +// SourceSpec represents a source. +type SourceSpec interface { + GetType() AppSourceType +} + +// GetType returns the GitHub source type. +func (s *GitHubSourceSpec) GetType() AppSourceType { + return AppSourceTypeGitHub +} + +// GetType returns the GitLab source type. +func (s *GitLabSourceSpec) GetType() AppSourceType { + return AppSourceTypeGitLab +} + +// GetType returns the Git source type. +func (s *GitSourceSpec) GetType() AppSourceType { + return AppSourceTypeGit +} + +// GetType returns the Image source type. +func (s *ImageSourceSpec) GetType() AppSourceType { + return AppSourceTypeImage +} + +// VCSSourceSpec represents a VCS source. +type VCSSourceSpec interface { + SourceSpec + GetRepo() string + GetBranch() string +} + +// GetRepo allows GitSourceSpec to implement the SourceSpec interface. +func (s *GitSourceSpec) GetRepo() string { + return s.RepoCloneURL +} + +// ForEachAppComponentSpec iterates over each component spec in an app. +func (s *AppSpec) ForEachAppComponentSpec(fn func(component AppComponentSpec) error) error { + if s == nil { + return nil + } + for _, c := range s.Services { + if err := fn(c); err != nil { + return err + } + } + for _, c := range s.Workers { + if err := fn(c); err != nil { + return err + } + } + for _, c := range s.Jobs { + if err := fn(c); err != nil { + return err + } + } + for _, c := range s.StaticSites { + if err := fn(c); err != nil { + return err + } + } + for _, c := range s.Databases { + if err := fn(c); err != nil { + return err + } + } + for _, c := range s.Functions { + if err := fn(c); err != nil { + return err + } + } + return nil +} + +// ForEachAppSpecComponent loops over each component spec that matches the provided interface type. +// The type constraint is intentionally set to `any` to allow use of arbitrary interfaces to match the desired component types. +// +// Examples: +// - interface constraint +// godo.ForEachAppSpecComponent(spec, func(component godo.AppBuildableComponentSpec) error { ... }) +// - struct type constraint +// godo.ForEachAppSpecComponent(spec, func(component *godo.AppStaticSiteSpec) error { ... }) +func ForEachAppSpecComponent[T any](s *AppSpec, fn func(component T) error) error { + return s.ForEachAppComponentSpec(func(component AppComponentSpec) error { + if c, ok := component.(T); ok { + if err := fn(c); err != nil { + return err + } + } + return nil + }) +} + +// GetAppSpecComponent returns an app spec component by type and name. +// +// Examples: +// - interface constraint +// godo.GetAppSpecComponent[godo.AppBuildableComponentSpec](spec, "component-name") +// - struct type constraint +// godo.GetAppSpecComponent[*godo.AppServiceSpec](spec, "component-name") +func GetAppSpecComponent[T interface { + GetName() string +}](s *AppSpec, name string) (T, error) { + var c T + errStop := errors.New("stop") + err := ForEachAppSpecComponent(s, func(component T) error { + if component.GetName() == name { + c = component + return errStop + } + return nil + }) + if err == errStop { + return c, nil + } + return c, fmt.Errorf("component %s not found", name) +} diff --git a/vendor/github.com/digitalocean/godo/apps_accessors.go b/vendor/github.com/digitalocean/godo/apps_accessors.go new file mode 100644 index 0000000000..e2190b7633 --- /dev/null +++ b/vendor/github.com/digitalocean/godo/apps_accessors.go @@ -0,0 +1,2863 @@ +// Code generated automatically. DO NOT EDIT. + +package godo + +import ( + "time" +) + +// GetActiveDeployment returns the ActiveDeployment field. +func (a *App) GetActiveDeployment() *Deployment { + if a == nil { + return nil + } + return a.ActiveDeployment +} + +// GetBuildConfig returns the BuildConfig field. +func (a *App) GetBuildConfig() *AppBuildConfig { + if a == nil { + return nil + } + return a.BuildConfig +} + +// GetCreatedAt returns the CreatedAt field. +func (a *App) GetCreatedAt() time.Time { + if a == nil { + return time.Time{} + } + return a.CreatedAt +} + +// GetDefaultIngress returns the DefaultIngress field. +func (a *App) GetDefaultIngress() string { + if a == nil { + return "" + } + return a.DefaultIngress +} + +// GetDomains returns the Domains field. +func (a *App) GetDomains() []*AppDomain { + if a == nil { + return nil + } + return a.Domains +} + +// GetID returns the ID field. +func (a *App) GetID() string { + if a == nil { + return "" + } + return a.ID +} + +// GetInProgressDeployment returns the InProgressDeployment field. +func (a *App) GetInProgressDeployment() *Deployment { + if a == nil { + return nil + } + return a.InProgressDeployment +} + +// GetLastDeploymentActiveAt returns the LastDeploymentActiveAt field. +func (a *App) GetLastDeploymentActiveAt() time.Time { + if a == nil { + return time.Time{} + } + return a.LastDeploymentActiveAt +} + +// GetLastDeploymentCreatedAt returns the LastDeploymentCreatedAt field. +func (a *App) GetLastDeploymentCreatedAt() time.Time { + if a == nil { + return time.Time{} + } + return a.LastDeploymentCreatedAt +} + +// GetLiveDomain returns the LiveDomain field. +func (a *App) GetLiveDomain() string { + if a == nil { + return "" + } + return a.LiveDomain +} + +// GetLiveURL returns the LiveURL field. +func (a *App) GetLiveURL() string { + if a == nil { + return "" + } + return a.LiveURL +} + +// GetLiveURLBase returns the LiveURLBase field. +func (a *App) GetLiveURLBase() string { + if a == nil { + return "" + } + return a.LiveURLBase +} + +// GetOwnerUUID returns the OwnerUUID field. +func (a *App) GetOwnerUUID() string { + if a == nil { + return "" + } + return a.OwnerUUID +} + +// GetPinnedDeployment returns the PinnedDeployment field. +func (a *App) GetPinnedDeployment() *Deployment { + if a == nil { + return nil + } + return a.PinnedDeployment +} + +// GetRegion returns the Region field. +func (a *App) GetRegion() *AppRegion { + if a == nil { + return nil + } + return a.Region +} + +// GetSpec returns the Spec field. +func (a *App) GetSpec() *AppSpec { + if a == nil { + return nil + } + return a.Spec +} + +// GetTierSlug returns the TierSlug field. +func (a *App) GetTierSlug() string { + if a == nil { + return "" + } + return a.TierSlug +} + +// GetUpdatedAt returns the UpdatedAt field. +func (a *App) GetUpdatedAt() time.Time { + if a == nil { + return time.Time{} + } + return a.UpdatedAt +} + +// GetComponentName returns the ComponentName field. +func (a *AppAlert) GetComponentName() string { + if a == nil { + return "" + } + return a.ComponentName +} + +// GetEmails returns the Emails field. +func (a *AppAlert) GetEmails() []string { + if a == nil { + return nil + } + return a.Emails +} + +// GetID returns the ID field. +func (a *AppAlert) GetID() string { + if a == nil { + return "" + } + return a.ID +} + +// GetPhase returns the Phase field. +func (a *AppAlert) GetPhase() AppAlertPhase { + if a == nil { + return "" + } + return a.Phase +} + +// GetProgress returns the Progress field. +func (a *AppAlert) GetProgress() *AppAlertProgress { + if a == nil { + return nil + } + return a.Progress +} + +// GetSlackWebhooks returns the SlackWebhooks field. +func (a *AppAlert) GetSlackWebhooks() []*AppAlertSlackWebhook { + if a == nil { + return nil + } + return a.SlackWebhooks +} + +// GetSpec returns the Spec field. +func (a *AppAlert) GetSpec() *AppAlertSpec { + if a == nil { + return nil + } + return a.Spec +} + +// GetSteps returns the Steps field. +func (a *AppAlertProgress) GetSteps() []*AppAlertProgressStep { + if a == nil { + return nil + } + return a.Steps +} + +// GetEndedAt returns the EndedAt field. +func (a *AppAlertProgressStep) GetEndedAt() time.Time { + if a == nil { + return time.Time{} + } + return a.EndedAt +} + +// GetName returns the Name field. +func (a *AppAlertProgressStep) GetName() string { + if a == nil { + return "" + } + return a.Name +} + +// GetReason returns the Reason field. +func (a *AppAlertProgressStep) GetReason() *AppAlertProgressStepReason { + if a == nil { + return nil + } + return a.Reason +} + +// GetStartedAt returns the StartedAt field. +func (a *AppAlertProgressStep) GetStartedAt() time.Time { + if a == nil { + return time.Time{} + } + return a.StartedAt +} + +// GetStatus returns the Status field. +func (a *AppAlertProgressStep) GetStatus() AppAlertProgressStepStatus { + if a == nil { + return "" + } + return a.Status +} + +// GetSteps returns the Steps field. +func (a *AppAlertProgressStep) GetSteps() []*AppAlertProgressStep { + if a == nil { + return nil + } + return a.Steps +} + +// GetCode returns the Code field. +func (a *AppAlertProgressStepReason) GetCode() string { + if a == nil { + return "" + } + return a.Code +} + +// GetMessage returns the Message field. +func (a *AppAlertProgressStepReason) GetMessage() string { + if a == nil { + return "" + } + return a.Message +} + +// GetChannel returns the Channel field. +func (a *AppAlertSlackWebhook) GetChannel() string { + if a == nil { + return "" + } + return a.Channel +} + +// GetURL returns the URL field. +func (a *AppAlertSlackWebhook) GetURL() string { + if a == nil { + return "" + } + return a.URL +} + +// GetDisabled returns the Disabled field. +func (a *AppAlertSpec) GetDisabled() bool { + if a == nil { + return false + } + return a.Disabled +} + +// GetOperator returns the Operator field. +func (a *AppAlertSpec) GetOperator() AppAlertSpecOperator { + if a == nil { + return "" + } + return a.Operator +} + +// GetRule returns the Rule field. +func (a *AppAlertSpec) GetRule() AppAlertSpecRule { + if a == nil { + return "" + } + return a.Rule +} + +// GetValue returns the Value field. +func (a *AppAlertSpec) GetValue() float32 { + if a == nil { + return 0 + } + return a.Value +} + +// GetWindow returns the Window field. +func (a *AppAlertSpec) GetWindow() AppAlertSpecWindow { + if a == nil { + return "" + } + return a.Window +} + +// GetCNBVersioning returns the CNBVersioning field. +func (a *AppBuildConfig) GetCNBVersioning() *AppBuildConfigCNBVersioning { + if a == nil { + return nil + } + return a.CNBVersioning +} + +// GetBuildpacks returns the Buildpacks field. +func (a *AppBuildConfigCNBVersioning) GetBuildpacks() []*Buildpack { + if a == nil { + return nil + } + return a.Buildpacks +} + +// GetAllowCredentials returns the AllowCredentials field. +func (a *AppCORSPolicy) GetAllowCredentials() bool { + if a == nil { + return false + } + return a.AllowCredentials +} + +// GetAllowHeaders returns the AllowHeaders field. +func (a *AppCORSPolicy) GetAllowHeaders() []string { + if a == nil { + return nil + } + return a.AllowHeaders +} + +// GetAllowMethods returns the AllowMethods field. +func (a *AppCORSPolicy) GetAllowMethods() []string { + if a == nil { + return nil + } + return a.AllowMethods +} + +// GetAllowOrigins returns the AllowOrigins field. +func (a *AppCORSPolicy) GetAllowOrigins() []*AppStringMatch { + if a == nil { + return nil + } + return a.AllowOrigins +} + +// GetExposeHeaders returns the ExposeHeaders field. +func (a *AppCORSPolicy) GetExposeHeaders() []string { + if a == nil { + return nil + } + return a.ExposeHeaders +} + +// GetMaxAge returns the MaxAge field. +func (a *AppCORSPolicy) GetMaxAge() string { + if a == nil { + return "" + } + return a.MaxAge +} + +// GetSpec returns the Spec field. +func (a *AppCreateRequest) GetSpec() *AppSpec { + if a == nil { + return nil + } + return a.Spec +} + +// GetClusterName returns the ClusterName field. +func (a *AppDatabaseSpec) GetClusterName() string { + if a == nil { + return "" + } + return a.ClusterName +} + +// GetDBName returns the DBName field. +func (a *AppDatabaseSpec) GetDBName() string { + if a == nil { + return "" + } + return a.DBName +} + +// GetDBUser returns the DBUser field. +func (a *AppDatabaseSpec) GetDBUser() string { + if a == nil { + return "" + } + return a.DBUser +} + +// GetEngine returns the Engine field. +func (a *AppDatabaseSpec) GetEngine() AppDatabaseSpecEngine { + if a == nil { + return "" + } + return a.Engine +} + +// GetName returns the Name field. +func (a *AppDatabaseSpec) GetName() string { + if a == nil { + return "" + } + return a.Name +} + +// GetNumNodes returns the NumNodes field. +func (a *AppDatabaseSpec) GetNumNodes() int64 { + if a == nil { + return 0 + } + return a.NumNodes +} + +// GetProduction returns the Production field. +func (a *AppDatabaseSpec) GetProduction() bool { + if a == nil { + return false + } + return a.Production +} + +// GetSize returns the Size field. +func (a *AppDatabaseSpec) GetSize() string { + if a == nil { + return "" + } + return a.Size +} + +// GetVersion returns the Version field. +func (a *AppDatabaseSpec) GetVersion() string { + if a == nil { + return "" + } + return a.Version +} + +// GetCertificateExpiresAt returns the CertificateExpiresAt field. +func (a *AppDomain) GetCertificateExpiresAt() time.Time { + if a == nil { + return time.Time{} + } + return a.CertificateExpiresAt +} + +// GetID returns the ID field. +func (a *AppDomain) GetID() string { + if a == nil { + return "" + } + return a.ID +} + +// GetPhase returns the Phase field. +func (a *AppDomain) GetPhase() AppDomainPhase { + if a == nil { + return "" + } + return a.Phase +} + +// GetProgress returns the Progress field. +func (a *AppDomain) GetProgress() *AppDomainProgress { + if a == nil { + return nil + } + return a.Progress +} + +// GetRotateValidationRecords returns the RotateValidationRecords field. +func (a *AppDomain) GetRotateValidationRecords() bool { + if a == nil { + return false + } + return a.RotateValidationRecords +} + +// GetSpec returns the Spec field. +func (a *AppDomain) GetSpec() *AppDomainSpec { + if a == nil { + return nil + } + return a.Spec +} + +// GetValidation returns the Validation field. +func (a *AppDomain) GetValidation() *AppDomainValidation { + if a == nil { + return nil + } + return a.Validation +} + +// GetValidations returns the Validations field. +func (a *AppDomain) GetValidations() []*AppDomainValidation { + if a == nil { + return nil + } + return a.Validations +} + +// GetSteps returns the Steps field. +func (a *AppDomainProgress) GetSteps() []*AppDomainProgressStep { + if a == nil { + return nil + } + return a.Steps +} + +// GetEndedAt returns the EndedAt field. +func (a *AppDomainProgressStep) GetEndedAt() time.Time { + if a == nil { + return time.Time{} + } + return a.EndedAt +} + +// GetName returns the Name field. +func (a *AppDomainProgressStep) GetName() string { + if a == nil { + return "" + } + return a.Name +} + +// GetReason returns the Reason field. +func (a *AppDomainProgressStep) GetReason() *AppDomainProgressStepReason { + if a == nil { + return nil + } + return a.Reason +} + +// GetStartedAt returns the StartedAt field. +func (a *AppDomainProgressStep) GetStartedAt() time.Time { + if a == nil { + return time.Time{} + } + return a.StartedAt +} + +// GetStatus returns the Status field. +func (a *AppDomainProgressStep) GetStatus() AppDomainProgressStepStatus { + if a == nil { + return "" + } + return a.Status +} + +// GetSteps returns the Steps field. +func (a *AppDomainProgressStep) GetSteps() []*AppDomainProgressStep { + if a == nil { + return nil + } + return a.Steps +} + +// GetCode returns the Code field. +func (a *AppDomainProgressStepReason) GetCode() string { + if a == nil { + return "" + } + return a.Code +} + +// GetMessage returns the Message field. +func (a *AppDomainProgressStepReason) GetMessage() string { + if a == nil { + return "" + } + return a.Message +} + +// GetCertificate returns the Certificate field. +func (a *AppDomainSpec) GetCertificate() string { + if a == nil { + return "" + } + return a.Certificate +} + +// GetDomain returns the Domain field. +func (a *AppDomainSpec) GetDomain() string { + if a == nil { + return "" + } + return a.Domain +} + +// GetMinimumTLSVersion returns the MinimumTLSVersion field. +func (a *AppDomainSpec) GetMinimumTLSVersion() string { + if a == nil { + return "" + } + return a.MinimumTLSVersion +} + +// GetType returns the Type field. +func (a *AppDomainSpec) GetType() AppDomainSpecType { + if a == nil { + return "" + } + return a.Type +} + +// GetWildcard returns the Wildcard field. +func (a *AppDomainSpec) GetWildcard() bool { + if a == nil { + return false + } + return a.Wildcard +} + +// GetZone returns the Zone field. +func (a *AppDomainSpec) GetZone() string { + if a == nil { + return "" + } + return a.Zone +} + +// GetTXTName returns the TXTName field. +func (a *AppDomainValidation) GetTXTName() string { + if a == nil { + return "" + } + return a.TXTName +} + +// GetTXTValue returns the TXTValue field. +func (a *AppDomainValidation) GetTXTValue() string { + if a == nil { + return "" + } + return a.TXTValue +} + +// GetAlerts returns the Alerts field. +func (a *AppFunctionsSpec) GetAlerts() []*AppAlertSpec { + if a == nil { + return nil + } + return a.Alerts +} + +// GetCORS returns the CORS field. +func (a *AppFunctionsSpec) GetCORS() *AppCORSPolicy { + if a == nil { + return nil + } + return a.CORS +} + +// GetEnvs returns the Envs field. +func (a *AppFunctionsSpec) GetEnvs() []*AppVariableDefinition { + if a == nil { + return nil + } + return a.Envs +} + +// GetGit returns the Git field. +func (a *AppFunctionsSpec) GetGit() *GitSourceSpec { + if a == nil { + return nil + } + return a.Git +} + +// GetGitHub returns the GitHub field. +func (a *AppFunctionsSpec) GetGitHub() *GitHubSourceSpec { + if a == nil { + return nil + } + return a.GitHub +} + +// GetGitLab returns the GitLab field. +func (a *AppFunctionsSpec) GetGitLab() *GitLabSourceSpec { + if a == nil { + return nil + } + return a.GitLab +} + +// GetLogDestinations returns the LogDestinations field. +func (a *AppFunctionsSpec) GetLogDestinations() []*AppLogDestinationSpec { + if a == nil { + return nil + } + return a.LogDestinations +} + +// GetName returns the Name field. +func (a *AppFunctionsSpec) GetName() string { + if a == nil { + return "" + } + return a.Name +} + +// GetRoutes returns the Routes field. +func (a *AppFunctionsSpec) GetRoutes() []*AppRouteSpec { + if a == nil { + return nil + } + return a.Routes +} + +// GetSourceDir returns the SourceDir field. +func (a *AppFunctionsSpec) GetSourceDir() string { + if a == nil { + return "" + } + return a.SourceDir +} + +// GetLoadBalancer returns the LoadBalancer field. +func (a *AppIngressSpec) GetLoadBalancer() AppIngressSpecLoadBalancer { + if a == nil { + return "" + } + return a.LoadBalancer +} + +// GetLoadBalancerSize returns the LoadBalancerSize field. +func (a *AppIngressSpec) GetLoadBalancerSize() int64 { + if a == nil { + return 0 + } + return a.LoadBalancerSize +} + +// GetCPUs returns the CPUs field. +func (a *AppInstanceSize) GetCPUs() string { + if a == nil { + return "" + } + return a.CPUs +} + +// GetCPUType returns the CPUType field. +func (a *AppInstanceSize) GetCPUType() AppInstanceSizeCPUType { + if a == nil { + return "" + } + return a.CPUType +} + +// GetMemoryBytes returns the MemoryBytes field. +func (a *AppInstanceSize) GetMemoryBytes() string { + if a == nil { + return "" + } + return a.MemoryBytes +} + +// GetName returns the Name field. +func (a *AppInstanceSize) GetName() string { + if a == nil { + return "" + } + return a.Name +} + +// GetSlug returns the Slug field. +func (a *AppInstanceSize) GetSlug() string { + if a == nil { + return "" + } + return a.Slug +} + +// GetTierDowngradeTo returns the TierDowngradeTo field. +func (a *AppInstanceSize) GetTierDowngradeTo() string { + if a == nil { + return "" + } + return a.TierDowngradeTo +} + +// GetTierSlug returns the TierSlug field. +func (a *AppInstanceSize) GetTierSlug() string { + if a == nil { + return "" + } + return a.TierSlug +} + +// GetTierUpgradeTo returns the TierUpgradeTo field. +func (a *AppInstanceSize) GetTierUpgradeTo() string { + if a == nil { + return "" + } + return a.TierUpgradeTo +} + +// GetUSDPerMonth returns the USDPerMonth field. +func (a *AppInstanceSize) GetUSDPerMonth() string { + if a == nil { + return "" + } + return a.USDPerMonth +} + +// GetUSDPerSecond returns the USDPerSecond field. +func (a *AppInstanceSize) GetUSDPerSecond() string { + if a == nil { + return "" + } + return a.USDPerSecond +} + +// GetAlerts returns the Alerts field. +func (a *AppJobSpec) GetAlerts() []*AppAlertSpec { + if a == nil { + return nil + } + return a.Alerts +} + +// GetBuildCommand returns the BuildCommand field. +func (a *AppJobSpec) GetBuildCommand() string { + if a == nil { + return "" + } + return a.BuildCommand +} + +// GetDockerfilePath returns the DockerfilePath field. +func (a *AppJobSpec) GetDockerfilePath() string { + if a == nil { + return "" + } + return a.DockerfilePath +} + +// GetEnvs returns the Envs field. +func (a *AppJobSpec) GetEnvs() []*AppVariableDefinition { + if a == nil { + return nil + } + return a.Envs +} + +// GetGit returns the Git field. +func (a *AppJobSpec) GetGit() *GitSourceSpec { + if a == nil { + return nil + } + return a.Git +} + +// GetGitHub returns the GitHub field. +func (a *AppJobSpec) GetGitHub() *GitHubSourceSpec { + if a == nil { + return nil + } + return a.GitHub +} + +// GetGitLab returns the GitLab field. +func (a *AppJobSpec) GetGitLab() *GitLabSourceSpec { + if a == nil { + return nil + } + return a.GitLab +} + +// GetImage returns the Image field. +func (a *AppJobSpec) GetImage() *ImageSourceSpec { + if a == nil { + return nil + } + return a.Image +} + +// GetInstanceCount returns the InstanceCount field. +func (a *AppJobSpec) GetInstanceCount() int64 { + if a == nil { + return 0 + } + return a.InstanceCount +} + +// GetInstanceSizeSlug returns the InstanceSizeSlug field. +func (a *AppJobSpec) GetInstanceSizeSlug() string { + if a == nil { + return "" + } + return a.InstanceSizeSlug +} + +// GetKind returns the Kind field. +func (a *AppJobSpec) GetKind() AppJobSpecKind { + if a == nil { + return "" + } + return a.Kind +} + +// GetLogDestinations returns the LogDestinations field. +func (a *AppJobSpec) GetLogDestinations() []*AppLogDestinationSpec { + if a == nil { + return nil + } + return a.LogDestinations +} + +// GetName returns the Name field. +func (a *AppJobSpec) GetName() string { + if a == nil { + return "" + } + return a.Name +} + +// GetRunCommand returns the RunCommand field. +func (a *AppJobSpec) GetRunCommand() string { + if a == nil { + return "" + } + return a.RunCommand +} + +// GetSourceDir returns the SourceDir field. +func (a *AppJobSpec) GetSourceDir() string { + if a == nil { + return "" + } + return a.SourceDir +} + +// GetDatadog returns the Datadog field. +func (a *AppLogDestinationSpec) GetDatadog() *AppLogDestinationSpecDataDog { + if a == nil { + return nil + } + return a.Datadog +} + +// GetEndpoint returns the Endpoint field. +func (a *AppLogDestinationSpec) GetEndpoint() string { + if a == nil { + return "" + } + return a.Endpoint +} + +// GetHeaders returns the Headers field. +func (a *AppLogDestinationSpec) GetHeaders() []*AppLogDestinationSpecHeader { + if a == nil { + return nil + } + return a.Headers +} + +// GetLogtail returns the Logtail field. +func (a *AppLogDestinationSpec) GetLogtail() *AppLogDestinationSpecLogtail { + if a == nil { + return nil + } + return a.Logtail +} + +// GetName returns the Name field. +func (a *AppLogDestinationSpec) GetName() string { + if a == nil { + return "" + } + return a.Name +} + +// GetPapertrail returns the Papertrail field. +func (a *AppLogDestinationSpec) GetPapertrail() *AppLogDestinationSpecPapertrail { + if a == nil { + return nil + } + return a.Papertrail +} + +// GetTLSInsecure returns the TLSInsecure field. +func (a *AppLogDestinationSpec) GetTLSInsecure() bool { + if a == nil { + return false + } + return a.TLSInsecure +} + +// GetApiKey returns the ApiKey field. +func (a *AppLogDestinationSpecDataDog) GetApiKey() string { + if a == nil { + return "" + } + return a.ApiKey +} + +// GetEndpoint returns the Endpoint field. +func (a *AppLogDestinationSpecDataDog) GetEndpoint() string { + if a == nil { + return "" + } + return a.Endpoint +} + +// GetKey returns the Key field. +func (a *AppLogDestinationSpecHeader) GetKey() string { + if a == nil { + return "" + } + return a.Key +} + +// GetValue returns the Value field. +func (a *AppLogDestinationSpecHeader) GetValue() string { + if a == nil { + return "" + } + return a.Value +} + +// GetToken returns the Token field. +func (a *AppLogDestinationSpecLogtail) GetToken() string { + if a == nil { + return "" + } + return a.Token +} + +// GetEndpoint returns the Endpoint field. +func (a *AppLogDestinationSpecPapertrail) GetEndpoint() string { + if a == nil { + return "" + } + return a.Endpoint +} + +// GetAppID returns the AppID field. +func (a *AppProposeRequest) GetAppID() string { + if a == nil { + return "" + } + return a.AppID +} + +// GetSpec returns the Spec field. +func (a *AppProposeRequest) GetSpec() *AppSpec { + if a == nil { + return nil + } + return a.Spec +} + +// GetAppCost returns the AppCost field. +func (a *AppProposeResponse) GetAppCost() float32 { + if a == nil { + return 0 + } + return a.AppCost +} + +// GetAppIsStarter returns the AppIsStarter field. +func (a *AppProposeResponse) GetAppIsStarter() bool { + if a == nil { + return false + } + return a.AppIsStarter +} + +// GetAppIsStatic returns the AppIsStatic field. +func (a *AppProposeResponse) GetAppIsStatic() bool { + if a == nil { + return false + } + return a.AppIsStatic +} + +// GetAppNameAvailable returns the AppNameAvailable field. +func (a *AppProposeResponse) GetAppNameAvailable() bool { + if a == nil { + return false + } + return a.AppNameAvailable +} + +// GetAppNameSuggestion returns the AppNameSuggestion field. +func (a *AppProposeResponse) GetAppNameSuggestion() string { + if a == nil { + return "" + } + return a.AppNameSuggestion +} + +// GetAppTierDowngradeCost returns the AppTierDowngradeCost field. +func (a *AppProposeResponse) GetAppTierDowngradeCost() float32 { + if a == nil { + return 0 + } + return a.AppTierDowngradeCost +} + +// GetAppTierUpgradeCost returns the AppTierUpgradeCost field. +func (a *AppProposeResponse) GetAppTierUpgradeCost() float32 { + if a == nil { + return 0 + } + return a.AppTierUpgradeCost +} + +// GetExistingStarterApps returns the ExistingStarterApps field. +func (a *AppProposeResponse) GetExistingStarterApps() string { + if a == nil { + return "" + } + return a.ExistingStarterApps +} + +// GetExistingStaticApps returns the ExistingStaticApps field. +func (a *AppProposeResponse) GetExistingStaticApps() string { + if a == nil { + return "" + } + return a.ExistingStaticApps +} + +// GetMaxFreeStarterApps returns the MaxFreeStarterApps field. +func (a *AppProposeResponse) GetMaxFreeStarterApps() string { + if a == nil { + return "" + } + return a.MaxFreeStarterApps +} + +// GetMaxFreeStaticApps returns the MaxFreeStaticApps field. +func (a *AppProposeResponse) GetMaxFreeStaticApps() string { + if a == nil { + return "" + } + return a.MaxFreeStaticApps +} + +// GetSpec returns the Spec field. +func (a *AppProposeResponse) GetSpec() *AppSpec { + if a == nil { + return nil + } + return a.Spec +} + +// GetContinent returns the Continent field. +func (a *AppRegion) GetContinent() string { + if a == nil { + return "" + } + return a.Continent +} + +// GetDataCenters returns the DataCenters field. +func (a *AppRegion) GetDataCenters() []string { + if a == nil { + return nil + } + return a.DataCenters +} + +// GetDefault returns the Default field. +func (a *AppRegion) GetDefault() bool { + if a == nil { + return false + } + return a.Default +} + +// GetDisabled returns the Disabled field. +func (a *AppRegion) GetDisabled() bool { + if a == nil { + return false + } + return a.Disabled +} + +// GetFlag returns the Flag field. +func (a *AppRegion) GetFlag() string { + if a == nil { + return "" + } + return a.Flag +} + +// GetLabel returns the Label field. +func (a *AppRegion) GetLabel() string { + if a == nil { + return "" + } + return a.Label +} + +// GetReason returns the Reason field. +func (a *AppRegion) GetReason() string { + if a == nil { + return "" + } + return a.Reason +} + +// GetSlug returns the Slug field. +func (a *AppRegion) GetSlug() string { + if a == nil { + return "" + } + return a.Slug +} + +// GetPath returns the Path field. +func (a *AppRouteSpec) GetPath() string { + if a == nil { + return "" + } + return a.Path +} + +// GetPreservePathPrefix returns the PreservePathPrefix field. +func (a *AppRouteSpec) GetPreservePathPrefix() bool { + if a == nil { + return false + } + return a.PreservePathPrefix +} + +// GetAlerts returns the Alerts field. +func (a *AppServiceSpec) GetAlerts() []*AppAlertSpec { + if a == nil { + return nil + } + return a.Alerts +} + +// GetBuildCommand returns the BuildCommand field. +func (a *AppServiceSpec) GetBuildCommand() string { + if a == nil { + return "" + } + return a.BuildCommand +} + +// GetCORS returns the CORS field. +func (a *AppServiceSpec) GetCORS() *AppCORSPolicy { + if a == nil { + return nil + } + return a.CORS +} + +// GetDockerfilePath returns the DockerfilePath field. +func (a *AppServiceSpec) GetDockerfilePath() string { + if a == nil { + return "" + } + return a.DockerfilePath +} + +// GetEnvs returns the Envs field. +func (a *AppServiceSpec) GetEnvs() []*AppVariableDefinition { + if a == nil { + return nil + } + return a.Envs +} + +// GetGit returns the Git field. +func (a *AppServiceSpec) GetGit() *GitSourceSpec { + if a == nil { + return nil + } + return a.Git +} + +// GetGitHub returns the GitHub field. +func (a *AppServiceSpec) GetGitHub() *GitHubSourceSpec { + if a == nil { + return nil + } + return a.GitHub +} + +// GetGitLab returns the GitLab field. +func (a *AppServiceSpec) GetGitLab() *GitLabSourceSpec { + if a == nil { + return nil + } + return a.GitLab +} + +// GetHealthCheck returns the HealthCheck field. +func (a *AppServiceSpec) GetHealthCheck() *AppServiceSpecHealthCheck { + if a == nil { + return nil + } + return a.HealthCheck +} + +// GetHTTPPort returns the HTTPPort field. +func (a *AppServiceSpec) GetHTTPPort() int64 { + if a == nil { + return 0 + } + return a.HTTPPort +} + +// GetImage returns the Image field. +func (a *AppServiceSpec) GetImage() *ImageSourceSpec { + if a == nil { + return nil + } + return a.Image +} + +// GetInstanceCount returns the InstanceCount field. +func (a *AppServiceSpec) GetInstanceCount() int64 { + if a == nil { + return 0 + } + return a.InstanceCount +} + +// GetInstanceSizeSlug returns the InstanceSizeSlug field. +func (a *AppServiceSpec) GetInstanceSizeSlug() string { + if a == nil { + return "" + } + return a.InstanceSizeSlug +} + +// GetInternalPorts returns the InternalPorts field. +func (a *AppServiceSpec) GetInternalPorts() []int64 { + if a == nil { + return nil + } + return a.InternalPorts +} + +// GetLogDestinations returns the LogDestinations field. +func (a *AppServiceSpec) GetLogDestinations() []*AppLogDestinationSpec { + if a == nil { + return nil + } + return a.LogDestinations +} + +// GetName returns the Name field. +func (a *AppServiceSpec) GetName() string { + if a == nil { + return "" + } + return a.Name +} + +// GetRoutes returns the Routes field. +func (a *AppServiceSpec) GetRoutes() []*AppRouteSpec { + if a == nil { + return nil + } + return a.Routes +} + +// GetRunCommand returns the RunCommand field. +func (a *AppServiceSpec) GetRunCommand() string { + if a == nil { + return "" + } + return a.RunCommand +} + +// GetSourceDir returns the SourceDir field. +func (a *AppServiceSpec) GetSourceDir() string { + if a == nil { + return "" + } + return a.SourceDir +} + +// GetFailureThreshold returns the FailureThreshold field. +func (a *AppServiceSpecHealthCheck) GetFailureThreshold() int32 { + if a == nil { + return 0 + } + return a.FailureThreshold +} + +// GetHTTPPath returns the HTTPPath field. +func (a *AppServiceSpecHealthCheck) GetHTTPPath() string { + if a == nil { + return "" + } + return a.HTTPPath +} + +// GetInitialDelaySeconds returns the InitialDelaySeconds field. +func (a *AppServiceSpecHealthCheck) GetInitialDelaySeconds() int32 { + if a == nil { + return 0 + } + return a.InitialDelaySeconds +} + +// GetPath returns the Path field. +func (a *AppServiceSpecHealthCheck) GetPath() string { + if a == nil { + return "" + } + return a.Path +} + +// GetPeriodSeconds returns the PeriodSeconds field. +func (a *AppServiceSpecHealthCheck) GetPeriodSeconds() int32 { + if a == nil { + return 0 + } + return a.PeriodSeconds +} + +// GetPort returns the Port field. +func (a *AppServiceSpecHealthCheck) GetPort() int64 { + if a == nil { + return 0 + } + return a.Port +} + +// GetSuccessThreshold returns the SuccessThreshold field. +func (a *AppServiceSpecHealthCheck) GetSuccessThreshold() int32 { + if a == nil { + return 0 + } + return a.SuccessThreshold +} + +// GetTimeoutSeconds returns the TimeoutSeconds field. +func (a *AppServiceSpecHealthCheck) GetTimeoutSeconds() int32 { + if a == nil { + return 0 + } + return a.TimeoutSeconds +} + +// GetAlerts returns the Alerts field. +func (a *AppSpec) GetAlerts() []*AppAlertSpec { + if a == nil { + return nil + } + return a.Alerts +} + +// GetDatabases returns the Databases field. +func (a *AppSpec) GetDatabases() []*AppDatabaseSpec { + if a == nil { + return nil + } + return a.Databases +} + +// GetDomains returns the Domains field. +func (a *AppSpec) GetDomains() []*AppDomainSpec { + if a == nil { + return nil + } + return a.Domains +} + +// GetEnvs returns the Envs field. +func (a *AppSpec) GetEnvs() []*AppVariableDefinition { + if a == nil { + return nil + } + return a.Envs +} + +// GetFeatures returns the Features field. +func (a *AppSpec) GetFeatures() []string { + if a == nil { + return nil + } + return a.Features +} + +// GetFunctions returns the Functions field. +func (a *AppSpec) GetFunctions() []*AppFunctionsSpec { + if a == nil { + return nil + } + return a.Functions +} + +// GetIngress returns the Ingress field. +func (a *AppSpec) GetIngress() *AppIngressSpec { + if a == nil { + return nil + } + return a.Ingress +} + +// GetJobs returns the Jobs field. +func (a *AppSpec) GetJobs() []*AppJobSpec { + if a == nil { + return nil + } + return a.Jobs +} + +// GetName returns the Name field. +func (a *AppSpec) GetName() string { + if a == nil { + return "" + } + return a.Name +} + +// GetRegion returns the Region field. +func (a *AppSpec) GetRegion() string { + if a == nil { + return "" + } + return a.Region +} + +// GetServices returns the Services field. +func (a *AppSpec) GetServices() []*AppServiceSpec { + if a == nil { + return nil + } + return a.Services +} + +// GetStaticSites returns the StaticSites field. +func (a *AppSpec) GetStaticSites() []*AppStaticSiteSpec { + if a == nil { + return nil + } + return a.StaticSites +} + +// GetWorkers returns the Workers field. +func (a *AppSpec) GetWorkers() []*AppWorkerSpec { + if a == nil { + return nil + } + return a.Workers +} + +// GetBuildCommand returns the BuildCommand field. +func (a *AppStaticSiteSpec) GetBuildCommand() string { + if a == nil { + return "" + } + return a.BuildCommand +} + +// GetCatchallDocument returns the CatchallDocument field. +func (a *AppStaticSiteSpec) GetCatchallDocument() string { + if a == nil { + return "" + } + return a.CatchallDocument +} + +// GetCORS returns the CORS field. +func (a *AppStaticSiteSpec) GetCORS() *AppCORSPolicy { + if a == nil { + return nil + } + return a.CORS +} + +// GetDockerfilePath returns the DockerfilePath field. +func (a *AppStaticSiteSpec) GetDockerfilePath() string { + if a == nil { + return "" + } + return a.DockerfilePath +} + +// GetEnvs returns the Envs field. +func (a *AppStaticSiteSpec) GetEnvs() []*AppVariableDefinition { + if a == nil { + return nil + } + return a.Envs +} + +// GetErrorDocument returns the ErrorDocument field. +func (a *AppStaticSiteSpec) GetErrorDocument() string { + if a == nil { + return "" + } + return a.ErrorDocument +} + +// GetGit returns the Git field. +func (a *AppStaticSiteSpec) GetGit() *GitSourceSpec { + if a == nil { + return nil + } + return a.Git +} + +// GetGitHub returns the GitHub field. +func (a *AppStaticSiteSpec) GetGitHub() *GitHubSourceSpec { + if a == nil { + return nil + } + return a.GitHub +} + +// GetGitLab returns the GitLab field. +func (a *AppStaticSiteSpec) GetGitLab() *GitLabSourceSpec { + if a == nil { + return nil + } + return a.GitLab +} + +// GetIndexDocument returns the IndexDocument field. +func (a *AppStaticSiteSpec) GetIndexDocument() string { + if a == nil { + return "" + } + return a.IndexDocument +} + +// GetName returns the Name field. +func (a *AppStaticSiteSpec) GetName() string { + if a == nil { + return "" + } + return a.Name +} + +// GetOutputDir returns the OutputDir field. +func (a *AppStaticSiteSpec) GetOutputDir() string { + if a == nil { + return "" + } + return a.OutputDir +} + +// GetRoutes returns the Routes field. +func (a *AppStaticSiteSpec) GetRoutes() []*AppRouteSpec { + if a == nil { + return nil + } + return a.Routes +} + +// GetSourceDir returns the SourceDir field. +func (a *AppStaticSiteSpec) GetSourceDir() string { + if a == nil { + return "" + } + return a.SourceDir +} + +// GetExact returns the Exact field. +func (a *AppStringMatch) GetExact() string { + if a == nil { + return "" + } + return a.Exact +} + +// GetPrefix returns the Prefix field. +func (a *AppStringMatch) GetPrefix() string { + if a == nil { + return "" + } + return a.Prefix +} + +// GetRegex returns the Regex field. +func (a *AppStringMatch) GetRegex() string { + if a == nil { + return "" + } + return a.Regex +} + +// GetBuildSeconds returns the BuildSeconds field. +func (a *AppTier) GetBuildSeconds() string { + if a == nil { + return "" + } + return a.BuildSeconds +} + +// GetEgressBandwidthBytes returns the EgressBandwidthBytes field. +func (a *AppTier) GetEgressBandwidthBytes() string { + if a == nil { + return "" + } + return a.EgressBandwidthBytes +} + +// GetName returns the Name field. +func (a *AppTier) GetName() string { + if a == nil { + return "" + } + return a.Name +} + +// GetSlug returns the Slug field. +func (a *AppTier) GetSlug() string { + if a == nil { + return "" + } + return a.Slug +} + +// GetKey returns the Key field. +func (a *AppVariableDefinition) GetKey() string { + if a == nil { + return "" + } + return a.Key +} + +// GetScope returns the Scope field. +func (a *AppVariableDefinition) GetScope() AppVariableScope { + if a == nil { + return "" + } + return a.Scope +} + +// GetType returns the Type field. +func (a *AppVariableDefinition) GetType() AppVariableType { + if a == nil { + return "" + } + return a.Type +} + +// GetValue returns the Value field. +func (a *AppVariableDefinition) GetValue() string { + if a == nil { + return "" + } + return a.Value +} + +// GetAlerts returns the Alerts field. +func (a *AppWorkerSpec) GetAlerts() []*AppAlertSpec { + if a == nil { + return nil + } + return a.Alerts +} + +// GetBuildCommand returns the BuildCommand field. +func (a *AppWorkerSpec) GetBuildCommand() string { + if a == nil { + return "" + } + return a.BuildCommand +} + +// GetDockerfilePath returns the DockerfilePath field. +func (a *AppWorkerSpec) GetDockerfilePath() string { + if a == nil { + return "" + } + return a.DockerfilePath +} + +// GetEnvs returns the Envs field. +func (a *AppWorkerSpec) GetEnvs() []*AppVariableDefinition { + if a == nil { + return nil + } + return a.Envs +} + +// GetGit returns the Git field. +func (a *AppWorkerSpec) GetGit() *GitSourceSpec { + if a == nil { + return nil + } + return a.Git +} + +// GetGitHub returns the GitHub field. +func (a *AppWorkerSpec) GetGitHub() *GitHubSourceSpec { + if a == nil { + return nil + } + return a.GitHub +} + +// GetGitLab returns the GitLab field. +func (a *AppWorkerSpec) GetGitLab() *GitLabSourceSpec { + if a == nil { + return nil + } + return a.GitLab +} + +// GetImage returns the Image field. +func (a *AppWorkerSpec) GetImage() *ImageSourceSpec { + if a == nil { + return nil + } + return a.Image +} + +// GetInstanceCount returns the InstanceCount field. +func (a *AppWorkerSpec) GetInstanceCount() int64 { + if a == nil { + return 0 + } + return a.InstanceCount +} + +// GetInstanceSizeSlug returns the InstanceSizeSlug field. +func (a *AppWorkerSpec) GetInstanceSizeSlug() string { + if a == nil { + return "" + } + return a.InstanceSizeSlug +} + +// GetLogDestinations returns the LogDestinations field. +func (a *AppWorkerSpec) GetLogDestinations() []*AppLogDestinationSpec { + if a == nil { + return nil + } + return a.LogDestinations +} + +// GetName returns the Name field. +func (a *AppWorkerSpec) GetName() string { + if a == nil { + return "" + } + return a.Name +} + +// GetRunCommand returns the RunCommand field. +func (a *AppWorkerSpec) GetRunCommand() string { + if a == nil { + return "" + } + return a.RunCommand +} + +// GetSourceDir returns the SourceDir field. +func (a *AppWorkerSpec) GetSourceDir() string { + if a == nil { + return "" + } + return a.SourceDir +} + +// GetDescription returns the Description field. +func (b *Buildpack) GetDescription() []string { + if b == nil { + return nil + } + return b.Description +} + +// GetDocsLink returns the DocsLink field. +func (b *Buildpack) GetDocsLink() string { + if b == nil { + return "" + } + return b.DocsLink +} + +// GetID returns the ID field. +func (b *Buildpack) GetID() string { + if b == nil { + return "" + } + return b.ID +} + +// GetLatest returns the Latest field. +func (b *Buildpack) GetLatest() bool { + if b == nil { + return false + } + return b.Latest +} + +// GetMajorVersion returns the MajorVersion field. +func (b *Buildpack) GetMajorVersion() int32 { + if b == nil { + return 0 + } + return b.MajorVersion +} + +// GetName returns the Name field. +func (b *Buildpack) GetName() string { + if b == nil { + return "" + } + return b.Name +} + +// GetVersion returns the Version field. +func (b *Buildpack) GetVersion() string { + if b == nil { + return "" + } + return b.Version +} + +// GetCause returns the Cause field. +func (d *Deployment) GetCause() string { + if d == nil { + return "" + } + return d.Cause +} + +// GetCauseDetails returns the CauseDetails field. +func (d *Deployment) GetCauseDetails() *DeploymentCauseDetails { + if d == nil { + return nil + } + return d.CauseDetails +} + +// GetClonedFrom returns the ClonedFrom field. +func (d *Deployment) GetClonedFrom() string { + if d == nil { + return "" + } + return d.ClonedFrom +} + +// GetCreatedAt returns the CreatedAt field. +func (d *Deployment) GetCreatedAt() time.Time { + if d == nil { + return time.Time{} + } + return d.CreatedAt +} + +// GetFunctions returns the Functions field. +func (d *Deployment) GetFunctions() []*DeploymentFunctions { + if d == nil { + return nil + } + return d.Functions +} + +// GetID returns the ID field. +func (d *Deployment) GetID() string { + if d == nil { + return "" + } + return d.ID +} + +// GetJobs returns the Jobs field. +func (d *Deployment) GetJobs() []*DeploymentJob { + if d == nil { + return nil + } + return d.Jobs +} + +// GetLoadBalancerID returns the LoadBalancerID field. +func (d *Deployment) GetLoadBalancerID() string { + if d == nil { + return "" + } + return d.LoadBalancerID +} + +// GetPhase returns the Phase field. +func (d *Deployment) GetPhase() DeploymentPhase { + if d == nil { + return "" + } + return d.Phase +} + +// GetPhaseLastUpdatedAt returns the PhaseLastUpdatedAt field. +func (d *Deployment) GetPhaseLastUpdatedAt() time.Time { + if d == nil { + return time.Time{} + } + return d.PhaseLastUpdatedAt +} + +// GetPreviousDeploymentID returns the PreviousDeploymentID field. +func (d *Deployment) GetPreviousDeploymentID() string { + if d == nil { + return "" + } + return d.PreviousDeploymentID +} + +// GetProgress returns the Progress field. +func (d *Deployment) GetProgress() *DeploymentProgress { + if d == nil { + return nil + } + return d.Progress +} + +// GetServices returns the Services field. +func (d *Deployment) GetServices() []*DeploymentService { + if d == nil { + return nil + } + return d.Services +} + +// GetSpec returns the Spec field. +func (d *Deployment) GetSpec() *AppSpec { + if d == nil { + return nil + } + return d.Spec +} + +// GetStaticSites returns the StaticSites field. +func (d *Deployment) GetStaticSites() []*DeploymentStaticSite { + if d == nil { + return nil + } + return d.StaticSites +} + +// GetTierSlug returns the TierSlug field. +func (d *Deployment) GetTierSlug() string { + if d == nil { + return "" + } + return d.TierSlug +} + +// GetUpdatedAt returns the UpdatedAt field. +func (d *Deployment) GetUpdatedAt() time.Time { + if d == nil { + return time.Time{} + } + return d.UpdatedAt +} + +// GetWorkers returns the Workers field. +func (d *Deployment) GetWorkers() []*DeploymentWorker { + if d == nil { + return nil + } + return d.Workers +} + +// GetDigitalOceanUserAction returns the DigitalOceanUserAction field. +func (d *DeploymentCauseDetails) GetDigitalOceanUserAction() *DeploymentCauseDetailsDigitalOceanUserAction { + if d == nil { + return nil + } + return d.DigitalOceanUserAction +} + +// GetGitPush returns the GitPush field. +func (d *DeploymentCauseDetails) GetGitPush() *DeploymentCauseDetailsGitPush { + if d == nil { + return nil + } + return d.GitPush +} + +// GetInternal returns the Internal field. +func (d *DeploymentCauseDetails) GetInternal() bool { + if d == nil { + return false + } + return d.Internal +} + +// GetType returns the Type field. +func (d *DeploymentCauseDetails) GetType() DeploymentCauseDetailsType { + if d == nil { + return "" + } + return d.Type +} + +// GetEmail returns the Email field. +func (d *DeploymentCauseDetailsDigitalOceanUser) GetEmail() string { + if d == nil { + return "" + } + return d.Email +} + +// GetFullName returns the FullName field. +func (d *DeploymentCauseDetailsDigitalOceanUser) GetFullName() string { + if d == nil { + return "" + } + return d.FullName +} + +// GetUUID returns the UUID field. +func (d *DeploymentCauseDetailsDigitalOceanUser) GetUUID() string { + if d == nil { + return "" + } + return d.UUID +} + +// GetName returns the Name field. +func (d *DeploymentCauseDetailsDigitalOceanUserAction) GetName() DeploymentCauseDetailsDigitalOceanUserActionName { + if d == nil { + return "" + } + return d.Name +} + +// GetUser returns the User field. +func (d *DeploymentCauseDetailsDigitalOceanUserAction) GetUser() *DeploymentCauseDetailsDigitalOceanUser { + if d == nil { + return nil + } + return d.User +} + +// GetCommitAuthor returns the CommitAuthor field. +func (d *DeploymentCauseDetailsGitPush) GetCommitAuthor() string { + if d == nil { + return "" + } + return d.CommitAuthor +} + +// GetCommitMessage returns the CommitMessage field. +func (d *DeploymentCauseDetailsGitPush) GetCommitMessage() string { + if d == nil { + return "" + } + return d.CommitMessage +} + +// GetCommitSHA returns the CommitSHA field. +func (d *DeploymentCauseDetailsGitPush) GetCommitSHA() string { + if d == nil { + return "" + } + return d.CommitSHA +} + +// GetGitHub returns the GitHub field. +func (d *DeploymentCauseDetailsGitPush) GetGitHub() *GitHubSourceSpec { + if d == nil { + return nil + } + return d.GitHub +} + +// GetGitLab returns the GitLab field. +func (d *DeploymentCauseDetailsGitPush) GetGitLab() *GitLabSourceSpec { + if d == nil { + return nil + } + return d.GitLab +} + +// GetUsername returns the Username field. +func (d *DeploymentCauseDetailsGitPush) GetUsername() string { + if d == nil { + return "" + } + return d.Username +} + +// GetName returns the Name field. +func (d *DeploymentFunctions) GetName() string { + if d == nil { + return "" + } + return d.Name +} + +// GetNamespace returns the Namespace field. +func (d *DeploymentFunctions) GetNamespace() string { + if d == nil { + return "" + } + return d.Namespace +} + +// GetSourceCommitHash returns the SourceCommitHash field. +func (d *DeploymentFunctions) GetSourceCommitHash() string { + if d == nil { + return "" + } + return d.SourceCommitHash +} + +// GetBuildpacks returns the Buildpacks field. +func (d *DeploymentJob) GetBuildpacks() []*Buildpack { + if d == nil { + return nil + } + return d.Buildpacks +} + +// GetName returns the Name field. +func (d *DeploymentJob) GetName() string { + if d == nil { + return "" + } + return d.Name +} + +// GetSourceCommitHash returns the SourceCommitHash field. +func (d *DeploymentJob) GetSourceCommitHash() string { + if d == nil { + return "" + } + return d.SourceCommitHash +} + +// GetErrorSteps returns the ErrorSteps field. +func (d *DeploymentProgress) GetErrorSteps() int32 { + if d == nil { + return 0 + } + return d.ErrorSteps +} + +// GetPendingSteps returns the PendingSteps field. +func (d *DeploymentProgress) GetPendingSteps() int32 { + if d == nil { + return 0 + } + return d.PendingSteps +} + +// GetRunningSteps returns the RunningSteps field. +func (d *DeploymentProgress) GetRunningSteps() int32 { + if d == nil { + return 0 + } + return d.RunningSteps +} + +// GetSteps returns the Steps field. +func (d *DeploymentProgress) GetSteps() []*DeploymentProgressStep { + if d == nil { + return nil + } + return d.Steps +} + +// GetSuccessSteps returns the SuccessSteps field. +func (d *DeploymentProgress) GetSuccessSteps() int32 { + if d == nil { + return 0 + } + return d.SuccessSteps +} + +// GetSummarySteps returns the SummarySteps field. +func (d *DeploymentProgress) GetSummarySteps() []*DeploymentProgressStep { + if d == nil { + return nil + } + return d.SummarySteps +} + +// GetTotalSteps returns the TotalSteps field. +func (d *DeploymentProgress) GetTotalSteps() int32 { + if d == nil { + return 0 + } + return d.TotalSteps +} + +// GetComponentName returns the ComponentName field. +func (d *DeploymentProgressStep) GetComponentName() string { + if d == nil { + return "" + } + return d.ComponentName +} + +// GetEndedAt returns the EndedAt field. +func (d *DeploymentProgressStep) GetEndedAt() time.Time { + if d == nil { + return time.Time{} + } + return d.EndedAt +} + +// GetMessageBase returns the MessageBase field. +func (d *DeploymentProgressStep) GetMessageBase() string { + if d == nil { + return "" + } + return d.MessageBase +} + +// GetName returns the Name field. +func (d *DeploymentProgressStep) GetName() string { + if d == nil { + return "" + } + return d.Name +} + +// GetReason returns the Reason field. +func (d *DeploymentProgressStep) GetReason() *DeploymentProgressStepReason { + if d == nil { + return nil + } + return d.Reason +} + +// GetStartedAt returns the StartedAt field. +func (d *DeploymentProgressStep) GetStartedAt() time.Time { + if d == nil { + return time.Time{} + } + return d.StartedAt +} + +// GetStatus returns the Status field. +func (d *DeploymentProgressStep) GetStatus() DeploymentProgressStepStatus { + if d == nil { + return "" + } + return d.Status +} + +// GetSteps returns the Steps field. +func (d *DeploymentProgressStep) GetSteps() []*DeploymentProgressStep { + if d == nil { + return nil + } + return d.Steps +} + +// GetCode returns the Code field. +func (d *DeploymentProgressStepReason) GetCode() string { + if d == nil { + return "" + } + return d.Code +} + +// GetMessage returns the Message field. +func (d *DeploymentProgressStepReason) GetMessage() string { + if d == nil { + return "" + } + return d.Message +} + +// GetBuildpacks returns the Buildpacks field. +func (d *DeploymentService) GetBuildpacks() []*Buildpack { + if d == nil { + return nil + } + return d.Buildpacks +} + +// GetName returns the Name field. +func (d *DeploymentService) GetName() string { + if d == nil { + return "" + } + return d.Name +} + +// GetSourceCommitHash returns the SourceCommitHash field. +func (d *DeploymentService) GetSourceCommitHash() string { + if d == nil { + return "" + } + return d.SourceCommitHash +} + +// GetBuildpacks returns the Buildpacks field. +func (d *DeploymentStaticSite) GetBuildpacks() []*Buildpack { + if d == nil { + return nil + } + return d.Buildpacks +} + +// GetName returns the Name field. +func (d *DeploymentStaticSite) GetName() string { + if d == nil { + return "" + } + return d.Name +} + +// GetSourceCommitHash returns the SourceCommitHash field. +func (d *DeploymentStaticSite) GetSourceCommitHash() string { + if d == nil { + return "" + } + return d.SourceCommitHash +} + +// GetBuildpacks returns the Buildpacks field. +func (d *DeploymentWorker) GetBuildpacks() []*Buildpack { + if d == nil { + return nil + } + return d.Buildpacks +} + +// GetName returns the Name field. +func (d *DeploymentWorker) GetName() string { + if d == nil { + return "" + } + return d.Name +} + +// GetSourceCommitHash returns the SourceCommitHash field. +func (d *DeploymentWorker) GetSourceCommitHash() string { + if d == nil { + return "" + } + return d.SourceCommitHash +} + +// GetSpec returns the Spec field. +func (d *DeployTemplate) GetSpec() *AppSpec { + if d == nil { + return nil + } + return d.Spec +} + +// GetCommitSHA returns the CommitSHA field. +func (d *DetectRequest) GetCommitSHA() string { + if d == nil { + return "" + } + return d.CommitSHA +} + +// GetGit returns the Git field. +func (d *DetectRequest) GetGit() *GitSourceSpec { + if d == nil { + return nil + } + return d.Git +} + +// GetGitHub returns the GitHub field. +func (d *DetectRequest) GetGitHub() *GitHubSourceSpec { + if d == nil { + return nil + } + return d.GitHub +} + +// GetGitLab returns the GitLab field. +func (d *DetectRequest) GetGitLab() *GitLabSourceSpec { + if d == nil { + return nil + } + return d.GitLab +} + +// GetSourceDir returns the SourceDir field. +func (d *DetectRequest) GetSourceDir() string { + if d == nil { + return "" + } + return d.SourceDir +} + +// GetComponents returns the Components field. +func (d *DetectResponse) GetComponents() []*DetectResponseComponent { + if d == nil { + return nil + } + return d.Components +} + +// GetTemplate returns the Template field. +func (d *DetectResponse) GetTemplate() *DeployTemplate { + if d == nil { + return nil + } + return d.Template +} + +// GetTemplateError returns the TemplateError field. +func (d *DetectResponse) GetTemplateError() string { + if d == nil { + return "" + } + return d.TemplateError +} + +// GetTemplateFound returns the TemplateFound field. +func (d *DetectResponse) GetTemplateFound() bool { + if d == nil { + return false + } + return d.TemplateFound +} + +// GetTemplateValid returns the TemplateValid field. +func (d *DetectResponse) GetTemplateValid() bool { + if d == nil { + return false + } + return d.TemplateValid +} + +// GetBuildCommand returns the BuildCommand field. +func (d *DetectResponseComponent) GetBuildCommand() string { + if d == nil { + return "" + } + return d.BuildCommand +} + +// GetBuildpacks returns the Buildpacks field. +func (d *DetectResponseComponent) GetBuildpacks() []*Buildpack { + if d == nil { + return nil + } + return d.Buildpacks +} + +// GetDockerfiles returns the Dockerfiles field. +func (d *DetectResponseComponent) GetDockerfiles() []string { + if d == nil { + return nil + } + return d.Dockerfiles +} + +// GetEnvVars returns the EnvVars field. +func (d *DetectResponseComponent) GetEnvVars() []*AppVariableDefinition { + if d == nil { + return nil + } + return d.EnvVars +} + +// GetHTTPPorts returns the HTTPPorts field. +func (d *DetectResponseComponent) GetHTTPPorts() []int64 { + if d == nil { + return nil + } + return d.HTTPPorts +} + +// GetRunCommand returns the RunCommand field. +func (d *DetectResponseComponent) GetRunCommand() string { + if d == nil { + return "" + } + return d.RunCommand +} + +// GetServerlessPackages returns the ServerlessPackages field. +func (d *DetectResponseComponent) GetServerlessPackages() []*DetectResponseServerlessPackage { + if d == nil { + return nil + } + return d.ServerlessPackages +} + +// GetSourceDir returns the SourceDir field. +func (d *DetectResponseComponent) GetSourceDir() string { + if d == nil { + return "" + } + return d.SourceDir +} + +// GetStrategy returns the Strategy field. +func (d *DetectResponseComponent) GetStrategy() DetectResponseType { + if d == nil { + return "" + } + return d.Strategy +} + +// GetTypes returns the Types field. +func (d *DetectResponseComponent) GetTypes() []string { + if d == nil { + return nil + } + return d.Types +} + +// GetLimits returns the Limits field. +func (d *DetectResponseServerlessFunction) GetLimits() *DetectResponseServerlessFunctionLimits { + if d == nil { + return nil + } + return d.Limits +} + +// GetName returns the Name field. +func (d *DetectResponseServerlessFunction) GetName() string { + if d == nil { + return "" + } + return d.Name +} + +// GetPackage returns the Package field. +func (d *DetectResponseServerlessFunction) GetPackage() string { + if d == nil { + return "" + } + return d.Package +} + +// GetRuntime returns the Runtime field. +func (d *DetectResponseServerlessFunction) GetRuntime() string { + if d == nil { + return "" + } + return d.Runtime +} + +// GetLogs returns the Logs field. +func (d *DetectResponseServerlessFunctionLimits) GetLogs() string { + if d == nil { + return "" + } + return d.Logs +} + +// GetMemory returns the Memory field. +func (d *DetectResponseServerlessFunctionLimits) GetMemory() string { + if d == nil { + return "" + } + return d.Memory +} + +// GetTimeout returns the Timeout field. +func (d *DetectResponseServerlessFunctionLimits) GetTimeout() string { + if d == nil { + return "" + } + return d.Timeout +} + +// GetFunctions returns the Functions field. +func (d *DetectResponseServerlessPackage) GetFunctions() []*DetectResponseServerlessFunction { + if d == nil { + return nil + } + return d.Functions +} + +// GetName returns the Name field. +func (d *DetectResponseServerlessPackage) GetName() string { + if d == nil { + return "" + } + return d.Name +} + +// GetBranch returns the Branch field. +func (g *GitHubSourceSpec) GetBranch() string { + if g == nil { + return "" + } + return g.Branch +} + +// GetDeployOnPush returns the DeployOnPush field. +func (g *GitHubSourceSpec) GetDeployOnPush() bool { + if g == nil { + return false + } + return g.DeployOnPush +} + +// GetRepo returns the Repo field. +func (g *GitHubSourceSpec) GetRepo() string { + if g == nil { + return "" + } + return g.Repo +} + +// GetBranch returns the Branch field. +func (g *GitLabSourceSpec) GetBranch() string { + if g == nil { + return "" + } + return g.Branch +} + +// GetDeployOnPush returns the DeployOnPush field. +func (g *GitLabSourceSpec) GetDeployOnPush() bool { + if g == nil { + return false + } + return g.DeployOnPush +} + +// GetRepo returns the Repo field. +func (g *GitLabSourceSpec) GetRepo() string { + if g == nil { + return "" + } + return g.Repo +} + +// GetBranch returns the Branch field. +func (g *GitSourceSpec) GetBranch() string { + if g == nil { + return "" + } + return g.Branch +} + +// GetRepoCloneURL returns the RepoCloneURL field. +func (g *GitSourceSpec) GetRepoCloneURL() string { + if g == nil { + return "" + } + return g.RepoCloneURL +} + +// GetRegistry returns the Registry field. +func (i *ImageSourceSpec) GetRegistry() string { + if i == nil { + return "" + } + return i.Registry +} + +// GetRegistryType returns the RegistryType field. +func (i *ImageSourceSpec) GetRegistryType() ImageSourceSpecRegistryType { + if i == nil { + return "" + } + return i.RegistryType +} + +// GetRepository returns the Repository field. +func (i *ImageSourceSpec) GetRepository() string { + if i == nil { + return "" + } + return i.Repository +} + +// GetTag returns the Tag field. +func (i *ImageSourceSpec) GetTag() string { + if i == nil { + return "" + } + return i.Tag +} + +// GetAppID returns the AppID field. +func (u *UpgradeBuildpackRequest) GetAppID() string { + if u == nil { + return "" + } + return u.AppID +} + +// GetBuildpackID returns the BuildpackID field. +func (u *UpgradeBuildpackRequest) GetBuildpackID() string { + if u == nil { + return "" + } + return u.BuildpackID +} + +// GetMajorVersion returns the MajorVersion field. +func (u *UpgradeBuildpackRequest) GetMajorVersion() int32 { + if u == nil { + return 0 + } + return u.MajorVersion +} + +// GetTriggerDeployment returns the TriggerDeployment field. +func (u *UpgradeBuildpackRequest) GetTriggerDeployment() bool { + if u == nil { + return false + } + return u.TriggerDeployment +} + +// GetAffectedComponents returns the AffectedComponents field. +func (u *UpgradeBuildpackResponse) GetAffectedComponents() []string { + if u == nil { + return nil + } + return u.AffectedComponents +} + +// GetDeployment returns the Deployment field. +func (u *UpgradeBuildpackResponse) GetDeployment() *Deployment { + if u == nil { + return nil + } + return u.Deployment +} diff --git a/vendor/github.com/digitalocean/godo/databases.go b/vendor/github.com/digitalocean/godo/databases.go index ffa452b21f..69bd6c9f52 100644 --- a/vendor/github.com/digitalocean/godo/databases.go +++ b/vendor/github.com/digitalocean/godo/databases.go @@ -268,6 +268,7 @@ type DatabaseDB struct { // DatabaseReplica represents a read-only replica of a particular database type DatabaseReplica struct { + ID string `json:"id"` Name string `json:"name"` Connection *DatabaseConnection `json:"connection"` PrivateConnection *DatabaseConnection `json:"private_connection,omitempty"` diff --git a/vendor/github.com/digitalocean/godo/floating_ips.go b/vendor/github.com/digitalocean/godo/floating_ips.go index 0458717a6b..5a29c67ee9 100644 --- a/vendor/github.com/digitalocean/godo/floating_ips.go +++ b/vendor/github.com/digitalocean/godo/floating_ips.go @@ -28,9 +28,11 @@ var _ FloatingIPsService = &FloatingIPsServiceOp{} // FloatingIP represents a Digital Ocean floating IP. type FloatingIP struct { - Region *Region `json:"region"` - Droplet *Droplet `json:"droplet"` - IP string `json:"ip"` + Region *Region `json:"region"` + Droplet *Droplet `json:"droplet"` + IP string `json:"ip"` + ProjectID string `json:"project_id"` + Locked bool `json:"locked"` } func (f FloatingIP) String() string { @@ -59,6 +61,7 @@ type floatingIPRoot struct { type FloatingIPCreateRequest struct { Region string `json:"region,omitempty"` DropletID int `json:"droplet_id,omitempty"` + ProjectID string `json:"project_id,omitempty"` } // List all floating IPs. diff --git a/vendor/github.com/digitalocean/godo/godo.go b/vendor/github.com/digitalocean/godo/godo.go index ae2e2238a5..46320bd741 100644 --- a/vendor/github.com/digitalocean/godo/godo.go +++ b/vendor/github.com/digitalocean/godo/godo.go @@ -20,7 +20,7 @@ import ( ) const ( - libraryVersion = "1.83.0" + libraryVersion = "1.85.0" defaultBaseURL = "https://api.digitalocean.com/" userAgent = "godo/" + libraryVersion mediaType = "application/json" diff --git a/vendor/github.com/digitalocean/godo/reserved_ips.go b/vendor/github.com/digitalocean/godo/reserved_ips.go index f767f86c0e..5370c14c75 100644 --- a/vendor/github.com/digitalocean/godo/reserved_ips.go +++ b/vendor/github.com/digitalocean/godo/reserved_ips.go @@ -29,9 +29,11 @@ var _ ReservedIPsService = &ReservedIPsServiceOp{} // ReservedIP represents a Digital Ocean reserved IP. type ReservedIP struct { - Region *Region `json:"region"` - Droplet *Droplet `json:"droplet"` - IP string `json:"ip"` + Region *Region `json:"region"` + Droplet *Droplet `json:"droplet"` + IP string `json:"ip"` + ProjectID string `json:"project_id"` + Locked bool `json:"locked"` } func (f ReservedIP) String() string { @@ -60,6 +62,7 @@ type reservedIPRoot struct { type ReservedIPCreateRequest struct { Region string `json:"region,omitempty"` DropletID int `json:"droplet_id,omitempty"` + ProjectID string `json:"project_id,omitempty"` } // List all reserved IPs. diff --git a/vendor/github.com/digitalocean/godo/tags.go b/vendor/github.com/digitalocean/godo/tags.go index 8715f1482f..a19a4b0c28 100644 --- a/vendor/github.com/digitalocean/godo/tags.go +++ b/vendor/github.com/digitalocean/godo/tags.go @@ -95,7 +95,7 @@ type Tag struct { Resources *TaggedResources `json:"resources,omitempty"` } -//TagCreateRequest represents the JSON structure of a request of that type. +// TagCreateRequest represents the JSON structure of a request of that type. type TagCreateRequest struct { Name string `json:"name"` } diff --git a/vendor/github.com/hashicorp/vault/api/README.md b/vendor/github.com/hashicorp/vault/api/README.md index 38840caa34..7230ce779f 100644 --- a/vendor/github.com/hashicorp/vault/api/README.md +++ b/vendor/github.com/hashicorp/vault/api/README.md @@ -4,5 +4,6 @@ Vault API This provides the `github.com/hashicorp/vault/api` package which contains code useful for interacting with a Vault server. For examples of how to use this module, see the [vault-examples](https://github.com/hashicorp/vault-examples) repo. +For a step-by-step walkthrough on using these client libraries, see the [developer quickstart](https://www.vaultproject.io/docs/get-started/developer-qs). [![GoDoc](https://godoc.org/github.com/hashicorp/vault/api?status.png)](https://godoc.org/github.com/hashicorp/vault/api) \ No newline at end of file diff --git a/vendor/github.com/hashicorp/vault/api/client.go b/vendor/github.com/hashicorp/vault/api/client.go index b5f7e9bb82..7c17981059 100644 --- a/vendor/github.com/hashicorp/vault/api/client.go +++ b/vendor/github.com/hashicorp/vault/api/client.go @@ -347,8 +347,6 @@ func (c *Config) ReadEnvironment() error { } if v := os.Getenv(EnvVaultAgentAddr); v != "" { envAgentAddress = v - } else if v := os.Getenv(EnvVaultAgentAddress); v != "" { - envAgentAddress = v } if v := os.Getenv(EnvVaultMaxRetries); v != "" { maxRetries, err := strconv.ParseUint(v, 10, 32) @@ -392,12 +390,6 @@ func (c *Config) ReadEnvironment() error { if err != nil { return fmt.Errorf("could not parse VAULT_SKIP_VERIFY") } - } else if v := os.Getenv(EnvVaultInsecure); v != "" { - var err error - envInsecure, err = strconv.ParseBool(v) - if err != nil { - return fmt.Errorf("could not parse VAULT_INSECURE") - } } if v := os.Getenv(EnvVaultSRVLookup); v != "" { var err error @@ -470,6 +462,51 @@ func (c *Config) ReadEnvironment() error { return nil } +// ParseAddress transforms the provided address into a url.URL and handles +// the case of Unix domain sockets by setting the DialContext in the +// configuration's HttpClient.Transport. This function must be called with +// c.modifyLock held for write access. +func (c *Config) ParseAddress(address string) (*url.URL, error) { + u, err := url.Parse(address) + if err != nil { + return nil, err + } + + c.Address = address + + if strings.HasPrefix(address, "unix://") { + // When the address begins with unix://, always change the transport's + // DialContext (to match previous behaviour) + socket := strings.TrimPrefix(address, "unix://") + + if transport, ok := c.HttpClient.Transport.(*http.Transport); ok { + transport.DialContext = func(context.Context, string, string) (net.Conn, error) { + return net.Dial("unix", socket) + } + + // Since the address points to a unix domain socket, the scheme in the + // *URL would be set to `unix`. The *URL in the client is expected to + // be pointing to the protocol used in the application layer and not to + // the transport layer. Hence, setting the fields accordingly. + u.Scheme = "http" + u.Host = socket + u.Path = "" + } else { + return nil, fmt.Errorf("attempting to specify unix:// address with non-transport transport") + } + } else if strings.HasPrefix(c.Address, "unix://") { + // When the address being set does not begin with unix:// but the previous + // address in the Config did, change the transport's DialContext back to + // use the default configuration that cleanhttp uses. + + if transport, ok := c.HttpClient.Transport.(*http.Transport); ok { + transport.DialContext = cleanhttp.DefaultPooledTransport().DialContext + } + } + + return u, nil +} + func parseRateLimit(val string) (rate float64, burst int, err error) { _, err = fmt.Sscanf(val, "%f:%d", &rate, &burst) if err != nil { @@ -542,27 +579,11 @@ func NewClient(c *Config) (*Client, error) { address = c.AgentAddress } - u, err := url.Parse(address) + u, err := c.ParseAddress(address) if err != nil { return nil, err } - if strings.HasPrefix(address, "unix://") { - socket := strings.TrimPrefix(address, "unix://") - transport := c.HttpClient.Transport.(*http.Transport) - transport.DialContext = func(context.Context, string, string) (net.Conn, error) { - return net.Dial("unix", socket) - } - - // Since the address points to a unix domain socket, the scheme in the - // *URL would be set to `unix`. The *URL in the client is expected to - // be pointing to the protocol used in the application layer and not to - // the transport layer. Hence, setting the fields accordingly. - u.Scheme = "http" - u.Host = socket - u.Path = "" - } - client := &Client{ addr: u, config: c, @@ -621,14 +642,11 @@ func (c *Client) SetAddress(addr string) error { c.modifyLock.Lock() defer c.modifyLock.Unlock() - parsedAddr, err := url.Parse(addr) + parsedAddr, err := c.config.ParseAddress(addr) if err != nil { return errwrap.Wrapf("failed to set address: {{err}}", err) } - c.config.modifyLock.Lock() - c.config.Address = addr - c.config.modifyLock.Unlock() c.addr = parsedAddr return nil } @@ -720,6 +738,42 @@ func (c *Client) SetMaxRetries(retries int) { c.config.MaxRetries = retries } +func (c *Client) SetMaxIdleConnections(idle int) { + c.modifyLock.RLock() + defer c.modifyLock.RUnlock() + c.config.modifyLock.Lock() + defer c.config.modifyLock.Unlock() + + c.config.HttpClient.Transport.(*http.Transport).MaxIdleConns = idle +} + +func (c *Client) MaxIdleConnections() int { + c.modifyLock.RLock() + defer c.modifyLock.RUnlock() + c.config.modifyLock.Lock() + defer c.config.modifyLock.Unlock() + + return c.config.HttpClient.Transport.(*http.Transport).MaxIdleConns +} + +func (c *Client) SetDisableKeepAlives(disable bool) { + c.modifyLock.RLock() + defer c.modifyLock.RUnlock() + c.config.modifyLock.Lock() + defer c.config.modifyLock.Unlock() + + c.config.HttpClient.Transport.(*http.Transport).DisableKeepAlives = disable +} + +func (c *Client) DisableKeepAlives() bool { + c.modifyLock.RLock() + defer c.modifyLock.RUnlock() + c.config.modifyLock.RLock() + defer c.config.modifyLock.RUnlock() + + return c.config.HttpClient.Transport.(*http.Transport).DisableKeepAlives +} + func (c *Client) MaxRetries() int { c.modifyLock.RLock() defer c.modifyLock.RUnlock() diff --git a/vendor/github.com/hashicorp/vault/api/kv.go b/vendor/github.com/hashicorp/vault/api/kv.go index 16437582e7..37699df266 100644 --- a/vendor/github.com/hashicorp/vault/api/kv.go +++ b/vendor/github.com/hashicorp/vault/api/kv.go @@ -1,5 +1,11 @@ package api +import "errors" + +// ErrSecretNotFound is returned by KVv1 and KVv2 wrappers to indicate that the +// secret is missing at the given location. +var ErrSecretNotFound = errors.New("secret not found") + // A KVSecret is a key-value secret returned by Vault's KV secrets engine, // and is the most basic type of secret stored in Vault. // diff --git a/vendor/github.com/hashicorp/vault/api/kv_v1.go b/vendor/github.com/hashicorp/vault/api/kv_v1.go index d269070bc3..22ba992384 100644 --- a/vendor/github.com/hashicorp/vault/api/kv_v1.go +++ b/vendor/github.com/hashicorp/vault/api/kv_v1.go @@ -19,7 +19,7 @@ func (kv *KVv1) Get(ctx context.Context, secretPath string) (*KVSecret, error) { return nil, fmt.Errorf("error encountered while reading secret at %s: %w", pathToRead, err) } if secret == nil { - return nil, fmt.Errorf("no secret found at %s", pathToRead) + return nil, fmt.Errorf("%w: at %s", ErrSecretNotFound, pathToRead) } return &KVSecret{ diff --git a/vendor/github.com/hashicorp/vault/api/kv_v2.go b/vendor/github.com/hashicorp/vault/api/kv_v2.go index f0f59abfe5..7a98cfeefd 100644 --- a/vendor/github.com/hashicorp/vault/api/kv_v2.go +++ b/vendor/github.com/hashicorp/vault/api/kv_v2.go @@ -2,7 +2,9 @@ package api import ( "context" + "errors" "fmt" + "net/http" "sort" "strconv" "time" @@ -115,7 +117,7 @@ func (kv *KVv2) Get(ctx context.Context, secretPath string) (*KVSecret, error) { return nil, fmt.Errorf("error encountered while reading secret at %s: %w", pathToRead, err) } if secret == nil { - return nil, fmt.Errorf("no secret found at %s", pathToRead) + return nil, fmt.Errorf("%w: at %s", ErrSecretNotFound, pathToRead) } kvSecret, err := extractDataAndVersionMetadata(secret) @@ -149,7 +151,7 @@ func (kv *KVv2) GetVersion(ctx context.Context, secretPath string, version int) return nil, err } if secret == nil { - return nil, fmt.Errorf("no secret with version %d found at %s", version, pathToRead) + return nil, fmt.Errorf("%w: for version %d at %s", ErrSecretNotFound, version, pathToRead) } kvSecret, err := extractDataAndVersionMetadata(secret) @@ -175,7 +177,7 @@ func (kv *KVv2) GetVersionsAsList(ctx context.Context, secretPath string) ([]KVV return nil, err } if secret == nil || secret.Data == nil { - return nil, fmt.Errorf("no secret metadata found at %s", pathToRead) + return nil, fmt.Errorf("%w: no metadata at %s", ErrSecretNotFound, pathToRead) } md, err := extractFullMetadata(secret) @@ -202,7 +204,7 @@ func (kv *KVv2) GetMetadata(ctx context.Context, secretPath string) (*KVMetadata return nil, err } if secret == nil || secret.Data == nil { - return nil, fmt.Errorf("no secret metadata found at %s", pathToRead) + return nil, fmt.Errorf("%w: no metadata at %s", ErrSecretNotFound, pathToRead) } md, err := extractFullMetadata(secret) @@ -244,7 +246,7 @@ func (kv *KVv2) Put(ctx context.Context, secretPath string, data map[string]inte return nil, fmt.Errorf("error writing secret to %s: %w", pathToWriteTo, err) } if secret == nil { - return nil, fmt.Errorf("no secret was written to %s", pathToWriteTo) + return nil, fmt.Errorf("%w: after writing to %s", ErrSecretNotFound, pathToWriteTo) } metadata, err := extractVersionMetadata(secret) @@ -325,19 +327,19 @@ func (kv *KVv2) Patch(ctx context.Context, secretPath string, newData map[string // Determine which kind of patch to use, // the newer HTTP Patch style or the older read-then-write style var kvs *KVSecret - var perr error + var err error switch patchMethod { case "rw": - kvs, perr = readThenWrite(ctx, kv.c, kv.mountPath, secretPath, newData) + kvs, err = readThenWrite(ctx, kv.c, kv.mountPath, secretPath, newData) case "patch": - kvs, perr = mergePatch(ctx, kv.c, kv.mountPath, secretPath, newData, opts...) + kvs, err = mergePatch(ctx, kv.c, kv.mountPath, secretPath, newData, opts...) case "": - kvs, perr = mergePatch(ctx, kv.c, kv.mountPath, secretPath, newData, opts...) + kvs, err = mergePatch(ctx, kv.c, kv.mountPath, secretPath, newData, opts...) default: return nil, fmt.Errorf("unsupported patch method provided; value for patch method should be string \"rw\" or \"patch\"") } - if perr != nil { - return nil, fmt.Errorf("unable to perform patch: %w", perr) + if err != nil { + return nil, fmt.Errorf("unable to perform patch: %w", err) } if kvs == nil { return nil, fmt.Errorf("no secret was written to %s", secretPath) @@ -478,7 +480,7 @@ func (kv *KVv2) Rollback(ctx context.Context, secretPath string, toVersion int) // Now run it again and read the version we want to roll back to rollbackVersion, err := kv.GetVersion(ctx, secretPath, toVersion) if err != nil { - return nil, fmt.Errorf("unable to get previous version %d of secret: %s", toVersion, err) + return nil, fmt.Errorf("unable to get previous version %d of secret: %w", toVersion, err) } err = validateRollbackVersion(rollbackVersion) @@ -687,18 +689,28 @@ func mergePatch(ctx context.Context, client *Client, mountPath string, secretPat secret, err := client.Logical().JSONMergePatch(ctx, pathToMergePatch, wrappedData) if err != nil { - // If it's a 405, that probably means the server is running a pre-1.9 - // Vault version that doesn't support the HTTP PATCH method. - // Fall back to the old way of doing it. - if re, ok := err.(*ResponseError); ok && re.StatusCode == 405 { - return readThenWrite(ctx, client, mountPath, secretPath, newData) + var re *ResponseError + + if errors.As(err, &re) { + switch re.StatusCode { + // 403 + case http.StatusForbidden: + return nil, fmt.Errorf("received 403 from Vault server; please ensure that token's policy has \"patch\" capability: %w", err) + + // 404 + case http.StatusNotFound: + return nil, fmt.Errorf("%w: performing merge patch to %s", ErrSecretNotFound, pathToMergePatch) + + // 405 + case http.StatusMethodNotAllowed: + // If it's a 405, that probably means the server is running a pre-1.9 + // Vault version that doesn't support the HTTP PATCH method. + // Fall back to the old way of doing it. + return readThenWrite(ctx, client, mountPath, secretPath, newData) + } } - if re, ok := err.(*ResponseError); ok && re.StatusCode == 403 { - return nil, fmt.Errorf("received 403 from Vault server; please ensure that token's policy has \"patch\" capability: %w", err) - } - - return nil, fmt.Errorf("error performing merge patch to %s: %s", pathToMergePatch, err) + return nil, fmt.Errorf("error performing merge patch to %s: %w", pathToMergePatch, err) } metadata, err := extractVersionMetadata(secret) @@ -730,7 +742,7 @@ func readThenWrite(ctx context.Context, client *Client, mountPath string, secret // Make sure the secret already exists if existingVersion == nil || existingVersion.Data == nil { - return nil, fmt.Errorf("no existing secret was found at %s when doing read-then-write patch operation: %w", secretPath, err) + return nil, fmt.Errorf("%w: at %s as part of read-then-write patch operation", ErrSecretNotFound, secretPath) } // Verify existing secret has metadata diff --git a/vendor/github.com/hashicorp/vault/api/lifetime_watcher.go b/vendor/github.com/hashicorp/vault/api/lifetime_watcher.go index f06263526f..5f3eadbffd 100644 --- a/vendor/github.com/hashicorp/vault/api/lifetime_watcher.go +++ b/vendor/github.com/hashicorp/vault/api/lifetime_watcher.go @@ -50,25 +50,24 @@ const ( // LifetimeWatcher is a process for watching lifetime of a secret. // -// watcher, err := client.NewLifetimeWatcher(&LifetimeWatcherInput{ -// Secret: mySecret, -// }) -// go watcher.Start() -// defer watcher.Stop() +// watcher, err := client.NewLifetimeWatcher(&LifetimeWatcherInput{ +// Secret: mySecret, +// }) +// go watcher.Start() +// defer watcher.Stop() // -// for { -// select { -// case err := <-watcher.DoneCh(): -// if err != nil { -// log.Fatal(err) -// } -// -// // Renewal is now over -// case renewal := <-watcher.RenewCh(): -// log.Printf("Successfully renewed: %#v", renewal) -// } -// } +// for { +// select { +// case err := <-watcher.DoneCh(): +// if err != nil { +// log.Fatal(err) +// } // +// // Renewal is now over +// case renewal := <-watcher.RenewCh(): +// log.Printf("Successfully renewed: %#v", renewal) +// } +// } // // `DoneCh` will return if renewal fails, or if the remaining lease duration is // under a built-in threshold and either renewing is not extending it or @@ -251,7 +250,8 @@ func (r *LifetimeWatcher) doRenew() error { } func (r *LifetimeWatcher) doRenewWithOptions(tokenMode bool, nonRenewable bool, initLeaseDuration int, credString string, - renew renewFunc, initialRetryInterval time.Duration) error { + renew renewFunc, initialRetryInterval time.Duration, +) error { if credString == "" || (nonRenewable && r.renewBehavior == RenewBehaviorErrorOnErrors) { return r.errLifetimeWatcherNotRenewable diff --git a/vendor/github.com/hashicorp/vault/api/output_string.go b/vendor/github.com/hashicorp/vault/api/output_string.go index b8c396ebc0..80c591f20b 100644 --- a/vendor/github.com/hashicorp/vault/api/output_string.go +++ b/vendor/github.com/hashicorp/vault/api/output_string.go @@ -60,19 +60,19 @@ func (d *OutputStringError) buildCurlString() (string, error) { finalCurlString = fmt.Sprintf("%s-X %s ", finalCurlString, d.Request.Method) } if d.ClientCACert != "" { - clientCACert := strings.Replace(d.ClientCACert, "'", "'\"'\"'", -1) + clientCACert := strings.ReplaceAll(d.ClientCACert, "'", "'\"'\"'") finalCurlString = fmt.Sprintf("%s--cacert '%s' ", finalCurlString, clientCACert) } if d.ClientCAPath != "" { - clientCAPath := strings.Replace(d.ClientCAPath, "'", "'\"'\"'", -1) + clientCAPath := strings.ReplaceAll(d.ClientCAPath, "'", "'\"'\"'") finalCurlString = fmt.Sprintf("%s--capath '%s' ", finalCurlString, clientCAPath) } if d.ClientCert != "" { - clientCert := strings.Replace(d.ClientCert, "'", "'\"'\"'", -1) + clientCert := strings.ReplaceAll(d.ClientCert, "'", "'\"'\"'") finalCurlString = fmt.Sprintf("%s--cert '%s' ", finalCurlString, clientCert) } if d.ClientKey != "" { - clientKey := strings.Replace(d.ClientKey, "'", "'\"'\"'", -1) + clientKey := strings.ReplaceAll(d.ClientKey, "'", "'\"'\"'") finalCurlString = fmt.Sprintf("%s--key '%s' ", finalCurlString, clientKey) } for k, v := range d.Request.Header { @@ -87,7 +87,7 @@ func (d *OutputStringError) buildCurlString() (string, error) { if len(body) > 0 { // We need to escape single quotes since that's what we're using to // quote the body - escapedBody := strings.Replace(string(body), "'", "'\"'\"'", -1) + escapedBody := strings.ReplaceAll(string(body), "'", "'\"'\"'") finalCurlString = fmt.Sprintf("%s-d '%s' ", finalCurlString, escapedBody) } diff --git a/vendor/github.com/hashicorp/vault/api/plugin_helpers.go b/vendor/github.com/hashicorp/vault/api/plugin_helpers.go index e8ceb9c2fd..2b1b35c3b5 100644 --- a/vendor/github.com/hashicorp/vault/api/plugin_helpers.go +++ b/vendor/github.com/hashicorp/vault/api/plugin_helpers.go @@ -16,7 +16,11 @@ import ( "github.com/hashicorp/errwrap" ) -var ( +const ( + // PluginAutoMTLSEnv is used to ensure AutoMTLS is used. This will override + // setting a TLSProviderFunc for a plugin. + PluginAutoMTLSEnv = "VAULT_PLUGIN_AUTOMTLS_ENABLED" + // PluginMetadataModeEnv is an ENV name used to disable TLS communication // to bootstrap mounting plugins. PluginMetadataModeEnv = "VAULT_PLUGIN_METADATA_MODE" @@ -24,51 +28,51 @@ var ( // PluginUnwrapTokenEnv is the ENV name used to pass unwrap tokens to the // plugin. PluginUnwrapTokenEnv = "VAULT_UNWRAP_TOKEN" - - // sudoPaths is a map containing the paths that require a token's policy - // to have the "sudo" capability. The keys are the paths as strings, in - // the same format as they are returned by the OpenAPI spec. The values - // are the regular expressions that can be used to test whether a given - // path matches that path or not (useful specifically for the paths that - // contain templated fields.) - sudoPaths = map[string]*regexp.Regexp{ - "/auth/token/accessors/": regexp.MustCompile(`^/auth/token/accessors/$`), - "/pki/root": regexp.MustCompile(`^/pki/root$`), - "/pki/root/sign-self-issued": regexp.MustCompile(`^/pki/root/sign-self-issued$`), - "/sys/audit": regexp.MustCompile(`^/sys/audit$`), - "/sys/audit/{path}": regexp.MustCompile(`^/sys/audit/.+$`), - "/sys/auth/{path}": regexp.MustCompile(`^/sys/auth/.+$`), - "/sys/auth/{path}/tune": regexp.MustCompile(`^/sys/auth/.+/tune$`), - "/sys/config/auditing/request-headers": regexp.MustCompile(`^/sys/config/auditing/request-headers$`), - "/sys/config/auditing/request-headers/{header}": regexp.MustCompile(`^/sys/config/auditing/request-headers/.+$`), - "/sys/config/cors": regexp.MustCompile(`^/sys/config/cors$`), - "/sys/config/ui/headers/": regexp.MustCompile(`^/sys/config/ui/headers/$`), - "/sys/config/ui/headers/{header}": regexp.MustCompile(`^/sys/config/ui/headers/.+$`), - "/sys/leases": regexp.MustCompile(`^/sys/leases$`), - "/sys/leases/lookup/": regexp.MustCompile(`^/sys/leases/lookup/$`), - "/sys/leases/lookup/{prefix}": regexp.MustCompile(`^/sys/leases/lookup/.+$`), - "/sys/leases/revoke-force/{prefix}": regexp.MustCompile(`^/sys/leases/revoke-force/.+$`), - "/sys/leases/revoke-prefix/{prefix}": regexp.MustCompile(`^/sys/leases/revoke-prefix/.+$`), - "/sys/plugins/catalog/{name}": regexp.MustCompile(`^/sys/plugins/catalog/[^/]+$`), - "/sys/plugins/catalog/{type}": regexp.MustCompile(`^/sys/plugins/catalog/[\w-]+$`), - "/sys/plugins/catalog/{type}/{name}": regexp.MustCompile(`^/sys/plugins/catalog/[\w-]+/[^/]+$`), - "/sys/raw": regexp.MustCompile(`^/sys/raw$`), - "/sys/raw/{path}": regexp.MustCompile(`^/sys/raw/.+$`), - "/sys/remount": regexp.MustCompile(`^/sys/remount$`), - "/sys/revoke-force/{prefix}": regexp.MustCompile(`^/sys/revoke-force/.+$`), - "/sys/revoke-prefix/{prefix}": regexp.MustCompile(`^/sys/revoke-prefix/.+$`), - "/sys/rotate": regexp.MustCompile(`^/sys/rotate$`), - - // enterprise-only paths - "/sys/replication/dr/primary/secondary-token": regexp.MustCompile(`^/sys/replication/dr/primary/secondary-token$`), - "/sys/replication/performance/primary/secondary-token": regexp.MustCompile(`^/sys/replication/performance/primary/secondary-token$`), - "/sys/replication/primary/secondary-token": regexp.MustCompile(`^/sys/replication/primary/secondary-token$`), - "/sys/replication/reindex": regexp.MustCompile(`^/sys/replication/reindex$`), - "/sys/storage/raft/snapshot-auto/config/": regexp.MustCompile(`^/sys/storage/raft/snapshot-auto/config/$`), - "/sys/storage/raft/snapshot-auto/config/{name}": regexp.MustCompile(`^/sys/storage/raft/snapshot-auto/config/[^/]+$`), - } ) +// sudoPaths is a map containing the paths that require a token's policy +// to have the "sudo" capability. The keys are the paths as strings, in +// the same format as they are returned by the OpenAPI spec. The values +// are the regular expressions that can be used to test whether a given +// path matches that path or not (useful specifically for the paths that +// contain templated fields.) +var sudoPaths = map[string]*regexp.Regexp{ + "/auth/token/accessors/": regexp.MustCompile(`^/auth/token/accessors/$`), + "/pki/root": regexp.MustCompile(`^/pki/root$`), + "/pki/root/sign-self-issued": regexp.MustCompile(`^/pki/root/sign-self-issued$`), + "/sys/audit": regexp.MustCompile(`^/sys/audit$`), + "/sys/audit/{path}": regexp.MustCompile(`^/sys/audit/.+$`), + "/sys/auth/{path}": regexp.MustCompile(`^/sys/auth/.+$`), + "/sys/auth/{path}/tune": regexp.MustCompile(`^/sys/auth/.+/tune$`), + "/sys/config/auditing/request-headers": regexp.MustCompile(`^/sys/config/auditing/request-headers$`), + "/sys/config/auditing/request-headers/{header}": regexp.MustCompile(`^/sys/config/auditing/request-headers/.+$`), + "/sys/config/cors": regexp.MustCompile(`^/sys/config/cors$`), + "/sys/config/ui/headers/": regexp.MustCompile(`^/sys/config/ui/headers/$`), + "/sys/config/ui/headers/{header}": regexp.MustCompile(`^/sys/config/ui/headers/.+$`), + "/sys/leases": regexp.MustCompile(`^/sys/leases$`), + "/sys/leases/lookup/": regexp.MustCompile(`^/sys/leases/lookup/$`), + "/sys/leases/lookup/{prefix}": regexp.MustCompile(`^/sys/leases/lookup/.+$`), + "/sys/leases/revoke-force/{prefix}": regexp.MustCompile(`^/sys/leases/revoke-force/.+$`), + "/sys/leases/revoke-prefix/{prefix}": regexp.MustCompile(`^/sys/leases/revoke-prefix/.+$`), + "/sys/plugins/catalog/{name}": regexp.MustCompile(`^/sys/plugins/catalog/[^/]+$`), + "/sys/plugins/catalog/{type}": regexp.MustCompile(`^/sys/plugins/catalog/[\w-]+$`), + "/sys/plugins/catalog/{type}/{name}": regexp.MustCompile(`^/sys/plugins/catalog/[\w-]+/[^/]+$`), + "/sys/raw": regexp.MustCompile(`^/sys/raw$`), + "/sys/raw/{path}": regexp.MustCompile(`^/sys/raw/.+$`), + "/sys/remount": regexp.MustCompile(`^/sys/remount$`), + "/sys/revoke-force/{prefix}": regexp.MustCompile(`^/sys/revoke-force/.+$`), + "/sys/revoke-prefix/{prefix}": regexp.MustCompile(`^/sys/revoke-prefix/.+$`), + "/sys/rotate": regexp.MustCompile(`^/sys/rotate$`), + + // enterprise-only paths + "/sys/replication/dr/primary/secondary-token": regexp.MustCompile(`^/sys/replication/dr/primary/secondary-token$`), + "/sys/replication/performance/primary/secondary-token": regexp.MustCompile(`^/sys/replication/performance/primary/secondary-token$`), + "/sys/replication/primary/secondary-token": regexp.MustCompile(`^/sys/replication/primary/secondary-token$`), + "/sys/replication/reindex": regexp.MustCompile(`^/sys/replication/reindex$`), + "/sys/storage/raft/snapshot-auto/config/": regexp.MustCompile(`^/sys/storage/raft/snapshot-auto/config/$`), + "/sys/storage/raft/snapshot-auto/config/{name}": regexp.MustCompile(`^/sys/storage/raft/snapshot-auto/config/[^/]+$`), +} + // PluginAPIClientMeta is a helper that plugins can use to configure TLS connections // back to Vault. type PluginAPIClientMeta struct { @@ -120,7 +124,7 @@ func VaultPluginTLSProvider(apiTLSConfig *TLSConfig) func() (*tls.Config, error) // VaultPluginTLSProviderContext is run inside a plugin and retrieves the response // wrapped TLS certificate from vault. It returns a configured TLS Config. func VaultPluginTLSProviderContext(ctx context.Context, apiTLSConfig *TLSConfig) func() (*tls.Config, error) { - if os.Getenv(PluginMetadataModeEnv) == "true" { + if os.Getenv(PluginAutoMTLSEnv) == "true" || os.Getenv(PluginMetadataModeEnv) == "true" { return nil } diff --git a/vendor/github.com/hashicorp/vault/api/ssh_agent.go b/vendor/github.com/hashicorp/vault/api/ssh_agent.go index 505519b04e..03fe2bea53 100644 --- a/vendor/github.com/hashicorp/vault/api/ssh_agent.go +++ b/vendor/github.com/hashicorp/vault/api/ssh_agent.go @@ -85,11 +85,10 @@ func (c *SSHHelperConfig) SetTLSParameters(clientConfig *Config, certPool *x509. } // Returns true if any of the following conditions are true: -// * CA cert is configured -// * CA path is configured -// * configured to skip certificate verification -// * TLS server name is configured -// +// - CA cert is configured +// - CA path is configured +// - configured to skip certificate verification +// - TLS server name is configured func (c *SSHHelperConfig) shouldSetTLSParameters() bool { return c.CACert != "" || c.CAPath != "" || c.TLSServerName != "" || c.TLSSkipVerify } diff --git a/vendor/github.com/hashicorp/vault/api/sys_audit.go b/vendor/github.com/hashicorp/vault/api/sys_audit.go index 7020256f41..82d9aab0b7 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_audit.go +++ b/vendor/github.com/hashicorp/vault/api/sys_audit.go @@ -87,7 +87,8 @@ func (c *Sys) ListAuditWithContext(ctx context.Context) (map[string]*Audit, erro // DEPRECATED: Use EnableAuditWithOptions instead func (c *Sys) EnableAudit( - path string, auditType string, desc string, opts map[string]string) error { + path string, auditType string, desc string, opts map[string]string, +) error { return c.EnableAuditWithOptions(path, &EnableAuditOptions{ Type: auditType, Description: desc, diff --git a/vendor/github.com/hashicorp/vault/api/sys_mounts.go b/vendor/github.com/hashicorp/vault/api/sys_mounts.go index 52f51139f7..ddaddaf475 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_mounts.go +++ b/vendor/github.com/hashicorp/vault/api/sys_mounts.go @@ -247,6 +247,7 @@ type MountInput struct { SealWrap bool `json:"seal_wrap" mapstructure:"seal_wrap"` ExternalEntropyAccess bool `json:"external_entropy_access" mapstructure:"external_entropy_access"` Options map[string]string `json:"options"` + PluginVersion string `json:"plugin_version,omitempty"` // Deprecated: Newer server responses should be returning this information in the // Type field (json: "type") instead. @@ -281,6 +282,10 @@ type MountOutput struct { Local bool `json:"local"` SealWrap bool `json:"seal_wrap" mapstructure:"seal_wrap"` ExternalEntropyAccess bool `json:"external_entropy_access" mapstructure:"external_entropy_access"` + PluginVersion string `json:"plugin_version" mapstructure:"plugin_version"` + RunningVersion string `json:"running_plugin_version" mapstructure:"running_plugin_version"` + RunningSha256 string `json:"running_sha256" mapstructure:"running_sha256"` + DeprecationStatus string `json:"deprecation_status" mapstructure:"deprecation_status"` } type MountConfigOutput struct { diff --git a/vendor/github.com/hashicorp/vault/api/sys_plugins.go b/vendor/github.com/hashicorp/vault/api/sys_plugins.go index 004ee222bf..389e66eb1f 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_plugins.go +++ b/vendor/github.com/hashicorp/vault/api/sys_plugins.go @@ -22,6 +22,8 @@ type ListPluginsResponse struct { // PluginsByType is the list of plugins by type. PluginsByType map[consts.PluginType][]string `json:"types"` + Details []PluginDetails `json:"details,omitempty"` + // Names is the list of names of the plugins. // // Deprecated: Newer server responses should be returning PluginsByType (json: @@ -29,6 +31,14 @@ type ListPluginsResponse struct { Names []string `json:"names"` } +type PluginDetails struct { + Type string `json:"string"` + Name string `json:"name"` + Version string `json:"version,omitempty"` + Builtin bool `json:"builtin"` + DeprecationStatus string `json:"deprecation_status,omitempty" mapstructure:"deprecation_status"` +} + // ListPlugins wraps ListPluginsWithContext using context.Background. func (c *Sys) ListPlugins(i *ListPluginsInput) (*ListPluginsResponse, error) { return c.ListPluginsWithContext(context.Background(), i) @@ -98,6 +108,7 @@ func (c *Sys) ListPluginsWithContext(ctx context.Context, i *ListPluginsInput) ( result := &ListPluginsResponse{ PluginsByType: make(map[consts.PluginType][]string), + Details: []PluginDetails{}, } if i.Type == consts.PluginTypeUnknown { for _, pluginType := range consts.PluginTypes { @@ -129,6 +140,12 @@ func (c *Sys) ListPluginsWithContext(ctx context.Context, i *ListPluginsInput) ( result.PluginsByType[i.Type] = respKeys } + if detailed, ok := secret.Data["detailed"]; ok { + if err := mapstructure.Decode(detailed, &result.Details); err != nil { + return nil, err + } + } + return result, nil } @@ -142,11 +159,12 @@ type GetPluginInput struct { // GetPluginResponse is the response from the GetPlugin call. type GetPluginResponse struct { - Args []string `json:"args"` - Builtin bool `json:"builtin"` - Command string `json:"command"` - Name string `json:"name"` - SHA256 string `json:"sha256"` + Args []string `json:"args"` + Builtin bool `json:"builtin"` + Command string `json:"command"` + Name string `json:"name"` + SHA256 string `json:"sha256"` + DeprecationStatus string `json:"deprecation_status,omitempty"` } // GetPlugin wraps GetPluginWithContext using context.Background. @@ -194,6 +212,9 @@ type RegisterPluginInput struct { // SHA256 is the shasum of the plugin. SHA256 string `json:"sha256,omitempty"` + + // Version is the optional version of the plugin being registered + Version string `json:"version,omitempty"` } // RegisterPlugin wraps RegisterPluginWithContext using context.Background. @@ -227,6 +248,9 @@ type DeregisterPluginInput struct { // Type of the plugin. Required. Type consts.PluginType `json:"type"` + + // Version of the plugin. Optional. + Version string `json:"version,omitempty"` } // DeregisterPlugin wraps DeregisterPluginWithContext using context.Background. @@ -242,7 +266,7 @@ func (c *Sys) DeregisterPluginWithContext(ctx context.Context, i *DeregisterPlug path := catalogPathByType(i.Type, i.Name) req := c.c.NewRequest(http.MethodDelete, path) - + req.Params.Set("version", i.Version) resp, err := c.c.rawRequestWithContext(ctx, req) if err == nil { defer resp.Body.Close() diff --git a/vendor/github.com/hashicorp/vault/api/sys_seal.go b/vendor/github.com/hashicorp/vault/api/sys_seal.go index 189d61469a..c772ae0fc2 100644 --- a/vendor/github.com/hashicorp/vault/api/sys_seal.go +++ b/vendor/github.com/hashicorp/vault/api/sys_seal.go @@ -93,20 +93,22 @@ func sealStatusRequestWithContext(ctx context.Context, c *Sys, r *Request) (*Sea } type SealStatusResponse struct { - Type string `json:"type"` - Initialized bool `json:"initialized"` - Sealed bool `json:"sealed"` - T int `json:"t"` - N int `json:"n"` - Progress int `json:"progress"` - Nonce string `json:"nonce"` - Version string `json:"version"` - BuildDate string `json:"build_date"` - Migration bool `json:"migration"` - ClusterName string `json:"cluster_name,omitempty"` - ClusterID string `json:"cluster_id,omitempty"` - RecoverySeal bool `json:"recovery_seal"` - StorageType string `json:"storage_type,omitempty"` + Type string `json:"type"` + Initialized bool `json:"initialized"` + Sealed bool `json:"sealed"` + T int `json:"t"` + N int `json:"n"` + Progress int `json:"progress"` + Nonce string `json:"nonce"` + Version string `json:"version"` + BuildDate string `json:"build_date"` + Migration bool `json:"migration"` + ClusterName string `json:"cluster_name,omitempty"` + ClusterID string `json:"cluster_id,omitempty"` + RecoverySeal bool `json:"recovery_seal"` + StorageType string `json:"storage_type,omitempty"` + HCPLinkStatus string `json:"hcp_link_status,omitempty"` + HCPLinkResourceID string `json:"hcp_link_resource_ID,omitempty"` } type UnsealOpts struct { diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/certutil/helpers.go b/vendor/github.com/hashicorp/vault/sdk/helper/certutil/helpers.go index 457de9b022..348c85f9dd 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/certutil/helpers.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/certutil/helpers.go @@ -49,6 +49,26 @@ var expectedNISTPCurveHashBits = map[int]int{ 521: 512, } +// Mapping of constant names<->constant values for SignatureAlgorithm +var SignatureAlgorithmNames = map[string]x509.SignatureAlgorithm{ + "sha256withrsa": x509.SHA256WithRSA, + "sha384withrsa": x509.SHA384WithRSA, + "sha512withrsa": x509.SHA512WithRSA, + "ecdsawithsha256": x509.ECDSAWithSHA256, + "ecdsawithsha384": x509.ECDSAWithSHA384, + "ecdsawithsha512": x509.ECDSAWithSHA512, + "sha256withrsapss": x509.SHA256WithRSAPSS, + "sha384withrsapss": x509.SHA384WithRSAPSS, + "sha512withrsapss": x509.SHA512WithRSAPSS, + "pureed25519": x509.PureEd25519, + "ed25519": x509.PureEd25519, // Duplicated for clarity; most won't expect the "Pure" prefix. +} + +// OID for RFC 5280 Delta CRL Indicator CRL extension. +// +// > id-ce-deltaCRLIndicator OBJECT IDENTIFIER ::= { id-ce 27 } +var DeltaCRLIndicatorOID = asn1.ObjectIdentifier([]int{2, 5, 29, 27}) + // GetHexFormatted returns the byte buffer formatted in hex with // the specified separator between bytes. func GetHexFormatted(buf []byte, sep string) string { @@ -87,6 +107,16 @@ func GetSubjKeyID(privateKey crypto.Signer) ([]byte, error) { return getSubjectKeyID(privateKey.Public()) } +// Returns the explicit SKID when used for cross-signing, else computes a new +// SKID from the key itself. +func getSubjectKeyIDFromBundle(data *CreationBundle) ([]byte, error) { + if len(data.Params.SKID) > 0 { + return data.Params.SKID, nil + } + + return getSubjectKeyID(data.CSR.PublicKey) +} + func getSubjectKeyID(pub interface{}) ([]byte, error) { var publicKeyBytes []byte switch pub := pub.(type) { @@ -151,18 +181,21 @@ func ParsePKIJSON(input []byte) (*ParsedCertBundle, error) { } func ParseDERKey(privateKeyBytes []byte) (signer crypto.Signer, format BlockType, err error) { - if signer, err = x509.ParseECPrivateKey(privateKeyBytes); err == nil { + var firstError error + if signer, firstError = x509.ParseECPrivateKey(privateKeyBytes); firstError == nil { format = ECBlock return } - if signer, err = x509.ParsePKCS1PrivateKey(privateKeyBytes); err == nil { + var secondError error + if signer, secondError = x509.ParsePKCS1PrivateKey(privateKeyBytes); secondError == nil { format = PKCS1Block return } + var thirdError error var rawKey interface{} - if rawKey, err = x509.ParsePKCS8PrivateKey(privateKeyBytes); err == nil { + if rawKey, thirdError = x509.ParsePKCS8PrivateKey(privateKeyBytes); thirdError == nil { switch rawSigner := rawKey.(type) { case *rsa.PrivateKey: signer = rawSigner @@ -178,7 +211,7 @@ func ParseDERKey(privateKeyBytes []byte) (signer crypto.Signer, format BlockType return } - return nil, UnknownBlock, err + return nil, UnknownBlock, fmt.Errorf("got errors attempting to parse DER private key:\n1. %v\n2. %v\n3. %v", firstError, secondError, thirdError) } func ParsePEMKey(keyPem string) (crypto.Signer, BlockType, error) { @@ -756,6 +789,29 @@ func CreateCertificateWithKeyGenerator(data *CreationBundle, randReader io.Reade return createCertificate(data, randReader, keyGenerator) } +// Set correct correct RSA sig algo +func certTemplateSetSigAlgo(certTemplate *x509.Certificate, data *CreationBundle) { + if data.Params.UsePSS { + switch data.Params.SignatureBits { + case 256: + certTemplate.SignatureAlgorithm = x509.SHA256WithRSAPSS + case 384: + certTemplate.SignatureAlgorithm = x509.SHA384WithRSAPSS + case 512: + certTemplate.SignatureAlgorithm = x509.SHA512WithRSAPSS + } + } else { + switch data.Params.SignatureBits { + case 256: + certTemplate.SignatureAlgorithm = x509.SHA256WithRSA + case 384: + certTemplate.SignatureAlgorithm = x509.SHA384WithRSA + case 512: + certTemplate.SignatureAlgorithm = x509.SHA512WithRSA + } + } +} + func createCertificate(data *CreationBundle, randReader io.Reader, privateKeyGenerator KeyGenerator) (*ParsedCertBundle, error) { var err error result := &ParsedCertBundle{} @@ -824,14 +880,7 @@ func createCertificate(data *CreationBundle, randReader io.Reader, privateKeyGen if data.SigningBundle != nil { switch data.SigningBundle.PrivateKeyType { case RSAPrivateKey: - switch data.Params.SignatureBits { - case 256: - certTemplate.SignatureAlgorithm = x509.SHA256WithRSA - case 384: - certTemplate.SignatureAlgorithm = x509.SHA384WithRSA - case 512: - certTemplate.SignatureAlgorithm = x509.SHA512WithRSA - } + certTemplateSetSigAlgo(certTemplate, data) case Ed25519PrivateKey: certTemplate.SignatureAlgorithm = x509.PureEd25519 case ECPrivateKey: @@ -853,14 +902,7 @@ func createCertificate(data *CreationBundle, randReader io.Reader, privateKeyGen switch data.Params.KeyType { case "rsa": - switch data.Params.SignatureBits { - case 256: - certTemplate.SignatureAlgorithm = x509.SHA256WithRSA - case 384: - certTemplate.SignatureAlgorithm = x509.SHA384WithRSA - case 512: - certTemplate.SignatureAlgorithm = x509.SHA512WithRSA - } + certTemplateSetSigAlgo(certTemplate, data) case "ed25519": certTemplate.SignatureAlgorithm = x509.PureEd25519 case "ec": @@ -1066,7 +1108,7 @@ func signCertificate(data *CreationBundle, randReader io.Reader) (*ParsedCertBun return nil, err } - subjKeyID, err := getSubjectKeyID(data.CSR.PublicKey) + subjKeyID, err := getSubjectKeyIDFromBundle(data) if err != nil { return nil, err } @@ -1087,14 +1129,7 @@ func signCertificate(data *CreationBundle, randReader io.Reader) (*ParsedCertBun switch data.SigningBundle.PrivateKeyType { case RSAPrivateKey: - switch data.Params.SignatureBits { - case 256: - certTemplate.SignatureAlgorithm = x509.SHA256WithRSA - case 384: - certTemplate.SignatureAlgorithm = x509.SHA384WithRSA - case 512: - certTemplate.SignatureAlgorithm = x509.SHA512WithRSA - } + certTemplateSetSigAlgo(certTemplate, data) case ECPrivateKey: switch data.Params.SignatureBits { case 256: @@ -1266,3 +1301,26 @@ func CreateKeyBundleWithKeyGenerator(keyType string, keyBits int, randReader io. } return result, nil } + +// CreateDeltaCRLIndicatorExt allows creating correctly formed delta CRLs +// that point back to the last complete CRL that they're based on. +func CreateDeltaCRLIndicatorExt(completeCRLNumber int64) (pkix.Extension, error) { + bigNum := big.NewInt(completeCRLNumber) + bigNumValue, err := asn1.Marshal(bigNum) + if err != nil { + return pkix.Extension{}, fmt.Errorf("unable to marshal complete CRL number (%v): %v", completeCRLNumber, err) + } + return pkix.Extension{ + Id: DeltaCRLIndicatorOID, + // > When a conforming CRL issuer generates a delta CRL, the delta + // > CRL MUST include a critical delta CRL indicator extension. + Critical: true, + // This extension only includes the complete CRL number: + // + // > BaseCRLNumber ::= CRLNumber + // + // But, this needs to be encoded as a big number for encoding/asn1 + // to work properly. + Value: bigNumValue, + }, nil +} diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/certutil/types.go b/vendor/github.com/hashicorp/vault/sdk/helper/certutil/types.go index a5caa2e440..03aba84996 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/certutil/types.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/certutil/types.go @@ -710,6 +710,7 @@ type CAInfoBundle struct { ParsedCertBundle URLs *URLEntries LeafNotAfterBehavior NotAfterBehavior + RevocationSigAlg x509.SignatureAlgorithm } func (b *CAInfoBundle) GetCAChain() []*CertBlock { @@ -782,6 +783,7 @@ type CreationParameters struct { PolicyIdentifiers []string BasicConstraintsValidForNonCA bool SignatureBits int + UsePSS bool ForceAppendCaChain bool // Only used when signing a CA cert @@ -796,6 +798,9 @@ type CreationParameters struct { // The duration the certificate will use NotBefore NotBeforeDuration time.Duration + + // The explicit SKID to use; especially useful for cross-signing. + SKID []byte } type CreationBundle struct { diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/consts/deprecation_status.go b/vendor/github.com/hashicorp/vault/sdk/helper/consts/deprecation_status.go new file mode 100644 index 0000000000..5591924a77 --- /dev/null +++ b/vendor/github.com/hashicorp/vault/sdk/helper/consts/deprecation_status.go @@ -0,0 +1,31 @@ +package consts + +const VaultAllowPendingRemovalMountsEnv = "VAULT_ALLOW_PENDING_REMOVAL_MOUNTS" + +// DeprecationStatus represents the current deprecation state for builtins +type DeprecationStatus uint32 + +// These are the states of deprecation for builtin plugins +const ( + Supported = iota + Deprecated + PendingRemoval + Removed + Unknown +) + +// String returns the string representation of a builtin deprecation status +func (s DeprecationStatus) String() string { + switch s { + case Supported: + return "supported" + case Deprecated: + return "deprecated" + case PendingRemoval: + return "pending removal" + case Removed: + return "removed" + default: + return "" + } +} diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/locksutil/locks.go b/vendor/github.com/hashicorp/vault/sdk/helper/locksutil/locks.go index 1c85402493..35ffcf739d 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/locksutil/locks.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/locksutil/locks.go @@ -25,7 +25,6 @@ type LockEntry struct { // Lock B, Lock A // // Where process 1 is now deadlocked trying to lock B, and process 2 deadlocked trying to lock A -// func CreateLocks() []*LockEntry { ret := make([]*LockEntry, LockCount) for i := range ret { diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/logging/logging.go b/vendor/github.com/hashicorp/vault/sdk/helper/logging/logging.go index a8d30674b1..211a545e33 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/logging/logging.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/logging/logging.go @@ -42,9 +42,10 @@ func NewVaultLogger(level log.Level) log.Logger { // writer and a Vault formatter func NewVaultLoggerWithWriter(w io.Writer, level log.Level) log.Logger { opts := &log.LoggerOptions{ - Level: level, - Output: w, - JSONFormat: ParseEnvLogFormat() == JSONFormat, + Level: level, + IndependentLevels: true, + Output: w, + JSONFormat: ParseEnvLogFormat() == JSONFormat, } return log.New(opts) } diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/pluginutil/env.go b/vendor/github.com/hashicorp/vault/sdk/helper/pluginutil/env.go index fd0cd4fb83..df1fdbeede 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/pluginutil/env.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/pluginutil/env.go @@ -7,7 +7,11 @@ import ( version "github.com/hashicorp/go-version" ) -var ( +const ( + // PluginAutoMTLSEnv is used to ensure AutoMTLS is used. This will override + // setting a TLSProviderFunc for a plugin. + PluginAutoMTLSEnv = "VAULT_PLUGIN_AUTOMTLS_ENABLED" + // PluginMlockEnabled is the ENV name used to pass the configuration for // enabling mlock PluginMlockEnabled = "VAULT_PLUGIN_MLOCK_ENABLED" @@ -27,6 +31,10 @@ var ( // PluginCACertPEMEnv is an ENV name used for holding a CA PEM-encoded // string. Used for testing. PluginCACertPEMEnv = "VAULT_TESTING_PLUGIN_CA_PEM" + + // PluginMultiplexingOptOut is an ENV name used to define a comma separated list of plugin names + // opted-out of the multiplexing feature; for emergencies if multiplexing ever causes issues + PluginMultiplexingOptOut = "VAULT_PLUGIN_MULTIPLEXING_OPT_OUT" ) // OptionallyEnableMlock determines if mlock should be called, and if so enables diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/pluginutil/multiplexing.go b/vendor/github.com/hashicorp/vault/sdk/helper/pluginutil/multiplexing.go index cbf50335d0..9ebc78381d 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/pluginutil/multiplexing.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/pluginutil/multiplexing.go @@ -1,12 +1,16 @@ package pluginutil import ( - context "context" + "context" "fmt" + "os" + "strings" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" + "github.com/hashicorp/go-secure-stdlib/strutil" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" ) type PluginMultiplexingServerImpl struct { @@ -15,17 +19,22 @@ type PluginMultiplexingServerImpl struct { Supported bool } -func (pm PluginMultiplexingServerImpl) MultiplexingSupport(ctx context.Context, req *MultiplexingSupportRequest) (*MultiplexingSupportResponse, error) { +func (pm PluginMultiplexingServerImpl) MultiplexingSupport(_ context.Context, _ *MultiplexingSupportRequest) (*MultiplexingSupportResponse, error) { return &MultiplexingSupportResponse{ Supported: pm.Supported, }, nil } -func MultiplexingSupported(ctx context.Context, cc grpc.ClientConnInterface) (bool, error) { +func MultiplexingSupported(ctx context.Context, cc grpc.ClientConnInterface, name string) (bool, error) { if cc == nil { return false, fmt.Errorf("client connection is nil") } + out := strings.Split(os.Getenv(PluginMultiplexingOptOut), ",") + if strutil.StrListContains(out, name) { + return false, nil + } + req := new(MultiplexingSupportRequest) resp, err := NewPluginMultiplexingClient(cc).MultiplexingSupport(ctx, req) if err != nil { @@ -45,3 +54,22 @@ func MultiplexingSupported(ctx context.Context, cc grpc.ClientConnInterface) (bo return resp.Supported, nil } + +func GetMultiplexIDFromContext(ctx context.Context) (string, error) { + md, ok := metadata.FromIncomingContext(ctx) + if !ok { + return "", fmt.Errorf("missing plugin multiplexing metadata") + } + + multiplexIDs := md[MultiplexingCtxKey] + if len(multiplexIDs) != 1 { + return "", fmt.Errorf("unexpected number of IDs in metadata: (%d)", len(multiplexIDs)) + } + + multiplexID := multiplexIDs[0] + if multiplexID == "" { + return "", fmt.Errorf("empty multiplex ID in metadata") + } + + return multiplexID, nil +} diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/pluginutil/multiplexing.pb.go b/vendor/github.com/hashicorp/vault/sdk/helper/pluginutil/multiplexing.pb.go index d0ff51e57b..d7073b10e0 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/pluginutil/multiplexing.pb.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/pluginutil/multiplexing.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.19.4 +// protoc-gen-go v1.28.1 +// protoc v3.21.5 // source: sdk/helper/pluginutil/multiplexing.proto package pluginutil diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/pluginutil/run_config.go b/vendor/github.com/hashicorp/vault/sdk/helper/pluginutil/run_config.go index cb804f60d8..3eb8fb2b28 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/pluginutil/run_config.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/pluginutil/run_config.go @@ -16,12 +16,14 @@ import ( type PluginClientConfig struct { Name string PluginType consts.PluginType + Version string PluginSets map[int]plugin.PluginSet HandshakeConfig plugin.HandshakeConfig Logger log.Logger IsMetadataMode bool AutoMTLS bool MLock bool + Wrapper RunnerUtil } type runConfig struct { @@ -33,8 +35,6 @@ type runConfig struct { // Initialized with what's in PluginRunner.Env, but can be added to env []string - wrapper RunnerUtil - PluginClientConfig } @@ -43,7 +43,7 @@ func (rc runConfig) makeConfig(ctx context.Context) (*plugin.ClientConfig, error cmd.Env = append(cmd.Env, rc.env...) // Add the mlock setting to the ENV of the plugin - if rc.MLock || (rc.wrapper != nil && rc.wrapper.MlockEnabled()) { + if rc.MLock || (rc.Wrapper != nil && rc.Wrapper.MlockEnabled()) { cmd.Env = append(cmd.Env, fmt.Sprintf("%s=%s", PluginMlockEnabled, "true")) } cmd.Env = append(cmd.Env, fmt.Sprintf("%s=%s", PluginVaultVersionEnv, version.GetVersion().Version)) @@ -54,6 +54,9 @@ func (rc runConfig) makeConfig(ctx context.Context) (*plugin.ClientConfig, error metadataEnv := fmt.Sprintf("%s=%t", PluginMetadataModeEnv, rc.IsMetadataMode) cmd.Env = append(cmd.Env, metadataEnv) + automtlsEnv := fmt.Sprintf("%s=%t", PluginAutoMTLSEnv, rc.AutoMTLS) + cmd.Env = append(cmd.Env, automtlsEnv) + var clientTLSConfig *tls.Config if !rc.AutoMTLS && !rc.IsMetadataMode { // Get a CA TLS Certificate @@ -70,7 +73,7 @@ func (rc runConfig) makeConfig(ctx context.Context) (*plugin.ClientConfig, error // Use CA to sign a server cert and wrap the values in a response wrapped // token. - wrapToken, err := wrapServerConfig(ctx, rc.wrapper, certBytes, key) + wrapToken, err := wrapServerConfig(ctx, rc.Wrapper, certBytes, key) if err != nil { return nil, err } @@ -120,7 +123,7 @@ func Env(env ...string) RunOpt { func Runner(wrapper RunnerUtil) RunOpt { return func(rc *runConfig) { - rc.wrapper = wrapper + rc.Wrapper = wrapper } } diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/pluginutil/runner.go b/vendor/github.com/hashicorp/vault/sdk/helper/pluginutil/runner.go index f2822efc10..631c4f3a2f 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/pluginutil/runner.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/pluginutil/runner.go @@ -5,7 +5,8 @@ import ( "time" log "github.com/hashicorp/go-hclog" - plugin "github.com/hashicorp/go-plugin" + "github.com/hashicorp/go-plugin" + "github.com/hashicorp/go-version" "github.com/hashicorp/vault/sdk/helper/consts" "github.com/hashicorp/vault/sdk/helper/wrapping" "google.golang.org/grpc" @@ -14,7 +15,8 @@ import ( // Looker defines the plugin Lookup function that looks into the plugin catalog // for available plugins and returns a PluginRunner type Looker interface { - LookupPlugin(context.Context, string, consts.PluginType) (*PluginRunner, error) + LookupPlugin(ctx context.Context, pluginName string, pluginType consts.PluginType) (*PluginRunner, error) + LookupPluginVersion(ctx context.Context, pluginName string, pluginType consts.PluginType, version string) (*PluginRunner, error) } // RunnerUtil interface defines the functions needed by the runner to wrap the @@ -35,6 +37,7 @@ type LookRunnerUtil interface { type PluginClient interface { Conn() grpc.ClientConnInterface + Reload() error plugin.ClientProtocol } @@ -45,6 +48,7 @@ const MultiplexingCtxKey string = "multiplex_id" type PluginRunner struct { Name string `json:"name" structs:"name"` Type consts.PluginType `json:"type" structs:"type"` + Version string `json:"version" structs:"version"` Command string `json:"command" structs:"command"` Args []string `json:"args" structs:"args"` Env []string `json:"env" structs:"env"` @@ -81,6 +85,20 @@ func (r *PluginRunner) RunMetadataMode(ctx context.Context, wrapper RunnerUtil, ) } +// VersionedPlugin holds any versioning information stored about a plugin in the +// plugin catalog. +type VersionedPlugin struct { + Type string `json:"type"` // string instead of consts.PluginType so that we get the string form in API responses. + Name string `json:"name"` + Version string `json:"version"` + SHA256 string `json:"sha256,omitempty"` + Builtin bool `json:"builtin"` + DeprecationStatus string `json:"deprecation_status,omitempty"` + + // Pre-parsed semver struct of the Version field + SemanticVersion *version.Version `json:"-"` +} + // CtxCancelIfCanceled takes a context cancel func and a context. If the context is // shutdown the cancelfunc is called. This is useful for merging two cancel // functions. diff --git a/vendor/github.com/hashicorp/vault/sdk/logical/identity.pb.go b/vendor/github.com/hashicorp/vault/sdk/logical/identity.pb.go index 4b1a36b398..6c1c4b2c9b 100644 --- a/vendor/github.com/hashicorp/vault/sdk/logical/identity.pb.go +++ b/vendor/github.com/hashicorp/vault/sdk/logical/identity.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.19.4 +// protoc-gen-go v1.28.1 +// protoc v3.21.5 // source: sdk/logical/identity.proto package logical diff --git a/vendor/github.com/hashicorp/vault/sdk/logical/logical.go b/vendor/github.com/hashicorp/vault/sdk/logical/logical.go index fb9619ae20..601148952f 100644 --- a/vendor/github.com/hashicorp/vault/sdk/logical/logical.go +++ b/vendor/github.com/hashicorp/vault/sdk/logical/logical.go @@ -137,3 +137,20 @@ type Auditor interface { AuditRequest(ctx context.Context, input *LogInput) error AuditResponse(ctx context.Context, input *LogInput) error } + +// Externaler allows us to check if a backend is running externally (i.e., over GRPC) +type Externaler interface { + IsExternal() bool +} + +type PluginVersion struct { + Version string +} + +// PluginVersioner is an optional interface to return version info. +type PluginVersioner interface { + // PluginVersion returns the version for the backend + PluginVersion() PluginVersion +} + +var EmptyPluginVersion = PluginVersion{""} diff --git a/vendor/github.com/hashicorp/vault/sdk/logical/managed_key.go b/vendor/github.com/hashicorp/vault/sdk/logical/managed_key.go index 750459542c..e892c9cce9 100644 --- a/vendor/github.com/hashicorp/vault/sdk/logical/managed_key.go +++ b/vendor/github.com/hashicorp/vault/sdk/logical/managed_key.go @@ -3,6 +3,7 @@ package logical import ( "context" "crypto" + "crypto/cipher" "io" ) @@ -33,8 +34,9 @@ type ManagedKey interface { } type ( - ManagedKeyConsumer func(context.Context, ManagedKey) error - ManagedSigningKeyConsumer func(context.Context, ManagedSigningKey) error + ManagedKeyConsumer func(context.Context, ManagedKey) error + ManagedSigningKeyConsumer func(context.Context, ManagedSigningKey) error + ManagedEncryptingKeyConsumer func(context.Context, ManagedEncryptingKey) error ) type ManagedKeySystemView interface { @@ -51,6 +53,12 @@ type ManagedKeySystemView interface { // WithManagedSigningKeyByUUID retrieves an instantiated managed signing key for consumption by the given function, // with the same semantics as WithManagedKeyByUUID WithManagedSigningKeyByUUID(ctx context.Context, keyUuid, backendUUID string, f ManagedSigningKeyConsumer) error + // WithManagedSigningKeyByName retrieves an instantiated managed signing key for consumption by the given function, + // with the same semantics as WithManagedKeyByName + WithManagedEncryptingKeyByName(ctx context.Context, keyName, backendUUID string, f ManagedEncryptingKeyConsumer) error + // WithManagedSigningKeyByUUID retrieves an instantiated managed signing key for consumption by the given function, + // with the same semantics as WithManagedKeyByUUID + WithManagedEncryptingKeyByUUID(ctx context.Context, keyUuid, backendUUID string, f ManagedEncryptingKeyConsumer) error } type ManagedAsymmetricKey interface { @@ -82,3 +90,8 @@ type ManagedSigningKey interface { // as needed so as to use per request contexts. GetSigner(context.Context) (crypto.Signer, error) } + +type ManagedEncryptingKey interface { + ManagedKey + GetAEAD(iv []byte) (cipher.AEAD, error) +} diff --git a/vendor/github.com/hashicorp/vault/sdk/logical/plugin.pb.go b/vendor/github.com/hashicorp/vault/sdk/logical/plugin.pb.go index 1fb53f9a79..03be5d3cba 100644 --- a/vendor/github.com/hashicorp/vault/sdk/logical/plugin.pb.go +++ b/vendor/github.com/hashicorp/vault/sdk/logical/plugin.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.19.4 +// protoc-gen-go v1.28.1 +// protoc v3.21.5 // source: sdk/logical/plugin.proto package logical diff --git a/vendor/github.com/hashicorp/vault/sdk/logical/request.go b/vendor/github.com/hashicorp/vault/sdk/logical/request.go index 1c400a4cb7..d774fd176b 100644 --- a/vendor/github.com/hashicorp/vault/sdk/logical/request.go +++ b/vendor/github.com/hashicorp/vault/sdk/logical/request.go @@ -365,6 +365,7 @@ const ( ListOperation = "list" HelpOperation = "help" AliasLookaheadOperation = "alias-lookahead" + ResolveRoleOperation = "resolve-role" // The operations below are called globally, the path is less relevant. RevokeOperation Operation = "revoke" @@ -377,7 +378,6 @@ type MFACreds map[string][]string // InitializationRequest stores the parameters and context of an Initialize() // call being made to a logical.Backend. type InitializationRequest struct { - // Storage can be used to durably store and retrieve state. Storage Storage } diff --git a/vendor/github.com/hashicorp/vault/sdk/logical/response.go b/vendor/github.com/hashicorp/vault/sdk/logical/response.go index e8276c789a..19194f5248 100644 --- a/vendor/github.com/hashicorp/vault/sdk/logical/response.go +++ b/vendor/github.com/hashicorp/vault/sdk/logical/response.go @@ -310,3 +310,12 @@ func (w *StatusHeaderResponseWriter) setCustomResponseHeaders(status int) { } var _ WrappingResponseWriter = &StatusHeaderResponseWriter{} + +// ResolveRoleResponse returns a standard response to be returned by functions handling a ResolveRoleOperation +func ResolveRoleResponse(roleName string) (*Response, error) { + return &Response{ + Data: map[string]interface{}{ + "role": roleName, + }, + }, nil +} diff --git a/vendor/github.com/hashicorp/vault/sdk/logical/system_view.go b/vendor/github.com/hashicorp/vault/sdk/logical/system_view.go index 83b4a951e8..4e5627b1c8 100644 --- a/vendor/github.com/hashicorp/vault/sdk/logical/system_view.go +++ b/vendor/github.com/hashicorp/vault/sdk/logical/system_view.go @@ -54,7 +54,15 @@ type SystemView interface { // LookupPlugin looks into the plugin catalog for a plugin with the given // name. Returns a PluginRunner or an error if a plugin can not be found. - LookupPlugin(context.Context, string, consts.PluginType) (*pluginutil.PluginRunner, error) + LookupPlugin(ctx context.Context, pluginName string, pluginType consts.PluginType) (*pluginutil.PluginRunner, error) + + // LookupPluginVersion looks into the plugin catalog for a plugin with the given + // name and version. Returns a PluginRunner or an error if a plugin can not be found. + LookupPluginVersion(ctx context.Context, pluginName string, pluginType consts.PluginType, version string) (*pluginutil.PluginRunner, error) + + // ListVersionedPlugins returns information about all plugins of a certain + // type in the catalog, including any versioning information stored for them. + ListVersionedPlugins(ctx context.Context, pluginType consts.PluginType) ([]pluginutil.VersionedPlugin, error) // NewPluginClient returns a client for managing the lifecycle of plugin // processes @@ -168,6 +176,14 @@ func (d StaticSystemView) LookupPlugin(_ context.Context, _ string, _ consts.Plu return nil, errors.New("LookupPlugin is not implemented in StaticSystemView") } +func (d StaticSystemView) LookupPluginVersion(_ context.Context, _ string, _ consts.PluginType, _ string) (*pluginutil.PluginRunner, error) { + return nil, errors.New("LookupPluginVersion is not implemented in StaticSystemView") +} + +func (d StaticSystemView) ListVersionedPlugins(_ context.Context, _ consts.PluginType) ([]pluginutil.VersionedPlugin, error) { + return nil, errors.New("ListVersionedPlugins is not implemented in StaticSystemView") +} + func (d StaticSystemView) MlockEnabled() bool { return d.EnableMlock } diff --git a/vendor/github.com/hashicorp/vault/sdk/logical/version.pb.go b/vendor/github.com/hashicorp/vault/sdk/logical/version.pb.go new file mode 100644 index 0000000000..7845aeaf5c --- /dev/null +++ b/vendor/github.com/hashicorp/vault/sdk/logical/version.pb.go @@ -0,0 +1,204 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.21.5 +// source: sdk/logical/version.proto + +package logical + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Empty struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Empty) Reset() { + *x = Empty{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_logical_version_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Empty) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Empty) ProtoMessage() {} + +func (x *Empty) ProtoReflect() protoreflect.Message { + mi := &file_sdk_logical_version_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Empty.ProtoReflect.Descriptor instead. +func (*Empty) Descriptor() ([]byte, []int) { + return file_sdk_logical_version_proto_rawDescGZIP(), []int{0} +} + +// VersionReply is the reply for the Version method. +type VersionReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PluginVersion string `protobuf:"bytes,1,opt,name=plugin_version,json=pluginVersion,proto3" json:"plugin_version,omitempty"` +} + +func (x *VersionReply) Reset() { + *x = VersionReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_logical_version_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VersionReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VersionReply) ProtoMessage() {} + +func (x *VersionReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_logical_version_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VersionReply.ProtoReflect.Descriptor instead. +func (*VersionReply) Descriptor() ([]byte, []int) { + return file_sdk_logical_version_proto_rawDescGZIP(), []int{1} +} + +func (x *VersionReply) GetPluginVersion() string { + if x != nil { + return x.PluginVersion + } + return "" +} + +var File_sdk_logical_version_proto protoreflect.FileDescriptor + +var file_sdk_logical_version_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x73, 0x64, 0x6b, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x2f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6c, 0x6f, 0x67, + 0x69, 0x63, 0x61, 0x6c, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x35, 0x0a, + 0x0c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x25, 0x0a, + 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x41, 0x0a, 0x0d, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, + 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, + 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sdk_logical_version_proto_rawDescOnce sync.Once + file_sdk_logical_version_proto_rawDescData = file_sdk_logical_version_proto_rawDesc +) + +func file_sdk_logical_version_proto_rawDescGZIP() []byte { + file_sdk_logical_version_proto_rawDescOnce.Do(func() { + file_sdk_logical_version_proto_rawDescData = protoimpl.X.CompressGZIP(file_sdk_logical_version_proto_rawDescData) + }) + return file_sdk_logical_version_proto_rawDescData +} + +var file_sdk_logical_version_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_sdk_logical_version_proto_goTypes = []interface{}{ + (*Empty)(nil), // 0: logical.Empty + (*VersionReply)(nil), // 1: logical.VersionReply +} +var file_sdk_logical_version_proto_depIdxs = []int32{ + 0, // 0: logical.PluginVersion.Version:input_type -> logical.Empty + 1, // 1: logical.PluginVersion.Version:output_type -> logical.VersionReply + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_sdk_logical_version_proto_init() } +func file_sdk_logical_version_proto_init() { + if File_sdk_logical_version_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sdk_logical_version_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Empty); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_logical_version_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VersionReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_sdk_logical_version_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_sdk_logical_version_proto_goTypes, + DependencyIndexes: file_sdk_logical_version_proto_depIdxs, + MessageInfos: file_sdk_logical_version_proto_msgTypes, + }.Build() + File_sdk_logical_version_proto = out.File + file_sdk_logical_version_proto_rawDesc = nil + file_sdk_logical_version_proto_goTypes = nil + file_sdk_logical_version_proto_depIdxs = nil +} diff --git a/vendor/github.com/hashicorp/vault/sdk/logical/version.proto b/vendor/github.com/hashicorp/vault/sdk/logical/version.proto new file mode 100644 index 0000000000..345051ae9d --- /dev/null +++ b/vendor/github.com/hashicorp/vault/sdk/logical/version.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package logical; + +option go_package = "github.com/hashicorp/vault/sdk/logical"; + +message Empty {} + +// VersionReply is the reply for the Version method. +message VersionReply { + string plugin_version = 1; +} + +// PluginVersion is an optional RPC service implemented by plugins. +service PluginVersion { + // Version returns version information for the plugin. + rpc Version(Empty) returns (VersionReply); +} \ No newline at end of file diff --git a/vendor/github.com/hashicorp/vault/sdk/logical/version_grpc.pb.go b/vendor/github.com/hashicorp/vault/sdk/logical/version_grpc.pb.go new file mode 100644 index 0000000000..a69e970599 --- /dev/null +++ b/vendor/github.com/hashicorp/vault/sdk/logical/version_grpc.pb.go @@ -0,0 +1,103 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package logical + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// PluginVersionClient is the client API for PluginVersion service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type PluginVersionClient interface { + // Version returns version information for the plugin. + Version(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*VersionReply, error) +} + +type pluginVersionClient struct { + cc grpc.ClientConnInterface +} + +func NewPluginVersionClient(cc grpc.ClientConnInterface) PluginVersionClient { + return &pluginVersionClient{cc} +} + +func (c *pluginVersionClient) Version(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*VersionReply, error) { + out := new(VersionReply) + err := c.cc.Invoke(ctx, "/logical.PluginVersion/Version", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PluginVersionServer is the server API for PluginVersion service. +// All implementations must embed UnimplementedPluginVersionServer +// for forward compatibility +type PluginVersionServer interface { + // Version returns version information for the plugin. + Version(context.Context, *Empty) (*VersionReply, error) + mustEmbedUnimplementedPluginVersionServer() +} + +// UnimplementedPluginVersionServer must be embedded to have forward compatible implementations. +type UnimplementedPluginVersionServer struct { +} + +func (UnimplementedPluginVersionServer) Version(context.Context, *Empty) (*VersionReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method Version not implemented") +} +func (UnimplementedPluginVersionServer) mustEmbedUnimplementedPluginVersionServer() {} + +// UnsafePluginVersionServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PluginVersionServer will +// result in compilation errors. +type UnsafePluginVersionServer interface { + mustEmbedUnimplementedPluginVersionServer() +} + +func RegisterPluginVersionServer(s grpc.ServiceRegistrar, srv PluginVersionServer) { + s.RegisterService(&PluginVersion_ServiceDesc, srv) +} + +func _PluginVersion_Version_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PluginVersionServer).Version(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/logical.PluginVersion/Version", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PluginVersionServer).Version(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +// PluginVersion_ServiceDesc is the grpc.ServiceDesc for PluginVersion service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PluginVersion_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "logical.PluginVersion", + HandlerType: (*PluginVersionServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Version", + Handler: _PluginVersion_Version_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "sdk/logical/version.proto", +} diff --git a/vendor/github.com/hashicorp/vault/sdk/physical/entry.go b/vendor/github.com/hashicorp/vault/sdk/physical/entry.go index 418b0d2ca5..389fe6c81c 100644 --- a/vendor/github.com/hashicorp/vault/sdk/physical/entry.go +++ b/vendor/github.com/hashicorp/vault/sdk/physical/entry.go @@ -1,5 +1,10 @@ package physical +import ( + "encoding/hex" + "fmt" +) + // Entry is used to represent data stored by the physical backend type Entry struct { Key string @@ -9,3 +14,7 @@ type Entry struct { // Only used in replication ValueHash []byte } + +func (e *Entry) String() string { + return fmt.Sprintf("Key: %s. SealWrap: %t. Value: %s. ValueHash: %s", e.Key, e.SealWrap, hex.EncodeToString(e.Value), hex.EncodeToString(e.ValueHash)) +} diff --git a/vendor/github.com/hashicorp/vault/sdk/physical/inmem/inmem.go b/vendor/github.com/hashicorp/vault/sdk/physical/inmem/inmem.go index b366eb84bf..be16b4caa1 100644 --- a/vendor/github.com/hashicorp/vault/sdk/physical/inmem/inmem.go +++ b/vendor/github.com/hashicorp/vault/sdk/physical/inmem/inmem.go @@ -10,10 +10,9 @@ import ( "sync" "sync/atomic" + "github.com/armon/go-radix" log "github.com/hashicorp/go-hclog" "github.com/hashicorp/vault/sdk/physical" - - radix "github.com/armon/go-radix" ) // Verify interfaces are satisfied @@ -27,10 +26,11 @@ var ( ) var ( - PutDisabledError = errors.New("put operations disabled in inmem backend") - GetDisabledError = errors.New("get operations disabled in inmem backend") - DeleteDisabledError = errors.New("delete operations disabled in inmem backend") - ListDisabledError = errors.New("list operations disabled in inmem backend") + PutDisabledError = errors.New("put operations disabled in inmem backend") + GetDisabledError = errors.New("get operations disabled in inmem backend") + DeleteDisabledError = errors.New("delete operations disabled in inmem backend") + ListDisabledError = errors.New("list operations disabled in inmem backend") + GetInTxnDisabledError = errors.New("get operations inside transactions are disabled in inmem backend") ) // InmemBackend is an in-memory only physical backend. It is useful @@ -45,6 +45,7 @@ type InmemBackend struct { failPut *uint32 failDelete *uint32 failList *uint32 + failGetInTxn *uint32 logOps bool maxValueSize int } @@ -73,6 +74,7 @@ func NewInmem(conf map[string]string, logger log.Logger) (physical.Backend, erro failPut: new(uint32), failDelete: new(uint32), failList: new(uint32), + failGetInTxn: new(uint32), logOps: os.Getenv("VAULT_INMEM_LOG_ALL_OPS") != "", maxValueSize: maxValueSize, }, nil @@ -100,6 +102,7 @@ func NewTransactionalInmem(conf map[string]string, logger log.Logger) (physical. failPut: new(uint32), failDelete: new(uint32), failList: new(uint32), + failGetInTxn: new(uint32), logOps: os.Getenv("VAULT_INMEM_LOG_ALL_OPS") != "", maxValueSize: maxValueSize, }, @@ -189,6 +192,14 @@ func (i *InmemBackend) FailGet(fail bool) { atomic.StoreUint32(i.failGet, val) } +func (i *InmemBackend) FailGetInTxn(fail bool) { + var val uint32 + if fail { + val = 1 + } + atomic.StoreUint32(i.failGetInTxn, val) +} + // Delete is used to permanently delete an entry func (i *InmemBackend) Delete(ctx context.Context, key string) error { i.permitPool.Acquire() @@ -280,7 +291,7 @@ func (i *InmemBackend) FailList(fail bool) { atomic.StoreUint32(i.failList, val) } -// Implements the transaction interface +// Transaction implements the transaction interface func (t *TransactionalInmemBackend) Transaction(ctx context.Context, txns []*physical.TxnEntry) error { t.permitPool.Acquire() defer t.permitPool.Release() @@ -288,5 +299,12 @@ func (t *TransactionalInmemBackend) Transaction(ctx context.Context, txns []*phy t.Lock() defer t.Unlock() + failGetInTxn := atomic.LoadUint32(t.failGetInTxn) + for _, t := range txns { + if t.Operation == physical.GetOperation && failGetInTxn != 0 { + return GetInTxnDisabledError + } + } + return physical.GenericTransactionHandler(ctx, t, txns) } diff --git a/vendor/github.com/hashicorp/vault/sdk/physical/transactions.go b/vendor/github.com/hashicorp/vault/sdk/physical/transactions.go index 19f0d2cbed..a943c6bd95 100644 --- a/vendor/github.com/hashicorp/vault/sdk/physical/transactions.go +++ b/vendor/github.com/hashicorp/vault/sdk/physical/transactions.go @@ -2,8 +2,9 @@ package physical import ( "context" + "fmt" - multierror "github.com/hashicorp/go-multierror" + "github.com/hashicorp/go-multierror" ) // TxnEntry is an operation that takes atomically as part of @@ -13,6 +14,10 @@ type TxnEntry struct { Entry *Entry } +func (t *TxnEntry) String() string { + return fmt.Sprintf("Operation: %s. Entry: %s", t.Operation, t.Entry) +} + // Transactional is an optional interface for backends that // support doing transactional updates of multiple keys. This is // required for some features such as replication. @@ -40,6 +45,19 @@ func GenericTransactionHandler(ctx context.Context, t PseudoTransactional, txns rollbackStack := make([]*TxnEntry, 0, len(txns)) var dirty bool + // Update all of our GET transaction entries, so we can populate existing values back at the wal layer. + for _, txn := range txns { + if txn.Operation == GetOperation { + entry, err := t.GetInternal(ctx, txn.Entry.Key) + if err != nil { + return err + } + if entry != nil { + txn.Entry.Value = entry.Value + } + } + } + // We walk the transactions in order; each successful operation goes into a // LIFO for rollback if we hit an error along the way TxnWalk: @@ -78,6 +96,7 @@ TxnWalk: dirty = true break TxnWalk } + // Nothing existed so in fact rolling back requires a delete var rollbackEntry *TxnEntry if entry == nil { diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/client.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/client.go index 04ddaec7d3..792be9b5d3 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/hcloud/client.go +++ b/vendor/github.com/hetznercloud/hcloud-go/hcloud/client.go @@ -7,7 +7,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "math" "net/http" "net/http/httputil" @@ -222,7 +221,7 @@ func (c *Client) Do(r *http.Request, v interface{}) (*Response, error) { var body []byte var err error if r.ContentLength > 0 { - body, err = ioutil.ReadAll(r.Body) + body, err = io.ReadAll(r.Body) if err != nil { r.Body.Close() return nil, err @@ -231,7 +230,7 @@ func (c *Client) Do(r *http.Request, v interface{}) (*Response, error) { } for { if r.ContentLength > 0 { - r.Body = ioutil.NopCloser(bytes.NewReader(body)) + r.Body = io.NopCloser(bytes.NewReader(body)) } if c.debugWriter != nil { @@ -247,13 +246,13 @@ func (c *Client) Do(r *http.Request, v interface{}) (*Response, error) { return nil, err } response := &Response{Response: resp} - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { resp.Body.Close() return response, err } resp.Body.Close() - resp.Body = ioutil.NopCloser(bytes.NewReader(body)) + resp.Body = io.NopCloser(bytes.NewReader(body)) if c.debugWriter != nil { dumpResp, err := httputil.DumpResponse(resp, true) @@ -271,7 +270,7 @@ func (c *Client) Do(r *http.Request, v interface{}) (*Response, error) { err = errorFromResponse(resp, body) if err == nil { err = fmt.Errorf("hcloud: server responded with status code %d", resp.StatusCode) - } else if isRetryable(err) { + } else if isConflict(err) { c.backoff(retries) retries++ continue @@ -290,12 +289,12 @@ func (c *Client) Do(r *http.Request, v interface{}) (*Response, error) { } } -func isRetryable(error error) bool { +func isConflict(error error) bool { err, ok := error.(Error) if !ok { return false } - return err.Code == ErrorCodeRateLimitExceeded || err.Code == ErrorCodeConflict + return err.Code == ErrorCodeConflict } func (c *Client) backoff(retries int) { diff --git a/vendor/github.com/hetznercloud/hcloud-go/hcloud/metadata/client.go b/vendor/github.com/hetznercloud/hcloud-go/hcloud/metadata/client.go index a95fb10d88..7bfa18e598 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/hcloud/metadata/client.go +++ b/vendor/github.com/hetznercloud/hcloud-go/hcloud/metadata/client.go @@ -2,7 +2,7 @@ package metadata import ( "fmt" - "io/ioutil" + "io" "net" "net/http" "strconv" @@ -73,7 +73,7 @@ func (c *Client) get(path string) (string, error) { return "", err } defer resp.Body.Close() - bodyBytes, err := ioutil.ReadAll(resp.Body) + bodyBytes, err := io.ReadAll(resp.Body) if err != nil { return "", err } diff --git a/vendor/golang.org/x/crypto/ssh/cipher.go b/vendor/golang.org/x/crypto/ssh/cipher.go index 770e8a6639..c3062cfd13 100644 --- a/vendor/golang.org/x/crypto/ssh/cipher.go +++ b/vendor/golang.org/x/crypto/ssh/cipher.go @@ -15,7 +15,6 @@ import ( "fmt" "hash" "io" - "io/ioutil" "golang.org/x/crypto/chacha20" "golang.org/x/crypto/internal/poly1305" @@ -497,7 +496,7 @@ func (c *cbcCipher) readCipherPacket(seqNum uint32, r io.Reader) ([]byte, error) // data, to make distinguishing between // failing MAC and failing length check more // difficult. - io.CopyN(ioutil.Discard, r, int64(c.oracleCamouflage)) + io.CopyN(io.Discard, r, int64(c.oracleCamouflage)) } } return p, err diff --git a/vendor/golang.org/x/crypto/ssh/session.go b/vendor/golang.org/x/crypto/ssh/session.go index eca31a22d5..acef62259f 100644 --- a/vendor/golang.org/x/crypto/ssh/session.go +++ b/vendor/golang.org/x/crypto/ssh/session.go @@ -13,7 +13,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "sync" ) @@ -124,7 +123,7 @@ type Session struct { // output and error. // // If either is nil, Run connects the corresponding file - // descriptor to an instance of ioutil.Discard. There is a + // descriptor to an instance of io.Discard. There is a // fixed amount of buffering that is shared for the two streams. // If either blocks it may eventually cause the remote // command to block. @@ -506,7 +505,7 @@ func (s *Session) stdout() { return } if s.Stdout == nil { - s.Stdout = ioutil.Discard + s.Stdout = io.Discard } s.copyFuncs = append(s.copyFuncs, func() error { _, err := io.Copy(s.Stdout, s.ch) @@ -519,7 +518,7 @@ func (s *Session) stderr() { return } if s.Stderr == nil { - s.Stderr = ioutil.Discard + s.Stderr = io.Discard } s.copyFuncs = append(s.copyFuncs, func() error { _, err := io.Copy(s.Stderr, s.ch.Stderr()) diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go index fd873b9afa..a894e6901b 100644 --- a/vendor/golang.org/x/net/http2/server.go +++ b/vendor/golang.org/x/net/http2/server.go @@ -869,9 +869,7 @@ func (sc *serverConn) serve() { // Each connection starts with initialWindowSize inflow tokens. // If a higher value is configured, we add more tokens. - if diff := sc.srv.initialConnRecvWindowSize() - initialWindowSize; diff > 0 { - sc.sendWindowUpdate(nil, int(diff)) - } + sc.sendWindowUpdate(nil) if err := sc.readPreface(); err != nil { sc.condlogf(err, "http2: server: error reading preface from client %v: %v", sc.conn.RemoteAddr(), err) @@ -1588,7 +1586,7 @@ func (sc *serverConn) closeStream(st *stream, err error) { if p := st.body; p != nil { // Return any buffered unread bytes worth of conn-level flow control. // See golang.org/issue/16481 - sc.sendWindowUpdate(nil, p.Len()) + sc.sendWindowUpdate(nil) p.CloseWithError(err) } @@ -1736,7 +1734,7 @@ func (sc *serverConn) processData(f *DataFrame) error { // sendWindowUpdate, which also schedules sending the // frames. sc.inflow.take(int32(f.Length)) - sc.sendWindowUpdate(nil, int(f.Length)) // conn-level + sc.sendWindowUpdate(nil) // conn-level if st != nil && st.resetQueued { // Already have a stream error in flight. Don't send another. @@ -1754,7 +1752,7 @@ func (sc *serverConn) processData(f *DataFrame) error { return sc.countError("data_flow", streamError(id, ErrCodeFlowControl)) } sc.inflow.take(int32(f.Length)) - sc.sendWindowUpdate(nil, int(f.Length)) // conn-level + sc.sendWindowUpdate(nil) // conn-level st.body.CloseWithError(fmt.Errorf("sender tried to send more than declared Content-Length of %d bytes", st.declBodyBytes)) // RFC 7540, sec 8.1.2.6: A request or response is also malformed if the @@ -1772,7 +1770,7 @@ func (sc *serverConn) processData(f *DataFrame) error { if len(data) > 0 { wrote, err := st.body.Write(data) if err != nil { - sc.sendWindowUpdate(nil, int(f.Length)-wrote) + sc.sendWindowUpdate32(nil, int32(f.Length)-int32(wrote)) return sc.countError("body_write_err", streamError(id, ErrCodeStreamClosed)) } if wrote != len(data) { @@ -2099,12 +2097,6 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res return nil, nil, sc.countError("bad_path_method", streamError(f.StreamID, ErrCodeProtocol)) } - bodyOpen := !f.StreamEnded() - if rp.method == "HEAD" && bodyOpen { - // HEAD requests can't have bodies - return nil, nil, sc.countError("head_body", streamError(f.StreamID, ErrCodeProtocol)) - } - rp.header = make(http.Header) for _, hf := range f.RegularFields() { rp.header.Add(sc.canonicalHeader(hf.Name), hf.Value) @@ -2117,6 +2109,7 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res if err != nil { return nil, nil, err } + bodyOpen := !f.StreamEnded() if bodyOpen { if vv, ok := rp.header["Content-Length"]; ok { if cl, err := strconv.ParseUint(vv[0], 10, 63); err == nil { @@ -2329,17 +2322,32 @@ func (sc *serverConn) noteBodyReadFromHandler(st *stream, n int, err error) { func (sc *serverConn) noteBodyRead(st *stream, n int) { sc.serveG.check() - sc.sendWindowUpdate(nil, n) // conn-level + sc.sendWindowUpdate(nil) // conn-level if st.state != stateHalfClosedRemote && st.state != stateClosed { // Don't send this WINDOW_UPDATE if the stream is closed // remotely. - sc.sendWindowUpdate(st, n) + sc.sendWindowUpdate(st) } } // st may be nil for conn-level -func (sc *serverConn) sendWindowUpdate(st *stream, n int) { +func (sc *serverConn) sendWindowUpdate(st *stream) { sc.serveG.check() + + var n int32 + if st == nil { + if avail, windowSize := sc.inflow.available(), sc.srv.initialConnRecvWindowSize(); avail > windowSize/2 { + return + } else { + n = windowSize - avail + } + } else { + if avail, windowSize := st.inflow.available(), sc.srv.initialStreamRecvWindowSize(); avail > windowSize/2 { + return + } else { + n = windowSize - avail + } + } // "The legal range for the increment to the flow control // window is 1 to 2^31-1 (2,147,483,647) octets." // A Go Read call on 64-bit machines could in theory read @@ -2505,6 +2513,10 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) { rws.writeHeader(200) } + if rws.handlerDone { + rws.promoteUndeclaredTrailers() + } + isHeadResp := rws.req.Method == "HEAD" if !rws.sentHeader { rws.sentHeader = true @@ -2576,10 +2588,6 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) { return 0, nil } - if rws.handlerDone { - rws.promoteUndeclaredTrailers() - } - // only send trailers if they have actually been defined by the // server handler. hasNonemptyTrailers := rws.hasNonemptyTrailers() diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index 90fdc28cf9..e9aba4390f 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -258,7 +258,8 @@ func (t *Transport) initConnPool() { // HTTP/2 server. type ClientConn struct { t *Transport - tconn net.Conn // usually *tls.Conn, except specialized impls + tconn net.Conn // usually *tls.Conn, except specialized impls + tconnClosed bool tlsState *tls.ConnectionState // nil only for specialized impls reused uint32 // whether conn is being reused; atomic singleUse bool // whether being used for a single http.Request @@ -921,10 +922,10 @@ func (cc *ClientConn) onIdleTimeout() { cc.closeIfIdle() } -func (cc *ClientConn) closeConn() error { +func (cc *ClientConn) closeConn() { t := time.AfterFunc(250*time.Millisecond, cc.forceCloseConn) defer t.Stop() - return cc.tconn.Close() + cc.tconn.Close() } // A tls.Conn.Close can hang for a long time if the peer is unresponsive. @@ -990,7 +991,8 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error { shutdownEnterWaitStateHook() select { case <-done: - return cc.closeConn() + cc.closeConn() + return nil case <-ctx.Done(): cc.mu.Lock() // Free the goroutine above @@ -1027,7 +1029,7 @@ func (cc *ClientConn) sendGoAway() error { // closes the client connection immediately. In-flight requests are interrupted. // err is sent to streams. -func (cc *ClientConn) closeForError(err error) error { +func (cc *ClientConn) closeForError(err error) { cc.mu.Lock() cc.closed = true for _, cs := range cc.streams { @@ -1035,7 +1037,7 @@ func (cc *ClientConn) closeForError(err error) error { } cc.cond.Broadcast() cc.mu.Unlock() - return cc.closeConn() + cc.closeConn() } // Close closes the client connection immediately. @@ -1043,16 +1045,17 @@ func (cc *ClientConn) closeForError(err error) error { // In-flight requests are interrupted. For a graceful shutdown, use Shutdown instead. func (cc *ClientConn) Close() error { err := errors.New("http2: client connection force closed via ClientConn.Close") - return cc.closeForError(err) + cc.closeForError(err) + return nil } // closes the client connection immediately. In-flight requests are interrupted. -func (cc *ClientConn) closeForLostPing() error { +func (cc *ClientConn) closeForLostPing() { err := errors.New("http2: client connection lost") if f := cc.t.CountError; f != nil { f("conn_close_lost_ping") } - return cc.closeForError(err) + cc.closeForError(err) } // errRequestCanceled is a copy of net/http's errRequestCanceled because it's not @@ -2005,7 +2008,7 @@ func (cc *ClientConn) forgetStreamID(id uint32) { // wake up RoundTrip if there is a pending request. cc.cond.Broadcast() - closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives() + closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives() || cc.goAway != nil if closeOnIdle && cc.streamsReserved == 0 && len(cc.streams) == 0 { if VerboseLogs { cc.vlogf("http2: Transport closing idle conn %p (forSingleUse=%v, maxStream=%v)", cc, cc.singleUse, cc.nextStreamID-2) @@ -2674,7 +2677,6 @@ func (rl *clientConnReadLoop) processGoAway(f *GoAwayFrame) error { if fn := cc.t.CountError; fn != nil { fn("recv_goaway_" + f.ErrCode.stringToken()) } - } cc.setGoAway(f) return nil diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index 29737b2008..3f2cbb638f 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -442,6 +442,10 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) = ntdll.RtlAddFunctionTable //sys RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) = ntdll.RtlDeleteFunctionTable +// Desktop Window Manager API (Dwmapi) +//sys DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) = dwmapi.DwmGetWindowAttribute +//sys DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) = dwmapi.DwmSetWindowAttribute + // syscall interface implementation for other packages // GetCurrentProcess returns the handle for the current process. diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go index ef489f5463..0c4add9741 100644 --- a/vendor/golang.org/x/sys/windows/types_windows.go +++ b/vendor/golang.org/x/sys/windows/types_windows.go @@ -3232,3 +3232,29 @@ type GUIThreadInfo struct { CaretHandle HWND CaretRect Rect } + +const ( + DWMWA_NCRENDERING_ENABLED = 1 + DWMWA_NCRENDERING_POLICY = 2 + DWMWA_TRANSITIONS_FORCEDISABLED = 3 + DWMWA_ALLOW_NCPAINT = 4 + DWMWA_CAPTION_BUTTON_BOUNDS = 5 + DWMWA_NONCLIENT_RTL_LAYOUT = 6 + DWMWA_FORCE_ICONIC_REPRESENTATION = 7 + DWMWA_FLIP3D_POLICY = 8 + DWMWA_EXTENDED_FRAME_BOUNDS = 9 + DWMWA_HAS_ICONIC_BITMAP = 10 + DWMWA_DISALLOW_PEEK = 11 + DWMWA_EXCLUDED_FROM_PEEK = 12 + DWMWA_CLOAK = 13 + DWMWA_CLOAKED = 14 + DWMWA_FREEZE_REPRESENTATION = 15 + DWMWA_PASSIVE_UPDATE_MODE = 16 + DWMWA_USE_HOSTBACKDROPBRUSH = 17 + DWMWA_USE_IMMERSIVE_DARK_MODE = 20 + DWMWA_WINDOW_CORNER_PREFERENCE = 33 + DWMWA_BORDER_COLOR = 34 + DWMWA_CAPTION_COLOR = 35 + DWMWA_TEXT_COLOR = 36 + DWMWA_VISIBLE_FRAME_BORDER_THICKNESS = 37 +) diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index 6c6f27ba55..96ba8559c3 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -40,6 +40,7 @@ var ( modadvapi32 = NewLazySystemDLL("advapi32.dll") modcrypt32 = NewLazySystemDLL("crypt32.dll") moddnsapi = NewLazySystemDLL("dnsapi.dll") + moddwmapi = NewLazySystemDLL("dwmapi.dll") modiphlpapi = NewLazySystemDLL("iphlpapi.dll") modkernel32 = NewLazySystemDLL("kernel32.dll") modmswsock = NewLazySystemDLL("mswsock.dll") @@ -175,6 +176,8 @@ var ( procDnsNameCompare_W = moddnsapi.NewProc("DnsNameCompare_W") procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W") procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree") + procDwmGetWindowAttribute = moddwmapi.NewProc("DwmGetWindowAttribute") + procDwmSetWindowAttribute = moddwmapi.NewProc("DwmSetWindowAttribute") procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses") procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo") procGetBestInterfaceEx = modiphlpapi.NewProc("GetBestInterfaceEx") @@ -1534,6 +1537,22 @@ func DnsRecordListFree(rl *DNSRecord, freetype uint32) { return } +func DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) { + r0, _, _ := syscall.Syscall6(procDwmGetWindowAttribute.Addr(), 4, uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size), 0, 0) + if r0 != 0 { + ret = syscall.Errno(r0) + } + return +} + +func DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) { + r0, _, _ := syscall.Syscall6(procDwmSetWindowAttribute.Addr(), 4, uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size), 0, 0) + if r0 != 0 { + ret = syscall.Errno(r0) + } + return +} + func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) { r0, _, _ := syscall.Syscall6(procGetAdaptersAddresses.Addr(), 5, uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)), 0) if r0 != 0 { diff --git a/vendor/google.golang.org/api/container/v1/container-api.json b/vendor/google.golang.org/api/container/v1/container-api.json index 0697a1a808..5d56de6dae 100644 --- a/vendor/google.golang.org/api/container/v1/container-api.json +++ b/vendor/google.golang.org/api/container/v1/container-api.json @@ -2487,7 +2487,7 @@ } } }, - "revision": "20220727", + "revision": "20220826", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2636,7 +2636,7 @@ "description": "Specifies the node management options for NAP created node-pools." }, "minCpuPlatform": { - "description": "Deprecated. Minimum CPU platform to be used for NAP created node pools. The instance may be scheduled on the specified or newer CPU platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: Intel Haswell or minCpuPlatform: Intel Sandy Bridge. For more information, read [how to specify min CPU platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform) This field is deprecated, min_cpu_platform should be specified using https://cloud.google.com/requested-min-cpu-platform label selector on the pod. To unset the min cpu platform field pass \"automatic\" as field value.", + "description": "Deprecated. Minimum CPU platform to be used for NAP created node pools. The instance may be scheduled on the specified or newer CPU platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: Intel Haswell or minCpuPlatform: Intel Sandy Bridge. For more information, read [how to specify min CPU platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform). This field is deprecated, min_cpu_platform should be specified using https://cloud.google.com/requested-min-cpu-platform label selector on the pod. To unset the min cpu platform field pass \"automatic\" as field value.", "type": "string" }, "oauthScopes": { @@ -3284,6 +3284,10 @@ "description": "The node pool to be upgraded. This field is mandatory if \"desired_node_version\", \"desired_image_family\" or \"desired_node_pool_autoscaling\" is specified and there is more than one node pool on the cluster.", "type": "string" }, + "desiredNodePoolLoggingConfig": { + "$ref": "NodePoolLoggingConfig", + "description": "The desired node pool logging configuration defaults for the cluster." + }, "desiredNodeVersion": { "description": "The Kubernetes version to change the nodes to (typically an upgrade). Users may specify either explicit versions offered by Kubernetes Engine or version aliases, which have the following behavior: - \"latest\": picks the highest valid Kubernetes version - \"1.X\": picks the highest valid patch+gke.N patch in the 1.X version - \"1.X.Y\": picks the highest valid gke.N patch in the 1.X.Y version - \"1.X.Y-gke.N\": picks an explicit Kubernetes version - \"-\": picks the Kubernetes master version", "type": "string" @@ -4033,6 +4037,27 @@ }, "type": "object" }, + "LoggingVariantConfig": { + "description": "LoggingVariantConfig specifies the behaviour of the logging component.", + "id": "LoggingVariantConfig", + "properties": { + "variant": { + "description": "Logging variant deployed on nodes.", + "enum": [ + "VARIANT_UNSPECIFIED", + "DEFAULT", + "MAX_THROUGHPUT" + ], + "enumDescriptions": [ + "Default value. This shouldn't be used.", + "default logging variant.", + "maximum logging throughput variant." + ], + "type": "string" + } + }, + "type": "object" + }, "MaintenanceExclusionOptions": { "description": "Represents the Maintenance exclusion option.", "id": "MaintenanceExclusionOptions", @@ -4438,6 +4463,10 @@ "format": "int32", "type": "integer" }, + "loggingConfig": { + "$ref": "NodePoolLoggingConfig", + "description": "Logging configuration." + }, "machineType": { "description": "The name of a Google Compute Engine [machine type](https://cloud.google.com/compute/docs/machine-types) If unspecified, the default machine type is `e2-medium`.", "type": "string" @@ -4516,6 +4545,10 @@ "gcfsConfig": { "$ref": "GcfsConfig", "description": "GCFS (Google Container File System, also known as Riptide) options." + }, + "loggingConfig": { + "$ref": "NodePoolLoggingConfig", + "description": "Logging configuration for node pools." } }, "type": "object" @@ -4776,6 +4809,17 @@ }, "type": "object" }, + "NodePoolLoggingConfig": { + "description": "NodePoolLoggingConfig specifies logging configuration for nodepools.", + "id": "NodePoolLoggingConfig", + "properties": { + "variantConfig": { + "$ref": "LoggingVariantConfig", + "description": "Logging variant configuration." + } + }, + "type": "object" + }, "NodeTaint": { "description": "Kubernetes taint is comprised of three fields: key, value, and effect. Effect can only be one of three types: NoSchedule, PreferNoSchedule or NoExecute. See [here](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration) for more information, including usage and the valid values.", "id": "NodeTaint", @@ -5160,7 +5204,7 @@ "type": "string" }, "key": { - "description": "Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify \"googleapis.com/reservation-name\" as the key and specify the name of your reservation as its value.", + "description": "Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify \"compute.googleapis.com/reservation-name\" as the key and specify the name of your reservation as its value.", "type": "string" }, "values": { @@ -6042,6 +6086,10 @@ }, "type": "array" }, + "loggingConfig": { + "$ref": "NodePoolLoggingConfig", + "description": "Logging configuration." + }, "name": { "description": "The name (project, location, cluster, node pool) of the node pool to update. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.", "type": "string" diff --git a/vendor/google.golang.org/api/container/v1/container-gen.go b/vendor/google.golang.org/api/container/v1/container-gen.go index 93d89e1362..62a52528d0 100644 --- a/vendor/google.golang.org/api/container/v1/container-gen.go +++ b/vendor/google.golang.org/api/container/v1/container-gen.go @@ -562,7 +562,7 @@ type AutoprovisioningNodePoolDefaults struct { // platforms, such as minCpuPlatform: Intel Haswell or minCpuPlatform: // Intel Sandy Bridge. For more information, read how to specify min CPU // platform - // (https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform) + // (https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform). // This field is deprecated, min_cpu_platform should be specified using // https://cloud.google.com/requested-min-cpu-platform label selector on // the pod. To unset the min cpu platform field pass "automatic" as @@ -1466,6 +1466,10 @@ type ClusterUpdate struct { // one node pool on the cluster. DesiredNodePoolId string `json:"desiredNodePoolId,omitempty"` + // DesiredNodePoolLoggingConfig: The desired node pool logging + // configuration defaults for the cluster. + DesiredNodePoolLoggingConfig *NodePoolLoggingConfig `json:"desiredNodePoolLoggingConfig,omitempty"` + // DesiredNodeVersion: The Kubernetes version to change the nodes to // (typically an upgrade). Users may specify either explicit versions // offered by Kubernetes Engine or version aliases, which have the @@ -2906,6 +2910,40 @@ func (s *LoggingConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LoggingVariantConfig: LoggingVariantConfig specifies the behaviour of +// the logging component. +type LoggingVariantConfig struct { + // Variant: Logging variant deployed on nodes. + // + // Possible values: + // "VARIANT_UNSPECIFIED" - Default value. This shouldn't be used. + // "DEFAULT" - default logging variant. + // "MAX_THROUGHPUT" - maximum logging throughput variant. + Variant string `json:"variant,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Variant") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Variant") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LoggingVariantConfig) MarshalJSON() ([]byte, error) { + type NoMethod LoggingVariantConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MaintenanceExclusionOptions: Represents the Maintenance exclusion // option. type MaintenanceExclusionOptions struct { @@ -3633,6 +3671,9 @@ type NodeConfig struct { // information. LocalSsdCount int64 `json:"localSsdCount,omitempty"` + // LoggingConfig: Logging configuration. + LoggingConfig *NodePoolLoggingConfig `json:"loggingConfig,omitempty"` + // MachineType: The name of a Google Compute Engine machine type // (https://cloud.google.com/compute/docs/machine-types) If unspecified, // the default machine type is `e2-medium`. @@ -3754,6 +3795,9 @@ type NodeConfigDefaults struct { // Riptide) options. GcfsConfig *GcfsConfig `json:"gcfsConfig,omitempty"` + // LoggingConfig: Logging configuration for node pools. + LoggingConfig *NodePoolLoggingConfig `json:"loggingConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcfsConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -4212,6 +4256,35 @@ func (s *NodePoolDefaults) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NodePoolLoggingConfig: NodePoolLoggingConfig specifies logging +// configuration for nodepools. +type NodePoolLoggingConfig struct { + // VariantConfig: Logging variant configuration. + VariantConfig *LoggingVariantConfig `json:"variantConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "VariantConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "VariantConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NodePoolLoggingConfig) MarshalJSON() ([]byte, error) { + type NoMethod NodePoolLoggingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // NodeTaint: Kubernetes taint is comprised of three fields: key, value, // and effect. Effect can only be one of three types: NoSchedule, // PreferNoSchedule or NoExecute. See here @@ -4765,8 +4838,8 @@ type ReservationAffinity struct { // Key: Corresponds to the label key of a reservation resource. To // target a SPECIFIC_RESERVATION by name, specify - // "googleapis.com/reservation-name" as the key and specify the name of - // your reservation as its value. + // "compute.googleapis.com/reservation-name" as the key and specify the + // name of your reservation as its value. Key string `json:"key,omitempty"` // Values: Corresponds to the label value(s) of reservation resource(s). @@ -6331,6 +6404,9 @@ type UpdateNodePoolRequest struct { // removed. Locations []string `json:"locations,omitempty"` + // LoggingConfig: Logging configuration. + LoggingConfig *NodePoolLoggingConfig `json:"loggingConfig,omitempty"` + // Name: The name (project, location, cluster, node pool) of the node // pool to update. Specified in the format // `projects/*/locations/*/clusters/*/nodePools/*`. diff --git a/vendor/google.golang.org/api/dns/v1/dns-api.json b/vendor/google.golang.org/api/dns/v1/dns-api.json index 55ac1499de..7fb8d48865 100644 --- a/vendor/google.golang.org/api/dns/v1/dns-api.json +++ b/vendor/google.golang.org/api/dns/v1/dns-api.json @@ -1824,7 +1824,7 @@ } } }, - "revision": "20220804", + "revision": "20220908", "rootUrl": "https://dns.googleapis.com/", "schemas": { "Change": { @@ -2156,7 +2156,7 @@ "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." }, "members": { - "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", "items": { "type": "string" }, @@ -2517,6 +2517,13 @@ "ManagedZonePrivateVisibilityConfig": { "id": "ManagedZonePrivateVisibilityConfig", "properties": { + "gkeClusters": { + "description": "The list of Google Kubernetes Engine clusters that can see this zone.", + "items": { + "$ref": "ManagedZonePrivateVisibilityConfigGKECluster" + }, + "type": "array" + }, "kind": { "default": "dns#managedZonePrivateVisibilityConfig", "type": "string" @@ -2531,6 +2538,20 @@ }, "type": "object" }, + "ManagedZonePrivateVisibilityConfigGKECluster": { + "id": "ManagedZonePrivateVisibilityConfigGKECluster", + "properties": { + "gkeClusterName": { + "description": "The resource name of the cluster to bind this ManagedZone to. This should be specified in the format like: projects/*/locations/*/clusters/*. This is referenced from GKE projects.locations.clusters.get API: https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/get", + "type": "string" + }, + "kind": { + "default": "dns#managedZonePrivateVisibilityConfigGKECluster", + "type": "string" + } + }, + "type": "object" + }, "ManagedZonePrivateVisibilityConfigNetwork": { "id": "ManagedZonePrivateVisibilityConfigNetwork", "properties": { @@ -3338,6 +3359,13 @@ "description": "User-provided description for this Response Policy.", "type": "string" }, + "gkeClusters": { + "description": "The list of Google Kubernetes Engine clusters to which this response policy is applied.", + "items": { + "$ref": "ResponsePolicyGKECluster" + }, + "type": "array" + }, "id": { "description": "Unique identifier for the resource; defined by the server (output only).", "format": "int64", @@ -3361,6 +3389,20 @@ }, "type": "object" }, + "ResponsePolicyGKECluster": { + "id": "ResponsePolicyGKECluster", + "properties": { + "gkeClusterName": { + "description": "The resource name of the cluster to bind this response policy to. This should be specified in the format like: projects/*/locations/*/clusters/*. This is referenced from GKE projects.locations.clusters.get API: https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/get", + "type": "string" + }, + "kind": { + "default": "dns#responsePolicyGKECluster", + "type": "string" + } + }, + "type": "object" + }, "ResponsePolicyNetwork": { "id": "ResponsePolicyNetwork", "properties": { diff --git a/vendor/google.golang.org/api/dns/v1/dns-gen.go b/vendor/google.golang.org/api/dns/v1/dns-gen.go index 7df0116dda..f1de4406ac 100644 --- a/vendor/google.golang.org/api/dns/v1/dns-gen.go +++ b/vendor/google.golang.org/api/dns/v1/dns-gen.go @@ -780,11 +780,12 @@ type GoogleIamV1Binding struct { // `allUsers`: A special identifier that represents anyone who is on the // internet; with or without a Google account. * // `allAuthenticatedUsers`: A special identifier that represents anyone - // who is authenticated with a Google account or a service account. * - // `user:{emailid}`: An email address that represents a specific Google - // account. For example, `alice@example.com` . * - // `serviceAccount:{emailid}`: An email address that represents a Google - // service account. For example, + // who is authenticated with a Google account or a service account. Does + // not include identities that come from external identity providers + // (IdPs) through identity federation. * `user:{emailid}`: An email + // address that represents a specific Google account. For example, + // `alice@example.com` . * `serviceAccount:{emailid}`: An email address + // that represents a Google service account. For example, // `my-other-app@appspot.gserviceaccount.com`. * // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: // An identifier for a Kubernetes service account @@ -1508,12 +1509,16 @@ func (s *ManagedZonePeeringConfigTargetNetwork) MarshalJSON() ([]byte, error) { } type ManagedZonePrivateVisibilityConfig struct { + // GkeClusters: The list of Google Kubernetes Engine clusters that can + // see this zone. + GkeClusters []*ManagedZonePrivateVisibilityConfigGKECluster `json:"gkeClusters,omitempty"` + Kind string `json:"kind,omitempty"` // Networks: The list of VPC networks that can see this zone. Networks []*ManagedZonePrivateVisibilityConfigNetwork `json:"networks,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to + // ForceSendFields is a list of field names (e.g. "GkeClusters") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1521,10 +1526,10 @@ type ManagedZonePrivateVisibilityConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "GkeClusters") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -1536,6 +1541,40 @@ func (s *ManagedZonePrivateVisibilityConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ManagedZonePrivateVisibilityConfigGKECluster struct { + // GkeClusterName: The resource name of the cluster to bind this + // ManagedZone to. This should be specified in the format like: + // projects/*/locations/*/clusters/*. This is referenced from GKE + // projects.locations.clusters.get API: + // https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/get + GkeClusterName string `json:"gkeClusterName,omitempty"` + + Kind string `json:"kind,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GkeClusterName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GkeClusterName") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ManagedZonePrivateVisibilityConfigGKECluster) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZonePrivateVisibilityConfigGKECluster + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ManagedZonePrivateVisibilityConfigNetwork struct { Kind string `json:"kind,omitempty"` @@ -2905,6 +2944,10 @@ type ResponsePolicy struct { // Description: User-provided description for this Response Policy. Description string `json:"description,omitempty"` + // GkeClusters: The list of Google Kubernetes Engine clusters to which + // this response policy is applied. + GkeClusters []*ResponsePolicyGKECluster `json:"gkeClusters,omitempty"` + // Id: Unique identifier for the resource; defined by the server (output // only). Id int64 `json:"id,omitempty,string"` @@ -2945,6 +2988,40 @@ func (s *ResponsePolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ResponsePolicyGKECluster struct { + // GkeClusterName: The resource name of the cluster to bind this + // response policy to. This should be specified in the format like: + // projects/*/locations/*/clusters/*. This is referenced from GKE + // projects.locations.clusters.get API: + // https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/get + GkeClusterName string `json:"gkeClusterName,omitempty"` + + Kind string `json:"kind,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GkeClusterName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GkeClusterName") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ResponsePolicyGKECluster) MarshalJSON() ([]byte, error) { + type NoMethod ResponsePolicyGKECluster + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ResponsePolicyNetwork struct { Kind string `json:"kind,omitempty"` diff --git a/vendor/google.golang.org/api/internal/gensupport/media.go b/vendor/google.golang.org/api/internal/gensupport/media.go index d14a22470c..66caf24cb1 100644 --- a/vendor/google.golang.org/api/internal/gensupport/media.go +++ b/vendor/google.golang.org/api/internal/gensupport/media.go @@ -289,13 +289,12 @@ func (mi *MediaInfo) UploadRequest(reqHeaders http.Header, body io.Reader) (newB // be retried because the data is stored in the MediaBuffer. media, _, _, _ = mi.buffer.Chunk() } + toCleanup := []io.Closer{} if media != nil { fb := readerFunc(body) fm := readerFunc(media) combined, ctype := CombineBodyMedia(body, "application/json", media, mi.mType) - toCleanup := []io.Closer{ - combined, - } + toCleanup = append(toCleanup, combined) if fb != nil && fm != nil { getBody = func() (io.ReadCloser, error) { rb := ioutil.NopCloser(fb()) @@ -309,18 +308,30 @@ func (mi *MediaInfo) UploadRequest(reqHeaders http.Header, body io.Reader) (newB return r, nil } } - cleanup = func() { - for _, closer := range toCleanup { - _ = closer.Close() - } - - } reqHeaders.Set("Content-Type", ctype) body = combined } if mi.buffer != nil && mi.mType != "" && !mi.singleChunk { + // This happens when initiating a resumable upload session. + // The initial request contains a JSON body rather than media. + // It can be retried with a getBody function that re-creates the request body. + fb := readerFunc(body) + if fb != nil { + getBody = func() (io.ReadCloser, error) { + rb := ioutil.NopCloser(fb()) + toCleanup = append(toCleanup, rb) + return rb, nil + } + } reqHeaders.Set("X-Upload-Content-Type", mi.mType) } + // Ensure that any bodies created in getBody are cleaned up. + cleanup = func() { + for _, closer := range toCleanup { + _ = closer.Close() + } + + } return body, getBody, cleanup } diff --git a/vendor/google.golang.org/api/internal/gensupport/send.go b/vendor/google.golang.org/api/internal/gensupport/send.go index 70a8e01c1b..dd24139b36 100644 --- a/vendor/google.golang.org/api/internal/gensupport/send.go +++ b/vendor/google.golang.org/api/internal/gensupport/send.go @@ -17,6 +17,27 @@ import ( "github.com/googleapis/gax-go/v2" ) +// Use this error type to return an error which allows introspection of both +// the context error and the error from the service. +type wrappedCallErr struct { + ctxErr error + wrappedErr error +} + +func (e wrappedCallErr) Error() string { + return fmt.Sprintf("retry failed with %v; last error: %v", e.ctxErr, e.wrappedErr) +} + +func (e wrappedCallErr) Unwrap() error { + return e.wrappedErr +} + +// Is allows errors.Is to match the error from the call as well as context +// sentinel errors. +func (e wrappedCallErr) Is(target error) bool { + return errors.Is(e.ctxErr, target) || errors.Is(e.wrappedErr, target) +} + // SendRequest sends a single HTTP request using the given client. // If ctx is non-nil, it calls all hooks, then sends the request with // req.WithContext, then calls any functions returned by the hooks in @@ -96,12 +117,12 @@ func sendAndRetry(ctx context.Context, client *http.Client, req *http.Request, r for { select { case <-ctx.Done(): - // If we got an error, and the context has been canceled, - // the context's error is probably more useful. - if err == nil { - err = ctx.Err() + // If we got an error and the context has been canceled, return an error acknowledging + // both the context cancelation and the service error. + if err != nil { + return resp, wrappedCallErr{ctx.Err(), err} } - return resp, err + return resp, ctx.Err() case <-time.After(pause): } @@ -110,10 +131,10 @@ func sendAndRetry(ctx context.Context, client *http.Client, req *http.Request, r // select is satisfied at the same time, Go will choose one arbitrarily. // That can cause an operation to go through even if the context was // canceled before. - if err == nil { - err = ctx.Err() + if err != nil { + return resp, wrappedCallErr{ctx.Err(), err} } - return resp, err + return resp, ctx.Err() } invocationHeader := fmt.Sprintf("gccl-invocation-id/%s gccl-attempt-count/%d", invocationID, attempts) xGoogHeader := strings.Join([]string{invocationHeader, baseXGoogHeader}, " ") diff --git a/vendor/google.golang.org/api/internal/version.go b/vendor/google.golang.org/api/internal/version.go index 08d3c916f0..ce0e80c4e8 100644 --- a/vendor/google.golang.org/api/internal/version.go +++ b/vendor/google.golang.org/api/internal/version.go @@ -5,4 +5,4 @@ package internal // Version is the current tagged release of the library. -const Version = "0.96.0" +const Version = "0.97.0" diff --git a/vendor/helm.sh/helm/v3/internal/version/version.go b/vendor/helm.sh/helm/v3/internal/version/version.go index 6919e29d80..bf2af39bbd 100644 --- a/vendor/helm.sh/helm/v3/internal/version/version.go +++ b/vendor/helm.sh/helm/v3/internal/version/version.go @@ -29,7 +29,7 @@ var ( // // Increment major number for new feature additions and behavioral changes. // Increment minor number for bug fixes and performance enhancements. - version = "v3.9" + version = "v3.10" // metadata is extra build time data metadata = "" diff --git a/vendor/helm.sh/helm/v3/pkg/cli/environment.go b/vendor/helm.sh/helm/v3/pkg/cli/environment.go index d5b208015a..ac3093629d 100644 --- a/vendor/helm.sh/helm/v3/pkg/cli/environment.go +++ b/vendor/helm.sh/helm/v3/pkg/cli/environment.go @@ -30,6 +30,7 @@ import ( "github.com/spf13/pflag" "k8s.io/cli-runtime/pkg/genericclioptions" + "k8s.io/client-go/rest" "helm.sh/helm/v3/pkg/helmpath" ) @@ -37,6 +38,9 @@ import ( // defaultMaxHistory sets the maximum number of releases to 0: unlimited const defaultMaxHistory = 10 +// defaultBurstLimit sets the default client-side throttling limit +const defaultBurstLimit = 100 + // EnvSettings describes all of the environment settings. type EnvSettings struct { namespace string @@ -56,6 +60,12 @@ type EnvSettings struct { KubeAPIServer string // Custom certificate authority file. KubeCaFile string + // KubeInsecureSkipTLSVerify indicates if server's certificate will not be checked for validity. + // This makes the HTTPS connections insecure + KubeInsecureSkipTLSVerify bool + // KubeTLSServerName overrides the name to use for server certificate validation. + // If it is not provided, the hostname used to contact the server is used + KubeTLSServerName string // Debug indicates whether or not Helm is running in Debug mode. Debug bool // RegistryConfig is the path to the registry config file. @@ -68,22 +78,27 @@ type EnvSettings struct { PluginsDirectory string // MaxHistory is the max release history maintained. MaxHistory int + // BurstLimit is the default client-side throttling limit. + BurstLimit int } func New() *EnvSettings { env := &EnvSettings{ - namespace: os.Getenv("HELM_NAMESPACE"), - MaxHistory: envIntOr("HELM_MAX_HISTORY", defaultMaxHistory), - KubeContext: os.Getenv("HELM_KUBECONTEXT"), - KubeToken: os.Getenv("HELM_KUBETOKEN"), - KubeAsUser: os.Getenv("HELM_KUBEASUSER"), - KubeAsGroups: envCSV("HELM_KUBEASGROUPS"), - KubeAPIServer: os.Getenv("HELM_KUBEAPISERVER"), - KubeCaFile: os.Getenv("HELM_KUBECAFILE"), - PluginsDirectory: envOr("HELM_PLUGINS", helmpath.DataPath("plugins")), - RegistryConfig: envOr("HELM_REGISTRY_CONFIG", helmpath.ConfigPath("registry/config.json")), - RepositoryConfig: envOr("HELM_REPOSITORY_CONFIG", helmpath.ConfigPath("repositories.yaml")), - RepositoryCache: envOr("HELM_REPOSITORY_CACHE", helmpath.CachePath("repository")), + namespace: os.Getenv("HELM_NAMESPACE"), + MaxHistory: envIntOr("HELM_MAX_HISTORY", defaultMaxHistory), + KubeContext: os.Getenv("HELM_KUBECONTEXT"), + KubeToken: os.Getenv("HELM_KUBETOKEN"), + KubeAsUser: os.Getenv("HELM_KUBEASUSER"), + KubeAsGroups: envCSV("HELM_KUBEASGROUPS"), + KubeAPIServer: os.Getenv("HELM_KUBEAPISERVER"), + KubeCaFile: os.Getenv("HELM_KUBECAFILE"), + KubeTLSServerName: os.Getenv("HELM_KUBETLS_SERVER_NAME"), + KubeInsecureSkipTLSVerify: envBoolOr("HELM_KUBEINSECURE_SKIP_TLS_VERIFY", false), + PluginsDirectory: envOr("HELM_PLUGINS", helmpath.DataPath("plugins")), + RegistryConfig: envOr("HELM_REGISTRY_CONFIG", helmpath.ConfigPath("registry/config.json")), + RepositoryConfig: envOr("HELM_REPOSITORY_CONFIG", helmpath.ConfigPath("repositories.yaml")), + RepositoryCache: envOr("HELM_REPOSITORY_CACHE", helmpath.CachePath("repository")), + BurstLimit: envIntOr("HELM_BURST_LIMIT", defaultBurstLimit), } env.Debug, _ = strconv.ParseBool(os.Getenv("HELM_DEBUG")) @@ -96,7 +111,13 @@ func New() *EnvSettings { CAFile: &env.KubeCaFile, KubeConfig: &env.KubeConfig, Impersonate: &env.KubeAsUser, + Insecure: &env.KubeInsecureSkipTLSVerify, + TLSServerName: &env.KubeTLSServerName, ImpersonateGroup: &env.KubeAsGroups, + WrapConfigFn: func(config *rest.Config) *rest.Config { + config.Burst = env.BurstLimit + return config + }, } return env } @@ -111,10 +132,13 @@ func (s *EnvSettings) AddFlags(fs *pflag.FlagSet) { fs.StringArrayVar(&s.KubeAsGroups, "kube-as-group", s.KubeAsGroups, "group to impersonate for the operation, this flag can be repeated to specify multiple groups.") fs.StringVar(&s.KubeAPIServer, "kube-apiserver", s.KubeAPIServer, "the address and the port for the Kubernetes API server") fs.StringVar(&s.KubeCaFile, "kube-ca-file", s.KubeCaFile, "the certificate authority file for the Kubernetes API server connection") + fs.StringVar(&s.KubeTLSServerName, "kube-tls-server-name", s.KubeTLSServerName, "server name to use for Kubernetes API server certificate validation. If it is not provided, the hostname used to contact the server is used") + fs.BoolVar(&s.KubeInsecureSkipTLSVerify, "kube-insecure-skip-tls-verify", s.KubeInsecureSkipTLSVerify, "if true, the Kubernetes API server's certificate will not be checked for validity. This will make your HTTPS connections insecure") fs.BoolVar(&s.Debug, "debug", s.Debug, "enable verbose output") fs.StringVar(&s.RegistryConfig, "registry-config", s.RegistryConfig, "path to the registry config file") fs.StringVar(&s.RepositoryConfig, "repository-config", s.RepositoryConfig, "path to the file containing repository names and URLs") fs.StringVar(&s.RepositoryCache, "repository-cache", s.RepositoryCache, "path to the file containing cached repository indexes") + fs.IntVar(&s.BurstLimit, "burst-limit", s.BurstLimit, "client-side default throttling limit") } func envOr(name, def string) string { @@ -124,6 +148,18 @@ func envOr(name, def string) string { return def } +func envBoolOr(name string, def bool) bool { + if name == "" { + return def + } + envVal := envOr(name, strconv.FormatBool(def)) + ret, err := strconv.ParseBool(envVal) + if err != nil { + return def + } + return ret +} + func envIntOr(name string, def int) int { if name == "" { return def @@ -157,14 +193,17 @@ func (s *EnvSettings) EnvVars() map[string]string { "HELM_REPOSITORY_CONFIG": s.RepositoryConfig, "HELM_NAMESPACE": s.Namespace(), "HELM_MAX_HISTORY": strconv.Itoa(s.MaxHistory), + "HELM_BURST_LIMIT": strconv.Itoa(s.BurstLimit), // broken, these are populated from helm flags and not kubeconfig. - "HELM_KUBECONTEXT": s.KubeContext, - "HELM_KUBETOKEN": s.KubeToken, - "HELM_KUBEASUSER": s.KubeAsUser, - "HELM_KUBEASGROUPS": strings.Join(s.KubeAsGroups, ","), - "HELM_KUBEAPISERVER": s.KubeAPIServer, - "HELM_KUBECAFILE": s.KubeCaFile, + "HELM_KUBECONTEXT": s.KubeContext, + "HELM_KUBETOKEN": s.KubeToken, + "HELM_KUBEASUSER": s.KubeAsUser, + "HELM_KUBEASGROUPS": strings.Join(s.KubeAsGroups, ","), + "HELM_KUBEAPISERVER": s.KubeAPIServer, + "HELM_KUBECAFILE": s.KubeCaFile, + "HELM_KUBEINSECURE_SKIP_TLS_VERIFY": strconv.FormatBool(s.KubeInsecureSkipTLSVerify), + "HELM_KUBETLS_SERVER_NAME": s.KubeTLSServerName, } if s.KubeConfig != "" { envvars["KUBECONFIG"] = s.KubeConfig diff --git a/vendor/helm.sh/helm/v3/pkg/cli/values/options.go b/vendor/helm.sh/helm/v3/pkg/cli/values/options.go index a28ffa99fd..b895211d53 100644 --- a/vendor/helm.sh/helm/v3/pkg/cli/values/options.go +++ b/vendor/helm.sh/helm/v3/pkg/cli/values/options.go @@ -34,6 +34,7 @@ type Options struct { StringValues []string Values []string FileValues []string + JSONValues []string } // MergeValues merges values from files specified via -f/--values and directly @@ -57,6 +58,13 @@ func (opts *Options) MergeValues(p getter.Providers) (map[string]interface{}, er base = mergeMaps(base, currentMap) } + // User specified a value via --set-json + for _, value := range opts.JSONValues { + if err := strvals.ParseJSON(value, base); err != nil { + return nil, errors.Errorf("failed parsing --set-json data %s", value) + } + } + // User specified a value via --set for _, value := range opts.Values { if err := strvals.ParseInto(value, base); err != nil { @@ -112,7 +120,10 @@ func readFile(filePath string, p getter.Providers) ([]byte, error) { if strings.TrimSpace(filePath) == "-" { return ioutil.ReadAll(os.Stdin) } - u, _ := url.Parse(filePath) + u, err := url.Parse(filePath) + if err != nil { + return nil, err + } // FIXME: maybe someone handle other protocols like ftp. g, err := p.ByScheme(u.Scheme) diff --git a/vendor/helm.sh/helm/v3/pkg/strvals/parser.go b/vendor/helm.sh/helm/v3/pkg/strvals/parser.go index d8c73d03c5..26bc0fcf25 100644 --- a/vendor/helm.sh/helm/v3/pkg/strvals/parser.go +++ b/vendor/helm.sh/helm/v3/pkg/strvals/parser.go @@ -17,10 +17,13 @@ package strvals import ( "bytes" + "encoding/json" "fmt" "io" + "io/ioutil" "strconv" "strings" + "unicode" "github.com/pkg/errors" "sigs.k8s.io/yaml" @@ -98,6 +101,18 @@ func ParseIntoString(s string, dest map[string]interface{}) error { return t.parse() } +// ParseJSON parses a string with format key1=val1, key2=val2, ... +// where values are json strings (null, or scalars, or arrays, or objects). +// An empty val is treated as null. +// +// If a key exists in dest, the new value overwrites the dest version. +// +func ParseJSON(s string, dest map[string]interface{}) error { + scanner := bytes.NewBufferString(s) + t := newJSONParser(scanner, dest) + return t.parse() +} + // ParseIntoFile parses a filevals line and merges the result into dest. // // This method always returns a string as the value. @@ -117,9 +132,10 @@ type RunesValueReader func([]rune) (interface{}, error) // where sc is the source of the original data being parsed // where data is the final parsed data from the parses with correct types type parser struct { - sc *bytes.Buffer - data map[string]interface{} - reader RunesValueReader + sc *bytes.Buffer + data map[string]interface{} + reader RunesValueReader + isjsonval bool } func newParser(sc *bytes.Buffer, data map[string]interface{}, stringBool bool) *parser { @@ -129,6 +145,10 @@ func newParser(sc *bytes.Buffer, data map[string]interface{}, stringBool bool) * return &parser{sc: sc, data: data, reader: stringConverter} } +func newJSONParser(sc *bytes.Buffer, data map[string]interface{}) *parser { + return &parser{sc: sc, data: data, reader: nil, isjsonval: true} +} + func newFileParser(sc *bytes.Buffer, data map[string]interface{}, reader RunesValueReader) *parser { return &parser{sc: sc, data: data, reader: reader} } @@ -188,6 +208,33 @@ func (t *parser) key(data map[string]interface{}) (reterr error) { set(data, kk, list) return err case last == '=': + if t.isjsonval { + empval, err := t.emptyVal() + if err != nil { + return err + } + if empval { + set(data, string(k), nil) + return nil + } + // parse jsonvals by using Go’s JSON standard library + // Decode is preferred to Unmarshal in order to parse just the json parts of the list key1=jsonval1,key2=jsonval2,... + // Since Decode has its own buffer that consumes more characters (from underlying t.sc) than the ones actually decoded, + // we invoke Decode on a separate reader built with a copy of what is left in t.sc. After Decode is executed, we + // discard in t.sc the chars of the decoded json value (the number of those characters is returned by InputOffset). + var jsonval interface{} + dec := json.NewDecoder(strings.NewReader(t.sc.String())) + if err = dec.Decode(&jsonval); err != nil { + return err + } + set(data, string(k), jsonval) + if _, err = io.CopyN(ioutil.Discard, t.sc, dec.InputOffset()); err != nil { + return err + } + // skip possible blanks and comma + _, err = t.emptyVal() + return err + } //End of key. Consume =, Get value. // FIXME: Get value list first vl, e := t.valList() @@ -209,7 +256,6 @@ func (t *parser) key(data map[string]interface{}) (reterr error) { default: return e } - case last == ',': // No value given. Set the value to empty string. Return error. set(data, string(k), "") @@ -287,6 +333,34 @@ func (t *parser) listItem(list []interface{}, i int) ([]interface{}, error) { case err != nil: return list, err case last == '=': + if t.isjsonval { + empval, err := t.emptyVal() + if err != nil { + return list, err + } + if empval { + return setIndex(list, i, nil) + } + // parse jsonvals by using Go’s JSON standard library + // Decode is preferred to Unmarshal in order to parse just the json parts of the list key1=jsonval1,key2=jsonval2,... + // Since Decode has its own buffer that consumes more characters (from underlying t.sc) than the ones actually decoded, + // we invoke Decode on a separate reader built with a copy of what is left in t.sc. After Decode is executed, we + // discard in t.sc the chars of the decoded json value (the number of those characters is returned by InputOffset). + var jsonval interface{} + dec := json.NewDecoder(strings.NewReader(t.sc.String())) + if err = dec.Decode(&jsonval); err != nil { + return list, err + } + if list, err = setIndex(list, i, jsonval); err != nil { + return list, err + } + if _, err = io.CopyN(ioutil.Discard, t.sc, dec.InputOffset()); err != nil { + return list, err + } + // skip possible blanks and comma + _, err = t.emptyVal() + return list, err + } vl, e := t.valList() switch e { case nil: @@ -350,6 +424,28 @@ func (t *parser) listItem(list []interface{}, i int) ([]interface{}, error) { } } +// check for an empty value +// read and consume optional spaces until comma or EOF (empty val) or any other char (not empty val) +// comma and spaces are consumed, while any other char is not cosumed +func (t *parser) emptyVal() (bool, error) { + for { + r, _, e := t.sc.ReadRune() + if e == io.EOF { + return true, nil + } + if e != nil { + return false, e + } + if r == ',' { + return true, nil + } + if !unicode.IsSpace(r) { + t.sc.UnreadRune() + return false, nil + } + } +} + func (t *parser) val() ([]rune, error) { stop := runeSet([]rune{','}) v, _, err := runesUntil(t.sc, stop) diff --git a/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go b/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go index d37dfbf732..73876f6887 100644 --- a/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go +++ b/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go @@ -199,14 +199,18 @@ func newAuthenticator(c *cache, isTerminalFunc func(int) bool, config *api.ExecC now: time.Now, environ: os.Environ, - defaultDialer: defaultDialer, - connTracker: connTracker, + connTracker: connTracker, } for _, env := range config.Env { a.env = append(a.env, env.Name+"="+env.Value) } + // these functions are made comparable and stored in the cache so that repeated clientset + // construction with the same rest.Config results in a single TLS cache and Authenticator + a.getCert = &transport.GetCertHolder{GetCert: a.cert} + a.dial = &transport.DialHolder{Dial: defaultDialer.DialContext} + return c.put(key, a), nil } @@ -261,8 +265,6 @@ type Authenticator struct { now func() time.Time environ func() []string - // defaultDialer is used for clients which don't specify a custom dialer - defaultDialer *connrotation.Dialer // connTracker tracks all connections opened that we need to close when rotating a client certificate connTracker *connrotation.ConnectionTracker @@ -273,6 +275,12 @@ type Authenticator struct { mu sync.Mutex cachedCreds *credentials exp time.Time + + // getCert makes Authenticator.cert comparable to support TLS config caching + getCert *transport.GetCertHolder + // dial is used for clients which do not specify a custom dialer + // it is comparable to support TLS config caching + dial *transport.DialHolder } type credentials struct { @@ -300,18 +308,20 @@ func (a *Authenticator) UpdateTransportConfig(c *transport.Config) error { if c.HasCertCallback() { return errors.New("can't add TLS certificate callback: transport.Config.TLS.GetCert already set") } - c.TLS.GetCert = a.cert + c.TLS.GetCert = a.getCert.GetCert + c.TLS.GetCertHolder = a.getCert // comparable for TLS config caching - var d *connrotation.Dialer if c.Dial != nil { // if c has a custom dialer, we have to wrap it - d = connrotation.NewDialerWithTracker(c.Dial, a.connTracker) + // TLS config caching is not supported for this config + d := connrotation.NewDialerWithTracker(c.Dial, a.connTracker) + c.Dial = d.DialContext + c.DialHolder = nil } else { - d = a.defaultDialer + c.Dial = a.dial.Dial + c.DialHolder = a.dial // comparable for TLS config caching } - c.Dial = d.DialContext - return nil } diff --git a/vendor/k8s.io/client-go/rest/request.go b/vendor/k8s.io/client-go/rest/request.go index dba933f7d6..acf3113615 100644 --- a/vendor/k8s.io/client-go/rest/request.go +++ b/vendor/k8s.io/client-go/rest/request.go @@ -508,6 +508,87 @@ func (r *Request) URL() *url.URL { return finalURL } +// finalURLTemplate is similar to URL(), but will make all specific parameter values equal +// - instead of name or namespace, "{name}" and "{namespace}" will be used, and all query +// parameters will be reset. This creates a copy of the url so as not to change the +// underlying object. +func (r Request) finalURLTemplate() url.URL { + newParams := url.Values{} + v := []string{"{value}"} + for k := range r.params { + newParams[k] = v + } + r.params = newParams + u := r.URL() + if u == nil { + return url.URL{} + } + + segments := strings.Split(u.Path, "/") + groupIndex := 0 + index := 0 + trimmedBasePath := "" + if r.c.base != nil && strings.Contains(u.Path, r.c.base.Path) { + p := strings.TrimPrefix(u.Path, r.c.base.Path) + if !strings.HasPrefix(p, "/") { + p = "/" + p + } + // store the base path that we have trimmed so we can append it + // before returning the URL + trimmedBasePath = r.c.base.Path + segments = strings.Split(p, "/") + groupIndex = 1 + } + if len(segments) <= 2 { + return *u + } + + const CoreGroupPrefix = "api" + const NamedGroupPrefix = "apis" + isCoreGroup := segments[groupIndex] == CoreGroupPrefix + isNamedGroup := segments[groupIndex] == NamedGroupPrefix + if isCoreGroup { + // checking the case of core group with /api/v1/... format + index = groupIndex + 2 + } else if isNamedGroup { + // checking the case of named group with /apis/apps/v1/... format + index = groupIndex + 3 + } else { + // this should not happen that the only two possibilities are /api... and /apis..., just want to put an + // outlet here in case more API groups are added in future if ever possible: + // https://kubernetes.io/docs/concepts/overview/kubernetes-api/#api-groups + // if a wrong API groups name is encountered, return the {prefix} for url.Path + u.Path = "/{prefix}" + u.RawQuery = "" + return *u + } + // switch segLength := len(segments) - index; segLength { + switch { + // case len(segments) - index == 1: + // resource (with no name) do nothing + case len(segments)-index == 2: + // /$RESOURCE/$NAME: replace $NAME with {name} + segments[index+1] = "{name}" + case len(segments)-index == 3: + if segments[index+2] == "finalize" || segments[index+2] == "status" { + // /$RESOURCE/$NAME/$SUBRESOURCE: replace $NAME with {name} + segments[index+1] = "{name}" + } else { + // /namespace/$NAMESPACE/$RESOURCE: replace $NAMESPACE with {namespace} + segments[index+1] = "{namespace}" + } + case len(segments)-index >= 4: + segments[index+1] = "{namespace}" + // /namespace/$NAMESPACE/$RESOURCE/$NAME: replace $NAMESPACE with {namespace}, $NAME with {name} + if segments[index+3] != "finalize" && segments[index+3] != "status" { + // /$RESOURCE/$NAME/$SUBRESOURCE: replace $NAME with {name} + segments[index+3] = "{name}" + } + } + u.Path = path.Join(trimmedBasePath, path.Join(segments...)) + return *u +} + func (r *Request) tryThrottleWithInfo(ctx context.Context, retryInfo string) error { if r.rateLimiter == nil { return nil @@ -537,7 +618,7 @@ func (r *Request) tryThrottleWithInfo(ctx context.Context, retryInfo string) err // but we use a throttled logger to prevent spamming. globalThrottledLogger.Infof("%s", message) } - metrics.RateLimiterLatency.Observe(ctx, r.verb, *r.URL(), latency) + metrics.RateLimiterLatency.Observe(ctx, r.verb, r.finalURLTemplate(), latency) return err } @@ -826,7 +907,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp // Metrics for total request latency start := time.Now() defer func() { - metrics.RequestLatency.Observe(ctx, r.verb, *r.URL(), time.Since(start)) + metrics.RequestLatency.Observe(ctx, r.verb, r.finalURLTemplate(), time.Since(start)) }() if r.err != nil { diff --git a/vendor/k8s.io/client-go/transport/cache.go b/vendor/k8s.io/client-go/transport/cache.go index 214f0a79cf..b4f8dab0c9 100644 --- a/vendor/k8s.io/client-go/transport/cache.go +++ b/vendor/k8s.io/client-go/transport/cache.go @@ -17,6 +17,7 @@ limitations under the License. package transport import ( + "context" "fmt" "net" "net/http" @@ -55,6 +56,9 @@ type tlsCacheKey struct { serverName string nextProtos string disableCompression bool + // these functions are wrapped to allow them to be used as map keys + getCert *GetCertHolder + dial *DialHolder } func (t tlsCacheKey) String() string { @@ -62,7 +66,8 @@ func (t tlsCacheKey) String() string { if len(t.keyData) > 0 { keyText = "" } - return fmt.Sprintf("insecure:%v, caData:%#v, certData:%#v, keyData:%s, serverName:%s, disableCompression:%t", t.insecure, t.caData, t.certData, keyText, t.serverName, t.disableCompression) + return fmt.Sprintf("insecure:%v, caData:%#v, certData:%#v, keyData:%s, serverName:%s, disableCompression:%t, getCert:%p, dial:%p", + t.insecure, t.caData, t.certData, keyText, t.serverName, t.disableCompression, t.getCert, t.dial) } func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) { @@ -92,8 +97,10 @@ func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) { return http.DefaultTransport, nil } - dial := config.Dial - if dial == nil { + var dial func(ctx context.Context, network, address string) (net.Conn, error) + if config.Dial != nil { + dial = config.Dial + } else { dial = (&net.Dialer{ Timeout: 30 * time.Second, KeepAlive: 30 * time.Second, @@ -138,10 +145,18 @@ func tlsConfigKey(c *Config) (tlsCacheKey, bool, error) { return tlsCacheKey{}, false, err } - if c.TLS.GetCert != nil || c.Dial != nil || c.Proxy != nil { + if c.Proxy != nil { // cannot determine equality for functions return tlsCacheKey{}, false, nil } + if c.Dial != nil && c.DialHolder == nil { + // cannot determine equality for dial function that doesn't have non-nil DialHolder set as well + return tlsCacheKey{}, false, nil + } + if c.TLS.GetCert != nil && c.TLS.GetCertHolder == nil { + // cannot determine equality for getCert function that doesn't have non-nil GetCertHolder set as well + return tlsCacheKey{}, false, nil + } k := tlsCacheKey{ insecure: c.TLS.Insecure, @@ -149,6 +164,8 @@ func tlsConfigKey(c *Config) (tlsCacheKey, bool, error) { serverName: c.TLS.ServerName, nextProtos: strings.Join(c.TLS.NextProtos, ","), disableCompression: c.DisableCompression, + getCert: c.TLS.GetCertHolder, + dial: c.DialHolder, } if c.TLS.ReloadTLSFiles { diff --git a/vendor/k8s.io/client-go/transport/config.go b/vendor/k8s.io/client-go/transport/config.go index 89de798f60..fd853c0b39 100644 --- a/vendor/k8s.io/client-go/transport/config.go +++ b/vendor/k8s.io/client-go/transport/config.go @@ -68,7 +68,11 @@ type Config struct { WrapTransport WrapperFunc // Dial specifies the dial function for creating unencrypted TCP connections. + // If specified, this transport will be non-cacheable unless DialHolder is also set. Dial func(ctx context.Context, network, address string) (net.Conn, error) + // DialHolder can be populated to make transport configs cacheable. + // If specified, DialHolder.Dial must be equal to Dial. + DialHolder *DialHolder // Proxy is the proxy func to be used for all requests made by this // transport. If Proxy is nil, http.ProxyFromEnvironment is used. If Proxy @@ -78,6 +82,11 @@ type Config struct { Proxy func(*http.Request) (*url.URL, error) } +// DialHolder is used to make the wrapped function comparable so that it can be used as a map key. +type DialHolder struct { + Dial func(ctx context.Context, network, address string) (net.Conn, error) +} + // ImpersonationConfig has all the available impersonation options type ImpersonationConfig struct { // UserName matches user.Info.GetName() @@ -143,5 +152,15 @@ type TLSConfig struct { // To use only http/1.1, set to ["http/1.1"]. NextProtos []string - GetCert func() (*tls.Certificate, error) // Callback that returns a TLS client certificate. CertData, CertFile, KeyData and KeyFile supercede this field. + // Callback that returns a TLS client certificate. CertData, CertFile, KeyData and KeyFile supercede this field. + // If specified, this transport is non-cacheable unless CertHolder is populated. + GetCert func() (*tls.Certificate, error) + // CertHolder can be populated to make transport configs that set GetCert cacheable. + // If set, CertHolder.GetCert must be equal to GetCert. + GetCertHolder *GetCertHolder +} + +// GetCertHolder is used to make the wrapped function comparable so that it can be used as a map key. +type GetCertHolder struct { + GetCert func() (*tls.Certificate, error) } diff --git a/vendor/k8s.io/client-go/transport/transport.go b/vendor/k8s.io/client-go/transport/transport.go index b4a7bfa67c..eabfce72d0 100644 --- a/vendor/k8s.io/client-go/transport/transport.go +++ b/vendor/k8s.io/client-go/transport/transport.go @@ -24,6 +24,7 @@ import ( "fmt" "io/ioutil" "net/http" + "reflect" "sync" "time" @@ -39,6 +40,10 @@ func New(config *Config) (http.RoundTripper, error) { return nil, fmt.Errorf("using a custom transport with TLS certificate options or the insecure flag is not allowed") } + if !isValidHolders(config) { + return nil, fmt.Errorf("misconfigured holder for dialer or cert callback") + } + var ( rt http.RoundTripper err error @@ -56,6 +61,26 @@ func New(config *Config) (http.RoundTripper, error) { return HTTPWrappersForConfig(config, rt) } +func isValidHolders(config *Config) bool { + if config.TLS.GetCertHolder != nil { + if config.TLS.GetCertHolder.GetCert == nil || + config.TLS.GetCert == nil || + reflect.ValueOf(config.TLS.GetCertHolder.GetCert).Pointer() != reflect.ValueOf(config.TLS.GetCert).Pointer() { + return false + } + } + + if config.DialHolder != nil { + if config.DialHolder.Dial == nil || + config.Dial == nil || + reflect.ValueOf(config.DialHolder.Dial).Pointer() != reflect.ValueOf(config.Dial).Pointer() { + return false + } + } + + return true +} + // TLSConfigFor returns a tls.Config that will provide the transport level security defined // by the provided Config. Will return nil if no transport level security is requested. func TLSConfigFor(c *Config) (*tls.Config, error) { diff --git a/vendor/k8s.io/kubectl/pkg/cmd/util/helpers.go b/vendor/k8s.io/kubectl/pkg/cmd/util/helpers.go index 40ec0f194f..784dc73668 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/util/helpers.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/util/helpers.go @@ -133,6 +133,20 @@ func CheckDiffErr(err error) { }) } +// isInvalidReasonStatusError returns true if this is an API Status error with reason=Invalid. +// This is distinct from generic 422 errors we want to fall back to generic error handling. +func isInvalidReasonStatusError(err error) bool { + if !apierrors.IsInvalid(err) { + return false + } + statusError, isStatusError := err.(*apierrors.StatusError) + if !isStatusError { + return false + } + status := statusError.Status() + return status.Reason == metav1.StatusReasonInvalid +} + // checkErr formats a given error as a string and calls the passed handleErr // func with that string and an kubectl exit code. func checkErr(err error, handleErr func(string, int)) { @@ -148,16 +162,26 @@ func checkErr(err error, handleErr func(string, int)) { switch { case err == ErrExit: handleErr("", DefaultErrorExitCode) - case apierrors.IsInvalid(err): - details := err.(*apierrors.StatusError).Status().Details + case isInvalidReasonStatusError(err): + status := err.(*apierrors.StatusError).Status() + details := status.Details s := "The request is invalid" if details == nil { + // if we have no other details, include the message from the server if present + if len(status.Message) > 0 { + s += ": " + status.Message + } handleErr(s, DefaultErrorExitCode) return } if len(details.Kind) != 0 || len(details.Name) != 0 { s = fmt.Sprintf("The %s %q is invalid", details.Kind, details.Name) + } else if len(status.Message) > 0 && len(details.Causes) == 0 { + // only append the message if we have no kind/name details and no causes, + // since default invalid error constructors duplicate that information in the message + s += ": " + status.Message } + if len(details.Causes) > 0 { errs := statusCausesToAggrError(details.Causes) handleErr(MultilineError(s+": ", errs), DefaultErrorExitCode) diff --git a/vendor/modules.txt b/vendor/modules.txt index 56607be350..2c498db2c4 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -103,7 +103,7 @@ github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs github.com/aws/amazon-ec2-instance-selector/v2/pkg/sorter -# github.com/aws/aws-sdk-go v1.44.99 +# github.com/aws/aws-sdk-go v1.44.104 ## explicit; go 1.11 github.com/aws/aws-sdk-go/aws github.com/aws/aws-sdk-go/aws/arn @@ -254,7 +254,7 @@ github.com/cpuguy83/go-md2man/v2/md2man # github.com/davecgh/go-spew v1.1.1 ## explicit github.com/davecgh/go-spew/spew -# github.com/digitalocean/godo v1.83.0 +# github.com/digitalocean/godo v1.85.0 ## explicit; go 1.18 github.com/digitalocean/godo github.com/digitalocean/godo/metrics @@ -577,11 +577,11 @@ github.com/hashicorp/hcl/v2/hclwrite # github.com/hashicorp/memberlist v0.3.1 ## explicit; go 1.12 github.com/hashicorp/memberlist -# github.com/hashicorp/vault/api v1.7.2 +# github.com/hashicorp/vault/api v1.8.0 ## explicit; go 1.17 github.com/hashicorp/vault/api -# github.com/hashicorp/vault/sdk v0.5.1 -## explicit; go 1.17 +# github.com/hashicorp/vault/sdk v0.6.0 +## explicit; go 1.19 github.com/hashicorp/vault/sdk/helper/certutil github.com/hashicorp/vault/sdk/helper/compressutil github.com/hashicorp/vault/sdk/helper/consts @@ -603,7 +603,7 @@ github.com/hashicorp/vault/sdk/version # github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb ## explicit github.com/hashicorp/yamux -# github.com/hetznercloud/hcloud-go v1.35.2 +# github.com/hetznercloud/hcloud-go v1.35.3 ## explicit; go 1.18 github.com/hetznercloud/hcloud-go/hcloud github.com/hetznercloud/hcloud-go/hcloud/internal/instrumentation @@ -936,7 +936,7 @@ go.uber.org/atomic # go.uber.org/multierr v1.8.0 ## explicit; go 1.14 go.uber.org/multierr -# golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 +# golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0 ## explicit; go 1.17 golang.org/x/crypto/bcrypt golang.org/x/crypto/blake2b @@ -963,7 +963,7 @@ golang.org/x/crypto/ssh/internal/bcrypt_pbkdf golang.org/x/mod/internal/lazyregexp golang.org/x/mod/module golang.org/x/mod/semver -# golang.org/x/net v0.0.0-20220909164309-bea034e7d591 +# golang.org/x/net v0.0.0-20220921203646-d300de134e69 ## explicit; go 1.17 golang.org/x/net/bpf golang.org/x/net/context @@ -994,7 +994,7 @@ golang.org/x/oauth2/jwt ## explicit golang.org/x/sync/errgroup golang.org/x/sync/semaphore -# golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41 +# golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 ## explicit; go 1.17 golang.org/x/sys/cpu golang.org/x/sys/execabs @@ -1045,7 +1045,7 @@ golang.org/x/tools/internal/typesinternal # gomodules.xyz/jsonpatch/v2 v2.2.0 ## explicit; go 1.12 gomodules.xyz/jsonpatch/v2 -# google.golang.org/api v0.96.0 +# google.golang.org/api v0.97.0 ## explicit; go 1.15 google.golang.org/api/cloudresourcemanager/v1 google.golang.org/api/compute/v0.alpha @@ -1202,8 +1202,8 @@ gopkg.in/yaml.v2 # gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3 -# helm.sh/helm/v3 v3.9.4 -## explicit; go 1.17 +# helm.sh/helm/v3 v3.10.0 +## explicit; go 1.18 helm.sh/helm/v3/internal/ignore helm.sh/helm/v3/internal/sympath helm.sh/helm/v3/internal/tlsutil @@ -1219,7 +1219,7 @@ helm.sh/helm/v3/pkg/helmpath/xdg helm.sh/helm/v3/pkg/plugin helm.sh/helm/v3/pkg/registry helm.sh/helm/v3/pkg/strvals -# k8s.io/api v0.25.0 +# k8s.io/api v0.25.2 ## explicit; go 1.19 k8s.io/api/admission/v1 k8s.io/api/admission/v1beta1 @@ -1274,7 +1274,7 @@ k8s.io/api/storage/v1beta1 ## explicit; go 1.19 k8s.io/apiextensions-apiserver/pkg/apis/apiextensions k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 -# k8s.io/apimachinery v0.25.0 +# k8s.io/apimachinery v0.25.2 ## explicit; go 1.19 k8s.io/apimachinery/pkg/api/equality k8s.io/apimachinery/pkg/api/errors @@ -1331,12 +1331,12 @@ k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/json k8s.io/apimachinery/third_party/forked/golang/netutil k8s.io/apimachinery/third_party/forked/golang/reflect -# k8s.io/cli-runtime v0.25.0 +# k8s.io/cli-runtime v0.25.2 ## explicit; go 1.19 k8s.io/cli-runtime/pkg/genericclioptions k8s.io/cli-runtime/pkg/printers k8s.io/cli-runtime/pkg/resource -# k8s.io/client-go v0.25.0 +# k8s.io/client-go v0.25.2 ## explicit; go 1.19 k8s.io/client-go/applyconfigurations/admissionregistration/v1 k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1 @@ -1638,7 +1638,7 @@ k8s.io/client-go/util/jsonpath k8s.io/client-go/util/keyutil k8s.io/client-go/util/retry k8s.io/client-go/util/workqueue -# k8s.io/cloud-provider v0.25.0 +# k8s.io/cloud-provider v0.25.2 ## explicit; go 1.19 k8s.io/cloud-provider k8s.io/cloud-provider/node/helpers @@ -1649,7 +1649,7 @@ k8s.io/cloud-provider/volume/helpers # k8s.io/cloud-provider-aws v1.25.0 ## explicit; go 1.19 k8s.io/cloud-provider-aws/pkg/providers/v1 -# k8s.io/component-base v0.25.0 +# k8s.io/component-base v0.25.2 ## explicit; go 1.19 k8s.io/component-base/cli/flag k8s.io/component-base/config @@ -1662,7 +1662,7 @@ k8s.io/component-base/metrics/prometheus/restclient k8s.io/component-base/metrics/prometheusextension k8s.io/component-base/tracing/api/v1 k8s.io/component-base/version -# k8s.io/csi-translation-lib v0.25.0 +# k8s.io/csi-translation-lib v0.25.2 ## explicit; go 1.19 k8s.io/csi-translation-lib/plugins # k8s.io/gengo v0.0.0-20220913193501-391367153a38 @@ -1697,7 +1697,7 @@ k8s.io/kube-openapi/pkg/spec3 k8s.io/kube-openapi/pkg/util/proto k8s.io/kube-openapi/pkg/util/proto/validation k8s.io/kube-openapi/pkg/validation/spec -# k8s.io/kubectl v0.25.0 +# k8s.io/kubectl v0.25.2 ## explicit; go 1.19 k8s.io/kubectl/pkg/cmd/util k8s.io/kubectl/pkg/cmd/util/editor @@ -1713,17 +1713,17 @@ k8s.io/kubectl/pkg/util/slice k8s.io/kubectl/pkg/util/templates k8s.io/kubectl/pkg/util/term k8s.io/kubectl/pkg/validation -# k8s.io/kubelet v0.25.0 +# k8s.io/kubelet v0.25.2 ## explicit; go 1.19 k8s.io/kubelet/config/v1beta1 -# k8s.io/legacy-cloud-providers v0.25.0 +# k8s.io/legacy-cloud-providers v0.25.2 ## explicit; go 1.19 k8s.io/legacy-cloud-providers/gce -# k8s.io/mount-utils v0.25.0 +# k8s.io/mount-utils v0.25.2 ## explicit; go 1.19 k8s.io/mount-utils -# k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73 -## explicit; go 1.12 +# k8s.io/utils v0.0.0-20220922133306-665eaaec4324 +## explicit; go 1.18 k8s.io/utils/buffer k8s.io/utils/clock k8s.io/utils/clock/testing