diff --git a/go.mod b/go.mod
index 59980694e8ab..23c0c7166c54 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module github.com/openshift/hypershift
-go 1.25.8
+go 1.25.9
require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.22.0
@@ -101,16 +101,16 @@ require (
gopkg.in/ini.v1 v1.67.3
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
- k8s.io/api v0.35.1
- k8s.io/apiextensions-apiserver v0.35.1
- k8s.io/apimachinery v0.35.1
- k8s.io/apiserver v0.35.1
+ k8s.io/api v0.35.4
+ k8s.io/apiextensions-apiserver v0.35.4
+ k8s.io/apimachinery v0.35.4
+ k8s.io/apiserver v0.35.4
k8s.io/autoscaler/vertical-pod-autoscaler v1.3.0
k8s.io/cli-runtime v0.35.1
- k8s.io/client-go v0.35.1
- k8s.io/component-base v0.35.1
+ k8s.io/client-go v0.35.4
+ k8s.io/component-base v0.35.4
k8s.io/klog v1.0.0
- k8s.io/klog/v2 v2.130.1
+ k8s.io/klog/v2 v2.140.0
k8s.io/kube-aggregator v0.35.1
k8s.io/kube-scheduler v0.35.1
k8s.io/kubectl v0.35.1
@@ -118,18 +118,18 @@ require (
k8s.io/utils v0.0.0-20260108192941-914a6e750570
kubevirt.io/api v1.8.4
kubevirt.io/containerized-data-importer-api v1.65.0
- sigs.k8s.io/cluster-api v1.12.7
- sigs.k8s.io/cluster-api-provider-aws/v2 v2.10.0
- sigs.k8s.io/cluster-api-provider-azure v1.22.0
- sigs.k8s.io/cluster-api-provider-gcp v1.11.0
+ sigs.k8s.io/cluster-api v1.13.3
+ sigs.k8s.io/cluster-api-provider-aws/v2 v2.12.1
+ sigs.k8s.io/cluster-api-provider-azure v1.26.0
+ sigs.k8s.io/cluster-api-provider-gcp v1.12.0
sigs.k8s.io/cluster-api-provider-ibmcloud v0.12.0
- sigs.k8s.io/cluster-api-provider-kubevirt v0.11.1
- sigs.k8s.io/cluster-api-provider-openstack v0.14.4
- sigs.k8s.io/controller-runtime v0.22.5
+ sigs.k8s.io/cluster-api-provider-kubevirt v0.11.2
+ sigs.k8s.io/cluster-api-provider-openstack v0.14.6
+ sigs.k8s.io/controller-runtime v0.23.3
sigs.k8s.io/karpenter v1.9.0
sigs.k8s.io/kube-storage-version-migrator v0.0.6-0.20230721195810-5c8923c5ff96
- sigs.k8s.io/secrets-store-csi-driver v1.4.8
- sigs.k8s.io/structured-merge-diff/v6 v6.4.0
+ sigs.k8s.io/secrets-store-csi-driver v1.6.0
+ sigs.k8s.io/structured-merge-diff/v6 v6.4.2
sigs.k8s.io/yaml v1.6.0
)
@@ -151,13 +151,11 @@ require (
github.com/PaesslerAG/jsonpath v0.1.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
- github.com/asaskevich/govalidator/v11 v11.0.2-0.20250122183457-e11347878e23 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.13 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.29 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.29 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.29 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.30 // indirect
- github.com/aws/aws-sdk-go-v2/service/eks v1.77.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.22 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.29 // indirect
@@ -227,7 +225,7 @@ require (
github.com/gorilla/mux v1.8.1 // indirect
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
- github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7 // indirect
+ github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.8 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
@@ -251,14 +249,13 @@ require (
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opencontainers/selinux v1.13.0 // indirect
- github.com/openshift-online/ocm-common v0.0.31 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pkg/profile v1.7.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
- github.com/prometheus/procfs v0.19.2 // indirect
+ github.com/prometheus/procfs v0.20.1 // indirect
github.com/robfig/cron v1.2.0 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
@@ -271,26 +268,26 @@ require (
go.etcd.io/raft/v3 v3.6.0 // indirect
go.mongodb.org/mongo-driver v1.17.7 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
- go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0 // indirect
- go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 // indirect
- go.opentelemetry.io/otel v1.43.0 // indirect
- go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 // indirect
- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0 // indirect
- go.opentelemetry.io/otel/metric v1.43.0 // indirect
- go.opentelemetry.io/otel/sdk v1.43.0 // indirect
- go.opentelemetry.io/otel/trace v1.43.0 // indirect
- go.opentelemetry.io/proto/otlp v1.9.0 // indirect
+ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.69.0 // indirect
+ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0 // indirect
+ go.opentelemetry.io/otel v1.44.0 // indirect
+ go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0 // indirect
+ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.44.0 // indirect
+ go.opentelemetry.io/otel/metric v1.44.0 // indirect
+ go.opentelemetry.io/otel/sdk v1.44.0 // indirect
+ go.opentelemetry.io/otel/trace v1.44.0 // indirect
+ go.opentelemetry.io/proto/otlp v1.10.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.yaml.in/yaml/v2 v2.4.4 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/exp v0.0.0-20251219203646-944ab1f22d93 // indirect
- golang.org/x/mod v0.36.0 // indirect
+ golang.org/x/mod v0.37.0 // indirect
golang.org/x/sys v0.46.0 // indirect
golang.org/x/term v0.44.0 // indirect
golang.org/x/text v0.38.0 // indirect
golang.org/x/tools v0.45.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
- google.golang.org/genproto/googleapis/api v0.0.0-20260319201613-d00831a3d3e7 // indirect
+ google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260610212136-7ab31c22f7ad // indirect
google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
@@ -299,9 +296,9 @@ require (
k8s.io/cloud-provider v0.35.0 // indirect
k8s.io/component-helpers v0.35.1 // indirect
k8s.io/csi-translation-lib v0.35.0 // indirect
- k8s.io/kms v0.35.1 // indirect
+ k8s.io/kms v0.35.4 // indirect
k8s.io/kube-openapi v0.0.0-20251125145642-4e65d59e963e // indirect
- k8s.io/kubelet v0.33.3 // indirect
+ k8s.io/kubelet v0.34.0 // indirect
kubevirt.io/controller-lifecycle-operator-sdk/api v0.2.4 // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.33.0 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
diff --git a/go.sum b/go.sum
index 5c844fad2288..10f656a1569f 100644
--- a/go.sum
+++ b/go.sum
@@ -9,8 +9,6 @@ cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdB
cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10=
cyphar.com/go-pathrs v0.2.1 h1:9nx1vOgwVvX1mNBWDu93+vaceedpbsDqo+XuBGL40b8=
cyphar.com/go-pathrs v0.2.1/go.mod h1:y8f1EMG7r+hCuFf/rXsKqMJrJAUoADZGNh5/vZPKcGc=
-dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s=
-dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.22.0 h1:aokoqcHvaGjiM3VpjKDfMMnF/8epJ+Q1HLJ7CudztqE=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.22.0/go.mod h1:/WYEx9pcM9Y+Dd/APJaNlSvVSvzl54rrMdZT5+Oi2LM=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.14.0 h1:CU4+EJeJi3TKYWEcYuSdWsjzw0nVsK/H0MSQOiPcymU=
@@ -49,8 +47,6 @@ github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.2.0 h1:nCYfg
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.2.0/go.mod h1:ucUjca2JtSZboY8IoUqyQyuuXvwbMBVwFOm0vdQPNhA=
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.8.0 h1:irsmOWwkp0KCTTNS5e2hdFeIvSQClQo2No3IaNmL3Vw=
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.8.0/go.mod h1:GWcBkQj3MqN7ozHKLaCCAuNLiXoIGv2RtanfAwSjY/Y=
-github.com/Azure/azure-service-operator/v2 v2.13.0 h1:24xDkuGOjSDKKkthECRo/I76slmlt3u0buYQ4rvX3pQ=
-github.com/Azure/azure-service-operator/v2 v2.13.0/go.mod h1:3xfZMZm4yjdcjr3lh1kWqP2dtvZS/nCy7wpNERYDatg=
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg=
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
github.com/Azure/msi-dataplane v0.4.3 h1:dWPWzY4b54tLIR9T1Q014Xxd/1DxOsMIp6EjRFAJlQY=
@@ -74,12 +70,8 @@ github.com/IBM/vpc-go-sdk v0.71.1 h1:SP5/uQs5JDb1QRvSJ1QC2BzE+BHEMq4jd2+JEcRuieE
github.com/IBM/vpc-go-sdk v0.71.1/go.mod h1:K3vVlje72PYE3ZRt1iouE+jSIq+vCyYzT1HiFC06hUA=
github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ=
github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE=
-github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
-github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
-github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs=
-github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0=
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I=
github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c=
@@ -104,8 +96,6 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkY
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
-github.com/asaskevich/govalidator/v11 v11.0.2-0.20250122183457-e11347878e23 h1:I+Cy77zrFmVWIHOZaxiNV4L7w9xuVux9LMqAblGzvdE=
-github.com/asaskevich/govalidator/v11 v11.0.2-0.20250122183457-e11347878e23/go.mod h1:S7DsXubvw3xBC8rSI+qmzcTNw7xEND0ojHPqglh/whY=
github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHSxpiH9JdtuBj0=
github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY=
github.com/aws/aws-sdk-go-v2 v1.42.0 h1:XvXMJTkFQtpBKIWZnmr9ZEOc2InWM2yldjXEJ/bymhA=
@@ -180,8 +170,6 @@ github.com/awslabs/operatorpkg v0.0.0-20251222193911-34e9a1898737 h1:hF8FFDPnboX
github.com/awslabs/operatorpkg v0.0.0-20251222193911-34e9a1898737/go.mod h1:reUhRkYche5Vkz+ACdxho8smFwdAspzr8rpA2dNqsVQ=
github.com/awslabs/operatorpkg/aws v0.0.0-20250414225955-b47cd315ffe9 h1:Li3ZDz/k5Ob9gRzBvZ5qP3zaE183FWaBTYKayURTub8=
github.com/awslabs/operatorpkg/aws v0.0.0-20250414225955-b47cd315ffe9/go.mod h1:XuupixySxAZwqT/PRxIce7JqAI8NaKUer/TIdm3OMA4=
-github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o=
-github.com/benbjohnson/clock v1.3.5/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=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
@@ -213,10 +201,6 @@ github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD9
github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU=
github.com/coder/websocket v1.8.14 h1:9L0p0iKiNOibykf283eHkKUHHrpG7f65OE3BhhO7v9g=
github.com/coder/websocket v1.8.14/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg=
-github.com/coredns/caddy v1.1.1 h1:2eYKZT7i6yxIfGP3qLJoJ7HAsDJqYB+X68g4NYjSrE0=
-github.com/coredns/caddy v1.1.1/go.mod h1:A6ntJQlAWuQfFlsd9hvigKbo2WS0VUs2l1e2F+BawD4=
-github.com/coredns/corefile-migration v1.0.31 h1:f7WGhY8M2Jn8P2dVO0p7wSQ1QKsMARl6WEyUjCb/V38=
-github.com/coredns/corefile-migration v1.0.31/go.mod h1:56DPqONc3njpVPsdilEnfijCwNGC3/kTJLl7i7SPavY=
github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4=
github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec=
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU=
@@ -267,8 +251,8 @@ github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjT
github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM=
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4=
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc=
-github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
-github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
+github.com/fatih/color v1.19.0 h1:Zp3PiM21/9Ld6FzSKyL5c/BULoe/ONr9KlbYVOfG8+w=
+github.com/fatih/color v1.19.0/go.mod h1:zNk67I0ZUT1bEGsSGyCZYZNrHuTkJJB+r6Q9VuMi0LE=
github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw=
github.com/felixge/fgprof v0.9.4 h1:ocDNwMFlnA0NU0zSB3I52xkO4sFXk80VK9lXjLClu88=
github.com/felixge/fgprof v0.9.4/go.mod h1:yKl+ERSa++RYOs32d8K6WEXCB4uXdLls4ZaZPpayhMM=
@@ -460,8 +444,8 @@ github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.0 h1:FbSCl+KggFl+Ocym490i/E
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.0/go.mod h1:qOchhhIlmRcqk/O9uCo/puJlyo07YINaIqdZfZG3Jkc=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7 h1:X+2YciYSxvMQK0UZ7sg45ZVabVZBeBuvMkmuI2V3Fak=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7/go.mod h1:lW34nIZuQ8UDPdkon5fmfp2l3+ZkQ2me/+oecHYLOII=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 h1:5VipnvEpbqr2gA2VbM+nYVbkIF28c5ZQfqCBQ5g2xfk=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0/go.mod h1:Hyl3n6Twe1hvtd9XUXDec4pTvgMSEixRuQKPTMH2bNs=
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
@@ -469,8 +453,6 @@ github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVH
github.com/hashicorp/go-retryablehttp v0.7.8 h1:ylXZWnqa7Lhqpk0L1P1LzDtGcCR0rPVUrx/c8Unxc48=
github.com/hashicorp/go-retryablehttp v0.7.8/go.mod h1:rjiScheydd+CxvumBsIrFKlx3iS0jrZ7LvzFGFmuKbw=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
-github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI=
-github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w=
github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw=
@@ -478,8 +460,6 @@ github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
-github.com/jellydator/ttlcache/v3 v3.3.0 h1:BdoC9cE81qXfrxeb9eoJi9dWrdhSuwXMAnHTbnBm4Wc=
-github.com/jellydator/ttlcache/v3 v3.3.0/go.mod h1:bj2/e0l4jRnQdrnSTaGTsh4GSXvMjQcy41i7th0GVGw=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
@@ -540,8 +520,6 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/mfridman/tparse v0.18.0 h1:wh6dzOKaIwkUGyKgOntDW4liXSo37qg5AXbIhkMV3vE=
github.com/mfridman/tparse v0.18.0/go.mod h1:gEvqZTuCgEhPbYk/2lS3Kcxg1GmTxxU7kTC8DvP0i/A=
-github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
-github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=
github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0=
github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=
@@ -549,8 +527,6 @@ github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/z
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
-github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
-github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
github.com/moby/spdystream v0.5.1 h1:9sNYeYZUcci9R6/w7KDaFWEWeV4LStVG78Mpyq/Zm/Y=
github.com/moby/spdystream v0.5.1/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI=
@@ -605,8 +581,6 @@ github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJw
github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=
github.com/opencontainers/selinux v1.13.0 h1:Zza88GWezyT7RLql12URvoxsbLfjFx988+LGaWfbL84=
github.com/opencontainers/selinux v1.13.0/go.mod h1:XxWTed+A/s5NNq4GmYScVy+9jzXhGBVEOAyucdRUY8s=
-github.com/openshift-online/ocm-common v0.0.31 h1:csxB4UQAUhwhDOVBmOzUKgtemuwV9rhCkzMoeFX8zCQ=
-github.com/openshift-online/ocm-common v0.0.31/go.mod h1:VEkuZp9aqbXtetZ5ycND6QpvhykvTuBF3oPsVM1X3vI=
github.com/openshift/api v0.0.0-20260416105050-3c6b218b8a80 h1:r0S/yoZAI0iWo1JvoIijaIgWGWf/izg4WiV7Wrtz16k=
github.com/openshift/api v0.0.0-20260416105050-3c6b218b8a80/go.mod h1:pyVjK0nZ4sRs4fuQVQ4rubsJdahI1PB94LnQ8sGdvxo=
github.com/openshift/aws-karpenter-provider-aws v0.0.0-20260311064431-f0be9c72e5bf h1:ymEMrGiXp+PTd+Xd0Y7Jx8cNzaidg51AFyy+5tcvz+c=
@@ -672,16 +646,14 @@ github.com/prometheus/common v0.69.0/go.mod h1:ZzL3f6u94qUxh9p+tJTrF+FvBS1XXbbRA
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
-github.com/prometheus/procfs v0.19.2 h1:zUMhqEW66Ex7OXIiDkll3tl9a1ZdilUOd/F6ZXw4Vws=
-github.com/prometheus/procfs v0.19.2/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw=
+github.com/prometheus/procfs v0.20.1 h1:XwbrGOIplXW/AU3YhIhLODXMJYyC1isLFfYCsTEycfc=
+github.com/prometheus/procfs v0.20.1/go.mod h1:o9EMBZGRyvDrSPH1RqdxhojkuXstoe4UlK79eF5TGGo=
github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
-github.com/rotisserie/eris v0.5.4 h1:Il6IvLdAapsMhvuOahHWiBnl1G++Q0/L5UIkI5mARSk=
-github.com/rotisserie/eris v0.5.4/go.mod h1:Z/kgYTJiJtocxCbFfvRmO+QejApzG6zpyky9G1A4g9s=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/samber/lo v1.52.0 h1:Rvi+3BFHES3A8meP33VPAxiBZX/Aws5RxrschYGjomw=
@@ -697,8 +669,6 @@ github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC4
github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js=
github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0=
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
-github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=
-github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=
github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU=
github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
@@ -767,26 +737,26 @@ go.mongodb.org/mongo-driver v1.17.7 h1:a9w+U3Vt67eYzcfq3k/OAv284/uUUkL0uP75VE5rC
go.mongodb.org/mongo-driver v1.17.7/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ=
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0 h1:yI1/OhfEPy7J9eoa6Sj051C7n5dvpj0QX8g4sRchg04=
-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0/go.mod h1:NoUCKYWK+3ecatC4HjkRktREheMeEtrXoQxrqYFeHSc=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 h1:OyrsyzuttWTSur2qN/Lm0m2a8yqyIjUVBZcxFPuXq2o=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0/go.mod h1:C2NGBr+kAB4bk3xtMXfZ94gqFDtg/GkI7e9zqGh5Beg=
-go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I=
-go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 h1:QKdN8ly8zEMrByybbQgv8cWBcdAarwmIPZ6FThrWXJs=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0/go.mod h1:bTdK1nhqF76qiPoCCdyFIV+N/sRHYXYCTQc+3VCi3MI=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0 h1:DvJDOPmSWQHWywQS6lKL+pb8s3gBLOZUtw4N+mavW1I=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0/go.mod h1:EtekO9DEJb4/jRyN4v4Qjc2yA7AtfCBuz2FynRUWTXs=
-go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM=
-go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY=
-go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg=
-go.opentelemetry.io/otel/sdk v1.43.0/go.mod h1:P+IkVU3iWukmiit/Yf9AWvpyRDlUeBaRg6Y+C58QHzg=
-go.opentelemetry.io/otel/sdk/metric v1.43.0 h1:S88dyqXjJkuBNLeMcVPRFXpRw2fuwdvfCGLEo89fDkw=
-go.opentelemetry.io/otel/sdk/metric v1.43.0/go.mod h1:C/RJtwSEJ5hzTiUz5pXF1kILHStzb9zFlIEe85bhj6A=
-go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A=
-go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0=
-go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A=
-go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4=
+go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.69.0 h1:2yEATaop1/a1I4psnSLgWVPLWwCzkqWakgJy7xTDVy0=
+go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.69.0/go.mod h1:D7J12YRapIekYyPWgGPlA/23pRmpSEZC5xJC/TTLI9U=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0 h1:8tvICD4vSTOOsNrsI4Ljf6C+6UKvpTEH5XY3JMoyPoo=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0/go.mod h1:z9+yiacE0IHRqM4qFfkbt/JYlmYXgss8GY/jXoNuPJI=
+go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU=
+go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0 h1:4YsVu3B8+3qtWYYrsUYgn0OG78pN0rnNPRGX4SbokQI=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0/go.mod h1:+wnlSn0mD1ADVMe3v9Z/WIaiz6q6gL2J/ejaAmdmv80=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.44.0 h1:qazEJlUOQzhCpzQpFETGby7EdqjI1wsd0W+6Gg1SCTU=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.44.0/go.mod h1:fOD2Yefuxixkx3ahVNf0O/PERb6r4OlbxfATVnYvzCo=
+go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc=
+go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo=
+go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58=
+go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0=
+go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI=
+go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA=
+go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk=
+go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE=
+go.opentelemetry.io/proto/otlp v1.10.0 h1:IQRWgT5srOCYfiWnpqUYz9CVmbO8bFmKcwYxpuCSL2g=
+go.opentelemetry.io/proto/otlp v1.10.0/go.mod h1:/CV4QoCR/S9yaPj8utp3lvQPoqMtxXdzn7ozvvozVqk=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y=
@@ -819,8 +789,8 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
-golang.org/x/mod v0.36.0 h1:JJjpVx6myfUsUdAzZuOSTTmRE0PfZeNWzzvKrP7amb4=
-golang.org/x/mod v0.36.0/go.mod h1:moc6ELqsWcOw5Ef3xVprK5ul/MvtVvkIXLziUOICjUQ=
+golang.org/x/mod v0.37.0 h1:vF1DjpVEshcIqoEaauuHebaLk1O1forxjxBaVn884JQ=
+golang.org/x/mod v0.37.0/go.mod h1:m8S8VeM9r4dzDwjrKO0a1sZP3YjeMamRRlD+fmR2Q/0=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -954,8 +924,8 @@ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEY
google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20260319201613-d00831a3d3e7 h1:XzmzkmB14QhVhgnawEVsOn6OFsnpyxNPRY9QV01dNB0=
google.golang.org/genproto v0.0.0-20260319201613-d00831a3d3e7/go.mod h1:L43LFes82YgSonw6iTXTxXUX1OlULt4AQtkik4ULL/I=
-google.golang.org/genproto/googleapis/api v0.0.0-20260319201613-d00831a3d3e7 h1:41r6JMbpzBMen0R/4TZeeAmGXSJC7DftGINUodzTkPI=
-google.golang.org/genproto/googleapis/api v0.0.0-20260319201613-d00831a3d3e7/go.mod h1:EIQZ5bFCfRQDV4MhRle7+OgjNtZ6P1PiZBgAKuxXu/Y=
+google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa h1:Kjn0N0tCrDgiAFW+lGO4JZ3ck44CehvJQMAwj9QF0G8=
+google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:q4lMZS6kskjT5HvCPrnnypcDPVJqT/f4nfxmkE7gryY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260610212136-7ab31c22f7ad h1:45WmJvIV6C2+O/jjLkPUH+F3aOj/1miDoU2DD0+NWbg=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260610212136-7ab31c22f7ad/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
@@ -1010,28 +980,26 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/api v0.23.3/go.mod h1:w258XdGyvCmnBj/vGzQMj6kzdufJZVUwEM1U2fRJwSQ=
-k8s.io/api v0.35.1 h1:0PO/1FhlK/EQNVK5+txc4FuhQibV25VLSdLMmGpDE/Q=
-k8s.io/api v0.35.1/go.mod h1:28uR9xlXWml9eT0uaGo6y71xK86JBELShLy4wR1XtxM=
-k8s.io/apiextensions-apiserver v0.35.1 h1:p5vvALkknlOcAqARwjS20kJffgzHqwyQRM8vHLwgU7w=
-k8s.io/apiextensions-apiserver v0.35.1/go.mod h1:2CN4fe1GZ3HMe4wBr25qXyJnJyZaquy4nNlNmb3R7AQ=
+k8s.io/api v0.35.4 h1:P7nFYKl5vo9AGUp1Z+Pmd3p2tA7bX2wbFWCvDeRv988=
+k8s.io/api v0.35.4/go.mod h1:yl4lqySWOgYJJf9RERXKUwE9g2y+CkuwG+xmcOK8wXU=
+k8s.io/apiextensions-apiserver v0.35.4 h1:HeP+Upp7ItdvnyGmub0yoix+2z5+ev4M5cE5TCgtOUU=
+k8s.io/apiextensions-apiserver v0.35.4/go.mod h1:ogQlk+stIE8mnoRthSYCwlOS12fVqgWFiErMwPaXA7c=
k8s.io/apimachinery v0.23.3/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM=
-k8s.io/apimachinery v0.35.1 h1:yxO6gV555P1YV0SANtnTjXYfiivaTPvCTKX6w6qdDsU=
-k8s.io/apimachinery v0.35.1/go.mod h1:jQCgFZFR1F4Ik7hvr2g84RTJSZegBc8yHgFWKn//hns=
-k8s.io/apiserver v0.35.1 h1:potxdhhTL4i6AYAa2QCwtlhtB1eCdWQFvJV6fXgJzxs=
-k8s.io/apiserver v0.35.1/go.mod h1:BiL6Dd3A2I/0lBnteXfWmCFobHM39vt5+hJQd7Lbpi4=
+k8s.io/apimachinery v0.35.4 h1:xtdom9RG7e+yDp71uoXoJDWEE2eOiHgeO4GdBzwWpds=
+k8s.io/apimachinery v0.35.4/go.mod h1:NNi1taPOpep0jOj+oRha3mBJPqvi0hGdaV8TCqGQ+cc=
+k8s.io/apiserver v0.35.4 h1:vtuFqNFmF9bPRdHDL2lpK6qCTPWDreZJL4LRPwVM6ho=
+k8s.io/apiserver v0.35.4/go.mod h1:JnBcb+J8kFXKpZkgcbcUnPBBHi4qgBii1I7dLxFY/oo=
k8s.io/autoscaler/vertical-pod-autoscaler v1.3.0 h1:oVv4QrTPKM7vWyQRRzCDgDgi00NWo4Rjle5/nujP/dI=
k8s.io/autoscaler/vertical-pod-autoscaler v1.3.0/go.mod h1:W4k7qGP8A9Xqp+UK+lM49AfsWkAdXzE80F/s8kxwWVI=
k8s.io/cli-runtime v0.35.1 h1:uKcXFe8J7AMAM4Gm2JDK4mp198dBEq2nyeYtO+JfGJE=
k8s.io/cli-runtime v0.35.1/go.mod h1:55/hiXIq1C8qIJ3WBrWxEwDLdHQYhBNRdZOz9f7yvTw=
-k8s.io/client-go v0.35.1 h1:+eSfZHwuo/I19PaSxqumjqZ9l5XiTEKbIaJ+j1wLcLM=
-k8s.io/client-go v0.35.1/go.mod h1:1p1KxDt3a0ruRfc/pG4qT/3oHmUj1AhSHEcxNSGg+OA=
+k8s.io/client-go v0.35.4 h1:DN6fyaGuzK64UvnKO5fOA6ymSjvfGAnCAHAR0C66kD8=
+k8s.io/client-go v0.35.4/go.mod h1:2Pg9WpsS4NeOpoYTfHHfMxBG8zFMSAUi4O/qoiJC3nY=
k8s.io/cloud-provider v0.35.0 h1:syiBCQbKh2gho/S1BkIl006Dc44pV8eAtGZmv5NMe7M=
k8s.io/cloud-provider v0.35.0/go.mod h1:7grN+/Nt5Hf7tnSGPT3aErt4K7aQpygyCrGpbrQbzNc=
-k8s.io/cluster-bootstrap v0.34.3 h1:mLguWldCwTk0GvoWHg6tf6qgpVMDLCSvvtWUoL13RXg=
-k8s.io/cluster-bootstrap v0.34.3/go.mod h1:50AJCDVJ8HMmw9W2EN0cHSbTsI9GYtyOM+eyxjVlAwg=
k8s.io/code-generator v0.23.3/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk=
-k8s.io/component-base v0.35.1 h1:XgvpRf4srp037QWfGBLFsYMUQJkE5yMa94UsJU7pmcE=
-k8s.io/component-base v0.35.1/go.mod h1:HI/6jXlwkiOL5zL9bqA3en1Ygv60F03oEpnuU1G56Bs=
+k8s.io/component-base v0.35.4 h1:6n1tNJ87johN0Hif0Fs8K2GMthsaUwMqCebUDLYyv7U=
+k8s.io/component-base v0.35.4/go.mod h1:qaDJgz5c1KYKla9occFmlJEfPpkuA55s90G509R+PeY=
k8s.io/component-helpers v0.35.1 h1:vwQ/cAfnVwaPeSXTu4DdK3d3n11Lugc5vMb6EV809ZY=
k8s.io/component-helpers v0.35.1/go.mod h1:HQqMwUk68Yyxgj92dJ+J1w/qbx9M0QR0eZ680m/o+Rk=
k8s.io/csi-translation-lib v0.35.0 h1:jdVC/9rv3lfHl5/MFQXqIVcEZEOXPbl4IPI8cczPdWw=
@@ -1044,10 +1012,10 @@ k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
-k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
-k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
-k8s.io/kms v0.35.1 h1:kjv2r9g1mY7uL+l1RhyAZvWVZIA/4qIfBHXyjFGLRhU=
-k8s.io/kms v0.35.1/go.mod h1:VT+4ekZAdrZDMgShK37vvlyHUVhwI9t/9tvh0AyCWmQ=
+k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc=
+k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0=
+k8s.io/kms v0.35.4 h1:0eE6Zd4nACEs8cc7qCxf3UwMAtgM87X8doj+pJCxJk0=
+k8s.io/kms v0.35.4/go.mod h1:c/uQe/eKrWdBkvizLFW+ThLA6tTzR0RkkwJJyzDRT1g=
k8s.io/kube-aggregator v0.35.1 h1:LN+btMJ3yp7biqVgT/0LF6SKIKLyfPU0R+JJ1mycs2I=
k8s.io/kube-aggregator v0.35.1/go.mod h1:HQSjPQfOFRzcv7biQ7jV3cEfKHG+bczpLCfh4QfvxZU=
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk=
@@ -1058,8 +1026,8 @@ k8s.io/kube-scheduler v0.35.1 h1:xhF7M/4Hclq69IAG6K6qW2Y2P3jf9btRqccon3hKz9s=
k8s.io/kube-scheduler v0.35.1/go.mod h1:6wg+wyqGBuT93PRNmk7b/xPvYZ28K4JmUfWgeIz/JAU=
k8s.io/kubectl v0.35.1 h1:zP3Er8C5i1dcAFUMh9Eva0kVvZHptXIn/+8NtRWMxwg=
k8s.io/kubectl v0.35.1/go.mod h1:cQ2uAPs5IO/kx8R5s5J3Ihv3VCYwrx0obCXum0CvnXo=
-k8s.io/kubelet v0.33.3 h1:Cvy8+7Lq9saZds2ib7YBXbKvkMMJu3f5mzucmhSIJno=
-k8s.io/kubelet v0.33.3/go.mod h1:Q1Cfr6VQq1m9v9XsE/mDmhTxPdN6NPU6Ug0e6mAqi58=
+k8s.io/kubelet v0.34.0 h1:1nZt1Q6Kfx7xCaTS9vnqR9sjZDxf3cRSQkAFCczULmc=
+k8s.io/kubelet v0.34.0/go.mod h1:NqbF8ViVettlZbf9hw9DJhubaWn7rGvDDTcLMDm6tQ0=
k8s.io/pod-security-admission v0.35.1 h1:Ra7QA/mTXVabzzgQAe36trllpQdGSvwuq9pdnXsIqoI=
k8s.io/pod-security-admission v0.35.1/go.mod h1:J2OnqW+rNItdl6XZeySa4m2nDqrZ+nBpk1Mr6Vf9M/U=
k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
@@ -1074,22 +1042,22 @@ kubevirt.io/controller-lifecycle-operator-sdk/api v0.2.4 h1:fZYvD3/Vnitfkx6IJxjL
kubevirt.io/controller-lifecycle-operator-sdk/api v0.2.4/go.mod h1:018lASpFYBsYN6XwmA2TIrPCx6e0gviTd/ZNtSitKgc=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.33.0 h1:qPrZsv1cwQiFeieFlRqT627fVZ+tyfou/+S5S0H5ua0=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.33.0/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw=
-sigs.k8s.io/cluster-api v1.12.7 h1:CbRMWgKN/sHZGBWc/6s8DH9ZnqsSsmYDKlJJ69Rxt8o=
-sigs.k8s.io/cluster-api v1.12.7/go.mod h1:RdmTGGRMvAGIIQBljHUHNov/6Lgz7rmYXqzZNCK+Z4o=
-sigs.k8s.io/cluster-api-provider-aws/v2 v2.10.0 h1:E28NopVRAtnenHsfh54VwS2uEpGAkW0bv6Y19bqAwCg=
-sigs.k8s.io/cluster-api-provider-aws/v2 v2.10.0/go.mod h1:cuuFljMXGat8qW+lvSdYEWReR0DSauv19/rh+bpobl4=
-sigs.k8s.io/cluster-api-provider-azure v1.22.0 h1:TL+QXMVCeY2zR41PSlH2jyhQivDXXPGT8wqG4LX92ss=
-sigs.k8s.io/cluster-api-provider-azure v1.22.0/go.mod h1:ivn6SfniydSCKi+pzGUaNlH1rFcavqRKw0iy1g9l7Nc=
-sigs.k8s.io/cluster-api-provider-gcp v1.11.0 h1:I3sroBY64nAGCzt3aerpGMM76WU3UyjP429kEC0vJ5Y=
-sigs.k8s.io/cluster-api-provider-gcp v1.11.0/go.mod h1:vUbA5VeL+YRoxzNQ/vBzRcoHcFMMkWwgcX8DdG3Xcuc=
+sigs.k8s.io/cluster-api v1.13.3 h1:BlNVnjg644NnlWnxIWHbkltleFLVQwm8FmjWCSB9wGY=
+sigs.k8s.io/cluster-api v1.13.3/go.mod h1:7xB2mYn7oOxSlUw7wk6TukNCjR2phn+MI0gRju3TKSk=
+sigs.k8s.io/cluster-api-provider-aws/v2 v2.12.1 h1:Qt4c7roIXEpe0wtTocE2tIWgShhcCSuLwQGgIiUFSZo=
+sigs.k8s.io/cluster-api-provider-aws/v2 v2.12.1/go.mod h1:kzoAhbiaTDdVSQ9pWOQhDuBwQlkkl8xPbDnDw7M2Hk8=
+sigs.k8s.io/cluster-api-provider-azure v1.26.0 h1:r8j3FPec1GZ9SMx0f2Z9Pd0qXYu+qUOfR0U/TTgZ+6w=
+sigs.k8s.io/cluster-api-provider-azure v1.26.0/go.mod h1:mM4dXaUuTw0I5ko1xZIGxRKDBTQPKOg56rNwfDKyLWc=
+sigs.k8s.io/cluster-api-provider-gcp v1.12.0 h1:RFdAxck4j62e320n8uUbFcro4zxdYZnTWj0mAHZ+CFo=
+sigs.k8s.io/cluster-api-provider-gcp v1.12.0/go.mod h1:vL6gCBOG9LgszKtWsoPlrO1XFHqm5r0zlpk6V9eSCis=
sigs.k8s.io/cluster-api-provider-ibmcloud v0.12.0 h1:0+jfWLg+UmnGOdHZ9SrEpnUJgQPyyXpcjXGdkN5E5M4=
sigs.k8s.io/cluster-api-provider-ibmcloud v0.12.0/go.mod h1:OENB/2pEx2IgYAovlV7qHvOJYyBoKc94TxNqnjjyWYs=
-sigs.k8s.io/cluster-api-provider-kubevirt v0.11.1 h1:6He4EkFNVsEpYsObVRh1agt1/CxhqdqsOvEvyjRWWzk=
-sigs.k8s.io/cluster-api-provider-kubevirt v0.11.1/go.mod h1:so1WRGRRsxT4lqS0htpUqXrXLy0guBklh9UPVxoilLY=
-sigs.k8s.io/cluster-api-provider-openstack v0.14.4 h1:dvvDcPkvXqGJD/C+FchNWqW6E2OlREviJ/AJ8S6Z+uk=
-sigs.k8s.io/cluster-api-provider-openstack v0.14.4/go.mod h1:OJRiKdPY3SoYKMXDbzVgqwa9j8GBie31Pt8oiMtVT2Q=
-sigs.k8s.io/controller-runtime v0.22.5 h1:v3nfSUMowX/2WMp27J9slwGFyAt7IV0YwBxAkrUr0GE=
-sigs.k8s.io/controller-runtime v0.22.5/go.mod h1:pc5SoYWnWI6I+cBHYYdZ7B6YHZVY5xNfll88JB+vniI=
+sigs.k8s.io/cluster-api-provider-kubevirt v0.11.2 h1:+DyQP1xvAD34Cce/5efG1sJFwJZ3pxwoj17oEuKv/EI=
+sigs.k8s.io/cluster-api-provider-kubevirt v0.11.2/go.mod h1:so1WRGRRsxT4lqS0htpUqXrXLy0guBklh9UPVxoilLY=
+sigs.k8s.io/cluster-api-provider-openstack v0.14.6 h1:yOln3Hd6JOFe2mkOGckFdWwFNhJdcNWrlfgwMdxmzto=
+sigs.k8s.io/cluster-api-provider-openstack v0.14.6/go.mod h1:A5d/QLwDgQ9vOAD6/z6EKN23+4GXZK4E8vmh7Jlfsm0=
+sigs.k8s.io/controller-runtime v0.23.3 h1:VjB/vhoPoA9l1kEKZHBMnQF33tdCLQKJtydy4iqwZ80=
+sigs.k8s.io/controller-runtime v0.23.3/go.mod h1:B6COOxKptp+YaUT5q4l6LqUJTRpizbgf9KSRNdQGns0=
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs=
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg=
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
@@ -1101,12 +1069,12 @@ sigs.k8s.io/kustomize/kyaml v0.21.0 h1:7mQAf3dUwf0wBerWJd8rXhVcnkk5Tvn/q91cGkaP6
sigs.k8s.io/kustomize/kyaml v0.21.0/go.mod h1:hmxADesM3yUN2vbA5z1/YTBnzLJ1dajdqpQonwBL1FQ=
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=
sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
-sigs.k8s.io/secrets-store-csi-driver v1.4.8 h1:YmL0lx9HMYqeZCnLyOZRMuGAZXmP/e42UGCCAnMKjgE=
-sigs.k8s.io/secrets-store-csi-driver v1.4.8/go.mod h1:IawZyjzh3xGt6hHdckJUf3ls04O0zG5H550PEZz/beo=
+sigs.k8s.io/secrets-store-csi-driver v1.6.0 h1:YpKG/2hJkp3EkRGpH5SPxg1/5AkmeD5pwHNKIlE90FU=
+sigs.k8s.io/secrets-store-csi-driver v1.6.0/go.mod h1:E8tb5k+6YH+QyCWJ2yS/DSXCf25/pTMNuUPrFRf9t8g=
sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
-sigs.k8s.io/structured-merge-diff/v6 v6.4.0 h1:qmp2e3ZfFi1/jJbDGpD4mt3wyp6PE1NfKHCYLqgNQJo=
-sigs.k8s.io/structured-merge-diff/v6 v6.4.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=
+sigs.k8s.io/structured-merge-diff/v6 v6.4.2 h1:qdOxHwrl2Kaag1aQEarlYcOA9vSyGCp3CIki3aW8c4Q=
+sigs.k8s.io/structured-merge-diff/v6 v6.4.2/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=
diff --git a/vendor/github.com/asaskevich/govalidator/v11/.gitignore b/vendor/github.com/asaskevich/govalidator/v11/.gitignore
deleted file mode 100644
index 8d69a9418aa3..000000000000
--- a/vendor/github.com/asaskevich/govalidator/v11/.gitignore
+++ /dev/null
@@ -1,15 +0,0 @@
-bin/
-.idea/
-# Binaries for programs and plugins
-*.exe
-*.exe~
-*.dll
-*.so
-*.dylib
-
-# Test binary, built with `go test -c`
-*.test
-
-# Output of the go coverage tool, specifically when used with LiteIDE
-*.out
-
diff --git a/vendor/github.com/asaskevich/govalidator/v11/.travis.yml b/vendor/github.com/asaskevich/govalidator/v11/.travis.yml
deleted file mode 100644
index bb83c6670df6..000000000000
--- a/vendor/github.com/asaskevich/govalidator/v11/.travis.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-language: go
-dist: xenial
-go:
- - '1.10'
- - '1.11'
- - '1.12'
- - '1.13'
- - 'tip'
-
-script:
- - go test -coverpkg=./... -coverprofile=coverage.info -timeout=5s
- - bash <(curl -s https://codecov.io/bash)
diff --git a/vendor/github.com/asaskevich/govalidator/v11/CODE_OF_CONDUCT.md b/vendor/github.com/asaskevich/govalidator/v11/CODE_OF_CONDUCT.md
deleted file mode 100644
index 4b462b0d81b1..000000000000
--- a/vendor/github.com/asaskevich/govalidator/v11/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,43 +0,0 @@
-# Contributor Code of Conduct
-
-This project adheres to [The Code Manifesto](http://codemanifesto.com)
-as its guidelines for contributor interactions.
-
-## The Code Manifesto
-
-We want to work in an ecosystem that empowers developers to reach their
-potential — one that encourages growth and effective collaboration. A space
-that is safe for all.
-
-A space such as this benefits everyone that participates in it. It encourages
-new developers to enter our field. It is through discussion and collaboration
-that we grow, and through growth that we improve.
-
-In the effort to create such a place, we hold to these values:
-
-1. **Discrimination limits us.** This includes discrimination on the basis of
- race, gender, sexual orientation, gender identity, age, nationality,
- technology and any other arbitrary exclusion of a group of people.
-2. **Boundaries honor us.** Your comfort levels are not everyone’s comfort
- levels. Remember that, and if brought to your attention, heed it.
-3. **We are our biggest assets.** None of us were born masters of our trade.
- Each of us has been helped along the way. Return that favor, when and where
- you can.
-4. **We are resources for the future.** As an extension of #3, share what you
- know. Make yourself a resource to help those that come after you.
-5. **Respect defines us.** Treat others as you wish to be treated. Make your
- discussions, criticisms and debates from a position of respectfulness. Ask
- yourself, is it true? Is it necessary? Is it constructive? Anything less is
- unacceptable.
-6. **Reactions require grace.** Angry responses are valid, but abusive language
- and vindictive actions are toxic. When something happens that offends you,
- handle it assertively, but be respectful. Escalate reasonably, and try to
- allow the offender an opportunity to explain themselves, and possibly
- correct the issue.
-7. **Opinions are just that: opinions.** Each and every one of us, due to our
- background and upbringing, have varying opinions. That is perfectly
- acceptable. Remember this: if you respect your own opinions, you should
- respect the opinions of others.
-8. **To err is human.** You might not intend it, but mistakes do happen and
- contribute to build experience. Tolerate honest mistakes, and don't
- hesitate to apologize if you make one yourself.
diff --git a/vendor/github.com/asaskevich/govalidator/v11/CONTRIBUTING.md b/vendor/github.com/asaskevich/govalidator/v11/CONTRIBUTING.md
deleted file mode 100644
index 7ed268a1edd9..000000000000
--- a/vendor/github.com/asaskevich/govalidator/v11/CONTRIBUTING.md
+++ /dev/null
@@ -1,63 +0,0 @@
-#### Support
-If you do have a contribution to the package, feel free to create a Pull Request or an Issue.
-
-#### What to contribute
-If you don't know what to do, there are some features and functions that need to be done
-
-- [ ] Refactor code
-- [ ] Edit docs and [README](https://github.com/asaskevich/govalidator/README.md): spellcheck, grammar and typo check
-- [ ] Create actual list of contributors and projects that currently using this package
-- [ ] Resolve [issues and bugs](https://github.com/asaskevich/govalidator/issues)
-- [ ] Update actual [list of functions](https://github.com/asaskevich/govalidator#list-of-functions)
-- [ ] Update [list of validators](https://github.com/asaskevich/govalidator#validatestruct-2) that available for `ValidateStruct` and add new
-- [ ] Implement new validators: `IsFQDN`, `IsIMEI`, `IsPostalCode`, `IsISIN`, `IsISRC` etc
-- [x] Implement [validation by maps](https://github.com/asaskevich/govalidator/issues/224)
-- [ ] Implement fuzzing testing
-- [ ] Implement some struct/map/array utilities
-- [ ] Implement map/array validation
-- [ ] Implement benchmarking
-- [ ] Implement batch of examples
-- [ ] Look at forks for new features and fixes
-
-#### Advice
-Feel free to create what you want, but keep in mind when you implement new features:
-- Code must be clear and readable, names of variables/constants clearly describes what they are doing
-- Public functions must be documented and described in source file and added to README.md to the list of available functions
-- There are must be unit-tests for any new functions and improvements
-
-## Financial contributions
-
-We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/govalidator).
-Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
-
-
-## Credits
-
-
-### Contributors
-
-Thank you to all the people who have already contributed to govalidator!
-
-
-
-### Backers
-
-Thank you to all our backers! [[Become a backer](https://opencollective.com/govalidator#backer)]
-
-
-
-
-### Sponsors
-
-Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/govalidator#sponsor))
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/vendor/github.com/asaskevich/govalidator/v11/LICENSE b/vendor/github.com/asaskevich/govalidator/v11/LICENSE
deleted file mode 100644
index cacba9102400..000000000000
--- a/vendor/github.com/asaskevich/govalidator/v11/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014-2020 Alex Saskevich
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
diff --git a/vendor/github.com/asaskevich/govalidator/v11/README.md b/vendor/github.com/asaskevich/govalidator/v11/README.md
deleted file mode 100644
index fa56e3c4c893..000000000000
--- a/vendor/github.com/asaskevich/govalidator/v11/README.md
+++ /dev/null
@@ -1,624 +0,0 @@
-govalidator
-===========
-[](https://gitter.im/asaskevich/govalidator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [](https://godoc.org/github.com/asaskevich/govalidator)
-[](https://travis-ci.org/asaskevich/govalidator)
-[](https://codecov.io/gh/asaskevich/govalidator) [](https://goreportcard.com/report/github.com/asaskevich/govalidator) [](http://go-search.org/view?id=github.com%2Fasaskevich%2Fgovalidator) [](#backers) [](#sponsors) [](https://app.fossa.io/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator?ref=badge_shield)
-
-A package of validators and sanitizers for strings, structs and collections. Based on [validator.js](https://github.com/chriso/validator.js).
-
-#### Installation
-Make sure that Go is installed on your computer.
-Type the following command in your terminal:
-
- go get github.com/asaskevich/govalidator/v11
-
-or you can get specified release of the package with `gopkg.in`:
-
- go get gopkg.in/asaskevich/govalidator.v10
-
-After it the package is ready to use.
-
-
-#### Import package in your project
-Add following line in your `*.go` file:
-```go
-import "github.com/asaskevich/govalidator/v11"
-```
-If you are unhappy to use long `govalidator`, you can do something like this:
-```go
-import (
- valid "github.com/asaskevich/govalidator/v11"
-)
-```
-
-#### Activate behavior to require all fields have a validation tag by default
-`SetFieldsRequiredByDefault` causes validation to fail when struct fields do not include validations or are not explicitly marked as exempt (using `valid:"-"` or `valid:"email,optional"`). A good place to activate this is a package init function or the main() function.
-
-`SetNilPtrAllowedByRequired` causes validation to pass when struct fields marked by `required` are set to nil. This is disabled by default for consistency, but some packages that need to be able to determine between `nil` and `zero value` state can use this. If disabled, both `nil` and `zero` values cause validation errors.
-
-```go
-import "github.com/asaskevich/govalidator/v11"
-
-func init() {
- govalidator.SetFieldsRequiredByDefault(true)
-}
-```
-
-Here's some code to explain it:
-```go
-// this struct definition will fail govalidator.ValidateStruct() (and the field values do not matter):
-type exampleStruct struct {
- Name string ``
- Email string `valid:"email"`
-}
-
-// this, however, will only fail when Email is empty or an invalid email address:
-type exampleStruct2 struct {
- Name string `valid:"-"`
- Email string `valid:"email"`
-}
-
-// lastly, this will only fail when Email is an invalid email address but not when it's empty:
-type exampleStruct2 struct {
- Name string `valid:"-"`
- Email string `valid:"email,optional"`
-}
-```
-
-#### Recent breaking changes (see [#123](https://github.com/asaskevich/govalidator/pull/123))
-##### Custom validator function signature
-A context was added as the second parameter, for structs this is the object being validated – this makes dependent validation possible.
-```go
-import "github.com/asaskevich/govalidator/v11"
-
-// old signature
-func(i interface{}) bool
-
-// new signature
-func(i interface{}, o interface{}) bool
-```
-
-##### Adding a custom validator
-This was changed to prevent data races when accessing custom validators.
-```go
-import "github.com/asaskevich/govalidator/v11"
-
-// before
-govalidator.CustomTypeTagMap["customByteArrayValidator"] = func(i interface{}, o interface{}) bool {
- // ...
-}
-
-// after
-govalidator.CustomTypeTagMap.Set("customByteArrayValidator", func(i interface{}, o interface{}) bool {
- // ...
-})
-```
-
-#### List of functions:
-```go
-func Abs(value float64) float64
-func BlackList(str, chars string) string
-func ByteLength(str string, params ...string) bool
-func CamelCaseToUnderscore(str string) string
-func Contains(str, substring string) bool
-func Count(array []interface{}, iterator ConditionIterator) int
-func Each(array []interface{}, iterator Iterator)
-func ErrorByField(e error, field string) string
-func ErrorsByField(e error) map[string]string
-func Filter(array []interface{}, iterator ConditionIterator) []interface{}
-func Find(array []interface{}, iterator ConditionIterator) interface{}
-func GetLine(s string, index int) (string, error)
-func GetLines(s string) []string
-func HasLowerCase(str string) bool
-func HasUpperCase(str string) bool
-func HasWhitespace(str string) bool
-func HasWhitespaceOnly(str string) bool
-func InRange(value interface{}, left interface{}, right interface{}) bool
-func InRangeFloat32(value, left, right float32) bool
-func InRangeFloat64(value, left, right float64) bool
-func InRangeInt(value, left, right interface{}) bool
-func IsASCII(str string) bool
-func IsAlpha(str string) bool
-func IsAlphanumeric(str string) bool
-func IsBase64(str string) bool
-func IsByteLength(str string, min, max int) bool
-func IsCIDR(str string) bool
-func IsCRC32(str string) bool
-func IsCRC32b(str string) bool
-func IsCreditCard(str string) bool
-func IsDNSName(str string) bool
-func IsDataURI(str string) bool
-func IsDialString(str string) bool
-func IsDivisibleBy(str, num string) bool
-func IsEmail(str string) bool
-func IsExistingEmail(email string) bool
-func IsFilePath(str string) (bool, int)
-func IsFloat(str string) bool
-func IsFullWidth(str string) bool
-func IsHalfWidth(str string) bool
-func IsHash(str string, algorithm string) bool
-func IsHexadecimal(str string) bool
-func IsHexcolor(str string) bool
-func IsHost(str string) bool
-func IsIP(str string) bool
-func IsIPv4(str string) bool
-func IsIPv6(str string) bool
-func IsISBN(str string, version int) bool
-func IsISBN10(str string) bool
-func IsISBN13(str string) bool
-func IsISO3166Alpha2(str string) bool
-func IsISO3166Alpha3(str string) bool
-func IsISO4217(str string) bool
-func IsISO693Alpha2(str string) bool
-func IsISO693Alpha3b(str string) bool
-func IsIn(str string, params ...string) bool
-func IsInRaw(str string, params ...string) bool
-func IsInt(str string) bool
-func IsJSON(str string) bool
-func IsLatitude(str string) bool
-func IsLongitude(str string) bool
-func IsLowerCase(str string) bool
-func IsMAC(str string) bool
-func IsMD4(str string) bool
-func IsMD5(str string) bool
-func IsMagnetURI(str string) bool
-func IsMongoID(str string) bool
-func IsMultibyte(str string) bool
-func IsNatural(value float64) bool
-func IsNegative(value float64) bool
-func IsNonNegative(value float64) bool
-func IsNonPositive(value float64) bool
-func IsNotNull(str string) bool
-func IsNull(str string) bool
-func IsNumeric(str string) bool
-func IsPort(str string) bool
-func IsPositive(value float64) bool
-func IsPrintableASCII(str string) bool
-func IsRFC3339(str string) bool
-func IsRFC3339WithoutZone(str string) bool
-func IsRGBcolor(str string) bool
-func IsRegex(str string) bool
-func IsRequestURI(rawurl string) bool
-func IsRequestURL(rawurl string) bool
-func IsRipeMD128(str string) bool
-func IsRipeMD160(str string) bool
-func IsRsaPub(str string, params ...string) bool
-func IsRsaPublicKey(str string, keylen int) bool
-func IsSHA1(str string) bool
-func IsSHA256(str string) bool
-func IsSHA384(str string) bool
-func IsSHA512(str string) bool
-func IsSSN(str string) bool
-func IsSemver(str string) bool
-func IsTiger128(str string) bool
-func IsTiger160(str string) bool
-func IsTiger192(str string) bool
-func IsTime(str string, format string) bool
-func IsType(v interface{}, params ...string) bool
-func IsURL(str string) bool
-func IsUTFDigit(str string) bool
-func IsUTFLetter(str string) bool
-func IsUTFLetterNumeric(str string) bool
-func IsUTFNumeric(str string) bool
-func IsUUID(str string) bool
-func IsUUIDv3(str string) bool
-func IsUUIDv4(str string) bool
-func IsUUIDv5(str string) bool
-func IsULID(str string) bool
-func IsUnixTime(str string) bool
-func IsUpperCase(str string) bool
-func IsVariableWidth(str string) bool
-func IsYYYYMMDD(str string) bool
-func IsWhole(value float64) bool
-func LeftTrim(str, chars string) string
-func Map(array []interface{}, iterator ResultIterator) []interface{}
-func Matches(str, pattern string) bool
-func MaxStringLength(str string, params ...string) bool
-func MinStringLength(str string, params ...string) bool
-func NormalizeEmail(str string) (string, error)
-func PadBoth(str string, padStr string, padLen int) string
-func PadLeft(str string, padStr string, padLen int) string
-func PadRight(str string, padStr string, padLen int) string
-func PrependPathToErrors(err error, path string) error
-func Range(str string, params ...string) bool
-func RemoveTags(s string) string
-func ReplacePattern(str, pattern, replace string) string
-func Reverse(s string) string
-func RightTrim(str, chars string) string
-func RuneLength(str string, params ...string) bool
-func SafeFileName(str string) string
-func SetFieldsRequiredByDefault(value bool)
-func SetNilPtrAllowedByRequired(value bool)
-func Sign(value float64) float64
-func StringLength(str string, params ...string) bool
-func StringMatches(s string, params ...string) bool
-func StripLow(str string, keepNewLines bool) string
-func ToBoolean(str string) (bool, error)
-func ToFloat(str string) (float64, error)
-func ToInt(value interface{}) (res int64, err error)
-func ToJSON(obj interface{}) (string, error)
-func ToString(obj interface{}) string
-func Trim(str, chars string) string
-func Truncate(str string, length int, ending string) string
-func TruncatingErrorf(str string, args ...interface{}) error
-func UnderscoreToCamelCase(s string) string
-func ValidateMap(inputMap map[string]interface{}, validationMap map[string]interface{}) (bool, error)
-func ValidateStruct(s interface{}) (bool, error)
-func WhiteList(str, chars string) string
-type ConditionIterator
-type CustomTypeValidator
-type Error
-func (e Error) Error() string
-type Errors
-func (es Errors) Error() string
-func (es Errors) Errors() []error
-type ISO3166Entry
-type ISO693Entry
-type InterfaceParamValidator
-type Iterator
-type ParamValidator
-type ResultIterator
-type UnsupportedTypeError
-func (e *UnsupportedTypeError) Error() string
-type Validator
-```
-
-#### Examples
-###### IsURL
-```go
-println(govalidator.IsURL(`http://user@pass:domain.com/path/page`))
-```
-###### IsType
-```go
-println(govalidator.IsType("Bob", "string"))
-println(govalidator.IsType(1, "int"))
-i := 1
-println(govalidator.IsType(&i, "*int"))
-```
-
-IsType can be used through the tag `type` which is essential for map validation:
-```go
-type User struct {
- Name string `valid:"type(string)"`
- Age int `valid:"type(int)"`
- Meta interface{} `valid:"type(string)"`
-}
-result, err := govalidator.ValidateStruct(User{"Bob", 20, "meta"})
-if err != nil {
- println("error: " + err.Error())
-}
-println(result)
-```
-###### ToString
-```go
-type User struct {
- FirstName string
- LastName string
-}
-
-str := govalidator.ToString(&User{"John", "Juan"})
-println(str)
-```
-###### Each, Map, Filter, Count for slices
-Each iterates over the slice/array and calls Iterator for every item
-```go
-data := []interface{}{1, 2, 3, 4, 5}
-var fn govalidator.Iterator = func(value interface{}, index int) {
- println(value.(int))
-}
-govalidator.Each(data, fn)
-```
-```go
-data := []interface{}{1, 2, 3, 4, 5}
-var fn govalidator.ResultIterator = func(value interface{}, index int) interface{} {
- return value.(int) * 3
-}
-_ = govalidator.Map(data, fn) // result = []interface{}{1, 6, 9, 12, 15}
-```
-```go
-data := []interface{}{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
-var fn govalidator.ConditionIterator = func(value interface{}, index int) bool {
- return value.(int)%2 == 0
-}
-_ = govalidator.Filter(data, fn) // result = []interface{}{2, 4, 6, 8, 10}
-_ = govalidator.Count(data, fn) // result = 5
-```
-###### ValidateStruct [#2](https://github.com/asaskevich/govalidator/pull/2)
-If you want to validate structs, you can use tag `valid` for any field in your structure. All validators used with this field in one tag are separated by comma. If you want to skip validation, place `-` in your tag. If you need a validator that is not on the list below, you can add it like this:
-```go
-govalidator.TagMap["duck"] = govalidator.Validator(func(str string) bool {
- return str == "duck"
-})
-```
-For completely custom validators (interface-based), see below.
-
-Here is a list of available validators for struct fields (validator - used function):
-```go
-"email": IsEmail,
-"url": IsURL,
-"dialstring": IsDialString,
-"requrl": IsRequestURL,
-"requri": IsRequestURI,
-"alpha": IsAlpha,
-"utfletter": IsUTFLetter,
-"alphanum": IsAlphanumeric,
-"utfletternum": IsUTFLetterNumeric,
-"numeric": IsNumeric,
-"utfnumeric": IsUTFNumeric,
-"utfdigit": IsUTFDigit,
-"hexadecimal": IsHexadecimal,
-"hexcolor": IsHexcolor,
-"rgbcolor": IsRGBcolor,
-"lowercase": IsLowerCase,
-"uppercase": IsUpperCase,
-"int": IsInt,
-"float": IsFloat,
-"null": IsNull,
-"uuid": IsUUID,
-"uuidv3": IsUUIDv3,
-"uuidv4": IsUUIDv4,
-"uuidv5": IsUUIDv5,
-"creditcard": IsCreditCard,
-"isbn10": IsISBN10,
-"isbn13": IsISBN13,
-"json": IsJSON,
-"multibyte": IsMultibyte,
-"ascii": IsASCII,
-"printableascii": IsPrintableASCII,
-"fullwidth": IsFullWidth,
-"halfwidth": IsHalfWidth,
-"variablewidth": IsVariableWidth,
-"base64": IsBase64,
-"datauri": IsDataURI,
-"ip": IsIP,
-"port": IsPort,
-"ipv4": IsIPv4,
-"ipv6": IsIPv6,
-"dns": IsDNSName,
-"host": IsHost,
-"mac": IsMAC,
-"latitude": IsLatitude,
-"longitude": IsLongitude,
-"ssn": IsSSN,
-"semver": IsSemver,
-"rfc3339": IsRFC3339,
-"rfc3339WithoutZone": IsRFC3339WithoutZone,
-"ISO3166Alpha2": IsISO3166Alpha2,
-"ISO3166Alpha3": IsISO3166Alpha3,
-"ulid": IsULID,
-"yyyymmdd": IsYYYYMMDD,
-```
-Validators with parameters
-
-```go
-"range(min|max)": Range,
-"length(min|max)": ByteLength,
-"runelength(min|max)": RuneLength,
-"stringlength(min|max)": StringLength,
-"matches(pattern)": StringMatches,
-"in(string1|string2|...|stringN)": IsIn,
-"rsapub(keylength)" : IsRsaPub,
-"minstringlength(int): MinStringLength,
-"maxstringlength(int): MaxStringLength,
-```
-Validators with parameters for any type
-
-```go
-"type(type)": IsType,
-```
-
-And here is small example of usage:
-```go
-type Post struct {
- Title string `valid:"alphanum,required"`
- Message string `valid:"duck,ascii"`
- Message2 string `valid:"animal(dog)"`
- AuthorIP string `valid:"ipv4"`
- Date string `valid:"-"`
-}
-post := &Post{
- Title: "My Example Post",
- Message: "duck",
- Message2: "dog",
- AuthorIP: "123.234.54.3",
-}
-
-// Add your own struct validation tags
-govalidator.TagMap["duck"] = govalidator.Validator(func(str string) bool {
- return str == "duck"
-})
-
-// Add your own struct validation tags with parameter
-govalidator.ParamTagMap["animal"] = govalidator.ParamValidator(func(str string, params ...string) bool {
- species := params[0]
- return str == species
-})
-govalidator.ParamTagRegexMap["animal"] = regexp.MustCompile("^animal\\((\\w+)\\)$")
-
-result, err := govalidator.ValidateStruct(post)
-if err != nil {
- println("error: " + err.Error())
-}
-println(result)
-```
-###### ValidateMap [#2](https://github.com/asaskevich/govalidator/pull/338)
-If you want to validate maps, you can use the map to be validated and a validation map that contain the same tags used in ValidateStruct, both maps have to be in the form `map[string]interface{}`
-
-So here is small example of usage:
-```go
-var mapTemplate = map[string]interface{}{
- "name":"required,alpha",
- "family":"required,alpha",
- "email":"required,email",
- "cell-phone":"numeric",
- "address":map[string]interface{}{
- "line1":"required,alphanum",
- "line2":"alphanum",
- "postal-code":"numeric",
- },
-}
-
-var inputMap = map[string]interface{}{
- "name":"Bob",
- "family":"Smith",
- "email":"foo@bar.baz",
- "address":map[string]interface{}{
- "line1":"",
- "line2":"",
- "postal-code":"",
- },
-}
-
-result, err := govalidator.ValidateMap(inputMap, mapTemplate)
-if err != nil {
- println("error: " + err.Error())
-}
-println(result)
-```
-
-###### WhiteList
-```go
-// Remove all characters from string ignoring characters between "a" and "z"
-println(govalidator.WhiteList("a3a43a5a4a3a2a23a4a5a4a3a4", "a-z") == "aaaaaaaaaaaa")
-```
-
-###### Custom validation functions
-Custom validation using your own domain specific validators is also available - here's an example of how to use it:
-```go
-import "github.com/asaskevich/govalidator/v11"
-
-type CustomByteArray [6]byte // custom types are supported and can be validated
-
-type StructWithCustomByteArray struct {
- ID CustomByteArray `valid:"customByteArrayValidator,customMinLengthValidator"` // multiple custom validators are possible as well and will be evaluated in sequence
- Email string `valid:"email"`
- CustomMinLength int `valid:"-"`
-}
-
-govalidator.CustomTypeTagMap.Set("customByteArrayValidator", func(i interface{}, context interface{}) bool {
- switch v := context.(type) { // you can type switch on the context interface being validated
- case StructWithCustomByteArray:
- // you can check and validate against some other field in the context,
- // return early or not validate against the context at all – your choice
- case SomeOtherType:
- // ...
- default:
- // expecting some other type? Throw/panic here or continue
- }
-
- switch v := i.(type) { // type switch on the struct field being validated
- case CustomByteArray:
- for _, e := range v { // this validator checks that the byte array is not empty, i.e. not all zeroes
- if e != 0 {
- return true
- }
- }
- }
- return false
-})
-govalidator.CustomTypeTagMap.Set("customMinLengthValidator", func(i interface{}, context interface{}) bool {
- switch v := context.(type) { // this validates a field against the value in another field, i.e. dependent validation
- case StructWithCustomByteArray:
- return len(v.ID) >= v.CustomMinLength
- }
- return false
-})
-```
-
-###### Loop over Error()
-By default .Error() returns all errors in a single String. To access each error you can do this:
-```go
- if err != nil {
- errs := err.(govalidator.Errors).Errors()
- for _, e := range errs {
- fmt.Println(e.Error())
- }
- }
-```
-
-###### Custom error messages
-Custom error messages are supported via annotations by adding the `~` separator - here's an example of how to use it:
-```go
-type Ticket struct {
- Id int64 `json:"id"`
- FirstName string `json:"firstname" valid:"required~First name is blank"`
-}
-```
-
-#### Notes
-Documentation is available here: [godoc.org](https://godoc.org/github.com/asaskevich/govalidator).
-Full information about code coverage is also available here: [govalidator on gocover.io](http://gocover.io/github.com/asaskevich/govalidator).
-
-#### Support
-If you do have a contribution to the package, feel free to create a Pull Request or an Issue.
-
-#### What to contribute
-If you don't know what to do, there are some features and functions that need to be done
-
-- [ ] Refactor code
-- [ ] Edit docs and [README](https://github.com/asaskevich/govalidator/README.md): spellcheck, grammar and typo check
-- [ ] Create actual list of contributors and projects that currently using this package
-- [ ] Resolve [issues and bugs](https://github.com/asaskevich/govalidator/issues)
-- [ ] Update actual [list of functions](https://github.com/asaskevich/govalidator#list-of-functions)
-- [ ] Update [list of validators](https://github.com/asaskevich/govalidator#validatestruct-2) that available for `ValidateStruct` and add new
-- [ ] Implement new validators: `IsFQDN`, `IsIMEI`, `IsPostalCode`, `IsISIN`, `IsISRC` etc
-- [x] Implement [validation by maps](https://github.com/asaskevich/govalidator/issues/224)
-- [ ] Implement fuzzing testing
-- [ ] Implement some struct/map/array utilities
-- [ ] Implement map/array validation
-- [ ] Implement benchmarking
-- [ ] Implement batch of examples
-- [ ] Look at forks for new features and fixes
-
-#### Advice
-Feel free to create what you want, but keep in mind when you implement new features:
-- Code must be clear and readable, names of variables/constants clearly describes what they are doing
-- Public functions must be documented and described in source file and added to README.md to the list of available functions
-- There are must be unit-tests for any new functions and improvements
-
-## Credits
-### Contributors
-
-This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
-
-#### Special thanks to [contributors](https://github.com/asaskevich/govalidator/graphs/contributors)
-* [Daniel Lohse](https://github.com/annismckenzie)
-* [Attila Oláh](https://github.com/attilaolah)
-* [Daniel Korner](https://github.com/Dadie)
-* [Steven Wilkin](https://github.com/stevenwilkin)
-* [Deiwin Sarjas](https://github.com/deiwin)
-* [Noah Shibley](https://github.com/slugmobile)
-* [Nathan Davies](https://github.com/nathj07)
-* [Matt Sanford](https://github.com/mzsanford)
-* [Simon ccl1115](https://github.com/ccl1115)
-
-
-
-
-### Backers
-
-Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/govalidator#backer)]
-
-
-
-
-### Sponsors
-
-Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/govalidator#sponsor)]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-## License
-[](https://app.fossa.io/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator?ref=badge_large)
diff --git a/vendor/github.com/asaskevich/govalidator/v11/arrays.go b/vendor/github.com/asaskevich/govalidator/v11/arrays.go
deleted file mode 100644
index 3e1da7cb480e..000000000000
--- a/vendor/github.com/asaskevich/govalidator/v11/arrays.go
+++ /dev/null
@@ -1,87 +0,0 @@
-package govalidator
-
-// Iterator is the function that accepts element of slice/array and its index
-type Iterator func(interface{}, int)
-
-// ResultIterator is the function that accepts element of slice/array and its index and returns any result
-type ResultIterator func(interface{}, int) interface{}
-
-// ConditionIterator is the function that accepts element of slice/array and its index and returns boolean
-type ConditionIterator func(interface{}, int) bool
-
-// ReduceIterator is the function that accepts two element of slice/array and returns result of merging those values
-type ReduceIterator func(interface{}, interface{}) interface{}
-
-// Some validates that any item of array corresponds to ConditionIterator. Returns boolean.
-func Some(array []interface{}, iterator ConditionIterator) bool {
- res := false
- for index, data := range array {
- res = res || iterator(data, index)
- }
- return res
-}
-
-// Every validates that every item of array corresponds to ConditionIterator. Returns boolean.
-func Every(array []interface{}, iterator ConditionIterator) bool {
- res := true
- for index, data := range array {
- res = res && iterator(data, index)
- }
- return res
-}
-
-// Reduce boils down a list of values into a single value by ReduceIterator
-func Reduce(array []interface{}, iterator ReduceIterator, initialValue interface{}) interface{} {
- for _, data := range array {
- initialValue = iterator(initialValue, data)
- }
- return initialValue
-}
-
-// Each iterates over the slice and apply Iterator to every item
-func Each(array []interface{}, iterator Iterator) {
- for index, data := range array {
- iterator(data, index)
- }
-}
-
-// Map iterates over the slice and apply ResultIterator to every item. Returns new slice as a result.
-func Map(array []interface{}, iterator ResultIterator) []interface{} {
- var result = make([]interface{}, len(array))
- for index, data := range array {
- result[index] = iterator(data, index)
- }
- return result
-}
-
-// Find iterates over the slice and apply ConditionIterator to every item. Returns first item that meet ConditionIterator or nil otherwise.
-func Find(array []interface{}, iterator ConditionIterator) interface{} {
- for index, data := range array {
- if iterator(data, index) {
- return data
- }
- }
- return nil
-}
-
-// Filter iterates over the slice and apply ConditionIterator to every item. Returns new slice.
-func Filter(array []interface{}, iterator ConditionIterator) []interface{} {
- var result = make([]interface{}, 0)
- for index, data := range array {
- if iterator(data, index) {
- result = append(result, data)
- }
- }
- return result
-}
-
-// Count iterates over the slice and apply ConditionIterator to every item. Returns count of items that meets ConditionIterator.
-func Count(array []interface{}, iterator ConditionIterator) int {
- count := 0
- for index, data := range array {
- if iterator(data, index) {
- count = count + 1
- }
- }
- return count
-}
diff --git a/vendor/github.com/asaskevich/govalidator/v11/converter.go b/vendor/github.com/asaskevich/govalidator/v11/converter.go
deleted file mode 100644
index d68e990fc256..000000000000
--- a/vendor/github.com/asaskevich/govalidator/v11/converter.go
+++ /dev/null
@@ -1,81 +0,0 @@
-package govalidator
-
-import (
- "encoding/json"
- "fmt"
- "reflect"
- "strconv"
-)
-
-// ToString convert the input to a string.
-func ToString(obj interface{}) string {
- res := fmt.Sprintf("%v", obj)
- return res
-}
-
-// ToJSON convert the input to a valid JSON string
-func ToJSON(obj interface{}) (string, error) {
- res, err := json.Marshal(obj)
- if err != nil {
- res = []byte("")
- }
- return string(res), err
-}
-
-// ToFloat convert the input string to a float, or 0.0 if the input is not a float.
-func ToFloat(value interface{}) (res float64, err error) {
- val := reflect.ValueOf(value)
-
- switch value.(type) {
- case int, int8, int16, int32, int64:
- res = float64(val.Int())
- case uint, uint8, uint16, uint32, uint64:
- res = float64(val.Uint())
- case float32, float64:
- res = val.Float()
- case string:
- res, err = strconv.ParseFloat(val.String(), 64)
- if err != nil {
- res = 0
- }
- default:
- err = fmt.Errorf("ToInt: unknown interface type %T", value)
- res = 0
- }
-
- return
-}
-
-// ToInt convert the input string or any int type to an integer type 64, or 0 if the input is not an integer.
-func ToInt(value interface{}) (res int64, err error) {
- val := reflect.ValueOf(value)
-
- switch value.(type) {
- case int, int8, int16, int32, int64:
- res = val.Int()
- case uint, uint8, uint16, uint32, uint64:
- res = int64(val.Uint())
- case float32, float64:
- res = int64(val.Float())
- case string:
- if IsInt(val.String()) {
- res, err = strconv.ParseInt(val.String(), 0, 64)
- if err != nil {
- res = 0
- }
- } else {
- err = fmt.Errorf("ToInt: invalid numeric format %g", value)
- res = 0
- }
- default:
- err = fmt.Errorf("ToInt: unknown interface type %T", value)
- res = 0
- }
-
- return
-}
-
-// ToBoolean convert the input string to a boolean.
-func ToBoolean(str string) (bool, error) {
- return strconv.ParseBool(str)
-}
diff --git a/vendor/github.com/asaskevich/govalidator/v11/doc.go b/vendor/github.com/asaskevich/govalidator/v11/doc.go
deleted file mode 100644
index 55dce62dc8c3..000000000000
--- a/vendor/github.com/asaskevich/govalidator/v11/doc.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package govalidator
-
-// A package of validators and sanitizers for strings, structures and collections.
diff --git a/vendor/github.com/asaskevich/govalidator/v11/error.go b/vendor/github.com/asaskevich/govalidator/v11/error.go
deleted file mode 100644
index 1da2336f47ee..000000000000
--- a/vendor/github.com/asaskevich/govalidator/v11/error.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package govalidator
-
-import (
- "sort"
- "strings"
-)
-
-// Errors is an array of multiple errors and conforms to the error interface.
-type Errors []error
-
-// Errors returns itself.
-func (es Errors) Errors() []error {
- return es
-}
-
-func (es Errors) Error() string {
- var errs []string
- for _, e := range es {
- errs = append(errs, e.Error())
- }
- sort.Strings(errs)
- return strings.Join(errs, ";")
-}
-
-// Error encapsulates a name, an error and whether there's a custom error message or not.
-type Error struct {
- Name string
- Err error
- CustomErrorMessageExists bool
-
- // Validator indicates the name of the validator that failed
- Validator string
- Path []string
-}
-
-func (e Error) Error() string {
- if e.CustomErrorMessageExists {
- return e.Err.Error()
- }
-
- errName := e.Name
- if len(e.Path) > 0 {
- errName = strings.Join(append(e.Path, e.Name), ".")
- }
-
- return errName + ": " + e.Err.Error()
-}
diff --git a/vendor/github.com/asaskevich/govalidator/v11/numerics.go b/vendor/github.com/asaskevich/govalidator/v11/numerics.go
deleted file mode 100644
index 5041d9e86844..000000000000
--- a/vendor/github.com/asaskevich/govalidator/v11/numerics.go
+++ /dev/null
@@ -1,100 +0,0 @@
-package govalidator
-
-import (
- "math"
-)
-
-// Abs returns absolute value of number
-func Abs(value float64) float64 {
- return math.Abs(value)
-}
-
-// Sign returns signum of number: 1 in case of value > 0, -1 in case of value < 0, 0 otherwise
-func Sign(value float64) float64 {
- if value > 0 {
- return 1
- } else if value < 0 {
- return -1
- } else {
- return 0
- }
-}
-
-// IsNegative returns true if value < 0
-func IsNegative(value float64) bool {
- return value < 0
-}
-
-// IsPositive returns true if value > 0
-func IsPositive(value float64) bool {
- return value > 0
-}
-
-// IsNonNegative returns true if value >= 0
-func IsNonNegative(value float64) bool {
- return value >= 0
-}
-
-// IsNonPositive returns true if value <= 0
-func IsNonPositive(value float64) bool {
- return value <= 0
-}
-
-// InRangeInt returns true if value lies between left and right border
-func InRangeInt(value, left, right interface{}) bool {
- value64, _ := ToInt(value)
- left64, _ := ToInt(left)
- right64, _ := ToInt(right)
- if left64 > right64 {
- left64, right64 = right64, left64
- }
- return value64 >= left64 && value64 <= right64
-}
-
-// InRangeFloat32 returns true if value lies between left and right border
-func InRangeFloat32(value, left, right float32) bool {
- if left > right {
- left, right = right, left
- }
- return value >= left && value <= right
-}
-
-// InRangeFloat64 returns true if value lies between left and right border
-func InRangeFloat64(value, left, right float64) bool {
- if left > right {
- left, right = right, left
- }
- return value >= left && value <= right
-}
-
-// InRange returns true if value lies between left and right border, generic type to handle int, float32, float64 and string.
-// All types must the same type.
-// False if value doesn't lie in range or if it incompatible or not comparable
-func InRange(value interface{}, left interface{}, right interface{}) bool {
- switch value.(type) {
- case int:
- intValue, _ := ToInt(value)
- intLeft, _ := ToInt(left)
- intRight, _ := ToInt(right)
- return InRangeInt(intValue, intLeft, intRight)
- case float32, float64:
- intValue, _ := ToFloat(value)
- intLeft, _ := ToFloat(left)
- intRight, _ := ToFloat(right)
- return InRangeFloat64(intValue, intLeft, intRight)
- case string:
- return value.(string) >= left.(string) && value.(string) <= right.(string)
- default:
- return false
- }
-}
-
-// IsWhole returns true if value is whole number
-func IsWhole(value float64) bool {
- return math.Remainder(value, 1) == 0
-}
-
-// IsNatural returns true if value is natural number (positive and whole)
-func IsNatural(value float64) bool {
- return IsWhole(value) && IsPositive(value)
-}
diff --git a/vendor/github.com/asaskevich/govalidator/v11/patterns.go b/vendor/github.com/asaskevich/govalidator/v11/patterns.go
deleted file mode 100644
index bafc3765ea12..000000000000
--- a/vendor/github.com/asaskevich/govalidator/v11/patterns.go
+++ /dev/null
@@ -1,113 +0,0 @@
-package govalidator
-
-import "regexp"
-
-// Basic regular expressions for validating strings
-const (
- Email string = "^(((([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+(\\.([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|\\.|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.)+(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.?$"
- CreditCard string = "^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11}|6[27][0-9]{14})$"
- ISBN10 string = "^(?:[0-9]{9}X|[0-9]{10})$"
- ISBN13 string = "^(?:[0-9]{13})$"
- UUID3 string = "^[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$"
- UUID4 string = "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
- UUID5 string = "^[0-9a-f]{8}-[0-9a-f]{4}-5[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
- UUID string = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
- Alpha string = "^[a-zA-Z]+$"
- Alphanumeric string = "^[a-zA-Z0-9]+$"
- Numeric string = "^[0-9]+$"
- Int string = "^(?:[-+]?(?:0|[1-9][0-9]*))$"
- Float string = "^(?:[-+]?(?:[0-9]+))?(?:\\.[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$"
- Hexadecimal string = "^[0-9a-fA-F]+$"
- Hexcolor string = "^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
- RGBcolor string = "^rgb\\(\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*\\)$"
- ASCII string = "^[\x00-\x7F]+$"
- Multibyte string = "[^\x00-\x7F]"
- FullWidth string = "[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]"
- HalfWidth string = "[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]"
- Base64 string = "^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=|[A-Za-z0-9+\\/]{4})$"
- PrintableASCII string = "^[\x20-\x7E]+$"
- DataURI string = "^data:.+\\/(.+);base64$"
- MagnetURI string = "^magnet:\\?xt=urn:[a-zA-Z0-9]+:[a-zA-Z0-9]{32,40}&dn=.+&tr=.+$"
- Latitude string = "^[-+]?([1-8]?\\d(\\.\\d+)?|90(\\.0+)?)$"
- Longitude string = "^[-+]?(180(\\.0+)?|((1[0-7]\\d)|([1-9]?\\d))(\\.\\d+)?)$"
- DNSName string = `^([a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62}){1}(\.[a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62})*[\._]?$`
- IP string = `(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))`
- URLSchema string = `((ftp|tcp|udp|wss?|https?):\/\/)`
- URLUsername string = `(\S+(:\S*)?@)`
- URLPath string = `((\/|\?|#)[^\s]*)`
- URLPort string = `(:(\d{1,5}))`
- URLIP string = `([1-9]\d?|1\d\d|2[01]\d|22[0-3]|24\d|25[0-5])(\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){2}(?:\.([0-9]\d?|1\d\d|2[0-4]\d|25[0-5]))`
- URLSubdomain string = `((www\.)|([a-zA-Z0-9]+([-_\.]?[a-zA-Z0-9])*[a-zA-Z0-9]\.[a-zA-Z0-9]+))`
- URL = `^` + URLSchema + `?` + URLUsername + `?` + `((` + URLIP + `|(\[` + IP + `\])|(([a-zA-Z0-9]([a-zA-Z0-9-_]+)?[a-zA-Z0-9]([-\.][a-zA-Z0-9]+)*)|(` + URLSubdomain + `?))?(([a-zA-Z\x{00a1}-\x{ffff}0-9]+-?-?)*[a-zA-Z\x{00a1}-\x{ffff}0-9]+)(?:\.([a-zA-Z\x{00a1}-\x{ffff}]{1,}))?))\.?` + URLPort + `?` + URLPath + `?$`
- SSN string = `^\d{3}[- ]?\d{2}[- ]?\d{4}$`
- WinPath string = `^[a-zA-Z]:\\(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*$`
- UnixPath string = `^(/[^/\x00]*)+/?$`
- WinARPath string = `^(?:(?:[a-zA-Z]:|\\\\[a-z0-9_.$●-]+\\[a-z0-9_.$●-]+)\\|\\?[^\\/:*?"<>|\r\n]+\\?)(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*$`
- UnixARPath string = `^((\.{0,2}/)?([^/\x00]*))+/?$`
- Semver string = "^v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$"
- tagName string = "valid"
- hasLowerCase string = ".*[[:lower:]]"
- hasUpperCase string = ".*[[:upper:]]"
- hasWhitespace string = ".*[[:space:]]"
- hasWhitespaceOnly string = "^[[:space:]]+$"
- IMEI string = "^[0-9a-f]{14}$|^\\d{15}$|^\\d{18}$"
- IMSI string = "^\\d{14,15}$"
- E164 string = `^\+?[1-9]\d{1,14}$`
-)
-
-// Used by IsFilePath func
-const (
- // Unknown is unresolved OS type
- Unknown = iota
- // Win is Windows type
- Win
- // Unix is *nix OS types
- Unix
-)
-
-var (
- userRegexp = regexp.MustCompile("^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+$")
- hostRegexp = regexp.MustCompile("^[^\\s]+\\.[^\\s]+$")
- userDotRegexp = regexp.MustCompile("(^[.]{1})|([.]{1}$)|([.]{2,})")
- rxEmail = regexp.MustCompile(Email)
- rxCreditCard = regexp.MustCompile(CreditCard)
- rxISBN10 = regexp.MustCompile(ISBN10)
- rxISBN13 = regexp.MustCompile(ISBN13)
- rxUUID3 = regexp.MustCompile(UUID3)
- rxUUID4 = regexp.MustCompile(UUID4)
- rxUUID5 = regexp.MustCompile(UUID5)
- rxUUID = regexp.MustCompile(UUID)
- rxAlpha = regexp.MustCompile(Alpha)
- rxAlphanumeric = regexp.MustCompile(Alphanumeric)
- rxNumeric = regexp.MustCompile(Numeric)
- rxInt = regexp.MustCompile(Int)
- rxFloat = regexp.MustCompile(Float)
- rxHexadecimal = regexp.MustCompile(Hexadecimal)
- rxHexcolor = regexp.MustCompile(Hexcolor)
- rxRGBcolor = regexp.MustCompile(RGBcolor)
- rxASCII = regexp.MustCompile(ASCII)
- rxPrintableASCII = regexp.MustCompile(PrintableASCII)
- rxMultibyte = regexp.MustCompile(Multibyte)
- rxFullWidth = regexp.MustCompile(FullWidth)
- rxHalfWidth = regexp.MustCompile(HalfWidth)
- rxBase64 = regexp.MustCompile(Base64)
- rxDataURI = regexp.MustCompile(DataURI)
- rxMagnetURI = regexp.MustCompile(MagnetURI)
- rxLatitude = regexp.MustCompile(Latitude)
- rxLongitude = regexp.MustCompile(Longitude)
- rxDNSName = regexp.MustCompile(DNSName)
- rxURL = regexp.MustCompile(URL)
- rxSSN = regexp.MustCompile(SSN)
- rxWinPath = regexp.MustCompile(WinPath)
- rxUnixPath = regexp.MustCompile(UnixPath)
- rxARWinPath = regexp.MustCompile(WinARPath)
- rxARUnixPath = regexp.MustCompile(UnixARPath)
- rxSemver = regexp.MustCompile(Semver)
- rxHasLowerCase = regexp.MustCompile(hasLowerCase)
- rxHasUpperCase = regexp.MustCompile(hasUpperCase)
- rxHasWhitespace = regexp.MustCompile(hasWhitespace)
- rxHasWhitespaceOnly = regexp.MustCompile(hasWhitespaceOnly)
- rxIMEI = regexp.MustCompile(IMEI)
- rxIMSI = regexp.MustCompile(IMSI)
- rxE164 = regexp.MustCompile(E164)
-)
diff --git a/vendor/github.com/asaskevich/govalidator/v11/types.go b/vendor/github.com/asaskevich/govalidator/v11/types.go
deleted file mode 100644
index 6347d5fa6e60..000000000000
--- a/vendor/github.com/asaskevich/govalidator/v11/types.go
+++ /dev/null
@@ -1,657 +0,0 @@
-package govalidator
-
-import (
- "reflect"
- "regexp"
- "sort"
- "sync"
-)
-
-// Validator is a wrapper for a validator function that returns bool and accepts string.
-type Validator func(str string) bool
-
-// CustomTypeValidator is a wrapper for validator functions that returns bool and accepts any type.
-// The second parameter should be the context (in the case of validating a struct: the whole object being validated).
-type CustomTypeValidator func(i interface{}, o interface{}) bool
-
-// ParamValidator is a wrapper for validator functions that accept additional parameters.
-type ParamValidator func(str string, params ...string) bool
-
-// InterfaceParamValidator is a wrapper for functions that accept variants parameters for an interface value
-type InterfaceParamValidator func(in interface{}, params ...string) bool
-type tagOptionsMap map[string]tagOption
-
-func (t tagOptionsMap) orderedKeys() []string {
- var keys []string
- for k := range t {
- keys = append(keys, k)
- }
-
- sort.Slice(keys, func(a, b int) bool {
- return t[keys[a]].order < t[keys[b]].order
- })
-
- return keys
-}
-
-type tagOption struct {
- name string
- customErrorMessage string
- order int
-}
-
-// UnsupportedTypeError is a wrapper for reflect.Type
-type UnsupportedTypeError struct {
- Type reflect.Type
-}
-
-// stringValues is a slice of reflect.Value holding *reflect.StringValue.
-// It implements the methods to sort by string.
-type stringValues []reflect.Value
-
-// InterfaceParamTagMap is a map of functions accept variants parameters for an interface value
-var InterfaceParamTagMap = map[string]InterfaceParamValidator{
- "type": IsType,
-}
-
-// InterfaceParamTagRegexMap maps interface param tags to their respective regexes.
-var InterfaceParamTagRegexMap = map[string]*regexp.Regexp{
- "type": regexp.MustCompile(`^type\((.*)\)$`),
-}
-
-// ParamTagMap is a map of functions accept variants parameters
-var ParamTagMap = map[string]ParamValidator{
- "length": ByteLength,
- "range": Range,
- "runelength": RuneLength,
- "stringlength": StringLength,
- "matches": StringMatches,
- "in": IsInRaw,
- "rsapub": IsRsaPub,
- "minstringlength": MinStringLength,
- "maxstringlength": MaxStringLength,
-}
-
-// ParamTagRegexMap maps param tags to their respective regexes.
-var ParamTagRegexMap = map[string]*regexp.Regexp{
- "range": regexp.MustCompile("^range\\((\\d+)\\|(\\d+)\\)$"),
- "length": regexp.MustCompile("^length\\((\\d+)\\|(\\d+)\\)$"),
- "runelength": regexp.MustCompile("^runelength\\((\\d+)\\|(\\d+)\\)$"),
- "stringlength": regexp.MustCompile("^stringlength\\((\\d+)\\|(\\d+)\\)$"),
- "in": regexp.MustCompile(`^in\((.*)\)`),
- "matches": regexp.MustCompile(`^matches\((.+)\)$`),
- "rsapub": regexp.MustCompile("^rsapub\\((\\d+)\\)$"),
- "minstringlength": regexp.MustCompile("^minstringlength\\((\\d+)\\)$"),
- "maxstringlength": regexp.MustCompile("^maxstringlength\\((\\d+)\\)$"),
-}
-
-type customTypeTagMap struct {
- validators map[string]CustomTypeValidator
-
- sync.RWMutex
-}
-
-func (tm *customTypeTagMap) Get(name string) (CustomTypeValidator, bool) {
- tm.RLock()
- defer tm.RUnlock()
- v, ok := tm.validators[name]
- return v, ok
-}
-
-func (tm *customTypeTagMap) Set(name string, ctv CustomTypeValidator) {
- tm.Lock()
- defer tm.Unlock()
- tm.validators[name] = ctv
-}
-
-// CustomTypeTagMap is a map of functions that can be used as tags for ValidateStruct function.
-// Use this to validate compound or custom types that need to be handled as a whole, e.g.
-// `type UUID [16]byte` (this would be handled as an array of bytes).
-var CustomTypeTagMap = &customTypeTagMap{validators: make(map[string]CustomTypeValidator)}
-
-// TagMap is a map of functions, that can be used as tags for ValidateStruct function.
-var TagMap = map[string]Validator{
- "email": IsEmail,
- "url": IsURL,
- "dialstring": IsDialString,
- "requrl": IsRequestURL,
- "requri": IsRequestURI,
- "alpha": IsAlpha,
- "utfletter": IsUTFLetter,
- "alphanum": IsAlphanumeric,
- "utfletternum": IsUTFLetterNumeric,
- "numeric": IsNumeric,
- "utfnumeric": IsUTFNumeric,
- "utfdigit": IsUTFDigit,
- "hexadecimal": IsHexadecimal,
- "hexcolor": IsHexcolor,
- "rgbcolor": IsRGBcolor,
- "lowercase": IsLowerCase,
- "uppercase": IsUpperCase,
- "int": IsInt,
- "float": IsFloat,
- "null": IsNull,
- "notnull": IsNotNull,
- "uuid": IsUUID,
- "uuidv3": IsUUIDv3,
- "uuidv4": IsUUIDv4,
- "uuidv5": IsUUIDv5,
- "creditcard": IsCreditCard,
- "isbn10": IsISBN10,
- "isbn13": IsISBN13,
- "json": IsJSON,
- "multibyte": IsMultibyte,
- "ascii": IsASCII,
- "printableascii": IsPrintableASCII,
- "fullwidth": IsFullWidth,
- "halfwidth": IsHalfWidth,
- "variablewidth": IsVariableWidth,
- "base64": IsBase64,
- "datauri": IsDataURI,
- "ip": IsIP,
- "port": IsPort,
- "ipv4": IsIPv4,
- "ipv6": IsIPv6,
- "dns": IsDNSName,
- "host": IsHost,
- "mac": IsMAC,
- "latitude": IsLatitude,
- "longitude": IsLongitude,
- "ssn": IsSSN,
- "semver": IsSemver,
- "rfc3339": IsRFC3339,
- "rfc3339WithoutZone": IsRFC3339WithoutZone,
- "ISO3166Alpha2": IsISO3166Alpha2,
- "ISO3166Alpha3": IsISO3166Alpha3,
- "ISO4217": IsISO4217,
- "IMEI": IsIMEI,
- "ulid": IsULID,
- "yyyymmdd": IsYYYYMMDD,
-}
-
-// ISO3166Entry stores country codes
-type ISO3166Entry struct {
- EnglishShortName string
- FrenchShortName string
- Alpha2Code string
- Alpha3Code string
- Numeric string
-}
-
-//ISO3166List based on https://www.iso.org/obp/ui/#search/code/ Code Type "Officially Assigned Codes"
-var ISO3166List = []ISO3166Entry{
- {"Afghanistan", "Afghanistan (l')", "AF", "AFG", "004"},
- {"Albania", "Albanie (l')", "AL", "ALB", "008"},
- {"Antarctica", "Antarctique (l')", "AQ", "ATA", "010"},
- {"Algeria", "Algérie (l')", "DZ", "DZA", "012"},
- {"American Samoa", "Samoa américaines (les)", "AS", "ASM", "016"},
- {"Andorra", "Andorre (l')", "AD", "AND", "020"},
- {"Angola", "Angola (l')", "AO", "AGO", "024"},
- {"Antigua and Barbuda", "Antigua-et-Barbuda", "AG", "ATG", "028"},
- {"Azerbaijan", "Azerbaïdjan (l')", "AZ", "AZE", "031"},
- {"Argentina", "Argentine (l')", "AR", "ARG", "032"},
- {"Australia", "Australie (l')", "AU", "AUS", "036"},
- {"Austria", "Autriche (l')", "AT", "AUT", "040"},
- {"Bahamas (the)", "Bahamas (les)", "BS", "BHS", "044"},
- {"Bahrain", "Bahreïn", "BH", "BHR", "048"},
- {"Bangladesh", "Bangladesh (le)", "BD", "BGD", "050"},
- {"Armenia", "Arménie (l')", "AM", "ARM", "051"},
- {"Barbados", "Barbade (la)", "BB", "BRB", "052"},
- {"Belgium", "Belgique (la)", "BE", "BEL", "056"},
- {"Bermuda", "Bermudes (les)", "BM", "BMU", "060"},
- {"Bhutan", "Bhoutan (le)", "BT", "BTN", "064"},
- {"Bolivia (Plurinational State of)", "Bolivie (État plurinational de)", "BO", "BOL", "068"},
- {"Bosnia and Herzegovina", "Bosnie-Herzégovine (la)", "BA", "BIH", "070"},
- {"Botswana", "Botswana (le)", "BW", "BWA", "072"},
- {"Bouvet Island", "Bouvet (l'Île)", "BV", "BVT", "074"},
- {"Brazil", "Brésil (le)", "BR", "BRA", "076"},
- {"Belize", "Belize (le)", "BZ", "BLZ", "084"},
- {"British Indian Ocean Territory (the)", "Indien (le Territoire britannique de l'océan)", "IO", "IOT", "086"},
- {"Solomon Islands", "Salomon (Îles)", "SB", "SLB", "090"},
- {"Virgin Islands (British)", "Vierges britanniques (les Îles)", "VG", "VGB", "092"},
- {"Brunei Darussalam", "Brunéi Darussalam (le)", "BN", "BRN", "096"},
- {"Bulgaria", "Bulgarie (la)", "BG", "BGR", "100"},
- {"Myanmar", "Myanmar (le)", "MM", "MMR", "104"},
- {"Burundi", "Burundi (le)", "BI", "BDI", "108"},
- {"Belarus", "Bélarus (le)", "BY", "BLR", "112"},
- {"Cambodia", "Cambodge (le)", "KH", "KHM", "116"},
- {"Cameroon", "Cameroun (le)", "CM", "CMR", "120"},
- {"Canada", "Canada (le)", "CA", "CAN", "124"},
- {"Cabo Verde", "Cabo Verde", "CV", "CPV", "132"},
- {"Cayman Islands (the)", "Caïmans (les Îles)", "KY", "CYM", "136"},
- {"Central African Republic (the)", "République centrafricaine (la)", "CF", "CAF", "140"},
- {"Sri Lanka", "Sri Lanka", "LK", "LKA", "144"},
- {"Chad", "Tchad (le)", "TD", "TCD", "148"},
- {"Chile", "Chili (le)", "CL", "CHL", "152"},
- {"China", "Chine (la)", "CN", "CHN", "156"},
- {"Taiwan (Province of China)", "Taïwan (Province de Chine)", "TW", "TWN", "158"},
- {"Christmas Island", "Christmas (l'Île)", "CX", "CXR", "162"},
- {"Cocos (Keeling) Islands (the)", "Cocos (les Îles)/ Keeling (les Îles)", "CC", "CCK", "166"},
- {"Colombia", "Colombie (la)", "CO", "COL", "170"},
- {"Comoros (the)", "Comores (les)", "KM", "COM", "174"},
- {"Mayotte", "Mayotte", "YT", "MYT", "175"},
- {"Congo (the)", "Congo (le)", "CG", "COG", "178"},
- {"Congo (the Democratic Republic of the)", "Congo (la République démocratique du)", "CD", "COD", "180"},
- {"Cook Islands (the)", "Cook (les Îles)", "CK", "COK", "184"},
- {"Costa Rica", "Costa Rica (le)", "CR", "CRI", "188"},
- {"Croatia", "Croatie (la)", "HR", "HRV", "191"},
- {"Cuba", "Cuba", "CU", "CUB", "192"},
- {"Cyprus", "Chypre", "CY", "CYP", "196"},
- {"Czech Republic (the)", "tchèque (la République)", "CZ", "CZE", "203"},
- {"Benin", "Bénin (le)", "BJ", "BEN", "204"},
- {"Denmark", "Danemark (le)", "DK", "DNK", "208"},
- {"Dominica", "Dominique (la)", "DM", "DMA", "212"},
- {"Dominican Republic (the)", "dominicaine (la République)", "DO", "DOM", "214"},
- {"Ecuador", "Équateur (l')", "EC", "ECU", "218"},
- {"El Salvador", "El Salvador", "SV", "SLV", "222"},
- {"Equatorial Guinea", "Guinée équatoriale (la)", "GQ", "GNQ", "226"},
- {"Ethiopia", "Éthiopie (l')", "ET", "ETH", "231"},
- {"Eritrea", "Érythrée (l')", "ER", "ERI", "232"},
- {"Estonia", "Estonie (l')", "EE", "EST", "233"},
- {"Faroe Islands (the)", "Féroé (les Îles)", "FO", "FRO", "234"},
- {"Falkland Islands (the) [Malvinas]", "Falkland (les Îles)/Malouines (les Îles)", "FK", "FLK", "238"},
- {"South Georgia and the South Sandwich Islands", "Géorgie du Sud-et-les Îles Sandwich du Sud (la)", "GS", "SGS", "239"},
- {"Fiji", "Fidji (les)", "FJ", "FJI", "242"},
- {"Finland", "Finlande (la)", "FI", "FIN", "246"},
- {"Åland Islands", "Åland(les Îles)", "AX", "ALA", "248"},
- {"France", "France (la)", "FR", "FRA", "250"},
- {"French Guiana", "Guyane française (la )", "GF", "GUF", "254"},
- {"French Polynesia", "Polynésie française (la)", "PF", "PYF", "258"},
- {"French Southern Territories (the)", "Terres australes françaises (les)", "TF", "ATF", "260"},
- {"Djibouti", "Djibouti", "DJ", "DJI", "262"},
- {"Gabon", "Gabon (le)", "GA", "GAB", "266"},
- {"Georgia", "Géorgie (la)", "GE", "GEO", "268"},
- {"Gambia (the)", "Gambie (la)", "GM", "GMB", "270"},
- {"Palestine, State of", "Palestine, État de", "PS", "PSE", "275"},
- {"Germany", "Allemagne (l')", "DE", "DEU", "276"},
- {"Ghana", "Ghana (le)", "GH", "GHA", "288"},
- {"Gibraltar", "Gibraltar", "GI", "GIB", "292"},
- {"Kiribati", "Kiribati", "KI", "KIR", "296"},
- {"Greece", "Grèce (la)", "GR", "GRC", "300"},
- {"Greenland", "Groenland (le)", "GL", "GRL", "304"},
- {"Grenada", "Grenade (la)", "GD", "GRD", "308"},
- {"Guadeloupe", "Guadeloupe (la)", "GP", "GLP", "312"},
- {"Guam", "Guam", "GU", "GUM", "316"},
- {"Guatemala", "Guatemala (le)", "GT", "GTM", "320"},
- {"Guinea", "Guinée (la)", "GN", "GIN", "324"},
- {"Guyana", "Guyana (le)", "GY", "GUY", "328"},
- {"Haiti", "Haïti", "HT", "HTI", "332"},
- {"Heard Island and McDonald Islands", "Heard-et-Îles MacDonald (l'Île)", "HM", "HMD", "334"},
- {"Holy See (the)", "Saint-Siège (le)", "VA", "VAT", "336"},
- {"Honduras", "Honduras (le)", "HN", "HND", "340"},
- {"Hong Kong", "Hong Kong", "HK", "HKG", "344"},
- {"Hungary", "Hongrie (la)", "HU", "HUN", "348"},
- {"Iceland", "Islande (l')", "IS", "ISL", "352"},
- {"India", "Inde (l')", "IN", "IND", "356"},
- {"Indonesia", "Indonésie (l')", "ID", "IDN", "360"},
- {"Iran (Islamic Republic of)", "Iran (République Islamique d')", "IR", "IRN", "364"},
- {"Iraq", "Iraq (l')", "IQ", "IRQ", "368"},
- {"Ireland", "Irlande (l')", "IE", "IRL", "372"},
- {"Israel", "Israël", "IL", "ISR", "376"},
- {"Italy", "Italie (l')", "IT", "ITA", "380"},
- {"Côte d'Ivoire", "Côte d'Ivoire (la)", "CI", "CIV", "384"},
- {"Jamaica", "Jamaïque (la)", "JM", "JAM", "388"},
- {"Japan", "Japon (le)", "JP", "JPN", "392"},
- {"Kazakhstan", "Kazakhstan (le)", "KZ", "KAZ", "398"},
- {"Jordan", "Jordanie (la)", "JO", "JOR", "400"},
- {"Kenya", "Kenya (le)", "KE", "KEN", "404"},
- {"Korea (the Democratic People's Republic of)", "Corée (la République populaire démocratique de)", "KP", "PRK", "408"},
- {"Korea (the Republic of)", "Corée (la République de)", "KR", "KOR", "410"},
- {"Kuwait", "Koweït (le)", "KW", "KWT", "414"},
- {"Kyrgyzstan", "Kirghizistan (le)", "KG", "KGZ", "417"},
- {"Lao People's Democratic Republic (the)", "Lao, République démocratique populaire", "LA", "LAO", "418"},
- {"Lebanon", "Liban (le)", "LB", "LBN", "422"},
- {"Lesotho", "Lesotho (le)", "LS", "LSO", "426"},
- {"Latvia", "Lettonie (la)", "LV", "LVA", "428"},
- {"Liberia", "Libéria (le)", "LR", "LBR", "430"},
- {"Libya", "Libye (la)", "LY", "LBY", "434"},
- {"Liechtenstein", "Liechtenstein (le)", "LI", "LIE", "438"},
- {"Lithuania", "Lituanie (la)", "LT", "LTU", "440"},
- {"Luxembourg", "Luxembourg (le)", "LU", "LUX", "442"},
- {"Macao", "Macao", "MO", "MAC", "446"},
- {"Madagascar", "Madagascar", "MG", "MDG", "450"},
- {"Malawi", "Malawi (le)", "MW", "MWI", "454"},
- {"Malaysia", "Malaisie (la)", "MY", "MYS", "458"},
- {"Maldives", "Maldives (les)", "MV", "MDV", "462"},
- {"Mali", "Mali (le)", "ML", "MLI", "466"},
- {"Malta", "Malte", "MT", "MLT", "470"},
- {"Martinique", "Martinique (la)", "MQ", "MTQ", "474"},
- {"Mauritania", "Mauritanie (la)", "MR", "MRT", "478"},
- {"Mauritius", "Maurice", "MU", "MUS", "480"},
- {"Mexico", "Mexique (le)", "MX", "MEX", "484"},
- {"Monaco", "Monaco", "MC", "MCO", "492"},
- {"Mongolia", "Mongolie (la)", "MN", "MNG", "496"},
- {"Moldova (the Republic of)", "Moldova , République de", "MD", "MDA", "498"},
- {"Montenegro", "Monténégro (le)", "ME", "MNE", "499"},
- {"Montserrat", "Montserrat", "MS", "MSR", "500"},
- {"Morocco", "Maroc (le)", "MA", "MAR", "504"},
- {"Mozambique", "Mozambique (le)", "MZ", "MOZ", "508"},
- {"Oman", "Oman", "OM", "OMN", "512"},
- {"Namibia", "Namibie (la)", "NA", "NAM", "516"},
- {"Nauru", "Nauru", "NR", "NRU", "520"},
- {"Nepal", "Népal (le)", "NP", "NPL", "524"},
- {"Netherlands (the)", "Pays-Bas (les)", "NL", "NLD", "528"},
- {"Curaçao", "Curaçao", "CW", "CUW", "531"},
- {"Aruba", "Aruba", "AW", "ABW", "533"},
- {"Sint Maarten (Dutch part)", "Saint-Martin (partie néerlandaise)", "SX", "SXM", "534"},
- {"Bonaire, Sint Eustatius and Saba", "Bonaire, Saint-Eustache et Saba", "BQ", "BES", "535"},
- {"New Caledonia", "Nouvelle-Calédonie (la)", "NC", "NCL", "540"},
- {"Vanuatu", "Vanuatu (le)", "VU", "VUT", "548"},
- {"New Zealand", "Nouvelle-Zélande (la)", "NZ", "NZL", "554"},
- {"Nicaragua", "Nicaragua (le)", "NI", "NIC", "558"},
- {"Niger (the)", "Niger (le)", "NE", "NER", "562"},
- {"Nigeria", "Nigéria (le)", "NG", "NGA", "566"},
- {"Niue", "Niue", "NU", "NIU", "570"},
- {"Norfolk Island", "Norfolk (l'Île)", "NF", "NFK", "574"},
- {"Norway", "Norvège (la)", "NO", "NOR", "578"},
- {"Northern Mariana Islands (the)", "Mariannes du Nord (les Îles)", "MP", "MNP", "580"},
- {"United States Minor Outlying Islands (the)", "Îles mineures éloignées des États-Unis (les)", "UM", "UMI", "581"},
- {"Micronesia (Federated States of)", "Micronésie (États fédérés de)", "FM", "FSM", "583"},
- {"Marshall Islands (the)", "Marshall (Îles)", "MH", "MHL", "584"},
- {"Palau", "Palaos (les)", "PW", "PLW", "585"},
- {"Pakistan", "Pakistan (le)", "PK", "PAK", "586"},
- {"Panama", "Panama (le)", "PA", "PAN", "591"},
- {"Papua New Guinea", "Papouasie-Nouvelle-Guinée (la)", "PG", "PNG", "598"},
- {"Paraguay", "Paraguay (le)", "PY", "PRY", "600"},
- {"Peru", "Pérou (le)", "PE", "PER", "604"},
- {"Philippines (the)", "Philippines (les)", "PH", "PHL", "608"},
- {"Pitcairn", "Pitcairn", "PN", "PCN", "612"},
- {"Poland", "Pologne (la)", "PL", "POL", "616"},
- {"Portugal", "Portugal (le)", "PT", "PRT", "620"},
- {"Guinea-Bissau", "Guinée-Bissau (la)", "GW", "GNB", "624"},
- {"Timor-Leste", "Timor-Leste (le)", "TL", "TLS", "626"},
- {"Puerto Rico", "Porto Rico", "PR", "PRI", "630"},
- {"Qatar", "Qatar (le)", "QA", "QAT", "634"},
- {"Réunion", "Réunion (La)", "RE", "REU", "638"},
- {"Romania", "Roumanie (la)", "RO", "ROU", "642"},
- {"Russian Federation (the)", "Russie (la Fédération de)", "RU", "RUS", "643"},
- {"Rwanda", "Rwanda (le)", "RW", "RWA", "646"},
- {"Saint Barthélemy", "Saint-Barthélemy", "BL", "BLM", "652"},
- {"Saint Helena, Ascension and Tristan da Cunha", "Sainte-Hélène, Ascension et Tristan da Cunha", "SH", "SHN", "654"},
- {"Saint Kitts and Nevis", "Saint-Kitts-et-Nevis", "KN", "KNA", "659"},
- {"Anguilla", "Anguilla", "AI", "AIA", "660"},
- {"Saint Lucia", "Sainte-Lucie", "LC", "LCA", "662"},
- {"Saint Martin (French part)", "Saint-Martin (partie française)", "MF", "MAF", "663"},
- {"Saint Pierre and Miquelon", "Saint-Pierre-et-Miquelon", "PM", "SPM", "666"},
- {"Saint Vincent and the Grenadines", "Saint-Vincent-et-les Grenadines", "VC", "VCT", "670"},
- {"San Marino", "Saint-Marin", "SM", "SMR", "674"},
- {"Sao Tome and Principe", "Sao Tomé-et-Principe", "ST", "STP", "678"},
- {"Saudi Arabia", "Arabie saoudite (l')", "SA", "SAU", "682"},
- {"Senegal", "Sénégal (le)", "SN", "SEN", "686"},
- {"Serbia", "Serbie (la)", "RS", "SRB", "688"},
- {"Seychelles", "Seychelles (les)", "SC", "SYC", "690"},
- {"Sierra Leone", "Sierra Leone (la)", "SL", "SLE", "694"},
- {"Singapore", "Singapour", "SG", "SGP", "702"},
- {"Slovakia", "Slovaquie (la)", "SK", "SVK", "703"},
- {"Viet Nam", "Viet Nam (le)", "VN", "VNM", "704"},
- {"Slovenia", "Slovénie (la)", "SI", "SVN", "705"},
- {"Somalia", "Somalie (la)", "SO", "SOM", "706"},
- {"South Africa", "Afrique du Sud (l')", "ZA", "ZAF", "710"},
- {"Zimbabwe", "Zimbabwe (le)", "ZW", "ZWE", "716"},
- {"Spain", "Espagne (l')", "ES", "ESP", "724"},
- {"South Sudan", "Soudan du Sud (le)", "SS", "SSD", "728"},
- {"Sudan (the)", "Soudan (le)", "SD", "SDN", "729"},
- {"Western Sahara*", "Sahara occidental (le)*", "EH", "ESH", "732"},
- {"Suriname", "Suriname (le)", "SR", "SUR", "740"},
- {"Svalbard and Jan Mayen", "Svalbard et l'Île Jan Mayen (le)", "SJ", "SJM", "744"},
- {"Swaziland", "Swaziland (le)", "SZ", "SWZ", "748"},
- {"Sweden", "Suède (la)", "SE", "SWE", "752"},
- {"Switzerland", "Suisse (la)", "CH", "CHE", "756"},
- {"Syrian Arab Republic", "République arabe syrienne (la)", "SY", "SYR", "760"},
- {"Tajikistan", "Tadjikistan (le)", "TJ", "TJK", "762"},
- {"Thailand", "Thaïlande (la)", "TH", "THA", "764"},
- {"Togo", "Togo (le)", "TG", "TGO", "768"},
- {"Tokelau", "Tokelau (les)", "TK", "TKL", "772"},
- {"Tonga", "Tonga (les)", "TO", "TON", "776"},
- {"Trinidad and Tobago", "Trinité-et-Tobago (la)", "TT", "TTO", "780"},
- {"United Arab Emirates (the)", "Émirats arabes unis (les)", "AE", "ARE", "784"},
- {"Tunisia", "Tunisie (la)", "TN", "TUN", "788"},
- {"Turkey", "Turquie (la)", "TR", "TUR", "792"},
- {"Turkmenistan", "Turkménistan (le)", "TM", "TKM", "795"},
- {"Turks and Caicos Islands (the)", "Turks-et-Caïcos (les Îles)", "TC", "TCA", "796"},
- {"Tuvalu", "Tuvalu (les)", "TV", "TUV", "798"},
- {"Uganda", "Ouganda (l')", "UG", "UGA", "800"},
- {"Ukraine", "Ukraine (l')", "UA", "UKR", "804"},
- {"Macedonia (the former Yugoslav Republic of)", "Macédoine (l'ex‑République yougoslave de)", "MK", "MKD", "807"},
- {"Egypt", "Égypte (l')", "EG", "EGY", "818"},
- {"United Kingdom of Great Britain and Northern Ireland (the)", "Royaume-Uni de Grande-Bretagne et d'Irlande du Nord (le)", "GB", "GBR", "826"},
- {"Guernsey", "Guernesey", "GG", "GGY", "831"},
- {"Jersey", "Jersey", "JE", "JEY", "832"},
- {"Isle of Man", "Île de Man", "IM", "IMN", "833"},
- {"Tanzania, United Republic of", "Tanzanie, République-Unie de", "TZ", "TZA", "834"},
- {"United States of America (the)", "États-Unis d'Amérique (les)", "US", "USA", "840"},
- {"Virgin Islands (U.S.)", "Vierges des États-Unis (les Îles)", "VI", "VIR", "850"},
- {"Burkina Faso", "Burkina Faso (le)", "BF", "BFA", "854"},
- {"Uruguay", "Uruguay (l')", "UY", "URY", "858"},
- {"Uzbekistan", "Ouzbékistan (l')", "UZ", "UZB", "860"},
- {"Venezuela (Bolivarian Republic of)", "Venezuela (République bolivarienne du)", "VE", "VEN", "862"},
- {"Wallis and Futuna", "Wallis-et-Futuna", "WF", "WLF", "876"},
- {"Samoa", "Samoa (le)", "WS", "WSM", "882"},
- {"Yemen", "Yémen (le)", "YE", "YEM", "887"},
- {"Zambia", "Zambie (la)", "ZM", "ZMB", "894"},
-}
-
-// ISO4217List is the list of ISO currency codes
-var ISO4217List = []string{
- "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN",
- "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD",
- "CAD", "CDF", "CHE", "CHF", "CHW", "CLF", "CLP", "CNY", "COP", "COU", "CRC", "CUC", "CUP", "CVE", "CZK",
- "DJF", "DKK", "DOP", "DZD",
- "EGP", "ERN", "ETB", "EUR",
- "FJD", "FKP",
- "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD",
- "HKD", "HNL", "HRK", "HTG", "HUF",
- "IDR", "ILS", "INR", "IQD", "IRR", "ISK",
- "JMD", "JOD", "JPY",
- "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT",
- "LAK", "LBP", "LKR", "LRD", "LSL", "LYD",
- "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRO", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN",
- "NAD", "NGN", "NIO", "NOK", "NPR", "NZD",
- "OMR",
- "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG",
- "QAR",
- "RON", "RSD", "RUB", "RWF",
- "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SRD", "SSP", "STD", "STN", "SVC", "SYP", "SZL",
- "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS",
- "UAH", "UGX", "USD", "USN", "UYI", "UYU", "UYW", "UZS",
- "VEF", "VES", "VND", "VUV",
- "WST",
- "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "XSU", "XTS", "XUA", "XXX",
- "YER",
- "ZAR", "ZMW", "ZWL",
-}
-
-// ISO693Entry stores ISO language codes
-type ISO693Entry struct {
- Alpha3bCode string
- Alpha2Code string
- English string
-}
-
-//ISO693List based on http://data.okfn.org/data/core/language-codes/r/language-codes-3b2.json
-var ISO693List = []ISO693Entry{
- {Alpha3bCode: "aar", Alpha2Code: "aa", English: "Afar"},
- {Alpha3bCode: "abk", Alpha2Code: "ab", English: "Abkhazian"},
- {Alpha3bCode: "afr", Alpha2Code: "af", English: "Afrikaans"},
- {Alpha3bCode: "aka", Alpha2Code: "ak", English: "Akan"},
- {Alpha3bCode: "alb", Alpha2Code: "sq", English: "Albanian"},
- {Alpha3bCode: "amh", Alpha2Code: "am", English: "Amharic"},
- {Alpha3bCode: "ara", Alpha2Code: "ar", English: "Arabic"},
- {Alpha3bCode: "arg", Alpha2Code: "an", English: "Aragonese"},
- {Alpha3bCode: "arm", Alpha2Code: "hy", English: "Armenian"},
- {Alpha3bCode: "asm", Alpha2Code: "as", English: "Assamese"},
- {Alpha3bCode: "ava", Alpha2Code: "av", English: "Avaric"},
- {Alpha3bCode: "ave", Alpha2Code: "ae", English: "Avestan"},
- {Alpha3bCode: "aym", Alpha2Code: "ay", English: "Aymara"},
- {Alpha3bCode: "aze", Alpha2Code: "az", English: "Azerbaijani"},
- {Alpha3bCode: "bak", Alpha2Code: "ba", English: "Bashkir"},
- {Alpha3bCode: "bam", Alpha2Code: "bm", English: "Bambara"},
- {Alpha3bCode: "baq", Alpha2Code: "eu", English: "Basque"},
- {Alpha3bCode: "bel", Alpha2Code: "be", English: "Belarusian"},
- {Alpha3bCode: "ben", Alpha2Code: "bn", English: "Bengali"},
- {Alpha3bCode: "bih", Alpha2Code: "bh", English: "Bihari languages"},
- {Alpha3bCode: "bis", Alpha2Code: "bi", English: "Bislama"},
- {Alpha3bCode: "bos", Alpha2Code: "bs", English: "Bosnian"},
- {Alpha3bCode: "bre", Alpha2Code: "br", English: "Breton"},
- {Alpha3bCode: "bul", Alpha2Code: "bg", English: "Bulgarian"},
- {Alpha3bCode: "bur", Alpha2Code: "my", English: "Burmese"},
- {Alpha3bCode: "cat", Alpha2Code: "ca", English: "Catalan; Valencian"},
- {Alpha3bCode: "cha", Alpha2Code: "ch", English: "Chamorro"},
- {Alpha3bCode: "che", Alpha2Code: "ce", English: "Chechen"},
- {Alpha3bCode: "chi", Alpha2Code: "zh", English: "Chinese"},
- {Alpha3bCode: "chu", Alpha2Code: "cu", English: "Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic"},
- {Alpha3bCode: "chv", Alpha2Code: "cv", English: "Chuvash"},
- {Alpha3bCode: "cor", Alpha2Code: "kw", English: "Cornish"},
- {Alpha3bCode: "cos", Alpha2Code: "co", English: "Corsican"},
- {Alpha3bCode: "cre", Alpha2Code: "cr", English: "Cree"},
- {Alpha3bCode: "cze", Alpha2Code: "cs", English: "Czech"},
- {Alpha3bCode: "dan", Alpha2Code: "da", English: "Danish"},
- {Alpha3bCode: "div", Alpha2Code: "dv", English: "Divehi; Dhivehi; Maldivian"},
- {Alpha3bCode: "dut", Alpha2Code: "nl", English: "Dutch; Flemish"},
- {Alpha3bCode: "dzo", Alpha2Code: "dz", English: "Dzongkha"},
- {Alpha3bCode: "eng", Alpha2Code: "en", English: "English"},
- {Alpha3bCode: "epo", Alpha2Code: "eo", English: "Esperanto"},
- {Alpha3bCode: "est", Alpha2Code: "et", English: "Estonian"},
- {Alpha3bCode: "ewe", Alpha2Code: "ee", English: "Ewe"},
- {Alpha3bCode: "fao", Alpha2Code: "fo", English: "Faroese"},
- {Alpha3bCode: "fij", Alpha2Code: "fj", English: "Fijian"},
- {Alpha3bCode: "fin", Alpha2Code: "fi", English: "Finnish"},
- {Alpha3bCode: "fre", Alpha2Code: "fr", English: "French"},
- {Alpha3bCode: "fry", Alpha2Code: "fy", English: "Western Frisian"},
- {Alpha3bCode: "ful", Alpha2Code: "ff", English: "Fulah"},
- {Alpha3bCode: "geo", Alpha2Code: "ka", English: "Georgian"},
- {Alpha3bCode: "ger", Alpha2Code: "de", English: "German"},
- {Alpha3bCode: "gla", Alpha2Code: "gd", English: "Gaelic; Scottish Gaelic"},
- {Alpha3bCode: "gle", Alpha2Code: "ga", English: "Irish"},
- {Alpha3bCode: "glg", Alpha2Code: "gl", English: "Galician"},
- {Alpha3bCode: "glv", Alpha2Code: "gv", English: "Manx"},
- {Alpha3bCode: "gre", Alpha2Code: "el", English: "Greek, Modern (1453-)"},
- {Alpha3bCode: "grn", Alpha2Code: "gn", English: "Guarani"},
- {Alpha3bCode: "guj", Alpha2Code: "gu", English: "Gujarati"},
- {Alpha3bCode: "hat", Alpha2Code: "ht", English: "Haitian; Haitian Creole"},
- {Alpha3bCode: "hau", Alpha2Code: "ha", English: "Hausa"},
- {Alpha3bCode: "heb", Alpha2Code: "he", English: "Hebrew"},
- {Alpha3bCode: "her", Alpha2Code: "hz", English: "Herero"},
- {Alpha3bCode: "hin", Alpha2Code: "hi", English: "Hindi"},
- {Alpha3bCode: "hmo", Alpha2Code: "ho", English: "Hiri Motu"},
- {Alpha3bCode: "hrv", Alpha2Code: "hr", English: "Croatian"},
- {Alpha3bCode: "hun", Alpha2Code: "hu", English: "Hungarian"},
- {Alpha3bCode: "ibo", Alpha2Code: "ig", English: "Igbo"},
- {Alpha3bCode: "ice", Alpha2Code: "is", English: "Icelandic"},
- {Alpha3bCode: "ido", Alpha2Code: "io", English: "Ido"},
- {Alpha3bCode: "iii", Alpha2Code: "ii", English: "Sichuan Yi; Nuosu"},
- {Alpha3bCode: "iku", Alpha2Code: "iu", English: "Inuktitut"},
- {Alpha3bCode: "ile", Alpha2Code: "ie", English: "Interlingue; Occidental"},
- {Alpha3bCode: "ina", Alpha2Code: "ia", English: "Interlingua (International Auxiliary Language Association)"},
- {Alpha3bCode: "ind", Alpha2Code: "id", English: "Indonesian"},
- {Alpha3bCode: "ipk", Alpha2Code: "ik", English: "Inupiaq"},
- {Alpha3bCode: "ita", Alpha2Code: "it", English: "Italian"},
- {Alpha3bCode: "jav", Alpha2Code: "jv", English: "Javanese"},
- {Alpha3bCode: "jpn", Alpha2Code: "ja", English: "Japanese"},
- {Alpha3bCode: "kal", Alpha2Code: "kl", English: "Kalaallisut; Greenlandic"},
- {Alpha3bCode: "kan", Alpha2Code: "kn", English: "Kannada"},
- {Alpha3bCode: "kas", Alpha2Code: "ks", English: "Kashmiri"},
- {Alpha3bCode: "kau", Alpha2Code: "kr", English: "Kanuri"},
- {Alpha3bCode: "kaz", Alpha2Code: "kk", English: "Kazakh"},
- {Alpha3bCode: "khm", Alpha2Code: "km", English: "Central Khmer"},
- {Alpha3bCode: "kik", Alpha2Code: "ki", English: "Kikuyu; Gikuyu"},
- {Alpha3bCode: "kin", Alpha2Code: "rw", English: "Kinyarwanda"},
- {Alpha3bCode: "kir", Alpha2Code: "ky", English: "Kirghiz; Kyrgyz"},
- {Alpha3bCode: "kom", Alpha2Code: "kv", English: "Komi"},
- {Alpha3bCode: "kon", Alpha2Code: "kg", English: "Kongo"},
- {Alpha3bCode: "kor", Alpha2Code: "ko", English: "Korean"},
- {Alpha3bCode: "kua", Alpha2Code: "kj", English: "Kuanyama; Kwanyama"},
- {Alpha3bCode: "kur", Alpha2Code: "ku", English: "Kurdish"},
- {Alpha3bCode: "lao", Alpha2Code: "lo", English: "Lao"},
- {Alpha3bCode: "lat", Alpha2Code: "la", English: "Latin"},
- {Alpha3bCode: "lav", Alpha2Code: "lv", English: "Latvian"},
- {Alpha3bCode: "lim", Alpha2Code: "li", English: "Limburgan; Limburger; Limburgish"},
- {Alpha3bCode: "lin", Alpha2Code: "ln", English: "Lingala"},
- {Alpha3bCode: "lit", Alpha2Code: "lt", English: "Lithuanian"},
- {Alpha3bCode: "ltz", Alpha2Code: "lb", English: "Luxembourgish; Letzeburgesch"},
- {Alpha3bCode: "lub", Alpha2Code: "lu", English: "Luba-Katanga"},
- {Alpha3bCode: "lug", Alpha2Code: "lg", English: "Ganda"},
- {Alpha3bCode: "mac", Alpha2Code: "mk", English: "Macedonian"},
- {Alpha3bCode: "mah", Alpha2Code: "mh", English: "Marshallese"},
- {Alpha3bCode: "mal", Alpha2Code: "ml", English: "Malayalam"},
- {Alpha3bCode: "mao", Alpha2Code: "mi", English: "Maori"},
- {Alpha3bCode: "mar", Alpha2Code: "mr", English: "Marathi"},
- {Alpha3bCode: "may", Alpha2Code: "ms", English: "Malay"},
- {Alpha3bCode: "mlg", Alpha2Code: "mg", English: "Malagasy"},
- {Alpha3bCode: "mlt", Alpha2Code: "mt", English: "Maltese"},
- {Alpha3bCode: "mon", Alpha2Code: "mn", English: "Mongolian"},
- {Alpha3bCode: "nau", Alpha2Code: "na", English: "Nauru"},
- {Alpha3bCode: "nav", Alpha2Code: "nv", English: "Navajo; Navaho"},
- {Alpha3bCode: "nbl", Alpha2Code: "nr", English: "Ndebele, South; South Ndebele"},
- {Alpha3bCode: "nde", Alpha2Code: "nd", English: "Ndebele, North; North Ndebele"},
- {Alpha3bCode: "ndo", Alpha2Code: "ng", English: "Ndonga"},
- {Alpha3bCode: "nep", Alpha2Code: "ne", English: "Nepali"},
- {Alpha3bCode: "nno", Alpha2Code: "nn", English: "Norwegian Nynorsk; Nynorsk, Norwegian"},
- {Alpha3bCode: "nob", Alpha2Code: "nb", English: "Bokmål, Norwegian; Norwegian Bokmål"},
- {Alpha3bCode: "nor", Alpha2Code: "no", English: "Norwegian"},
- {Alpha3bCode: "nya", Alpha2Code: "ny", English: "Chichewa; Chewa; Nyanja"},
- {Alpha3bCode: "oci", Alpha2Code: "oc", English: "Occitan (post 1500); Provençal"},
- {Alpha3bCode: "oji", Alpha2Code: "oj", English: "Ojibwa"},
- {Alpha3bCode: "ori", Alpha2Code: "or", English: "Oriya"},
- {Alpha3bCode: "orm", Alpha2Code: "om", English: "Oromo"},
- {Alpha3bCode: "oss", Alpha2Code: "os", English: "Ossetian; Ossetic"},
- {Alpha3bCode: "pan", Alpha2Code: "pa", English: "Panjabi; Punjabi"},
- {Alpha3bCode: "per", Alpha2Code: "fa", English: "Persian"},
- {Alpha3bCode: "pli", Alpha2Code: "pi", English: "Pali"},
- {Alpha3bCode: "pol", Alpha2Code: "pl", English: "Polish"},
- {Alpha3bCode: "por", Alpha2Code: "pt", English: "Portuguese"},
- {Alpha3bCode: "pus", Alpha2Code: "ps", English: "Pushto; Pashto"},
- {Alpha3bCode: "que", Alpha2Code: "qu", English: "Quechua"},
- {Alpha3bCode: "roh", Alpha2Code: "rm", English: "Romansh"},
- {Alpha3bCode: "rum", Alpha2Code: "ro", English: "Romanian; Moldavian; Moldovan"},
- {Alpha3bCode: "run", Alpha2Code: "rn", English: "Rundi"},
- {Alpha3bCode: "rus", Alpha2Code: "ru", English: "Russian"},
- {Alpha3bCode: "sag", Alpha2Code: "sg", English: "Sango"},
- {Alpha3bCode: "san", Alpha2Code: "sa", English: "Sanskrit"},
- {Alpha3bCode: "sin", Alpha2Code: "si", English: "Sinhala; Sinhalese"},
- {Alpha3bCode: "slo", Alpha2Code: "sk", English: "Slovak"},
- {Alpha3bCode: "slv", Alpha2Code: "sl", English: "Slovenian"},
- {Alpha3bCode: "sme", Alpha2Code: "se", English: "Northern Sami"},
- {Alpha3bCode: "smo", Alpha2Code: "sm", English: "Samoan"},
- {Alpha3bCode: "sna", Alpha2Code: "sn", English: "Shona"},
- {Alpha3bCode: "snd", Alpha2Code: "sd", English: "Sindhi"},
- {Alpha3bCode: "som", Alpha2Code: "so", English: "Somali"},
- {Alpha3bCode: "sot", Alpha2Code: "st", English: "Sotho, Southern"},
- {Alpha3bCode: "spa", Alpha2Code: "es", English: "Spanish; Castilian"},
- {Alpha3bCode: "srd", Alpha2Code: "sc", English: "Sardinian"},
- {Alpha3bCode: "srp", Alpha2Code: "sr", English: "Serbian"},
- {Alpha3bCode: "ssw", Alpha2Code: "ss", English: "Swati"},
- {Alpha3bCode: "sun", Alpha2Code: "su", English: "Sundanese"},
- {Alpha3bCode: "swa", Alpha2Code: "sw", English: "Swahili"},
- {Alpha3bCode: "swe", Alpha2Code: "sv", English: "Swedish"},
- {Alpha3bCode: "tah", Alpha2Code: "ty", English: "Tahitian"},
- {Alpha3bCode: "tam", Alpha2Code: "ta", English: "Tamil"},
- {Alpha3bCode: "tat", Alpha2Code: "tt", English: "Tatar"},
- {Alpha3bCode: "tel", Alpha2Code: "te", English: "Telugu"},
- {Alpha3bCode: "tgk", Alpha2Code: "tg", English: "Tajik"},
- {Alpha3bCode: "tgl", Alpha2Code: "tl", English: "Tagalog"},
- {Alpha3bCode: "tha", Alpha2Code: "th", English: "Thai"},
- {Alpha3bCode: "tib", Alpha2Code: "bo", English: "Tibetan"},
- {Alpha3bCode: "tir", Alpha2Code: "ti", English: "Tigrinya"},
- {Alpha3bCode: "ton", Alpha2Code: "to", English: "Tonga (Tonga Islands)"},
- {Alpha3bCode: "tsn", Alpha2Code: "tn", English: "Tswana"},
- {Alpha3bCode: "tso", Alpha2Code: "ts", English: "Tsonga"},
- {Alpha3bCode: "tuk", Alpha2Code: "tk", English: "Turkmen"},
- {Alpha3bCode: "tur", Alpha2Code: "tr", English: "Turkish"},
- {Alpha3bCode: "twi", Alpha2Code: "tw", English: "Twi"},
- {Alpha3bCode: "uig", Alpha2Code: "ug", English: "Uighur; Uyghur"},
- {Alpha3bCode: "ukr", Alpha2Code: "uk", English: "Ukrainian"},
- {Alpha3bCode: "urd", Alpha2Code: "ur", English: "Urdu"},
- {Alpha3bCode: "uzb", Alpha2Code: "uz", English: "Uzbek"},
- {Alpha3bCode: "ven", Alpha2Code: "ve", English: "Venda"},
- {Alpha3bCode: "vie", Alpha2Code: "vi", English: "Vietnamese"},
- {Alpha3bCode: "vol", Alpha2Code: "vo", English: "Volapük"},
- {Alpha3bCode: "wel", Alpha2Code: "cy", English: "Welsh"},
- {Alpha3bCode: "wln", Alpha2Code: "wa", English: "Walloon"},
- {Alpha3bCode: "wol", Alpha2Code: "wo", English: "Wolof"},
- {Alpha3bCode: "xho", Alpha2Code: "xh", English: "Xhosa"},
- {Alpha3bCode: "yid", Alpha2Code: "yi", English: "Yiddish"},
- {Alpha3bCode: "yor", Alpha2Code: "yo", English: "Yoruba"},
- {Alpha3bCode: "zha", Alpha2Code: "za", English: "Zhuang; Chuang"},
- {Alpha3bCode: "zul", Alpha2Code: "zu", English: "Zulu"},
-}
diff --git a/vendor/github.com/asaskevich/govalidator/v11/utils.go b/vendor/github.com/asaskevich/govalidator/v11/utils.go
deleted file mode 100644
index f4c30f824a22..000000000000
--- a/vendor/github.com/asaskevich/govalidator/v11/utils.go
+++ /dev/null
@@ -1,270 +0,0 @@
-package govalidator
-
-import (
- "errors"
- "fmt"
- "html"
- "math"
- "path"
- "regexp"
- "strings"
- "unicode"
- "unicode/utf8"
-)
-
-// Contains checks if the string contains the substring.
-func Contains(str, substring string) bool {
- return strings.Contains(str, substring)
-}
-
-// Matches checks if string matches the pattern (pattern is regular expression)
-// In case of error return false
-func Matches(str, pattern string) bool {
- match, _ := regexp.MatchString(pattern, str)
- return match
-}
-
-// LeftTrim trims characters from the left side of the input.
-// If second argument is empty, it will remove leading spaces.
-func LeftTrim(str, chars string) string {
- if chars == "" {
- return strings.TrimLeftFunc(str, unicode.IsSpace)
- }
- r, _ := regexp.Compile("^[" + chars + "]+")
- return r.ReplaceAllString(str, "")
-}
-
-// RightTrim trims characters from the right side of the input.
-// If second argument is empty, it will remove trailing spaces.
-func RightTrim(str, chars string) string {
- if chars == "" {
- return strings.TrimRightFunc(str, unicode.IsSpace)
- }
- r, _ := regexp.Compile("[" + chars + "]+$")
- return r.ReplaceAllString(str, "")
-}
-
-// Trim trims characters from both sides of the input.
-// If second argument is empty, it will remove spaces.
-func Trim(str, chars string) string {
- return LeftTrim(RightTrim(str, chars), chars)
-}
-
-// WhiteList removes characters that do not appear in the whitelist.
-func WhiteList(str, chars string) string {
- pattern := "[^" + chars + "]+"
- r, _ := regexp.Compile(pattern)
- return r.ReplaceAllString(str, "")
-}
-
-// BlackList removes characters that appear in the blacklist.
-func BlackList(str, chars string) string {
- pattern := "[" + chars + "]+"
- r, _ := regexp.Compile(pattern)
- return r.ReplaceAllString(str, "")
-}
-
-// StripLow removes characters with a numerical value < 32 and 127, mostly control characters.
-// If keep_new_lines is true, newline characters are preserved (\n and \r, hex 0xA and 0xD).
-func StripLow(str string, keepNewLines bool) string {
- chars := ""
- if keepNewLines {
- chars = "\x00-\x09\x0B\x0C\x0E-\x1F\x7F"
- } else {
- chars = "\x00-\x1F\x7F"
- }
- return BlackList(str, chars)
-}
-
-// ReplacePattern replaces regular expression pattern in string
-func ReplacePattern(str, pattern, replace string) string {
- r, _ := regexp.Compile(pattern)
- return r.ReplaceAllString(str, replace)
-}
-
-// Escape replaces <, >, & and " with HTML entities.
-var Escape = html.EscapeString
-
-func addSegment(inrune, segment []rune) []rune {
- if len(segment) == 0 {
- return inrune
- }
- if len(inrune) != 0 {
- inrune = append(inrune, '_')
- }
- inrune = append(inrune, segment...)
- return inrune
-}
-
-// UnderscoreToCamelCase converts from underscore separated form to camel case form.
-// Ex.: my_func => MyFunc
-func UnderscoreToCamelCase(s string) string {
- return strings.Replace(strings.Title(strings.Replace(strings.ToLower(s), "_", " ", -1)), " ", "", -1)
-}
-
-// CamelCaseToUnderscore converts from camel case form to underscore separated form.
-// Ex.: MyFunc => my_func
-func CamelCaseToUnderscore(str string) string {
- var output []rune
- var segment []rune
- for _, r := range str {
-
- // not treat number as separate segment
- if !unicode.IsLower(r) && string(r) != "_" && !unicode.IsNumber(r) {
- output = addSegment(output, segment)
- segment = nil
- }
- segment = append(segment, unicode.ToLower(r))
- }
- output = addSegment(output, segment)
- return string(output)
-}
-
-// Reverse returns reversed string
-func Reverse(s string) string {
- r := []rune(s)
- for i, j := 0, len(r)-1; i < j; i, j = i+1, j-1 {
- r[i], r[j] = r[j], r[i]
- }
- return string(r)
-}
-
-// GetLines splits string by "\n" and return array of lines
-func GetLines(s string) []string {
- return strings.Split(s, "\n")
-}
-
-// GetLine returns specified line of multiline string
-func GetLine(s string, index int) (string, error) {
- lines := GetLines(s)
- if index < 0 || index >= len(lines) {
- return "", errors.New("line index out of bounds")
- }
- return lines[index], nil
-}
-
-// RemoveTags removes all tags from HTML string
-func RemoveTags(s string) string {
- return ReplacePattern(s, "<[^>]*>", "")
-}
-
-// SafeFileName returns safe string that can be used in file names
-func SafeFileName(str string) string {
- name := strings.ToLower(str)
- name = path.Clean(path.Base(name))
- name = strings.Trim(name, " ")
- separators, err := regexp.Compile(`[ &_=+:]`)
- if err == nil {
- name = separators.ReplaceAllString(name, "-")
- }
- legal, err := regexp.Compile(`[^[:alnum:]-.]`)
- if err == nil {
- name = legal.ReplaceAllString(name, "")
- }
- for strings.Contains(name, "--") {
- name = strings.Replace(name, "--", "-", -1)
- }
- return name
-}
-
-// NormalizeEmail canonicalize an email address.
-// The local part of the email address is lowercased for all domains; the hostname is always lowercased and
-// the local part of the email address is always lowercased for hosts that are known to be case-insensitive (currently only GMail).
-// Normalization follows special rules for known providers: currently, GMail addresses have dots removed in the local part and
-// are stripped of tags (e.g. some.one+tag@gmail.com becomes someone@gmail.com) and all @googlemail.com addresses are
-// normalized to @gmail.com.
-func NormalizeEmail(str string) (string, error) {
- if !IsEmail(str) {
- return "", fmt.Errorf("%s is not an email", str)
- }
- parts := strings.Split(str, "@")
- parts[0] = strings.ToLower(parts[0])
- parts[1] = strings.ToLower(parts[1])
- if parts[1] == "gmail.com" || parts[1] == "googlemail.com" {
- parts[1] = "gmail.com"
- parts[0] = strings.Split(ReplacePattern(parts[0], `\.`, ""), "+")[0]
- }
- return strings.Join(parts, "@"), nil
-}
-
-// Truncate a string to the closest length without breaking words.
-func Truncate(str string, length int, ending string) string {
- var aftstr, befstr string
- if len(str) > length {
- words := strings.Fields(str)
- before, present := 0, 0
- for i := range words {
- befstr = aftstr
- before = present
- aftstr = aftstr + words[i] + " "
- present = len(aftstr)
- if present > length && i != 0 {
- if (length - before) < (present - length) {
- return Trim(befstr, " /\\.,\"'#!?&@+-") + ending
- }
- return Trim(aftstr, " /\\.,\"'#!?&@+-") + ending
- }
- }
- }
-
- return str
-}
-
-// PadLeft pads left side of a string if size of string is less then indicated pad length
-func PadLeft(str string, padStr string, padLen int) string {
- return buildPadStr(str, padStr, padLen, true, false)
-}
-
-// PadRight pads right side of a string if size of string is less then indicated pad length
-func PadRight(str string, padStr string, padLen int) string {
- return buildPadStr(str, padStr, padLen, false, true)
-}
-
-// PadBoth pads both sides of a string if size of string is less then indicated pad length
-func PadBoth(str string, padStr string, padLen int) string {
- return buildPadStr(str, padStr, padLen, true, true)
-}
-
-// PadString either left, right or both sides.
-// Note that padding string can be unicode and more then one character
-func buildPadStr(str string, padStr string, padLen int, padLeft bool, padRight bool) string {
-
- // When padded length is less then the current string size
- if padLen < utf8.RuneCountInString(str) {
- return str
- }
-
- padLen -= utf8.RuneCountInString(str)
-
- targetLen := padLen
-
- targetLenLeft := targetLen
- targetLenRight := targetLen
- if padLeft && padRight {
- targetLenLeft = padLen / 2
- targetLenRight = padLen - targetLenLeft
- }
-
- strToRepeatLen := utf8.RuneCountInString(padStr)
-
- repeatTimes := int(math.Ceil(float64(targetLen) / float64(strToRepeatLen)))
- repeatedString := strings.Repeat(padStr, repeatTimes)
-
- leftSide := ""
- if padLeft {
- leftSide = repeatedString[0:targetLenLeft]
- }
-
- rightSide := ""
- if padRight {
- rightSide = repeatedString[0:targetLenRight]
- }
-
- return leftSide + str + rightSide
-}
-
-// TruncatingErrorf removes extra args from fmt.Errorf if not formatted in the str object
-func TruncatingErrorf(str string, args ...interface{}) error {
- n := strings.Count(str, "%s")
- return fmt.Errorf(str, args[:n]...)
-}
diff --git a/vendor/github.com/asaskevich/govalidator/v11/validator.go b/vendor/github.com/asaskevich/govalidator/v11/validator.go
deleted file mode 100644
index 740be790e6d8..000000000000
--- a/vendor/github.com/asaskevich/govalidator/v11/validator.go
+++ /dev/null
@@ -1,1775 +0,0 @@
-// Package govalidator is package of validators and sanitizers for strings, structs and collections.
-package govalidator
-
-import (
- "bytes"
- "crypto/rsa"
- "crypto/x509"
- "encoding/base64"
- "encoding/json"
- "encoding/pem"
- "fmt"
- "io/ioutil"
- "net"
- "net/url"
- "reflect"
- "regexp"
- "sort"
- "strconv"
- "strings"
- "time"
- "unicode"
- "unicode/utf8"
-)
-
-var (
- fieldsRequiredByDefault bool
- nilPtrAllowedByRequired = false
- notNumberRegexp = regexp.MustCompile("[^0-9]+")
- whiteSpacesAndMinus = regexp.MustCompile(`[\s-]+`)
- paramsRegexp = regexp.MustCompile(`\(.*\)$`)
-)
-
-const maxURLRuneCount = 2083
-const minURLRuneCount = 3
-const rfc3339WithoutZone = "2006-01-02T15:04:05"
-
-// SetFieldsRequiredByDefault causes validation to fail when struct fields
-// do not include validations or are not explicitly marked as exempt (using `valid:"-"` or `valid:"email,optional"`).
-// This struct definition will fail govalidator.ValidateStruct() (and the field values do not matter):
-// type exampleStruct struct {
-// Name string ``
-// Email string `valid:"email"`
-// This, however, will only fail when Email is empty or an invalid email address:
-// type exampleStruct2 struct {
-// Name string `valid:"-"`
-// Email string `valid:"email"`
-// Lastly, this will only fail when Email is an invalid email address but not when it's empty:
-// type exampleStruct2 struct {
-// Name string `valid:"-"`
-// Email string `valid:"email,optional"`
-func SetFieldsRequiredByDefault(value bool) {
- fieldsRequiredByDefault = value
-}
-
-// SetNilPtrAllowedByRequired causes validation to pass for nil ptrs when a field is set to required.
-// The validation will still reject ptr fields in their zero value state. Example with this enabled:
-// type exampleStruct struct {
-// Name *string `valid:"required"`
-// With `Name` set to "", this will be considered invalid input and will cause a validation error.
-// With `Name` set to nil, this will be considered valid by validation.
-// By default this is disabled.
-func SetNilPtrAllowedByRequired(value bool) {
- nilPtrAllowedByRequired = value
-}
-
-// IsEmail checks if the string is an email.
-func IsEmail(str string) bool {
- // TODO uppercase letters are not supported
- return rxEmail.MatchString(str)
-}
-
-// IsExistingEmail checks if the string is an email of existing domain
-func IsExistingEmail(email string) bool {
-
- if len(email) < 6 || len(email) > 254 {
- return false
- }
- at := strings.LastIndex(email, "@")
- if at <= 0 || at > len(email)-3 {
- return false
- }
- user := email[:at]
- host := email[at+1:]
- if len(user) > 64 {
- return false
- }
- switch host {
- case "localhost", "example.com":
- return true
- }
- if userDotRegexp.MatchString(user) || !userRegexp.MatchString(user) || !hostRegexp.MatchString(host) {
- return false
- }
- if _, err := net.LookupMX(host); err != nil {
- if _, err := net.LookupIP(host); err != nil {
- return false
- }
- }
-
- return true
-}
-
-// IsURL checks if the string is an URL.
-func IsURL(str string) bool {
- if str == "" || utf8.RuneCountInString(str) >= maxURLRuneCount || len(str) <= minURLRuneCount || strings.HasPrefix(str, ".") {
- return false
- }
- strTemp := str
- if strings.Contains(str, ":") && !strings.Contains(str, "://") {
- // support no indicated urlscheme but with colon for port number
- // http:// is appended so url.Parse will succeed, strTemp used so it does not impact rxURL.MatchString
- strTemp = "http://" + str
- }
- u, err := url.Parse(strTemp)
- if err != nil {
- return false
- }
- if strings.HasPrefix(u.Host, ".") {
- return false
- }
- if u.Host == "" && (u.Path != "" && !strings.Contains(u.Path, ".")) {
- return false
- }
- return rxURL.MatchString(str)
-}
-
-// IsRequestURL checks if the string rawurl, assuming
-// it was received in an HTTP request, is a valid
-// URL confirm to RFC 3986
-func IsRequestURL(rawurl string) bool {
- url, err := url.ParseRequestURI(rawurl)
- if err != nil {
- return false //Couldn't even parse the rawurl
- }
- if len(url.Scheme) == 0 {
- return false //No Scheme found
- }
- return true
-}
-
-// IsRequestURI checks if the string rawurl, assuming
-// it was received in an HTTP request, is an
-// absolute URI or an absolute path.
-func IsRequestURI(rawurl string) bool {
- _, err := url.ParseRequestURI(rawurl)
- return err == nil
-}
-
-// IsAlpha checks if the string contains only letters (a-zA-Z). Empty string is valid.
-func IsAlpha(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxAlpha.MatchString(str)
-}
-
-//IsUTFLetter checks if the string contains only unicode letter characters.
-//Similar to IsAlpha but for all languages. Empty string is valid.
-func IsUTFLetter(str string) bool {
- if IsNull(str) {
- return true
- }
-
- for _, c := range str {
- if !unicode.IsLetter(c) {
- return false
- }
- }
- return true
-
-}
-
-// IsAlphanumeric checks if the string contains only letters and numbers. Empty string is valid.
-func IsAlphanumeric(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxAlphanumeric.MatchString(str)
-}
-
-// IsUTFLetterNumeric checks if the string contains only unicode letters and numbers. Empty string is valid.
-func IsUTFLetterNumeric(str string) bool {
- if IsNull(str) {
- return true
- }
- for _, c := range str {
- if !unicode.IsLetter(c) && !unicode.IsNumber(c) { //letters && numbers are ok
- return false
- }
- }
- return true
-
-}
-
-// IsNumeric checks if the string contains only numbers. Empty string is valid.
-func IsNumeric(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxNumeric.MatchString(str)
-}
-
-// IsUTFNumeric checks if the string contains only unicode numbers of any kind.
-// Numbers can be 0-9 but also Fractions ¾,Roman Ⅸ and Hangzhou 〩. Empty string is valid.
-func IsUTFNumeric(str string) bool {
- if IsNull(str) {
- return true
- }
- if strings.IndexAny(str, "+-") > 0 {
- return false
- }
- if len(str) > 1 {
- str = strings.TrimPrefix(str, "-")
- str = strings.TrimPrefix(str, "+")
- }
- for _, c := range str {
- if !unicode.IsNumber(c) { //numbers && minus sign are ok
- return false
- }
- }
- return true
-
-}
-
-// IsUTFDigit checks if the string contains only unicode radix-10 decimal digits. Empty string is valid.
-func IsUTFDigit(str string) bool {
- if IsNull(str) {
- return true
- }
- if strings.IndexAny(str, "+-") > 0 {
- return false
- }
- if len(str) > 1 {
- str = strings.TrimPrefix(str, "-")
- str = strings.TrimPrefix(str, "+")
- }
- for _, c := range str {
- if !unicode.IsDigit(c) { //digits && minus sign are ok
- return false
- }
- }
- return true
-
-}
-
-// IsHexadecimal checks if the string is a hexadecimal number.
-func IsHexadecimal(str string) bool {
- return rxHexadecimal.MatchString(str)
-}
-
-// IsHexcolor checks if the string is a hexadecimal color.
-func IsHexcolor(str string) bool {
- return rxHexcolor.MatchString(str)
-}
-
-// IsRGBcolor checks if the string is a valid RGB color in form rgb(RRR, GGG, BBB).
-func IsRGBcolor(str string) bool {
- return rxRGBcolor.MatchString(str)
-}
-
-// IsLowerCase checks if the string is lowercase. Empty string is valid.
-func IsLowerCase(str string) bool {
- if IsNull(str) {
- return true
- }
- return str == strings.ToLower(str)
-}
-
-// IsUpperCase checks if the string is uppercase. Empty string is valid.
-func IsUpperCase(str string) bool {
- if IsNull(str) {
- return true
- }
- return str == strings.ToUpper(str)
-}
-
-// HasLowerCase checks if the string contains at least 1 lowercase. Empty string is valid.
-func HasLowerCase(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxHasLowerCase.MatchString(str)
-}
-
-// HasUpperCase checks if the string contains as least 1 uppercase. Empty string is valid.
-func HasUpperCase(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxHasUpperCase.MatchString(str)
-}
-
-// IsInt checks if the string is an integer. Empty string is valid.
-func IsInt(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxInt.MatchString(str)
-}
-
-// IsFloat checks if the string is a float.
-func IsFloat(str string) bool {
- return str != "" && rxFloat.MatchString(str)
-}
-
-// IsDivisibleBy checks if the string is a number that's divisible by another.
-// If second argument is not valid integer or zero, it's return false.
-// Otherwise, if first argument is not valid integer or zero, it's return true (Invalid string converts to zero).
-func IsDivisibleBy(str, num string) bool {
- f, _ := ToFloat(str)
- p := int64(f)
- q, _ := ToInt(num)
- if q == 0 {
- return false
- }
- return (p == 0) || (p%q == 0)
-}
-
-// IsNull checks if the string is null.
-func IsNull(str string) bool {
- return len(str) == 0
-}
-
-// IsNotNull checks if the string is not null.
-func IsNotNull(str string) bool {
- return !IsNull(str)
-}
-
-// HasWhitespaceOnly checks the string only contains whitespace
-func HasWhitespaceOnly(str string) bool {
- return len(str) > 0 && rxHasWhitespaceOnly.MatchString(str)
-}
-
-// HasWhitespace checks if the string contains any whitespace
-func HasWhitespace(str string) bool {
- return len(str) > 0 && rxHasWhitespace.MatchString(str)
-}
-
-// IsByteLength checks if the string's length (in bytes) falls in a range.
-func IsByteLength(str string, min, max int) bool {
- return len(str) >= min && len(str) <= max
-}
-
-// IsUUIDv3 checks if the string is a UUID version 3.
-func IsUUIDv3(str string) bool {
- return rxUUID3.MatchString(str)
-}
-
-// IsUUIDv4 checks if the string is a UUID version 4.
-func IsUUIDv4(str string) bool {
- return rxUUID4.MatchString(str)
-}
-
-// IsUUIDv5 checks if the string is a UUID version 5.
-func IsUUIDv5(str string) bool {
- return rxUUID5.MatchString(str)
-}
-
-// IsUUID checks if the string is a UUID (version 3, 4 or 5).
-func IsUUID(str string) bool {
- return rxUUID.MatchString(str)
-}
-
-// Byte to index table for O(1) lookups when unmarshaling.
-// We use 0xFF as sentinel value for invalid indexes.
-var ulidDec = [...]byte{
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x01,
- 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E,
- 0x0F, 0x10, 0x11, 0xFF, 0x12, 0x13, 0xFF, 0x14, 0x15, 0xFF,
- 0x16, 0x17, 0x18, 0x19, 0x1A, 0xFF, 0x1B, 0x1C, 0x1D, 0x1E,
- 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0A, 0x0B, 0x0C,
- 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0xFF, 0x12, 0x13, 0xFF, 0x14,
- 0x15, 0xFF, 0x16, 0x17, 0x18, 0x19, 0x1A, 0xFF, 0x1B, 0x1C,
- 0x1D, 0x1E, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-}
-
-// EncodedSize is the length of a text encoded ULID.
-const ulidEncodedSize = 26
-
-// IsULID checks if the string is a ULID.
-//
-// Implementation got from:
-// https://github.com/oklog/ulid (Apache-2.0 License)
-//
-func IsULID(str string) bool {
- // Check if a base32 encoded ULID is the right length.
- if len(str) != ulidEncodedSize {
- return false
- }
-
- // Check if all the characters in a base32 encoded ULID are part of the
- // expected base32 character set.
- if ulidDec[str[0]] == 0xFF ||
- ulidDec[str[1]] == 0xFF ||
- ulidDec[str[2]] == 0xFF ||
- ulidDec[str[3]] == 0xFF ||
- ulidDec[str[4]] == 0xFF ||
- ulidDec[str[5]] == 0xFF ||
- ulidDec[str[6]] == 0xFF ||
- ulidDec[str[7]] == 0xFF ||
- ulidDec[str[8]] == 0xFF ||
- ulidDec[str[9]] == 0xFF ||
- ulidDec[str[10]] == 0xFF ||
- ulidDec[str[11]] == 0xFF ||
- ulidDec[str[12]] == 0xFF ||
- ulidDec[str[13]] == 0xFF ||
- ulidDec[str[14]] == 0xFF ||
- ulidDec[str[15]] == 0xFF ||
- ulidDec[str[16]] == 0xFF ||
- ulidDec[str[17]] == 0xFF ||
- ulidDec[str[18]] == 0xFF ||
- ulidDec[str[19]] == 0xFF ||
- ulidDec[str[20]] == 0xFF ||
- ulidDec[str[21]] == 0xFF ||
- ulidDec[str[22]] == 0xFF ||
- ulidDec[str[23]] == 0xFF ||
- ulidDec[str[24]] == 0xFF ||
- ulidDec[str[25]] == 0xFF {
- return false
- }
-
- // Check if the first character in a base32 encoded ULID will overflow. This
- // happens because the base32 representation encodes 130 bits, while the
- // ULID is only 128 bits.
- //
- // See https://github.com/oklog/ulid/issues/9 for details.
- if str[0] > '7' {
- return false
- }
- return true
-}
-
-// IsCreditCard checks if the string is a credit card.
-func IsCreditCard(str string) bool {
- sanitized := whiteSpacesAndMinus.ReplaceAllString(str, "")
- if !rxCreditCard.MatchString(sanitized) {
- return false
- }
-
- number, _ := ToInt(sanitized)
- number, lastDigit := number/10, number%10
-
- var sum int64
- for i := 0; number > 0; i++ {
- digit := number % 10
-
- if i%2 == 0 {
- digit *= 2
- if digit > 9 {
- digit -= 9
- }
- }
-
- sum += digit
- number = number / 10
- }
-
- return (sum+lastDigit)%10 == 0
-}
-
-// IsISBN10 checks if the string is an ISBN version 10.
-func IsISBN10(str string) bool {
- return IsISBN(str, 10)
-}
-
-// IsISBN13 checks if the string is an ISBN version 13.
-func IsISBN13(str string) bool {
- return IsISBN(str, 13)
-}
-
-// IsISBN checks if the string is an ISBN (version 10 or 13).
-// If version value is not equal to 10 or 13, it will be checks both variants.
-func IsISBN(str string, version int) bool {
- sanitized := whiteSpacesAndMinus.ReplaceAllString(str, "")
- var checksum int32
- var i int32
- if version == 10 {
- if !rxISBN10.MatchString(sanitized) {
- return false
- }
- for i = 0; i < 9; i++ {
- checksum += (i + 1) * int32(sanitized[i]-'0')
- }
- if sanitized[9] == 'X' {
- checksum += 10 * 10
- } else {
- checksum += 10 * int32(sanitized[9]-'0')
- }
- if checksum%11 == 0 {
- return true
- }
- return false
- } else if version == 13 {
- if !rxISBN13.MatchString(sanitized) {
- return false
- }
- factor := []int32{1, 3}
- for i = 0; i < 12; i++ {
- checksum += factor[i%2] * int32(sanitized[i]-'0')
- }
- return (int32(sanitized[12]-'0'))-((10-(checksum%10))%10) == 0
- }
- return IsISBN(str, 10) || IsISBN(str, 13)
-}
-
-// IsJSON checks if the string is valid JSON (note: uses json.Unmarshal).
-func IsJSON(str string) bool {
- var js json.RawMessage
- return json.Unmarshal([]byte(str), &js) == nil
-}
-
-// IsMultibyte checks if the string contains one or more multibyte chars. Empty string is valid.
-func IsMultibyte(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxMultibyte.MatchString(str)
-}
-
-// IsASCII checks if the string contains ASCII chars only. Empty string is valid.
-func IsASCII(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxASCII.MatchString(str)
-}
-
-// IsPrintableASCII checks if the string contains printable ASCII chars only. Empty string is valid.
-func IsPrintableASCII(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxPrintableASCII.MatchString(str)
-}
-
-// IsFullWidth checks if the string contains any full-width chars. Empty string is valid.
-func IsFullWidth(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxFullWidth.MatchString(str)
-}
-
-// IsHalfWidth checks if the string contains any half-width chars. Empty string is valid.
-func IsHalfWidth(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxHalfWidth.MatchString(str)
-}
-
-// IsVariableWidth checks if the string contains a mixture of full and half-width chars. Empty string is valid.
-func IsVariableWidth(str string) bool {
- if IsNull(str) {
- return true
- }
- return rxHalfWidth.MatchString(str) && rxFullWidth.MatchString(str)
-}
-
-// IsBase64 checks if a string is base64 encoded.
-func IsBase64(str string) bool {
- return rxBase64.MatchString(str)
-}
-
-// IsFilePath checks is a string is Win or Unix file path and returns it's type.
-func IsFilePath(str string) (bool, int) {
- if rxWinPath.MatchString(str) {
- //check windows path limit see:
- // http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath
- if len(str[3:]) > 32767 {
- return false, Win
- }
- return true, Win
- } else if rxUnixPath.MatchString(str) {
- return true, Unix
- }
- return false, Unknown
-}
-
-//IsWinFilePath checks both relative & absolute paths in Windows
-func IsWinFilePath(str string) bool {
- if rxARWinPath.MatchString(str) {
- //check windows path limit see:
- // http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath
- if len(str[3:]) > 32767 {
- return false
- }
- return true
- }
- return false
-}
-
-//IsUnixFilePath checks both relative & absolute paths in Unix
-func IsUnixFilePath(str string) bool {
- if rxARUnixPath.MatchString(str) {
- return true
- }
- return false
-}
-
-// IsDataURI checks if a string is base64 encoded data URI such as an image
-func IsDataURI(str string) bool {
- dataURI := strings.Split(str, ",")
- if !rxDataURI.MatchString(dataURI[0]) {
- return false
- }
- return IsBase64(dataURI[1])
-}
-
-// IsMagnetURI checks if a string is valid magnet URI
-func IsMagnetURI(str string) bool {
- return rxMagnetURI.MatchString(str)
-}
-
-// IsISO3166Alpha2 checks if a string is valid two-letter country code
-func IsISO3166Alpha2(str string) bool {
- for _, entry := range ISO3166List {
- if str == entry.Alpha2Code {
- return true
- }
- }
- return false
-}
-
-// IsISO3166Alpha3 checks if a string is valid three-letter country code
-func IsISO3166Alpha3(str string) bool {
- for _, entry := range ISO3166List {
- if str == entry.Alpha3Code {
- return true
- }
- }
- return false
-}
-
-// IsISO693Alpha2 checks if a string is valid two-letter language code
-func IsISO693Alpha2(str string) bool {
- for _, entry := range ISO693List {
- if str == entry.Alpha2Code {
- return true
- }
- }
- return false
-}
-
-// IsISO693Alpha3b checks if a string is valid three-letter language code
-func IsISO693Alpha3b(str string) bool {
- for _, entry := range ISO693List {
- if str == entry.Alpha3bCode {
- return true
- }
- }
- return false
-}
-
-// IsDNSName will validate the given string as a DNS name
-func IsDNSName(str string) bool {
- if str == "" || len(strings.Replace(str, ".", "", -1)) > 255 {
- // constraints already violated
- return false
- }
- return !IsIP(str) && rxDNSName.MatchString(str)
-}
-
-// IsHash checks if a string is a hash of type algorithm.
-// Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', 'tiger160', 'tiger192', 'crc32', 'crc32b']
-func IsHash(str string, algorithm string) bool {
- var len string
- algo := strings.ToLower(algorithm)
-
- if algo == "crc32" || algo == "crc32b" {
- len = "8"
- } else if algo == "md5" || algo == "md4" || algo == "ripemd128" || algo == "tiger128" {
- len = "32"
- } else if algo == "sha1" || algo == "ripemd160" || algo == "tiger160" {
- len = "40"
- } else if algo == "tiger192" {
- len = "48"
- } else if algo == "sha3-224" {
- len = "56"
- } else if algo == "sha256" || algo == "sha3-256" {
- len = "64"
- } else if algo == "sha384" || algo == "sha3-384" {
- len = "96"
- } else if algo == "sha512" || algo == "sha3-512" {
- len = "128"
- } else {
- return false
- }
-
- return Matches(str, "^[a-f0-9]{"+len+"}$")
-}
-
-// IsSHA3224 checks is a string is a SHA3-224 hash. Alias for `IsHash(str, "sha3-224")`
-func IsSHA3224(str string) bool {
- return IsHash(str, "sha3-224")
-}
-
-// IsSHA3256 checks is a string is a SHA3-256 hash. Alias for `IsHash(str, "sha3-256")`
-func IsSHA3256(str string) bool {
- return IsHash(str, "sha3-256")
-}
-
-// IsSHA3384 checks is a string is a SHA3-384 hash. Alias for `IsHash(str, "sha3-384")`
-func IsSHA3384(str string) bool {
- return IsHash(str, "sha3-384")
-}
-
-// IsSHA3512 checks is a string is a SHA3-512 hash. Alias for `IsHash(str, "sha3-512")`
-func IsSHA3512(str string) bool {
- return IsHash(str, "sha3-512")
-}
-
-// IsSHA512 checks is a string is a SHA512 hash. Alias for `IsHash(str, "sha512")`
-func IsSHA512(str string) bool {
- return IsHash(str, "sha512")
-}
-
-// IsSHA384 checks is a string is a SHA384 hash. Alias for `IsHash(str, "sha384")`
-func IsSHA384(str string) bool {
- return IsHash(str, "sha384")
-}
-
-// IsSHA256 checks is a string is a SHA256 hash. Alias for `IsHash(str, "sha256")`
-func IsSHA256(str string) bool {
- return IsHash(str, "sha256")
-}
-
-// IsTiger192 checks is a string is a Tiger192 hash. Alias for `IsHash(str, "tiger192")`
-func IsTiger192(str string) bool {
- return IsHash(str, "tiger192")
-}
-
-// IsTiger160 checks is a string is a Tiger160 hash. Alias for `IsHash(str, "tiger160")`
-func IsTiger160(str string) bool {
- return IsHash(str, "tiger160")
-}
-
-// IsRipeMD160 checks is a string is a RipeMD160 hash. Alias for `IsHash(str, "ripemd160")`
-func IsRipeMD160(str string) bool {
- return IsHash(str, "ripemd160")
-}
-
-// IsSHA1 checks is a string is a SHA-1 hash. Alias for `IsHash(str, "sha1")`
-func IsSHA1(str string) bool {
- return IsHash(str, "sha1")
-}
-
-// IsTiger128 checks is a string is a Tiger128 hash. Alias for `IsHash(str, "tiger128")`
-func IsTiger128(str string) bool {
- return IsHash(str, "tiger128")
-}
-
-// IsRipeMD128 checks is a string is a RipeMD128 hash. Alias for `IsHash(str, "ripemd128")`
-func IsRipeMD128(str string) bool {
- return IsHash(str, "ripemd128")
-}
-
-// IsCRC32 checks is a string is a CRC32 hash. Alias for `IsHash(str, "crc32")`
-func IsCRC32(str string) bool {
- return IsHash(str, "crc32")
-}
-
-// IsCRC32b checks is a string is a CRC32b hash. Alias for `IsHash(str, "crc32b")`
-func IsCRC32b(str string) bool {
- return IsHash(str, "crc32b")
-}
-
-// IsMD5 checks is a string is a MD5 hash. Alias for `IsHash(str, "md5")`
-func IsMD5(str string) bool {
- return IsHash(str, "md5")
-}
-
-// IsMD4 checks is a string is a MD4 hash. Alias for `IsHash(str, "md4")`
-func IsMD4(str string) bool {
- return IsHash(str, "md4")
-}
-
-// IsDialString validates the given string for usage with the various Dial() functions
-func IsDialString(str string) bool {
- if h, p, err := net.SplitHostPort(str); err == nil && h != "" && p != "" && (IsDNSName(h) || IsIP(h)) && IsPort(p) {
- return true
- }
-
- return false
-}
-
-// IsIP checks if a string is either IP version 4 or 6. Alias for `net.ParseIP`
-func IsIP(str string) bool {
- return net.ParseIP(str) != nil
-}
-
-// IsPort checks if a string represents a valid port
-func IsPort(str string) bool {
- if i, err := strconv.Atoi(str); err == nil && i > 0 && i < 65536 {
- return true
- }
- return false
-}
-
-// IsIPv4 checks if the string is an IP version 4.
-func IsIPv4(str string) bool {
- ip := net.ParseIP(str)
- return ip != nil && strings.Contains(str, ".")
-}
-
-// IsIPv6 checks if the string is an IP version 6.
-func IsIPv6(str string) bool {
- ip := net.ParseIP(str)
- return ip != nil && strings.Contains(str, ":")
-}
-
-// IsCIDR checks if the string is an valid CIDR notiation (IPV4 & IPV6)
-func IsCIDR(str string) bool {
- _, _, err := net.ParseCIDR(str)
- return err == nil
-}
-
-// IsMAC checks if a string is valid MAC address.
-// Possible MAC formats:
-// 01:23:45:67:89:ab
-// 01:23:45:67:89:ab:cd:ef
-// 01-23-45-67-89-ab
-// 01-23-45-67-89-ab-cd-ef
-// 0123.4567.89ab
-// 0123.4567.89ab.cdef
-func IsMAC(str string) bool {
- _, err := net.ParseMAC(str)
- return err == nil
-}
-
-// IsHost checks if the string is a valid IP (both v4 and v6) or a valid DNS name
-func IsHost(str string) bool {
- return IsIP(str) || IsDNSName(str)
-}
-
-// IsMongoID checks if the string is a valid hex-encoded representation of a MongoDB ObjectId.
-func IsMongoID(str string) bool {
- return rxHexadecimal.MatchString(str) && (len(str) == 24)
-}
-
-// IsLatitude checks if a string is valid latitude.
-func IsLatitude(str string) bool {
- return rxLatitude.MatchString(str)
-}
-
-// IsLongitude checks if a string is valid longitude.
-func IsLongitude(str string) bool {
- return rxLongitude.MatchString(str)
-}
-
-// IsIMEI checks if a string is valid IMEI
-func IsIMEI(str string) bool {
- return rxIMEI.MatchString(str)
-}
-
-// IsIMSI checks if a string is valid IMSI
-func IsIMSI(str string) bool {
- if !rxIMSI.MatchString(str) {
- return false
- }
-
- mcc, err := strconv.ParseInt(str[0:3], 10, 32)
- if err != nil {
- return false
- }
-
- switch mcc {
- case 202, 204, 206, 208, 212, 213, 214, 216, 218, 219:
- case 220, 221, 222, 226, 228, 230, 231, 232, 234, 235:
- case 238, 240, 242, 244, 246, 247, 248, 250, 255, 257:
- case 259, 260, 262, 266, 268, 270, 272, 274, 276, 278:
- case 280, 282, 283, 284, 286, 288, 289, 290, 292, 293:
- case 294, 295, 297, 302, 308, 310, 311, 312, 313, 314:
- case 315, 316, 330, 332, 334, 338, 340, 342, 344, 346:
- case 348, 350, 352, 354, 356, 358, 360, 362, 363, 364:
- case 365, 366, 368, 370, 372, 374, 376, 400, 401, 402:
- case 404, 405, 406, 410, 412, 413, 414, 415, 416, 417:
- case 418, 419, 420, 421, 422, 424, 425, 426, 427, 428:
- case 429, 430, 431, 432, 434, 436, 437, 438, 440, 441:
- case 450, 452, 454, 455, 456, 457, 460, 461, 466, 467:
- case 470, 472, 502, 505, 510, 514, 515, 520, 525, 528:
- case 530, 536, 537, 539, 540, 541, 542, 543, 544, 545:
- case 546, 547, 548, 549, 550, 551, 552, 553, 554, 555:
- case 602, 603, 604, 605, 606, 607, 608, 609, 610, 611:
- case 612, 613, 614, 615, 616, 617, 618, 619, 620, 621:
- case 622, 623, 624, 625, 626, 627, 628, 629, 630, 631:
- case 632, 633, 634, 635, 636, 637, 638, 639, 640, 641:
- case 642, 643, 645, 646, 647, 648, 649, 650, 651, 652:
- case 653, 654, 655, 657, 658, 659, 702, 704, 706, 708:
- case 710, 712, 714, 716, 722, 724, 730, 732, 734, 736:
- case 738, 740, 742, 744, 746, 748, 750, 995:
- return true
- default:
- return false
- }
- return true
-}
-
-// IsRsaPublicKey checks if a string is valid public key with provided length
-func IsRsaPublicKey(str string, keylen int) bool {
- bb := bytes.NewBufferString(str)
- pemBytes, err := ioutil.ReadAll(bb)
- if err != nil {
- return false
- }
- block, _ := pem.Decode(pemBytes)
- if block != nil && block.Type != "PUBLIC KEY" {
- return false
- }
- var der []byte
-
- if block != nil {
- der = block.Bytes
- } else {
- der, err = base64.StdEncoding.DecodeString(str)
- if err != nil {
- return false
- }
- }
-
- key, err := x509.ParsePKIXPublicKey(der)
- if err != nil {
- return false
- }
- pubkey, ok := key.(*rsa.PublicKey)
- if !ok {
- return false
- }
- bitlen := len(pubkey.N.Bytes()) * 8
- return bitlen == int(keylen)
-}
-
-// IsRegex checks if a give string is a valid regex with RE2 syntax or not
-func IsRegex(str string) bool {
- if _, err := regexp.Compile(str); err == nil {
- return true
- }
- return false
-}
-
-func toJSONName(tag string) string {
- if tag == "" {
- return ""
- }
-
- // JSON name always comes first. If there's no options then split[0] is
- // JSON name, if JSON name is not set, then split[0] is an empty string.
- split := strings.SplitN(tag, ",", 2)
-
- name := split[0]
-
- // However it is possible that the field is skipped when
- // (de-)serializing from/to JSON, in which case assume that there is no
- // tag name to use
- if name == "-" {
- return ""
- }
- return name
-}
-
-func prependPathToErrors(err error, path string) error {
- switch err2 := err.(type) {
- case Error:
- err2.Path = append([]string{path}, err2.Path...)
- return err2
- case Errors:
- errors := err2.Errors()
- for i, err3 := range errors {
- errors[i] = prependPathToErrors(err3, path)
- }
- return err2
- }
- return err
-}
-
-// ValidateArray performs validation according to condition iterator that validates every element of the array
-func ValidateArray(array []interface{}, iterator ConditionIterator) bool {
- return Every(array, iterator)
-}
-
-// ValidateMap use validation map for fields.
-// result will be equal to `false` if there are any errors.
-// s is the map containing the data to be validated.
-// m is the validation map in the form:
-// map[string]interface{}{"name":"required,alpha","address":map[string]interface{}{"line1":"required,alphanum"}}
-func ValidateMap(s map[string]interface{}, m map[string]interface{}) (bool, error) {
- if s == nil {
- return true, nil
- }
- result := true
- var err error
- var errs Errors
- var index int
- val := reflect.ValueOf(s)
- for key, value := range s {
- presentResult := true
- validator, ok := m[key]
- if !ok {
- presentResult = false
- var err error
- err = fmt.Errorf("all map keys has to be present in the validation map; got %s", key)
- err = prependPathToErrors(err, key)
- errs = append(errs, err)
- }
- valueField := reflect.ValueOf(value)
- mapResult := true
- typeResult := true
- structResult := true
- resultField := true
- switch subValidator := validator.(type) {
- case map[string]interface{}:
- var err error
- if v, ok := value.(map[string]interface{}); !ok {
- mapResult = false
- err = fmt.Errorf("map validator has to be for the map type only; got %s", valueField.Type().String())
- err = prependPathToErrors(err, key)
- errs = append(errs, err)
- } else {
- mapResult, err = ValidateMap(v, subValidator)
- if err != nil {
- mapResult = false
- err = prependPathToErrors(err, key)
- errs = append(errs, err)
- }
- }
- case string:
- if (valueField.Kind() == reflect.Struct ||
- (valueField.Kind() == reflect.Ptr && valueField.Elem().Kind() == reflect.Struct)) &&
- subValidator != "-" {
- var err error
- structResult, err = ValidateStruct(valueField.Interface())
- if err != nil {
- err = prependPathToErrors(err, key)
- errs = append(errs, err)
- }
- }
- resultField, err = typeCheck(valueField, reflect.StructField{
- Name: key,
- PkgPath: "",
- Type: val.Type(),
- Tag: reflect.StructTag(fmt.Sprintf("%s:%q", tagName, subValidator)),
- Offset: 0,
- Index: []int{index},
- Anonymous: false,
- }, val, nil)
- if err != nil {
- errs = append(errs, err)
- }
- case nil:
- // already handlerd when checked before
- default:
- typeResult = false
- err = fmt.Errorf("map validator has to be either map[string]interface{} or string; got %s", valueField.Type().String())
- err = prependPathToErrors(err, key)
- errs = append(errs, err)
- }
- result = result && presentResult && typeResult && resultField && structResult && mapResult
- index++
- }
- // checks required keys
- requiredResult := true
- for key, value := range m {
- if schema, ok := value.(string); ok {
- tags := parseTagIntoMap(schema)
- if required, ok := tags["required"]; ok {
- if _, ok := s[key]; !ok {
- requiredResult = false
- if required.customErrorMessage != "" {
- err = Error{key, fmt.Errorf(required.customErrorMessage), true, "required", []string{}}
- } else {
- err = Error{key, fmt.Errorf("required field missing"), false, "required", []string{}}
- }
- errs = append(errs, err)
- }
- }
- }
- }
-
- if len(errs) > 0 {
- err = errs
- }
- return result && requiredResult, err
-}
-
-// ValidateStruct use tags for fields.
-// result will be equal to `false` if there are any errors.
-// todo currently there is no guarantee that errors will be returned in predictable order (tests may to fail)
-func ValidateStruct(s interface{}) (bool, error) {
- if s == nil {
- return true, nil
- }
- result := true
- var err error
- val := reflect.ValueOf(s)
- if val.Kind() == reflect.Interface || val.Kind() == reflect.Ptr {
- val = val.Elem()
- }
- // we only accept structs
- if val.Kind() != reflect.Struct {
- return false, fmt.Errorf("function only accepts structs; got %s", val.Kind())
- }
- var errs Errors
- for i := 0; i < val.NumField(); i++ {
- valueField := val.Field(i)
- typeField := val.Type().Field(i)
- if typeField.PkgPath != "" {
- continue // Private field
- }
- structResult := true
- if valueField.Kind() == reflect.Interface {
- valueField = valueField.Elem()
- }
- if (valueField.Kind() == reflect.Struct ||
- (valueField.Kind() == reflect.Ptr && valueField.Elem().Kind() == reflect.Struct)) &&
- typeField.Tag.Get(tagName) != "-" {
- var err error
- structResult, err = ValidateStruct(valueField.Interface())
- if err != nil {
- err = prependPathToErrors(err, typeField.Name)
- errs = append(errs, err)
- }
- }
- resultField, err2 := typeCheck(valueField, typeField, val, nil)
- if err2 != nil {
-
- // Replace structure name with JSON name if there is a tag on the variable
- jsonTag := toJSONName(typeField.Tag.Get("json"))
- if jsonTag != "" {
- switch jsonError := err2.(type) {
- case Error:
- jsonError.Name = jsonTag
- err2 = jsonError
- case Errors:
- for i2, err3 := range jsonError {
- switch customErr := err3.(type) {
- case Error:
- customErr.Name = jsonTag
- jsonError[i2] = customErr
- }
- }
-
- err2 = jsonError
- }
- }
-
- errs = append(errs, err2)
- }
- result = result && resultField && structResult
- }
- if len(errs) > 0 {
- err = errs
- }
- return result, err
-}
-
-// ValidateStructAsync performs async validation of the struct and returns results through the channels
-func ValidateStructAsync(s interface{}) (<-chan bool, <-chan error) {
- res := make(chan bool)
- errors := make(chan error)
-
- go func() {
- defer close(res)
- defer close(errors)
-
- isValid, isFailed := ValidateStruct(s)
-
- res <- isValid
- errors <- isFailed
- }()
-
- return res, errors
-}
-
-// ValidateMapAsync performs async validation of the map and returns results through the channels
-func ValidateMapAsync(s map[string]interface{}, m map[string]interface{}) (<-chan bool, <-chan error) {
- res := make(chan bool)
- errors := make(chan error)
-
- go func() {
- defer close(res)
- defer close(errors)
-
- isValid, isFailed := ValidateMap(s, m)
-
- res <- isValid
- errors <- isFailed
- }()
-
- return res, errors
-}
-
-// parseTagIntoMap parses a struct tag `valid:required~Some error message,length(2|3)` into map[string]string{"required": "Some error message", "length(2|3)": ""}
-func parseTagIntoMap(tag string) tagOptionsMap {
- optionsMap := make(tagOptionsMap)
- options := strings.Split(tag, ",")
-
- for i, option := range options {
- option = strings.TrimSpace(option)
-
- validationOptions := strings.Split(option, "~")
- if !isValidTag(validationOptions[0]) {
- continue
- }
- if len(validationOptions) == 2 {
- optionsMap[validationOptions[0]] = tagOption{validationOptions[0], validationOptions[1], i}
- } else {
- optionsMap[validationOptions[0]] = tagOption{validationOptions[0], "", i}
- }
- }
- return optionsMap
-}
-
-func isValidTag(s string) bool {
- if s == "" {
- return false
- }
- for _, c := range s {
- switch {
- case strings.ContainsRune("\\'\"!#$%&()*+-./:<=>?@[]^_{|}~ ", c):
- // Backslash and quote chars are reserved, but
- // otherwise any punctuation chars are allowed
- // in a tag name.
- default:
- if !unicode.IsLetter(c) && !unicode.IsDigit(c) {
- return false
- }
- }
- }
- return true
-}
-
-// IsSSN will validate the given string as a U.S. Social Security Number
-func IsSSN(str string) bool {
- if str == "" || len(str) != 11 {
- return false
- }
- return rxSSN.MatchString(str)
-}
-
-// IsSemver checks if string is valid semantic version
-func IsSemver(str string) bool {
- return rxSemver.MatchString(str)
-}
-
-// IsType checks if interface is of some type
-func IsType(v interface{}, params ...string) bool {
- if len(params) == 1 {
- typ := params[0]
- return strings.Replace(reflect.TypeOf(v).String(), " ", "", -1) == strings.Replace(typ, " ", "", -1)
- }
- return false
-}
-
-// IsTime checks if string is valid according to given format
-func IsTime(str string, format string) bool {
- _, err := time.Parse(format, str)
- return err == nil
-}
-
-// IsUnixTime checks if string is valid unix timestamp value
-func IsUnixTime(str string) bool {
- if _, err := strconv.Atoi(str); err == nil {
- return true
- }
- return false
-}
-
-// IsRFC3339 checks if string is valid timestamp value according to RFC3339
-func IsRFC3339(str string) bool {
- return IsTime(str, time.RFC3339)
-}
-
-// IsRFC3339WithoutZone checks if string is valid timestamp value according to RFC3339 which excludes the timezone.
-func IsRFC3339WithoutZone(str string) bool {
- return IsTime(str, rfc3339WithoutZone)
-}
-
-// IsISO4217 checks if string is valid ISO currency code
-func IsISO4217(str string) bool {
- for _, currency := range ISO4217List {
- if str == currency {
- return true
- }
- }
-
- return false
-}
-
-// ByteLength checks string's length
-func ByteLength(str string, params ...string) bool {
- if len(params) == 2 {
- min, _ := ToInt(params[0])
- max, _ := ToInt(params[1])
- return len(str) >= int(min) && len(str) <= int(max)
- }
-
- return false
-}
-
-// RuneLength checks string's length
-// Alias for StringLength
-func RuneLength(str string, params ...string) bool {
- return StringLength(str, params...)
-}
-
-// IsRsaPub checks whether string is valid RSA key
-// Alias for IsRsaPublicKey
-func IsRsaPub(str string, params ...string) bool {
- if len(params) == 1 {
- len, _ := ToInt(params[0])
- return IsRsaPublicKey(str, int(len))
- }
-
- return false
-}
-
-// StringMatches checks if a string matches a given pattern.
-func StringMatches(s string, params ...string) bool {
- if len(params) == 1 {
- pattern := params[0]
- return Matches(s, pattern)
- }
- return false
-}
-
-// StringLength checks string's length (including multi byte strings)
-func StringLength(str string, params ...string) bool {
-
- if len(params) == 2 {
- strLength := utf8.RuneCountInString(str)
- min, _ := ToInt(params[0])
- max, _ := ToInt(params[1])
- return strLength >= int(min) && strLength <= int(max)
- }
-
- return false
-}
-
-// MinStringLength checks string's minimum length (including multi byte strings)
-func MinStringLength(str string, params ...string) bool {
-
- if len(params) == 1 {
- strLength := utf8.RuneCountInString(str)
- min, _ := ToInt(params[0])
- return strLength >= int(min)
- }
-
- return false
-}
-
-// MaxStringLength checks string's maximum length (including multi byte strings)
-func MaxStringLength(str string, params ...string) bool {
-
- if len(params) == 1 {
- strLength := utf8.RuneCountInString(str)
- max, _ := ToInt(params[0])
- return strLength <= int(max)
- }
-
- return false
-}
-
-// Range checks string's length
-func Range(str string, params ...string) bool {
- if len(params) == 2 {
- value, _ := ToFloat(str)
- min, _ := ToFloat(params[0])
- max, _ := ToFloat(params[1])
- return InRange(value, min, max)
- }
-
- return false
-}
-
-// IsInRaw checks if string is in list of allowed values
-func IsInRaw(str string, params ...string) bool {
- if len(params) == 1 {
- rawParams := params[0]
-
- parsedParams := strings.Split(rawParams, "|")
-
- return IsIn(str, parsedParams...)
- }
-
- return false
-}
-
-// IsIn checks if string str is a member of the set of strings params
-func IsIn(str string, params ...string) bool {
- for _, param := range params {
- if str == param {
- return true
- }
- }
-
- return false
-}
-
-func checkRequired(v reflect.Value, t reflect.StructField, options tagOptionsMap) (bool, error) {
- if nilPtrAllowedByRequired {
- k := v.Kind()
- if (k == reflect.Ptr || k == reflect.Interface) && v.IsNil() {
- return true, nil
- }
- }
-
- if requiredOption, isRequired := options["required"]; isRequired {
- if len(requiredOption.customErrorMessage) > 0 {
- return false, Error{t.Name, fmt.Errorf(requiredOption.customErrorMessage), true, "required", []string{}}
- }
- return false, Error{t.Name, fmt.Errorf("non zero value required"), false, "required", []string{}}
- } else if _, isOptional := options["optional"]; fieldsRequiredByDefault && !isOptional {
- return false, Error{t.Name, fmt.Errorf("Missing required field"), false, "required", []string{}}
- }
- // not required and empty is valid
- return true, nil
-}
-
-func typeCheck(v reflect.Value, t reflect.StructField, o reflect.Value, options tagOptionsMap) (isValid bool, resultErr error) {
- if !v.IsValid() {
- return false, nil
- }
-
- tag := t.Tag.Get(tagName)
-
- // checks if the field should be ignored
- switch tag {
- case "":
- if v.Kind() != reflect.Slice && v.Kind() != reflect.Map {
- if !fieldsRequiredByDefault {
- return true, nil
- }
- return false, Error{t.Name, fmt.Errorf("All fields are required to at least have one validation defined"), false, "required", []string{}}
- }
- case "-":
- return true, nil
- }
-
- isRootType := false
- if options == nil {
- isRootType = true
- options = parseTagIntoMap(tag)
- }
-
- if isEmptyValue(v) {
- // an empty value is not validated, checks only required
- isValid, resultErr = checkRequired(v, t, options)
- for key := range options {
- delete(options, key)
- }
- return isValid, resultErr
- }
-
- var customTypeErrors Errors
- optionsOrder := options.orderedKeys()
- for _, validatorName := range optionsOrder {
- validatorStruct := options[validatorName]
- if validatefunc, ok := CustomTypeTagMap.Get(validatorName); ok {
- delete(options, validatorName)
-
- if result := validatefunc(v.Interface(), o.Interface()); !result {
- if len(validatorStruct.customErrorMessage) > 0 {
- customTypeErrors = append(customTypeErrors, Error{Name: t.Name, Err: TruncatingErrorf(validatorStruct.customErrorMessage, fmt.Sprint(v), validatorName), CustomErrorMessageExists: true, Validator: stripParams(validatorName)})
- continue
- }
- customTypeErrors = append(customTypeErrors, Error{Name: t.Name, Err: fmt.Errorf("%s does not validate as %s", fmt.Sprint(v), validatorName), CustomErrorMessageExists: false, Validator: stripParams(validatorName)})
- }
- }
- }
-
- if len(customTypeErrors.Errors()) > 0 {
- return false, customTypeErrors
- }
-
- if isRootType {
- // Ensure that we've checked the value by all specified validators before report that the value is valid
- defer func() {
- delete(options, "optional")
- delete(options, "required")
-
- if isValid && resultErr == nil && len(options) != 0 {
- optionsOrder := options.orderedKeys()
- for _, validator := range optionsOrder {
- isValid = false
- resultErr = Error{t.Name, fmt.Errorf(
- "The following validator is invalid or can't be applied to the field: %q", validator), false, stripParams(validator), []string{}}
- return
- }
- }
- }()
- }
-
- for _, validatorSpec := range optionsOrder {
- validatorStruct := options[validatorSpec]
- var negate bool
- validator := validatorSpec
- customMsgExists := len(validatorStruct.customErrorMessage) > 0
-
- // checks whether the tag looks like '!something' or 'something'
- if validator[0] == '!' {
- validator = validator[1:]
- negate = true
- }
-
- // checks for interface param validators
- for key, value := range InterfaceParamTagRegexMap {
- ps := value.FindStringSubmatch(validator)
- if len(ps) == 0 {
- continue
- }
-
- validatefunc, ok := InterfaceParamTagMap[key]
- if !ok {
- continue
- }
-
- delete(options, validatorSpec)
-
- field := fmt.Sprint(v)
- if result := validatefunc(v.Interface(), ps[1:]...); (!result && !negate) || (result && negate) {
- if customMsgExists {
- return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}}
- }
- if negate {
- return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}}
- }
- return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}}
- }
- }
- }
-
- switch v.Kind() {
- case reflect.Bool,
- reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
- reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr,
- reflect.Float32, reflect.Float64,
- reflect.String:
- // for each tag option checks the map of validator functions
- for _, validatorSpec := range optionsOrder {
- validatorStruct := options[validatorSpec]
- var negate bool
- validator := validatorSpec
- customMsgExists := len(validatorStruct.customErrorMessage) > 0
-
- // checks whether the tag looks like '!something' or 'something'
- if validator[0] == '!' {
- validator = validator[1:]
- negate = true
- }
-
- // checks for param validators
- for key, value := range ParamTagRegexMap {
- ps := value.FindStringSubmatch(validator)
- if len(ps) == 0 {
- continue
- }
-
- validatefunc, ok := ParamTagMap[key]
- if !ok {
- continue
- }
-
- delete(options, validatorSpec)
-
- switch v.Kind() {
- case reflect.String,
- reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
- reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64,
- reflect.Float32, reflect.Float64:
-
- field := fmt.Sprint(v) // make value into string, then validate with regex
- if result := validatefunc(field, ps[1:]...); (!result && !negate) || (result && negate) {
- if customMsgExists {
- return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}}
- }
- if negate {
- return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}}
- }
- return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}}
- }
- default:
- // type not yet supported, fail
- return false, Error{t.Name, fmt.Errorf("Validator %s doesn't support kind %s", validator, v.Kind()), false, stripParams(validatorSpec), []string{}}
- }
- }
-
- if validatefunc, ok := TagMap[validator]; ok {
- delete(options, validatorSpec)
-
- switch v.Kind() {
- case reflect.String,
- reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
- reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64,
- reflect.Float32, reflect.Float64:
- field := fmt.Sprint(v) // make value into string, then validate with regex
- if result := validatefunc(field); !result && !negate || result && negate {
- if customMsgExists {
- return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}}
- }
- if negate {
- return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}}
- }
- return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}}
- }
- default:
- //Not Yet Supported Types (Fail here!)
- err := fmt.Errorf("Validator %s doesn't support kind %s for value %v", validator, v.Kind(), v)
- return false, Error{t.Name, err, false, stripParams(validatorSpec), []string{}}
- }
- }
- }
- return true, nil
- case reflect.Map:
- if v.Type().Key().Kind() != reflect.String {
- return false, &UnsupportedTypeError{v.Type()}
- }
- var sv stringValues
- sv = v.MapKeys()
- sort.Sort(sv)
- result := true
- for i, k := range sv {
- var resultItem bool
- var err error
- if v.MapIndex(k).Kind() != reflect.Struct {
- resultItem, err = typeCheck(v.MapIndex(k), t, o, options)
- if err != nil {
- return false, err
- }
- } else {
- resultItem, err = ValidateStruct(v.MapIndex(k).Interface())
- if err != nil {
- err = prependPathToErrors(err, t.Name+"."+sv[i].Interface().(string))
- return false, err
- }
- }
- result = result && resultItem
- }
- return result, nil
- case reflect.Slice, reflect.Array:
- result := true
- for i := 0; i < v.Len(); i++ {
- var resultItem bool
- var err error
- if v.Index(i).Kind() != reflect.Struct {
- resultItem, err = typeCheck(v.Index(i), t, o, options)
- if err != nil {
- return false, err
- }
- } else {
- resultItem, err = ValidateStruct(v.Index(i).Interface())
- if err != nil {
- err = prependPathToErrors(err, t.Name+"."+strconv.Itoa(i))
- return false, err
- }
- }
- result = result && resultItem
- }
- return result, nil
- case reflect.Interface:
- // If the value is an interface then encode its element
- if v.IsNil() {
- return true, nil
- }
- return ValidateStruct(v.Interface())
- case reflect.Ptr:
- // If the value is a pointer then checks its element
- if v.IsNil() {
- return true, nil
- }
- return typeCheck(v.Elem(), t, o, options)
- case reflect.Struct:
- return true, nil
- default:
- return false, &UnsupportedTypeError{v.Type()}
- }
-}
-
-func stripParams(validatorString string) string {
- return paramsRegexp.ReplaceAllString(validatorString, "")
-}
-
-// isEmptyValue checks whether value empty or not
-func isEmptyValue(v reflect.Value) bool {
- switch v.Kind() {
- case reflect.String, reflect.Array:
- return v.Len() == 0
- case reflect.Map, reflect.Slice:
- return v.Len() == 0 || v.IsNil()
- case reflect.Bool:
- return !v.Bool()
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- return v.Int() == 0
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
- return v.Uint() == 0
- case reflect.Float32, reflect.Float64:
- return v.Float() == 0
- case reflect.Interface, reflect.Ptr:
- return v.IsNil()
- }
-
- return reflect.DeepEqual(v.Interface(), reflect.Zero(v.Type()).Interface())
-}
-
-// ErrorByField returns error for specified field of the struct
-// validated by ValidateStruct or empty string if there are no errors
-// or this field doesn't exists or doesn't have any errors.
-func ErrorByField(e error, field string) string {
- if e == nil {
- return ""
- }
- return ErrorsByField(e)[field]
-}
-
-// ErrorsByField returns map of errors of the struct validated
-// by ValidateStruct or empty map if there are no errors.
-func ErrorsByField(e error) map[string]string {
- m := make(map[string]string)
- if e == nil {
- return m
- }
- // prototype for ValidateStruct
-
- switch e := e.(type) {
- case Error:
- m[e.Name] = e.Err.Error()
- case Errors:
- for _, item := range e.Errors() {
- n := ErrorsByField(item)
- for k, v := range n {
- m[k] = v
- }
- }
- }
-
- return m
-}
-
-// Error returns string equivalent for reflect.Type
-func (e *UnsupportedTypeError) Error() string {
- return "validator: unsupported type: " + e.Type.String()
-}
-
-func (sv stringValues) Len() int { return len(sv) }
-func (sv stringValues) Swap(i, j int) { sv[i], sv[j] = sv[j], sv[i] }
-func (sv stringValues) Less(i, j int) bool { return sv.get(i) < sv.get(j) }
-func (sv stringValues) get(i int) string { return sv[i].String() }
-
-func IsE164(str string) bool {
- return rxE164.MatchString(str)
-}
-
-// IsYYYYMMDD checks if a string is in the "YYYY-MM-DD" date format and returns true if valid.
-func IsYYYYMMDD(str string) bool {
- layout := "2006-01-02"
- _, err := time.Parse(layout, str)
- return err == nil
-}
diff --git a/vendor/github.com/asaskevich/govalidator/v11/wercker.yml b/vendor/github.com/asaskevich/govalidator/v11/wercker.yml
deleted file mode 100644
index bc5f7b0864bd..000000000000
--- a/vendor/github.com/asaskevich/govalidator/v11/wercker.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-box: golang
-build:
- steps:
- - setup-go-workspace
-
- - script:
- name: go get
- code: |
- go version
- go get -t ./...
-
- - script:
- name: go test
- code: |
- go test -race -v ./...
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go
deleted file mode 100644
index fb06d8dc0557..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go
+++ /dev/null
@@ -1,32 +0,0 @@
-package middleware
-
-import (
- "context"
- "sync/atomic"
-
- "github.com/aws/smithy-go/middleware"
-)
-
-// AddTimeOffsetMiddleware is deprecated.
-//
-// Deprecated: handled in retry loop.
-type AddTimeOffsetMiddleware struct {
- Offset *atomic.Int64
-}
-
-// ID the identifier for AddTimeOffsetMiddleware
-func (m *AddTimeOffsetMiddleware) ID() string { return "AddTimeOffsetMiddleware" }
-
-// HandleBuild is a no-op.
-func (m AddTimeOffsetMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
- out middleware.BuildOutput, metadata middleware.Metadata, err error,
-) {
- return next.HandleBuild(ctx, in)
-}
-
-// HandleDeserialize is a no-op.
-func (m *AddTimeOffsetMiddleware) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- return next.HandleDeserialize(ctx, in)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/CHANGELOG.md
deleted file mode 100644
index 000b601f0988..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/CHANGELOG.md
+++ /dev/null
@@ -1,882 +0,0 @@
-# v1.77.0 (2026-01-14)
-
-* **Feature**: Added support for BOTTLEROCKET NVIDIA FIPS AMIs to AMI types in US regions.
-
-# v1.76.4 (2026-01-09)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.76.3 (2025-12-09)
-
-* No change notes available for this release.
-
-# v1.76.2 (2025-12-08)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.76.1 (2025-12-02)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change.
-
-# v1.76.0 (2025-12-01)
-
-* **Feature**: This release adds support for EKS Capabilities
-
-# v1.75.1 (2025-11-25)
-
-* **Bug Fix**: Add error check for endpoint param binding during auth scheme resolution to fix panic reported in #3234
-
-# v1.75.0 (2025-11-21)
-
-* **Feature**: Adds support for controlPlaneScalingConfig on EKS Clusters.
-
-# v1.74.10 (2025-11-19.2)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.74.9 (2025-11-12)
-
-* **Bug Fix**: Further reduce allocation overhead when the metrics system isn't in-use.
-* **Bug Fix**: Reduce allocation overhead when the client doesn't have any HTTP interceptors configured.
-* **Bug Fix**: Remove blank trace spans towards the beginning of the request that added no additional information. This conveys a slight reduction in overall allocations.
-
-# v1.74.8 (2025-11-11)
-
-* **Bug Fix**: Return validation error if input region is not a valid host label.
-
-# v1.74.7 (2025-11-04)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system.
-
-# v1.74.6 (2025-10-30)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.74.5 (2025-10-23)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.74.4 (2025-10-22)
-
-* No change notes available for this release.
-
-# v1.74.3 (2025-10-16)
-
-* **Dependency Update**: Bump minimum Go version to 1.23.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.74.2 (2025-09-26)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.74.1 (2025-09-23)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.74.0 (2025-09-22)
-
-* **Feature**: Adds support for RepairConfig overrides and configurations in EKS Managed Node Groups.
-
-# v1.73.3 (2025-09-10)
-
-* No change notes available for this release.
-
-# v1.73.2 (2025-09-08)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.73.1 (2025-08-29)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.73.0 (2025-08-27)
-
-* **Feature**: Add support for on-demand refresh of EKS cluster insights
-* **Dependency Update**: Update to smithy-go v1.23.0.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.72.0 (2025-08-25)
-
-* **Feature**: Remove incorrect endpoint tests
-
-# v1.71.1 (2025-08-21)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.71.0 (2025-08-20)
-
-* **Feature**: EKS Add-ons Custom Namespace Support
-* **Bug Fix**: Remove unused deserialization code.
-
-# v1.70.0 (2025-08-11)
-
-* **Feature**: Add support for configuring per-service Options via callback on global config.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.69.0 (2025-08-05)
-
-* **Feature**: Add support for deletion protection on EKS clusters
-
-# v1.68.0 (2025-08-04)
-
-* **Feature**: Support configurable auth scheme preferences in service clients via AWS_AUTH_SCHEME_PREFERENCE in the environment, auth_scheme_preference in the config file, and through in-code settings on LoadDefaultConfig and client constructor methods.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.67.1 (2025-07-30)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.67.0 (2025-07-28)
-
-* **Feature**: Add support for HTTP interceptors.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.66.2 (2025-07-19)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.66.1 (2025-06-17)
-
-* **Dependency Update**: Update to smithy-go v1.22.4.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.66.0 (2025-06-11)
-
-* **Feature**: Release for EKS Pod Identity Cross Account feature and disableSessionTags flag.
-
-# v1.65.2 (2025-06-10)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.65.1 (2025-06-06)
-
-* No change notes available for this release.
-
-# v1.65.0 (2025-06-02)
-
-* **Feature**: Add support for filtering ListInsights API calls on MISCONFIGURATION insight category
-
-# v1.64.0 (2025-04-16)
-
-* **Feature**: Added support for new AL2023 ARM64 NVIDIA AMIs to the supported AMITypes.
-
-# v1.63.2 (2025-04-10)
-
-* No change notes available for this release.
-
-# v1.63.1 (2025-04-03)
-
-* No change notes available for this release.
-
-# v1.63.0 (2025-03-31)
-
-* **Feature**: Add support for updating RemoteNetworkConfig for hybrid nodes on EKS UpdateClusterConfig API
-
-# v1.62.0 (2025-03-27)
-
-* **Feature**: Added support for BOTTLEROCKET FIPS AMIs to AMI types in US regions.
-
-# v1.61.0 (2025-03-25)
-
-* **Feature**: Added support to override upgrade-blocking readiness checks via force flag when updating a cluster.
-
-# v1.60.1 (2025-03-04.2)
-
-* **Bug Fix**: Add assurance test for operation order.
-
-# v1.60.0 (2025-02-28)
-
-* **Feature**: Adding licenses to EKS Anywhere Subscription operations response.
-
-# v1.59.0 (2025-02-27)
-
-* **Feature**: Track credential providers via User-Agent Feature ids
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.58.1 (2025-02-18)
-
-* **Bug Fix**: Bump go version to 1.22
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.58.0 (2025-02-07)
-
-* **Feature**: Introduce versionStatus field to take place of status field in EKS DescribeClusterVersions API
-
-# v1.57.4 (2025-02-05)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.57.3 (2025-02-04)
-
-* No change notes available for this release.
-
-# v1.57.2 (2025-01-31)
-
-* **Dependency Update**: Switch to code-generated waiter matchers, removing the dependency on go-jmespath.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.57.1 (2025-01-30)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.57.0 (2025-01-24)
-
-* **Feature**: Adds support for UpdateStrategies in EKS Managed Node Groups.
-* **Dependency Update**: Updated to the latest SDK module versions
-* **Dependency Update**: Upgrade to smithy-go v1.22.2.
-
-# v1.56.5 (2025-01-17)
-
-* **Bug Fix**: Fix bug where credentials weren't refreshed during retry loop.
-
-# v1.56.4 (2025-01-15)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.56.3 (2025-01-14)
-
-* **Bug Fix**: Fix issue where waiters were not failing on unmatched errors as they should. This may have breaking behavioral changes for users in fringe cases. See [this announcement](https://github.com/aws/aws-sdk-go-v2/discussions/2954) for more information.
-
-# v1.56.2 (2025-01-09)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.56.1 (2025-01-08)
-
-* No change notes available for this release.
-
-# v1.56.0 (2024-12-23)
-
-* **Feature**: This release adds support for DescribeClusterVersions API that provides important information about Kubernetes versions along with end of support dates
-
-# v1.55.0 (2024-12-20)
-
-* **Feature**: This release expands the catalog of upgrade insight checks
-
-# v1.54.1 (2024-12-19)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.54.0 (2024-12-13)
-
-* **Feature**: Add NodeRepairConfig in CreateNodegroupRequest and UpdateNodegroupConfigRequest
-
-# v1.53.0 (2024-12-02)
-
-* **Feature**: Added support for Auto Mode Clusters, Hybrid Nodes, and specifying computeTypes in the DescribeAddonVersions API.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.52.1 (2024-11-18)
-
-* **Dependency Update**: Update to smithy-go v1.22.1.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.52.0 (2024-11-08)
-
-* **Feature**: Adds new error code `Ec2InstanceTypeDoesNotExist` for Amazon EKS managed node groups
-
-# v1.51.3 (2024-11-07)
-
-* **Bug Fix**: Adds case-insensitive handling of error message fields in service responses
-
-# v1.51.2 (2024-11-06)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.51.1 (2024-10-28)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.51.0 (2024-10-21)
-
-* **Feature**: This release adds support for Amazon Application Recovery Controller (ARC) zonal shift and zonal autoshift with EKS that enhances the resiliency of multi-AZ cluster environments
-
-# v1.50.2 (2024-10-08)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.50.1 (2024-10-07)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.50.0 (2024-10-04)
-
-* **Feature**: Add support for HTTP client metrics.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.49.4 (2024-10-03)
-
-* No change notes available for this release.
-
-# v1.49.3 (2024-09-27)
-
-* No change notes available for this release.
-
-# v1.49.2 (2024-09-25)
-
-* No change notes available for this release.
-
-# v1.49.1 (2024-09-23)
-
-* No change notes available for this release.
-
-# v1.49.0 (2024-09-20)
-
-* **Feature**: Add tracing and metrics support to service clients.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.48.5 (2024-09-17)
-
-* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution.
-
-# v1.48.4 (2024-09-04)
-
-* No change notes available for this release.
-
-# v1.48.3 (2024-09-03)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.48.2 (2024-08-22)
-
-* No change notes available for this release.
-
-# v1.48.1 (2024-08-15)
-
-* **Dependency Update**: Bump minimum Go version to 1.21.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.48.0 (2024-08-12)
-
-* **Feature**: Added support for new AL2023 GPU AMIs to the supported AMITypes.
-
-# v1.47.0 (2024-07-25)
-
-* **Feature**: This release adds support for EKS cluster to manage extended support.
-
-# v1.46.2 (2024-07-10.2)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.46.1 (2024-07-10)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.46.0 (2024-07-01)
-
-* **Feature**: Updates EKS managed node groups to support EC2 Capacity Blocks for ML
-
-# v1.45.1 (2024-06-28)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.45.0 (2024-06-26)
-
-* **Feature**: Added support for disabling unmanaged addons during cluster creation.
-* **Feature**: Support list-of-string endpoint parameter.
-
-# v1.44.1 (2024-06-19)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.44.0 (2024-06-18)
-
-* **Feature**: This release adds support to surface async fargate customer errors from async path to customer through describe-fargate-profile API response.
-* **Feature**: Track usage of various AWS SDK features in user-agent string.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.43.2 (2024-06-17)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.43.1 (2024-06-07)
-
-* **Bug Fix**: Add clock skew correction on all service clients
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.43.0 (2024-06-03)
-
-* **Feature**: Adds support for EKS add-ons pod identity associations integration
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.42.5 (2024-05-23)
-
-* No change notes available for this release.
-
-# v1.42.4 (2024-05-16)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.42.3 (2024-05-15)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.42.2 (2024-05-08)
-
-* **Bug Fix**: GoDoc improvement
-
-# v1.42.1 (2024-03-29)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.42.0 (2024-03-28)
-
-* **Feature**: Add multiple customer error code to handle customer caused failure when managing EKS node groups
-
-# v1.41.2 (2024-03-18)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.41.1 (2024-03-07)
-
-* **Bug Fix**: Remove dependency on go-cmp.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.41.0 (2024-02-29)
-
-* **Feature**: Added support for new AL2023 AMIs to the supported AMITypes.
-
-# v1.40.1 (2024-02-23)
-
-* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.40.0 (2024-02-22)
-
-* **Feature**: Add middleware stack snapshot tests.
-
-# v1.39.2 (2024-02-21)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.39.1 (2024-02-20)
-
-* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure.
-
-# v1.39.0 (2024-02-16)
-
-* **Feature**: Add new ClientOptions field to waiter config which allows you to extend the config for operation calls made by waiters.
-
-# v1.38.0 (2024-02-13)
-
-* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.37.1 (2024-01-04)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.37.0 (2023-12-20)
-
-* **Feature**: Add support for cluster insights, new EKS capability that surfaces potentially upgrade impacting issues.
-
-# v1.36.0 (2023-12-18)
-
-* **Feature**: Add support for EKS Cluster Access Management.
-
-# v1.35.5 (2023-12-08)
-
-* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein.
-
-# v1.35.4 (2023-12-07)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.35.3 (2023-12-06)
-
-* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously.
-
-# v1.35.2 (2023-12-01)
-
-* **Bug Fix**: Correct wrapping of errors in authentication workflow.
-* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.35.1 (2023-11-30)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.35.0 (2023-11-29)
-
-* **Feature**: Expose Options() accessor on service clients.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.34.2 (2023-11-28.2)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.34.1 (2023-11-28)
-
-* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction.
-
-# v1.34.0 (2023-11-27)
-
-* **Feature**: This release adds support for EKS Pod Identity feature. EKS Pod Identity makes it easy for customers to obtain IAM permissions for the applications running in their EKS clusters.
-
-# v1.33.2 (2023-11-20)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.33.1 (2023-11-15)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.33.0 (2023-11-09.2)
-
-* **Feature**: Adding EKS Anywhere subscription related operations.
-
-# v1.32.1 (2023-11-09)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.32.0 (2023-11-01)
-
-* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.31.0 (2023-10-31)
-
-* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.30.0 (2023-10-24)
-
-* **Feature**: Added support for Cluster Subnet and Security Group mutability.
-
-# v1.29.7 (2023-10-12)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.29.6 (2023-10-06)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.29.5 (2023-08-21)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.29.4 (2023-08-18)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.29.3 (2023-08-17)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.29.2 (2023-08-07)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.29.1 (2023-08-01)
-
-* No change notes available for this release.
-
-# v1.29.0 (2023-07-31)
-
-* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.28.1 (2023-07-28)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.28.0 (2023-07-27)
-
-* **Feature**: Add multiple customer error code to handle customer caused failure when managing EKS node groups
-
-# v1.27.15 (2023-07-13)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.27.14 (2023-06-15)
-
-* No change notes available for this release.
-
-# v1.27.13 (2023-06-13)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.27.12 (2023-05-04)
-
-* No change notes available for this release.
-
-# v1.27.11 (2023-04-24)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.27.10 (2023-04-10)
-
-* No change notes available for this release.
-
-# v1.27.9 (2023-04-07)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.27.8 (2023-03-21)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.27.7 (2023-03-14)
-
-* No change notes available for this release.
-
-# v1.27.6 (2023-03-10)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.27.5 (2023-02-22)
-
-* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes.
-
-# v1.27.4 (2023-02-20)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.27.3 (2023-02-15)
-
-* **Announcement**: When receiving an error response in restJson-based services, an incorrect error type may have been returned based on the content of the response. This has been fixed via PR #2012 tracked in issue #1910.
-* **Bug Fix**: Correct error type parsing for restJson services.
-
-# v1.27.2 (2023-02-08)
-
-* No change notes available for this release.
-
-# v1.27.1 (2023-02-03)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.27.0 (2023-01-05)
-
-* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401).
-
-# v1.26.0 (2022-12-15)
-
-* **Feature**: Add support for Windows managed nodes groups.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.25.0 (2022-12-07)
-
-* **Feature**: Adds support for EKS add-ons configurationValues fields and DescribeAddonConfiguration function
-
-# v1.24.1 (2022-12-02)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.24.0 (2022-11-29)
-
-* **Feature**: Adds support for additional EKS add-ons metadata and filtering fields
-
-# v1.23.0 (2022-11-16)
-
-* **Feature**: Adds support for customer-provided placement groups for Kubernetes control plane instances when creating local EKS clusters on Outposts
-
-# v1.22.4 (2022-11-07)
-
-* No change notes available for this release.
-
-# v1.22.3 (2022-10-24)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.22.2 (2022-10-21)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.22.1 (2022-09-20)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.22.0 (2022-09-14)
-
-* **Feature**: Adding support for local Amazon EKS clusters on Outposts
-* **Feature**: Adds support for EKS Addons ResolveConflicts "preserve" flag. Also adds new update failed status for EKS Addons.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.21.11 (2022-09-02)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.21.10 (2022-08-31)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.21.9 (2022-08-29)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.21.8 (2022-08-11)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.21.7 (2022-08-09)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.21.6 (2022-08-08)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.21.5 (2022-08-01)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.21.4 (2022-07-05)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.21.3 (2022-06-29)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.21.2 (2022-06-07)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.21.1 (2022-05-17)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.21.0 (2022-05-10)
-
-* **Feature**: Adds BOTTLEROCKET_ARM_64_NVIDIA and BOTTLEROCKET_x86_64_NVIDIA AMI types to EKS managed nodegroups
-
-# v1.20.7 (2022-05-03)
-
-* No change notes available for this release.
-
-# v1.20.6 (2022-04-25)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.20.5 (2022-04-12)
-
-* No change notes available for this release.
-
-# v1.20.4 (2022-03-30)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.20.3 (2022-03-24)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.20.2 (2022-03-23)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.20.1 (2022-03-08.3)
-
-* No change notes available for this release.
-
-# v1.20.0 (2022-03-08)
-
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.19.0 (2022-02-24)
-
-* **Feature**: API client updated
-* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options.
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.18.0 (2022-01-14)
-
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.17.0 (2022-01-07)
-
-* **Feature**: API client updated
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.16.0 (2021-12-21)
-
-* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens.
-
-# v1.15.1 (2021-12-02)
-
-* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514))
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.15.0 (2021-11-30)
-
-* **Feature**: API client updated
-
-# v1.14.0 (2021-11-19)
-
-* **Feature**: API client updated
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.13.0 (2021-11-12)
-
-* **Feature**: Waiters now have a `WaitForOutput` method, which can be used to retrieve the output of the successful wait operation. Thank you to [Andrew Haines](https://github.com/haines) for contributing this feature.
-
-# v1.12.0 (2021-11-06)
-
-* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Feature**: Updated service to latest API model.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.11.0 (2021-10-21)
-
-* **Feature**: Updated to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.10.2 (2021-10-11)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.10.1 (2021-09-17)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.10.0 (2021-09-10)
-
-* **Feature**: API client updated
-
-# v1.9.0 (2021-08-27)
-
-* **Feature**: Updated API model to latest revision.
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.8.2 (2021-08-19)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.8.1 (2021-08-04)
-
-* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.8.0 (2021-07-15)
-
-* **Feature**: Updated service model to latest version.
-* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.7.0 (2021-06-25)
-
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.6.0 (2021-06-11)
-
-* **Feature**: Updated to latest API model.
-
-# v1.5.0 (2021-05-20)
-
-* **Feature**: API client updated
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.4.0 (2021-05-14)
-
-* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
-* **Feature**: Updated to latest service API model.
-* **Dependency Update**: Updated to the latest SDK module versions
-
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/LICENSE.txt
deleted file mode 100644
index d64569567334..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/LICENSE.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_client.go
deleted file mode 100644
index e838452492ea..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_client.go
+++ /dev/null
@@ -1,966 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- cryptorand "crypto/rand"
- "errors"
- "fmt"
- "github.com/aws/aws-sdk-go-v2/aws"
- "github.com/aws/aws-sdk-go-v2/aws/defaults"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/retry"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
- awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
- internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
- internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
- internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
- internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware"
- smithy "github.com/aws/smithy-go"
- smithyauth "github.com/aws/smithy-go/auth"
- smithydocument "github.com/aws/smithy-go/document"
- "github.com/aws/smithy-go/logging"
- "github.com/aws/smithy-go/metrics"
- "github.com/aws/smithy-go/middleware"
- smithyrand "github.com/aws/smithy-go/rand"
- "github.com/aws/smithy-go/tracing"
- smithyhttp "github.com/aws/smithy-go/transport/http"
- "net"
- "net/http"
- "sync/atomic"
- "time"
-)
-
-const ServiceID = "EKS"
-const ServiceAPIVersion = "2017-11-01"
-
-type operationMetrics struct {
- Duration metrics.Float64Histogram
- SerializeDuration metrics.Float64Histogram
- ResolveIdentityDuration metrics.Float64Histogram
- ResolveEndpointDuration metrics.Float64Histogram
- SignRequestDuration metrics.Float64Histogram
- DeserializeDuration metrics.Float64Histogram
-}
-
-func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram {
- switch name {
- case "client.call.duration":
- return m.Duration
- case "client.call.serialization_duration":
- return m.SerializeDuration
- case "client.call.resolve_identity_duration":
- return m.ResolveIdentityDuration
- case "client.call.resolve_endpoint_duration":
- return m.ResolveEndpointDuration
- case "client.call.signing_duration":
- return m.SignRequestDuration
- case "client.call.deserialization_duration":
- return m.DeserializeDuration
- default:
- panic("unrecognized operation metric")
- }
-}
-
-func timeOperationMetric[T any](
- ctx context.Context, metric string, fn func() (T, error),
- opts ...metrics.RecordMetricOption,
-) (T, error) {
- mm := getOperationMetrics(ctx)
- if mm == nil { // not using the metrics system
- return fn()
- }
-
- instr := mm.histogramFor(metric)
- opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...)
-
- start := time.Now()
- v, err := fn()
- end := time.Now()
-
- elapsed := end.Sub(start)
- instr.Record(ctx, float64(elapsed)/1e9, opts...)
- return v, err
-}
-
-func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() {
- mm := getOperationMetrics(ctx)
- if mm == nil { // not using the metrics system
- return func() {}
- }
-
- instr := mm.histogramFor(metric)
- opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...)
-
- var ended bool
- start := time.Now()
- return func() {
- if ended {
- return
- }
- ended = true
-
- end := time.Now()
-
- elapsed := end.Sub(start)
- instr.Record(ctx, float64(elapsed)/1e9, opts...)
- }
-}
-
-func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption {
- return func(o *metrics.RecordMetricOptions) {
- o.Properties.Set("rpc.service", middleware.GetServiceID(ctx))
- o.Properties.Set("rpc.method", middleware.GetOperationName(ctx))
- }
-}
-
-type operationMetricsKey struct{}
-
-func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) {
- if _, ok := mp.(metrics.NopMeterProvider); ok {
- // not using the metrics system - setting up the metrics context is a memory-intensive operation
- // so we should skip it in this case
- return parent, nil
- }
-
- meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/eks")
- om := &operationMetrics{}
-
- var err error
-
- om.Duration, err = operationMetricTimer(meter, "client.call.duration",
- "Overall call duration (including retries and time to send or receive request and response body)")
- if err != nil {
- return nil, err
- }
- om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration",
- "The time it takes to serialize a message body")
- if err != nil {
- return nil, err
- }
- om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration",
- "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider")
- if err != nil {
- return nil, err
- }
- om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration",
- "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request")
- if err != nil {
- return nil, err
- }
- om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration",
- "The time it takes to sign a request")
- if err != nil {
- return nil, err
- }
- om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration",
- "The time it takes to deserialize a message body")
- if err != nil {
- return nil, err
- }
-
- return context.WithValue(parent, operationMetricsKey{}, om), nil
-}
-
-func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) {
- return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) {
- o.UnitLabel = "s"
- o.Description = desc
- })
-}
-
-func getOperationMetrics(ctx context.Context) *operationMetrics {
- if v := ctx.Value(operationMetricsKey{}); v != nil {
- return v.(*operationMetrics)
- }
- return nil
-}
-
-func operationTracer(p tracing.TracerProvider) tracing.Tracer {
- return p.Tracer("github.com/aws/aws-sdk-go-v2/service/eks")
-}
-
-// Client provides the API client to make operations call for Amazon Elastic
-// Kubernetes Service.
-type Client struct {
- options Options
-
- // Difference between the time reported by the server and the client
- timeOffset *atomic.Int64
-}
-
-// New returns an initialized Client based on the functional options. Provide
-// additional functional options to further configure the behavior of the client,
-// such as changing the client's endpoint or adding custom middleware behavior.
-func New(options Options, optFns ...func(*Options)) *Client {
- options = options.Copy()
-
- resolveDefaultLogger(&options)
-
- setResolvedDefaultsMode(&options)
-
- resolveRetryer(&options)
-
- resolveHTTPClient(&options)
-
- resolveHTTPSignerV4(&options)
-
- resolveIdempotencyTokenProvider(&options)
-
- resolveEndpointResolverV2(&options)
-
- resolveTracerProvider(&options)
-
- resolveMeterProvider(&options)
-
- resolveAuthSchemeResolver(&options)
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- finalizeRetryMaxAttempts(&options)
-
- ignoreAnonymousAuth(&options)
-
- wrapWithAnonymousAuth(&options)
-
- resolveAuthSchemes(&options)
-
- client := &Client{
- options: options,
- }
-
- initializeTimeOffsetResolver(client)
-
- return client
-}
-
-// Options returns a copy of the client configuration.
-//
-// Callers SHOULD NOT perform mutations on any inner structures within client
-// config. Config overrides should instead be made on a per-operation basis through
-// functional options.
-func (c *Client) Options() Options {
- return c.options.Copy()
-}
-
-func (c *Client) invokeOperation(
- ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error,
-) (
- result interface{}, metadata middleware.Metadata, err error,
-) {
- ctx = middleware.ClearStackValues(ctx)
- ctx = middleware.WithServiceID(ctx, ServiceID)
- ctx = middleware.WithOperationName(ctx, opID)
-
- stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
- options := c.options.Copy()
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- finalizeOperationRetryMaxAttempts(&options, *c)
-
- finalizeClientEndpointResolverOptions(&options)
-
- for _, fn := range stackFns {
- if err := fn(stack, options); err != nil {
- return nil, metadata, err
- }
- }
-
- for _, fn := range options.APIOptions {
- if err := fn(stack); err != nil {
- return nil, metadata, err
- }
- }
-
- ctx, err = withOperationMetrics(ctx, options.MeterProvider)
- if err != nil {
- return nil, metadata, err
- }
-
- tracer := operationTracer(options.TracerProvider)
- spanName := fmt.Sprintf("%s.%s", ServiceID, opID)
-
- ctx = tracing.WithOperationTracer(ctx, tracer)
-
- ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) {
- o.Kind = tracing.SpanKindClient
- o.Properties.Set("rpc.system", "aws-api")
- o.Properties.Set("rpc.method", opID)
- o.Properties.Set("rpc.service", ServiceID)
- })
- endTimer := startMetricTimer(ctx, "client.call.duration")
- defer endTimer()
- defer span.End()
-
- handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) {
- o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/eks")
- })
- decorated := middleware.DecorateHandler(handler, stack)
- result, metadata, err = decorated.Handle(ctx, params)
- if err != nil {
- span.SetProperty("exception.type", fmt.Sprintf("%T", err))
- span.SetProperty("exception.message", err.Error())
-
- var aerr smithy.APIError
- if errors.As(err, &aerr) {
- span.SetProperty("api.error_code", aerr.ErrorCode())
- span.SetProperty("api.error_message", aerr.ErrorMessage())
- span.SetProperty("api.error_fault", aerr.ErrorFault().String())
- }
-
- err = &smithy.OperationError{
- ServiceID: ServiceID,
- OperationName: opID,
- Err: err,
- }
- }
-
- span.SetProperty("error", err != nil)
- if err == nil {
- span.SetStatus(tracing.SpanStatusOK)
- } else {
- span.SetStatus(tracing.SpanStatusError)
- }
-
- return result, metadata, err
-}
-
-type operationInputKey struct{}
-
-func setOperationInput(ctx context.Context, input interface{}) context.Context {
- return middleware.WithStackValue(ctx, operationInputKey{}, input)
-}
-
-func getOperationInput(ctx context.Context) interface{} {
- return middleware.GetStackValue(ctx, operationInputKey{})
-}
-
-type setOperationInputMiddleware struct {
-}
-
-func (*setOperationInputMiddleware) ID() string {
- return "setOperationInput"
-}
-
-func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- ctx = setOperationInput(ctx, in.Parameters)
- return next.HandleSerialize(ctx, in)
-}
-
-func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error {
- if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil {
- return fmt.Errorf("add ResolveAuthScheme: %w", err)
- }
- if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil {
- return fmt.Errorf("add GetIdentity: %v", err)
- }
- if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil {
- return fmt.Errorf("add ResolveEndpointV2: %v", err)
- }
- if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil {
- return fmt.Errorf("add Signing: %w", err)
- }
- return nil
-}
-func resolveAuthSchemeResolver(options *Options) {
- if options.AuthSchemeResolver == nil {
- options.AuthSchemeResolver = &defaultAuthSchemeResolver{}
- }
-}
-
-func resolveAuthSchemes(options *Options) {
- if options.AuthSchemes == nil {
- options.AuthSchemes = []smithyhttp.AuthScheme{
- internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{
- Signer: options.HTTPSignerV4,
- Logger: options.Logger,
- LogSigning: options.ClientLogMode.IsSigning(),
- }),
- }
- }
-}
-
-type noSmithyDocumentSerde = smithydocument.NoSerde
-
-type legacyEndpointContextSetter struct {
- LegacyResolver EndpointResolver
-}
-
-func (*legacyEndpointContextSetter) ID() string {
- return "legacyEndpointContextSetter"
-}
-
-func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.LegacyResolver != nil {
- ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true)
- }
-
- return next.HandleInitialize(ctx, in)
-
-}
-func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error {
- return stack.Initialize.Add(&legacyEndpointContextSetter{
- LegacyResolver: o.EndpointResolver,
- }, middleware.Before)
-}
-
-func resolveDefaultLogger(o *Options) {
- if o.Logger != nil {
- return
- }
- o.Logger = logging.Nop{}
-}
-
-func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
- return middleware.AddSetLoggerMiddleware(stack, o.Logger)
-}
-
-func setResolvedDefaultsMode(o *Options) {
- if len(o.resolvedDefaultsMode) > 0 {
- return
- }
-
- var mode aws.DefaultsMode
- mode.SetFromString(string(o.DefaultsMode))
-
- if mode == aws.DefaultsModeAuto {
- mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
- }
-
- o.resolvedDefaultsMode = mode
-}
-
-// NewFromConfig returns a new client from the provided config.
-func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
- opts := Options{
- Region: cfg.Region,
- DefaultsMode: cfg.DefaultsMode,
- RuntimeEnvironment: cfg.RuntimeEnvironment,
- HTTPClient: cfg.HTTPClient,
- Credentials: cfg.Credentials,
- APIOptions: cfg.APIOptions,
- Logger: cfg.Logger,
- ClientLogMode: cfg.ClientLogMode,
- AppID: cfg.AppID,
- AuthSchemePreference: cfg.AuthSchemePreference,
- }
- resolveAWSRetryerProvider(cfg, &opts)
- resolveAWSRetryMaxAttempts(cfg, &opts)
- resolveAWSRetryMode(cfg, &opts)
- resolveAWSEndpointResolver(cfg, &opts)
- resolveInterceptors(cfg, &opts)
- resolveUseDualStackEndpoint(cfg, &opts)
- resolveUseFIPSEndpoint(cfg, &opts)
- resolveBaseEndpoint(cfg, &opts)
- return New(opts, func(o *Options) {
- for _, opt := range cfg.ServiceOptions {
- opt(ServiceID, o)
- }
- for _, opt := range optFns {
- opt(o)
- }
- })
-}
-
-func resolveHTTPClient(o *Options) {
- var buildable *awshttp.BuildableClient
-
- if o.HTTPClient != nil {
- var ok bool
- buildable, ok = o.HTTPClient.(*awshttp.BuildableClient)
- if !ok {
- return
- }
- } else {
- buildable = awshttp.NewBuildableClient()
- }
-
- modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
- if err == nil {
- buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) {
- if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok {
- dialer.Timeout = dialerTimeout
- }
- })
-
- buildable = buildable.WithTransportOptions(func(transport *http.Transport) {
- if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok {
- transport.TLSHandshakeTimeout = tlsHandshakeTimeout
- }
- })
- }
-
- o.HTTPClient = buildable
-}
-
-func resolveRetryer(o *Options) {
- if o.Retryer != nil {
- return
- }
-
- if len(o.RetryMode) == 0 {
- modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
- if err == nil {
- o.RetryMode = modeConfig.RetryMode
- }
- }
- if len(o.RetryMode) == 0 {
- o.RetryMode = aws.RetryModeStandard
- }
-
- var standardOptions []func(*retry.StandardOptions)
- if v := o.RetryMaxAttempts; v != 0 {
- standardOptions = append(standardOptions, func(so *retry.StandardOptions) {
- so.MaxAttempts = v
- })
- }
-
- switch o.RetryMode {
- case aws.RetryModeAdaptive:
- var adaptiveOptions []func(*retry.AdaptiveModeOptions)
- if len(standardOptions) != 0 {
- adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) {
- ao.StandardOptions = append(ao.StandardOptions, standardOptions...)
- })
- }
- o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...)
-
- default:
- o.Retryer = retry.NewStandard(standardOptions...)
- }
-}
-
-func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
- if cfg.Retryer == nil {
- return
- }
- o.Retryer = cfg.Retryer()
-}
-
-func resolveAWSRetryMode(cfg aws.Config, o *Options) {
- if len(cfg.RetryMode) == 0 {
- return
- }
- o.RetryMode = cfg.RetryMode
-}
-func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
- if cfg.RetryMaxAttempts == 0 {
- return
- }
- o.RetryMaxAttempts = cfg.RetryMaxAttempts
-}
-
-func finalizeRetryMaxAttempts(o *Options) {
- if o.RetryMaxAttempts == 0 {
- return
- }
-
- o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
-}
-
-func finalizeOperationRetryMaxAttempts(o *Options, client Client) {
- if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
- return
- }
-
- o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
-}
-
-func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
- if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
- return
- }
- o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions)
-}
-
-func resolveInterceptors(cfg aws.Config, o *Options) {
- o.Interceptors = cfg.Interceptors.Copy()
-}
-
-func addClientUserAgent(stack *middleware.Stack, options Options) error {
- ua, err := getOrAddRequestUserAgent(stack)
- if err != nil {
- return err
- }
-
- ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "eks", goModuleVersion)
- if len(options.AppID) > 0 {
- ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID)
- }
-
- return nil
-}
-
-func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) {
- id := (*awsmiddleware.RequestUserAgent)(nil).ID()
- mw, ok := stack.Build.Get(id)
- if !ok {
- mw = awsmiddleware.NewRequestUserAgent()
- if err := stack.Build.Add(mw, middleware.After); err != nil {
- return nil, err
- }
- }
-
- ua, ok := mw.(*awsmiddleware.RequestUserAgent)
- if !ok {
- return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id)
- }
-
- return ua, nil
-}
-
-type HTTPSignerV4 interface {
- SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
-}
-
-func resolveHTTPSignerV4(o *Options) {
- if o.HTTPSignerV4 != nil {
- return
- }
- o.HTTPSignerV4 = newDefaultV4Signer(*o)
-}
-
-func newDefaultV4Signer(o Options) *v4.Signer {
- return v4.NewSigner(func(so *v4.SignerOptions) {
- so.Logger = o.Logger
- so.LogSigning = o.ClientLogMode.IsSigning()
- })
-}
-
-func addClientRequestID(stack *middleware.Stack) error {
- return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After)
-}
-
-func addComputeContentLength(stack *middleware.Stack) error {
- return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After)
-}
-
-func addRawResponseToMetadata(stack *middleware.Stack) error {
- return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before)
-}
-
-func addRecordResponseTiming(stack *middleware.Stack) error {
- return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After)
-}
-
-func addSpanRetryLoop(stack *middleware.Stack, options Options) error {
- return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before)
-}
-
-type spanRetryLoop struct {
- options Options
-}
-
-func (*spanRetryLoop) ID() string {
- return "spanRetryLoop"
-}
-
-func (m *spanRetryLoop) HandleFinalize(
- ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
-) (
- middleware.FinalizeOutput, middleware.Metadata, error,
-) {
- tracer := operationTracer(m.options.TracerProvider)
- ctx, span := tracer.StartSpan(ctx, "RetryLoop")
- defer span.End()
-
- return next.HandleFinalize(ctx, in)
-}
-func addStreamingEventsPayload(stack *middleware.Stack) error {
- return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before)
-}
-
-func addUnsignedPayload(stack *middleware.Stack) error {
- return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After)
-}
-
-func addComputePayloadSHA256(stack *middleware.Stack) error {
- return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After)
-}
-
-func addContentSHA256Header(stack *middleware.Stack) error {
- return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After)
-}
-
-func addIsWaiterUserAgent(o *Options) {
- o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
- ua, err := getOrAddRequestUserAgent(stack)
- if err != nil {
- return err
- }
-
- ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter)
- return nil
- })
-}
-
-func addIsPaginatorUserAgent(o *Options) {
- o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
- ua, err := getOrAddRequestUserAgent(stack)
- if err != nil {
- return err
- }
-
- ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator)
- return nil
- })
-}
-
-func resolveIdempotencyTokenProvider(o *Options) {
- if o.IdempotencyTokenProvider != nil {
- return
- }
- o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader)
-}
-
-func addRetry(stack *middleware.Stack, o Options) error {
- attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) {
- m.LogAttempts = o.ClientLogMode.IsRetries()
- m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/eks")
- })
- if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil {
- return err
- }
- if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil {
- return err
- }
- return nil
-}
-
-// resolves dual-stack endpoint configuration
-func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error {
- if len(cfg.ConfigSources) == 0 {
- return nil
- }
- value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources)
- if err != nil {
- return err
- }
- if found {
- o.EndpointOptions.UseDualStackEndpoint = value
- }
- return nil
-}
-
-// resolves FIPS endpoint configuration
-func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
- if len(cfg.ConfigSources) == 0 {
- return nil
- }
- value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources)
- if err != nil {
- return err
- }
- if found {
- o.EndpointOptions.UseFIPSEndpoint = value
- }
- return nil
-}
-
-func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string {
- if mode == aws.AccountIDEndpointModeDisabled {
- return nil
- }
-
- if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" {
- return aws.String(ca.Credentials.AccountID)
- }
-
- return nil
-}
-
-func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error {
- mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset}
- if err := stack.Build.Add(&mw, middleware.After); err != nil {
- return err
- }
- return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before)
-}
-func initializeTimeOffsetResolver(c *Client) {
- c.timeOffset = new(atomic.Int64)
-}
-
-func addUserAgentRetryMode(stack *middleware.Stack, options Options) error {
- ua, err := getOrAddRequestUserAgent(stack)
- if err != nil {
- return err
- }
-
- switch options.Retryer.(type) {
- case *retry.Standard:
- ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard)
- case *retry.AdaptiveMode:
- ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive)
- }
- return nil
-}
-
-type setCredentialSourceMiddleware struct {
- ua *awsmiddleware.RequestUserAgent
- options Options
-}
-
-func (m setCredentialSourceMiddleware) ID() string { return "SetCredentialSourceMiddleware" }
-
-func (m setCredentialSourceMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
- out middleware.BuildOutput, metadata middleware.Metadata, err error,
-) {
- asProviderSource, ok := m.options.Credentials.(aws.CredentialProviderSource)
- if !ok {
- return next.HandleBuild(ctx, in)
- }
- providerSources := asProviderSource.ProviderSources()
- for _, source := range providerSources {
- m.ua.AddCredentialsSource(source)
- }
- return next.HandleBuild(ctx, in)
-}
-
-func addCredentialSource(stack *middleware.Stack, options Options) error {
- ua, err := getOrAddRequestUserAgent(stack)
- if err != nil {
- return err
- }
-
- mw := setCredentialSourceMiddleware{ua: ua, options: options}
- return stack.Build.Insert(&mw, "UserAgent", middleware.Before)
-}
-
-func resolveTracerProvider(options *Options) {
- if options.TracerProvider == nil {
- options.TracerProvider = &tracing.NopTracerProvider{}
- }
-}
-
-func resolveMeterProvider(options *Options) {
- if options.MeterProvider == nil {
- options.MeterProvider = metrics.NopMeterProvider{}
- }
-}
-
-// IdempotencyTokenProvider interface for providing idempotency token
-type IdempotencyTokenProvider interface {
- GetIdempotencyToken() (string, error)
-}
-
-func addRecursionDetection(stack *middleware.Stack) error {
- return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After)
-}
-
-func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
- return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before)
-
-}
-
-func addResponseErrorMiddleware(stack *middleware.Stack) error {
- return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before)
-
-}
-
-func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
- return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{
- LogRequest: o.ClientLogMode.IsRequest(),
- LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(),
- LogResponse: o.ClientLogMode.IsResponse(),
- LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(),
- }, middleware.After)
-}
-
-type disableHTTPSMiddleware struct {
- DisableHTTPS bool
-}
-
-func (*disableHTTPSMiddleware) ID() string {
- return "disableHTTPS"
-}
-
-func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
- out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
-) {
- req, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
- }
-
- if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) {
- req.URL.Scheme = "http"
- }
-
- return next.HandleFinalize(ctx, in)
-}
-
-func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error {
- return stack.Finalize.Insert(&disableHTTPSMiddleware{
- DisableHTTPS: o.EndpointOptions.DisableHTTPS,
- }, "ResolveEndpointV2", middleware.After)
-}
-
-func addInterceptBeforeRetryLoop(stack *middleware.Stack, opts Options) error {
- return stack.Finalize.Insert(&smithyhttp.InterceptBeforeRetryLoop{
- Interceptors: opts.Interceptors.BeforeRetryLoop,
- }, "Retry", middleware.Before)
-}
-
-func addInterceptAttempt(stack *middleware.Stack, opts Options) error {
- return stack.Finalize.Insert(&smithyhttp.InterceptAttempt{
- BeforeAttempt: opts.Interceptors.BeforeAttempt,
- AfterAttempt: opts.Interceptors.AfterAttempt,
- }, "Retry", middleware.After)
-}
-
-func addInterceptors(stack *middleware.Stack, opts Options) error {
- // middlewares are expensive, don't add all of these interceptor ones unless the caller
- // actually has at least one interceptor configured
- //
- // at the moment it's all-or-nothing because some of the middlewares here are responsible for
- // setting fields in the interceptor context for future ones
- if len(opts.Interceptors.BeforeExecution) == 0 &&
- len(opts.Interceptors.BeforeSerialization) == 0 && len(opts.Interceptors.AfterSerialization) == 0 &&
- len(opts.Interceptors.BeforeRetryLoop) == 0 &&
- len(opts.Interceptors.BeforeAttempt) == 0 &&
- len(opts.Interceptors.BeforeSigning) == 0 && len(opts.Interceptors.AfterSigning) == 0 &&
- len(opts.Interceptors.BeforeTransmit) == 0 && len(opts.Interceptors.AfterTransmit) == 0 &&
- len(opts.Interceptors.BeforeDeserialization) == 0 && len(opts.Interceptors.AfterDeserialization) == 0 &&
- len(opts.Interceptors.AfterAttempt) == 0 && len(opts.Interceptors.AfterExecution) == 0 {
- return nil
- }
-
- return errors.Join(
- stack.Initialize.Add(&smithyhttp.InterceptExecution{
- BeforeExecution: opts.Interceptors.BeforeExecution,
- AfterExecution: opts.Interceptors.AfterExecution,
- }, middleware.Before),
- stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{
- Interceptors: opts.Interceptors.BeforeSerialization,
- }, "OperationSerializer", middleware.Before),
- stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{
- Interceptors: opts.Interceptors.AfterSerialization,
- }, "OperationSerializer", middleware.After),
- stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{
- Interceptors: opts.Interceptors.BeforeSigning,
- }, "Signing", middleware.Before),
- stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{
- Interceptors: opts.Interceptors.AfterSigning,
- }, "Signing", middleware.After),
- stack.Deserialize.Add(&smithyhttp.InterceptTransmit{
- BeforeTransmit: opts.Interceptors.BeforeTransmit,
- AfterTransmit: opts.Interceptors.AfterTransmit,
- }, middleware.After),
- stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{
- Interceptors: opts.Interceptors.BeforeDeserialization,
- }, "OperationDeserializer", middleware.After), // (deserialize stack is called in reverse)
- stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{
- Interceptors: opts.Interceptors.AfterDeserialization,
- }, "OperationDeserializer", middleware.Before),
- )
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_AssociateAccessPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_AssociateAccessPolicy.go
deleted file mode 100644
index ed7a0b7e8cf0..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_AssociateAccessPolicy.go
+++ /dev/null
@@ -1,184 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Associates an access policy and its scope to an access entry. For more
-// information about associating access policies, see [Associating and disassociating access policies to and from access entries]in the Amazon EKS User Guide.
-//
-// [Associating and disassociating access policies to and from access entries]: https://docs.aws.amazon.com/eks/latest/userguide/access-policies.html
-func (c *Client) AssociateAccessPolicy(ctx context.Context, params *AssociateAccessPolicyInput, optFns ...func(*Options)) (*AssociateAccessPolicyOutput, error) {
- if params == nil {
- params = &AssociateAccessPolicyInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "AssociateAccessPolicy", params, optFns, c.addOperationAssociateAccessPolicyMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*AssociateAccessPolicyOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type AssociateAccessPolicyInput struct {
-
- // The scope for the AccessPolicy . You can scope access policies to an entire
- // cluster or to specific Kubernetes namespaces.
- //
- // This member is required.
- AccessScope *types.AccessScope
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The ARN of the AccessPolicy that you're associating. For a list of ARNs, use
- // ListAccessPolicies .
- //
- // This member is required.
- PolicyArn *string
-
- // The Amazon Resource Name (ARN) of the IAM user or role for the AccessEntry that
- // you're associating the access policy to.
- //
- // This member is required.
- PrincipalArn *string
-
- noSmithyDocumentSerde
-}
-
-type AssociateAccessPolicyOutput struct {
-
- // The AccessPolicy and scope associated to the AccessEntry .
- AssociatedAccessPolicy *types.AssociatedAccessPolicy
-
- // The name of your cluster.
- ClusterName *string
-
- // The ARN of the IAM principal for the AccessEntry .
- PrincipalArn *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationAssociateAccessPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociateAccessPolicy{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociateAccessPolicy{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateAccessPolicy"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpAssociateAccessPolicyValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateAccessPolicy(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opAssociateAccessPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "AssociateAccessPolicy",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_AssociateEncryptionConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_AssociateEncryptionConfig.go
deleted file mode 100644
index 6f9dbb9bfca1..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_AssociateEncryptionConfig.go
+++ /dev/null
@@ -1,206 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Associates an encryption configuration to an existing cluster.
-//
-// Use this API to enable encryption on existing clusters that don't already have
-// encryption enabled. This allows you to implement a defense-in-depth security
-// strategy without migrating applications to new Amazon EKS clusters.
-func (c *Client) AssociateEncryptionConfig(ctx context.Context, params *AssociateEncryptionConfigInput, optFns ...func(*Options)) (*AssociateEncryptionConfigOutput, error) {
- if params == nil {
- params = &AssociateEncryptionConfigInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "AssociateEncryptionConfig", params, optFns, c.addOperationAssociateEncryptionConfigMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*AssociateEncryptionConfigOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type AssociateEncryptionConfigInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The configuration you are using for encryption.
- //
- // This member is required.
- EncryptionConfig []types.EncryptionConfig
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request.
- ClientRequestToken *string
-
- noSmithyDocumentSerde
-}
-
-type AssociateEncryptionConfigOutput struct {
-
- // An object representing an asynchronous update.
- Update *types.Update
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationAssociateEncryptionConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociateEncryptionConfig{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociateEncryptionConfig{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateEncryptionConfig"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opAssociateEncryptionConfigMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpAssociateEncryptionConfigValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateEncryptionConfig(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpAssociateEncryptionConfig struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpAssociateEncryptionConfig) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpAssociateEncryptionConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*AssociateEncryptionConfigInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *AssociateEncryptionConfigInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opAssociateEncryptionConfigMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpAssociateEncryptionConfig{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opAssociateEncryptionConfig(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "AssociateEncryptionConfig",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_AssociateIdentityProviderConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_AssociateIdentityProviderConfig.go
deleted file mode 100644
index 6eafeb489018..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_AssociateIdentityProviderConfig.go
+++ /dev/null
@@ -1,219 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Associates an identity provider configuration to a cluster.
-//
-// If you want to authenticate identities using an identity provider, you can
-// create an identity provider configuration and associate it to your cluster.
-// After configuring authentication to your cluster you can create Kubernetes Role
-// and ClusterRole objects, assign permissions to them, and then bind them to the
-// identities using Kubernetes RoleBinding and ClusterRoleBinding objects. For
-// more information see [Using RBAC Authorization]in the Kubernetes documentation.
-//
-// [Using RBAC Authorization]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/
-func (c *Client) AssociateIdentityProviderConfig(ctx context.Context, params *AssociateIdentityProviderConfigInput, optFns ...func(*Options)) (*AssociateIdentityProviderConfigOutput, error) {
- if params == nil {
- params = &AssociateIdentityProviderConfigInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "AssociateIdentityProviderConfig", params, optFns, c.addOperationAssociateIdentityProviderConfigMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*AssociateIdentityProviderConfigOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type AssociateIdentityProviderConfigInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // An object representing an OpenID Connect (OIDC) identity provider configuration.
- //
- // This member is required.
- Oidc *types.OidcIdentityProviderConfigRequest
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request.
- ClientRequestToken *string
-
- // Metadata that assists with categorization and organization. Each tag consists
- // of a key and an optional value. You define both. Tags don't propagate to any
- // other cluster or Amazon Web Services resources.
- Tags map[string]string
-
- noSmithyDocumentSerde
-}
-
-type AssociateIdentityProviderConfigOutput struct {
-
- // The tags for the resource.
- Tags map[string]string
-
- // An object representing an asynchronous update.
- Update *types.Update
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationAssociateIdentityProviderConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociateIdentityProviderConfig{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociateIdentityProviderConfig{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateIdentityProviderConfig"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opAssociateIdentityProviderConfigMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpAssociateIdentityProviderConfigValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateIdentityProviderConfig(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpAssociateIdentityProviderConfig struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpAssociateIdentityProviderConfig) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpAssociateIdentityProviderConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*AssociateIdentityProviderConfigInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *AssociateIdentityProviderConfigInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opAssociateIdentityProviderConfigMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpAssociateIdentityProviderConfig{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opAssociateIdentityProviderConfig(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "AssociateIdentityProviderConfig",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateAccessEntry.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateAccessEntry.go
deleted file mode 100644
index ef98808321d9..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateAccessEntry.go
+++ /dev/null
@@ -1,289 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Creates an access entry.
-//
-// An access entry allows an IAM principal to access your cluster. Access entries
-// can replace the need to maintain entries in the aws-auth ConfigMap for
-// authentication. You have the following options for authorizing an IAM principal
-// to access Kubernetes objects on your cluster: Kubernetes role-based access
-// control (RBAC), Amazon EKS, or both. Kubernetes RBAC authorization requires you
-// to create and manage Kubernetes Role , ClusterRole , RoleBinding , and
-// ClusterRoleBinding objects, in addition to managing access entries. If you use
-// Amazon EKS authorization exclusively, you don't need to create and manage
-// Kubernetes Role , ClusterRole , RoleBinding , and ClusterRoleBinding objects.
-//
-// For more information about access entries, see [Access entries] in the Amazon EKS User Guide.
-//
-// [Access entries]: https://docs.aws.amazon.com/eks/latest/userguide/access-entries.html
-func (c *Client) CreateAccessEntry(ctx context.Context, params *CreateAccessEntryInput, optFns ...func(*Options)) (*CreateAccessEntryOutput, error) {
- if params == nil {
- params = &CreateAccessEntryInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "CreateAccessEntry", params, optFns, c.addOperationCreateAccessEntryMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*CreateAccessEntryOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type CreateAccessEntryInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The ARN of the IAM principal for the AccessEntry . You can specify one ARN for
- // each access entry. You can't specify the same ARN in more than one access entry.
- // This value can't be changed after access entry creation.
- //
- // The valid principals differ depending on the type of the access entry in the
- // type field. For STANDARD access entries, you can use every IAM principal type.
- // For nodes ( EC2 (for EKS Auto Mode), EC2_LINUX , EC2_WINDOWS , FARGATE_LINUX ,
- // and HYBRID_LINUX ), the only valid ARN is IAM roles.
- //
- // You can't use the STS session principal type with access entries because this
- // is a temporary principal for each session and not a permanent identity that can
- // be assigned permissions.
- //
- // [IAM best practices]recommend using IAM roles with temporary credentials, rather than IAM users
- // with long-term credentials.
- //
- // [IAM best practices]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#bp-users-federation-idp
- //
- // This member is required.
- PrincipalArn *string
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request.
- ClientRequestToken *string
-
- // The value for name that you've specified for kind: Group as a subject in a
- // Kubernetes RoleBinding or ClusterRoleBinding object. Amazon EKS doesn't confirm
- // that the value for name exists in any bindings on your cluster. You can specify
- // one or more names.
- //
- // Kubernetes authorizes the principalArn of the access entry to access any
- // cluster objects that you've specified in a Kubernetes Role or ClusterRole
- // object that is also specified in a binding's roleRef . For more information
- // about creating Kubernetes RoleBinding , ClusterRoleBinding , Role , or
- // ClusterRole objects, see [Using RBAC Authorization in the Kubernetes documentation].
- //
- // If you want Amazon EKS to authorize the principalArn (instead of, or in
- // addition to Kubernetes authorizing the principalArn ), you can associate one or
- // more access policies to the access entry using AssociateAccessPolicy . If you
- // associate any access policies, the principalARN has all permissions assigned in
- // the associated access policies and all permissions in any Kubernetes Role or
- // ClusterRole objects that the group names are bound to.
- //
- // [Using RBAC Authorization in the Kubernetes documentation]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/
- KubernetesGroups []string
-
- // Metadata that assists with categorization and organization. Each tag consists
- // of a key and an optional value. You define both. Tags don't propagate to any
- // other cluster or Amazon Web Services resources.
- Tags map[string]string
-
- // The type of the new access entry. Valid values are STANDARD , FARGATE_LINUX ,
- // EC2_LINUX , EC2_WINDOWS , EC2 (for EKS Auto Mode), HYBRID_LINUX , and
- // HYPERPOD_LINUX .
- //
- // If the principalArn is for an IAM role that's used for self-managed Amazon EC2
- // nodes, specify EC2_LINUX or EC2_WINDOWS . Amazon EKS grants the necessary
- // permissions to the node for you. If the principalArn is for any other purpose,
- // specify STANDARD . If you don't specify a value, Amazon EKS sets the value to
- // STANDARD . If you have the access mode of the cluster set to API_AND_CONFIG_MAP
- // , it's unnecessary to create access entries for IAM roles used with Fargate
- // profiles or managed Amazon EC2 nodes, because Amazon EKS creates entries in the
- // aws-auth ConfigMap for the roles. You can't change this value once you've
- // created the access entry.
- //
- // If you set the value to EC2_LINUX or EC2_WINDOWS , you can't specify values for
- // kubernetesGroups , or associate an AccessPolicy to the access entry.
- Type *string
-
- // The username to authenticate to Kubernetes with. We recommend not specifying a
- // username and letting Amazon EKS specify it for you. For more information about
- // the value Amazon EKS specifies for you, or constraints before specifying your
- // own username, see [Creating access entries]in the Amazon EKS User Guide.
- //
- // [Creating access entries]: https://docs.aws.amazon.com/eks/latest/userguide/access-entries.html#creating-access-entries
- Username *string
-
- noSmithyDocumentSerde
-}
-
-type CreateAccessEntryOutput struct {
-
- // An access entry allows an IAM principal (user or role) to access your cluster.
- // Access entries can replace the need to maintain the aws-auth ConfigMap for
- // authentication. For more information about access entries, see [Access entries]in the Amazon
- // EKS User Guide.
- //
- // [Access entries]: https://docs.aws.amazon.com/eks/latest/userguide/access-entries.html
- AccessEntry *types.AccessEntry
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationCreateAccessEntryMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateAccessEntry{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateAccessEntry{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAccessEntry"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opCreateAccessEntryMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpCreateAccessEntryValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAccessEntry(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpCreateAccessEntry struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpCreateAccessEntry) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpCreateAccessEntry) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*CreateAccessEntryInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateAccessEntryInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opCreateAccessEntryMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpCreateAccessEntry{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opCreateAccessEntry(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "CreateAccessEntry",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateAddon.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateAddon.go
deleted file mode 100644
index ee1a0db75702..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateAddon.go
+++ /dev/null
@@ -1,276 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Creates an Amazon EKS add-on.
-//
-// Amazon EKS add-ons help to automate the provisioning and lifecycle management
-// of common operational software for Amazon EKS clusters. For more information,
-// see [Amazon EKS add-ons]in the Amazon EKS User Guide.
-//
-// [Amazon EKS add-ons]: https://docs.aws.amazon.com/eks/latest/userguide/eks-add-ons.html
-func (c *Client) CreateAddon(ctx context.Context, params *CreateAddonInput, optFns ...func(*Options)) (*CreateAddonOutput, error) {
- if params == nil {
- params = &CreateAddonInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "CreateAddon", params, optFns, c.addOperationCreateAddonMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*CreateAddonOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type CreateAddonInput struct {
-
- // The name of the add-on. The name must match one of the names returned by
- // DescribeAddonVersions .
- //
- // This member is required.
- AddonName *string
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The version of the add-on. The version must match one of the versions returned
- // by [DescribeAddonVersions]DescribeAddonVersions .
- //
- // [DescribeAddonVersions]: https://docs.aws.amazon.com/eks/latest/APIReference/API_DescribeAddonVersions.html
- AddonVersion *string
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request.
- ClientRequestToken *string
-
- // The set of configuration values for the add-on that's created. The values that
- // you provide are validated against the schema returned by
- // DescribeAddonConfiguration .
- ConfigurationValues *string
-
- // The namespace configuration for the addon. If specified, this will override the
- // default namespace for the addon.
- NamespaceConfig *types.AddonNamespaceConfigRequest
-
- // An array of EKS Pod Identity associations to be created. Each association maps
- // a Kubernetes service account to an IAM role.
- //
- // For more information, see [Attach an IAM Role to an Amazon EKS add-on using EKS Pod Identity] in the Amazon EKS User Guide.
- //
- // [Attach an IAM Role to an Amazon EKS add-on using EKS Pod Identity]: https://docs.aws.amazon.com/eks/latest/userguide/add-ons-iam.html
- PodIdentityAssociations []types.AddonPodIdentityAssociations
-
- // How to resolve field value conflicts for an Amazon EKS add-on. Conflicts are
- // handled based on the value you choose:
- //
- // - None – If the self-managed version of the add-on is installed on your
- // cluster, Amazon EKS doesn't change the value. Creation of the add-on might fail.
- //
- // - Overwrite – If the self-managed version of the add-on is installed on your
- // cluster and the Amazon EKS default value is different than the existing value,
- // Amazon EKS changes the value to the Amazon EKS default value.
- //
- // - Preserve – This is similar to the NONE option. If the self-managed version
- // of the add-on is installed on your cluster Amazon EKS doesn't change the add-on
- // resource properties. Creation of the add-on might fail if conflicts are
- // detected. This option works differently during the update operation. For more
- // information, see [UpdateAddon]UpdateAddon .
- //
- // If you don't currently have the self-managed version of the add-on installed on
- // your cluster, the Amazon EKS add-on is installed. Amazon EKS sets all values to
- // default values, regardless of the option that you specify.
- //
- // [UpdateAddon]: https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html
- ResolveConflicts types.ResolveConflicts
-
- // The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's
- // service account. The role must be assigned the IAM permissions required by the
- // add-on. If you don't specify an existing IAM role, then the add-on uses the
- // permissions assigned to the node IAM role. For more information, see [Amazon EKS node IAM role]in the
- // Amazon EKS User Guide.
- //
- // To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC)
- // provider created for your cluster. For more information, see [Enabling IAM roles for service accounts on your cluster]in the Amazon EKS
- // User Guide.
- //
- // [Enabling IAM roles for service accounts on your cluster]: https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html
- // [Amazon EKS node IAM role]: https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html
- ServiceAccountRoleArn *string
-
- // Metadata that assists with categorization and organization. Each tag consists
- // of a key and an optional value. You define both. Tags don't propagate to any
- // other cluster or Amazon Web Services resources.
- Tags map[string]string
-
- noSmithyDocumentSerde
-}
-
-type CreateAddonOutput struct {
-
- // An Amazon EKS add-on. For more information, see [Amazon EKS add-ons] in the Amazon EKS User Guide.
- //
- // [Amazon EKS add-ons]: https://docs.aws.amazon.com/eks/latest/userguide/eks-add-ons.html
- Addon *types.Addon
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationCreateAddonMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateAddon{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateAddon{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAddon"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opCreateAddonMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpCreateAddonValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAddon(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpCreateAddon struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpCreateAddon) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpCreateAddon) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*CreateAddonInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateAddonInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opCreateAddonMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpCreateAddon{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opCreateAddon(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "CreateAddon",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateCapability.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateCapability.go
deleted file mode 100644
index b43efd4bcdd9..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateCapability.go
+++ /dev/null
@@ -1,294 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Creates a managed capability resource for an Amazon EKS cluster.
-//
-// Capabilities provide fully managed capabilities to build and scale with
-// Kubernetes. When you create a capability, Amazon EKSprovisions and manages the
-// infrastructure required to run the capability outside of your cluster. This
-// approach reduces operational overhead and preserves cluster resources.
-//
-// You can only create one Capability of each type on a given Amazon EKS cluster.
-// Valid types are Argo CD for declarative GitOps deployment, Amazon Web Services
-// Controllers for Kubernetes (ACK) for resource management, and Kube Resource
-// Orchestrator (KRO) for Kubernetes custom resource orchestration.
-//
-// For more information, see [EKS Capabilities] in the Amazon EKS User Guide.
-//
-// [EKS Capabilities]: https://docs.aws.amazon.com/eks/latest/userguide/capabilities.html
-func (c *Client) CreateCapability(ctx context.Context, params *CreateCapabilityInput, optFns ...func(*Options)) (*CreateCapabilityOutput, error) {
- if params == nil {
- params = &CreateCapabilityInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "CreateCapability", params, optFns, c.addOperationCreateCapabilityMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*CreateCapabilityOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type CreateCapabilityInput struct {
-
- // A unique name for the capability. The name must be unique within your cluster
- // and can contain alphanumeric characters, hyphens, and underscores.
- //
- // This member is required.
- CapabilityName *string
-
- // The name of the Amazon EKS cluster where you want to create the capability.
- //
- // This member is required.
- ClusterName *string
-
- // Specifies how Kubernetes resources managed by the capability should be handled
- // when the capability is deleted. Currently, the only supported value is RETAIN
- // which retains all Kubernetes resources managed by the capability when the
- // capability is deleted.
- //
- // Because resources are retained, all Kubernetes resources created by the
- // capability should be deleted from the cluster before deleting the capability
- // itself. After the capability is deleted, these resources become difficult to
- // manage because the controller is no longer available.
- //
- // This member is required.
- DeletePropagationPolicy types.CapabilityDeletePropagationPolicy
-
- // The Amazon Resource Name (ARN) of the IAM role that the capability uses to
- // interact with Amazon Web Services services. This role must have a trust policy
- // that allows the EKS service principal to assume it, and it must have the
- // necessary permissions for the capability type you're creating.
- //
- // For ACK capabilities, the role needs permissions to manage the resources you
- // want to control through Kubernetes. For Argo CD capabilities, the role needs
- // permissions to access Git repositories and Secrets Manager. For KRO
- // capabilities, the role needs permissions based on the resources you'll be
- // orchestrating.
- //
- // This member is required.
- RoleArn *string
-
- // The type of capability to create. Valid values are:
- //
- // - ACK – Amazon Web Services Controllers for Kubernetes (ACK), which lets you
- // manage resources directly from Kubernetes.
- //
- // - ARGOCD – Argo CD for GitOps-based continuous delivery.
- //
- // - KRO – Kube Resource Orchestrator (KRO) for composing and managing custom
- // Kubernetes resources.
- //
- // This member is required.
- Type types.CapabilityType
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request. This token is valid for 24 hours after creation. If you retry a
- // request with the same client request token and the same parameters after the
- // original request has completed successfully, the result of the original request
- // is returned.
- ClientRequestToken *string
-
- // The configuration settings for the capability. The structure of this object
- // varies depending on the capability type. For Argo CD capabilities, you can
- // configure IAM Identity CenterIAM; Identity Center integration, RBAC role
- // mappings, and network access settings.
- Configuration *types.CapabilityConfigurationRequest
-
- // The metadata that you apply to a resource to help you categorize and organize
- // them. Each tag consists of a key and an optional value. You define them.
- //
- // The following basic restrictions apply to tags:
- //
- // - Maximum number of tags per resource – 50
- //
- // - For each resource, each tag key must be unique, and each tag key can have
- // only one value.
- //
- // - Maximum key length – 128 Unicode characters in UTF-8
- //
- // - Maximum value length – 256 Unicode characters in UTF-8
- //
- // - If your tagging schema is used across multiple services and resources,
- // remember that other services may have restrictions on allowed characters.
- // Generally allowed characters are: letters, numbers, and spaces representable in
- // UTF-8, and the following characters: + - = . _ : / @.
- //
- // - Tag keys and values are case-sensitive.
- //
- // - Do not use aws: , AWS: , or any upper or lowercase combination of such as a
- // prefix for either keys or values as it is reserved for Amazon Web Services use.
- // You cannot edit or delete tag keys or values with this prefix. Tags with this
- // prefix do not count against your tags per resource limit.
- Tags map[string]string
-
- noSmithyDocumentSerde
-}
-
-type CreateCapabilityOutput struct {
-
- // An object containing information about the newly created capability, including
- // its name, ARN, status, and configuration.
- Capability *types.Capability
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationCreateCapabilityMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateCapability{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateCapability{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "CreateCapability"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opCreateCapabilityMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpCreateCapabilityValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCapability(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpCreateCapability struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpCreateCapability) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpCreateCapability) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*CreateCapabilityInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateCapabilityInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opCreateCapabilityMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpCreateCapability{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opCreateCapability(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "CreateCapability",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateCluster.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateCluster.go
deleted file mode 100644
index fb5774dbb1c9..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateCluster.go
+++ /dev/null
@@ -1,358 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Creates an Amazon EKS control plane.
-//
-// The Amazon EKS control plane consists of control plane instances that run the
-// Kubernetes software, such as etcd and the API server. The control plane runs in
-// an account managed by Amazon Web Services, and the Kubernetes API is exposed by
-// the Amazon EKS API server endpoint. Each Amazon EKS cluster control plane is
-// single tenant and unique. It runs on its own set of Amazon EC2 instances.
-//
-// The cluster control plane is provisioned across multiple Availability Zones and
-// fronted by an ELB Network Load Balancer. Amazon EKS also provisions elastic
-// network interfaces in your VPC subnets to provide connectivity from the control
-// plane instances to the nodes (for example, to support kubectl exec , logs , and
-// proxy data flows).
-//
-// Amazon EKS nodes run in your Amazon Web Services account and connect to your
-// cluster's control plane over the Kubernetes API server endpoint and a
-// certificate file that is created for your cluster.
-//
-// You can use the endpointPublicAccess and endpointPrivateAccess parameters to
-// enable or disable public and private access to your cluster's Kubernetes API
-// server endpoint. By default, public access is enabled, and private access is
-// disabled. The endpoint domain name and IP address family depends on the value of
-// the ipFamily for the cluster. For more information, see [Amazon EKS Cluster Endpoint Access Control] in the Amazon EKS User
-// Guide .
-//
-// You can use the logging parameter to enable or disable exporting the Kubernetes
-// control plane logs for your cluster to CloudWatch Logs. By default, cluster
-// control plane logs aren't exported to CloudWatch Logs. For more information, see
-// [Amazon EKS Cluster Control Plane Logs]in the Amazon EKS User Guide .
-//
-// CloudWatch Logs ingestion, archive storage, and data scanning rates apply to
-// exported control plane logs. For more information, see [CloudWatch Pricing].
-//
-// In most cases, it takes several minutes to create a cluster. After you create
-// an Amazon EKS cluster, you must configure your Kubernetes tooling to communicate
-// with the API server and launch nodes into your cluster. For more information,
-// see [Allowing users to access your cluster]and [Launching Amazon EKS nodes] in the Amazon EKS User Guide.
-//
-// [Allowing users to access your cluster]: https://docs.aws.amazon.com/eks/latest/userguide/cluster-auth.html
-// [CloudWatch Pricing]: http://aws.amazon.com/cloudwatch/pricing/
-// [Amazon EKS Cluster Control Plane Logs]: https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html
-// [Amazon EKS Cluster Endpoint Access Control]: https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html
-// [Launching Amazon EKS nodes]: https://docs.aws.amazon.com/eks/latest/userguide/launch-workers.html
-func (c *Client) CreateCluster(ctx context.Context, params *CreateClusterInput, optFns ...func(*Options)) (*CreateClusterOutput, error) {
- if params == nil {
- params = &CreateClusterInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "CreateCluster", params, optFns, c.addOperationCreateClusterMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*CreateClusterOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type CreateClusterInput struct {
-
- // The unique name to give to your cluster. The name can contain only alphanumeric
- // characters (case-sensitive), hyphens, and underscores. It must start with an
- // alphanumeric character and can't be longer than 100 characters. The name must be
- // unique within the Amazon Web Services Region and Amazon Web Services account
- // that you're creating the cluster in.
- //
- // This member is required.
- Name *string
-
- // The VPC configuration that's used by the cluster control plane. Amazon EKS VPC
- // resources have specific requirements to work properly with Kubernetes. For more
- // information, see [Cluster VPC Considerations]and [Cluster Security Group Considerations] in the Amazon EKS User Guide. You must specify at least
- // two subnets. You can specify up to five security groups. However, we recommend
- // that you use a dedicated security group for your cluster control plane.
- //
- // [Cluster Security Group Considerations]: https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html
- // [Cluster VPC Considerations]: https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html
- //
- // This member is required.
- ResourcesVpcConfig *types.VpcConfigRequest
-
- // The Amazon Resource Name (ARN) of the IAM role that provides permissions for
- // the Kubernetes control plane to make calls to Amazon Web Services API operations
- // on your behalf. For more information, see [Amazon EKS Service IAM Role]in the Amazon EKS User Guide .
- //
- // [Amazon EKS Service IAM Role]: https://docs.aws.amazon.com/eks/latest/userguide/service_IAM_role.html
- //
- // This member is required.
- RoleArn *string
-
- // The access configuration for the cluster.
- AccessConfig *types.CreateAccessConfigRequest
-
- // If you set this value to False when creating a cluster, the default networking
- // add-ons will not be installed.
- //
- // The default networking add-ons include vpc-cni , coredns , and kube-proxy .
- //
- // Use this option when you plan to install third-party alternative add-ons or
- // self-manage the default networking add-ons.
- BootstrapSelfManagedAddons *bool
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request.
- ClientRequestToken *string
-
- // Enable or disable the compute capability of EKS Auto Mode when creating your
- // EKS Auto Mode cluster. If the compute capability is enabled, EKS Auto Mode will
- // create and delete EC2 Managed Instances in your Amazon Web Services account
- ComputeConfig *types.ComputeConfigRequest
-
- // The control plane scaling tier configuration. For more information, see EKS
- // Provisioned Control Plane in the Amazon EKS User Guide.
- ControlPlaneScalingConfig *types.ControlPlaneScalingConfig
-
- // Indicates whether to enable deletion protection for the cluster. When enabled,
- // the cluster cannot be deleted unless deletion protection is first disabled. This
- // helps prevent accidental cluster deletion. Default value is false .
- DeletionProtection *bool
-
- // The encryption configuration for the cluster.
- EncryptionConfig []types.EncryptionConfig
-
- // The Kubernetes network configuration for the cluster.
- KubernetesNetworkConfig *types.KubernetesNetworkConfigRequest
-
- // Enable or disable exporting the Kubernetes control plane logs for your cluster
- // to CloudWatch Logs . By default, cluster control plane logs aren't exported to
- // CloudWatch Logs . For more information, see [Amazon EKS Cluster control plane logs]in the Amazon EKS User Guide .
- //
- // CloudWatch Logs ingestion, archive storage, and data scanning rates apply to
- // exported control plane logs. For more information, see [CloudWatch Pricing].
- //
- // [Amazon EKS Cluster control plane logs]: https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html
- // [CloudWatch Pricing]: http://aws.amazon.com/cloudwatch/pricing/
- Logging *types.Logging
-
- // An object representing the configuration of your local Amazon EKS cluster on an
- // Amazon Web Services Outpost. Before creating a local cluster on an Outpost,
- // review [Local clusters for Amazon EKS on Amazon Web Services Outposts]in the Amazon EKS User Guide. This object isn't available for creating
- // Amazon EKS clusters on the Amazon Web Services cloud.
- //
- // [Local clusters for Amazon EKS on Amazon Web Services Outposts]: https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-local-cluster-overview.html
- OutpostConfig *types.OutpostConfigRequest
-
- // The configuration in the cluster for EKS Hybrid Nodes. You can add, change, or
- // remove this configuration after the cluster is created.
- RemoteNetworkConfig *types.RemoteNetworkConfigRequest
-
- // Enable or disable the block storage capability of EKS Auto Mode when creating
- // your EKS Auto Mode cluster. If the block storage capability is enabled, EKS Auto
- // Mode will create and delete EBS volumes in your Amazon Web Services account.
- StorageConfig *types.StorageConfigRequest
-
- // Metadata that assists with categorization and organization. Each tag consists
- // of a key and an optional value. You define both. Tags don't propagate to any
- // other cluster or Amazon Web Services resources.
- Tags map[string]string
-
- // New clusters, by default, have extended support enabled. You can disable
- // extended support when creating a cluster by setting this value to STANDARD .
- UpgradePolicy *types.UpgradePolicyRequest
-
- // The desired Kubernetes version for your cluster. If you don't specify a value
- // here, the default version available in Amazon EKS is used.
- //
- // The default version might not be the latest version available.
- Version *string
-
- // Enable or disable ARC zonal shift for the cluster. If zonal shift is enabled,
- // Amazon Web Services configures zonal autoshift for the cluster.
- //
- // Zonal shift is a feature of Amazon Application Recovery Controller (ARC). ARC
- // zonal shift is designed to be a temporary measure that allows you to move
- // traffic for a resource away from an impaired AZ until the zonal shift expires or
- // you cancel it. You can extend the zonal shift if necessary.
- //
- // You can start a zonal shift for an Amazon EKS cluster, or you can allow Amazon
- // Web Services to do it for you by enabling zonal autoshift. This shift updates
- // the flow of east-to-west network traffic in your cluster to only consider
- // network endpoints for Pods running on worker nodes in healthy AZs. Additionally,
- // any ALB or NLB handling ingress traffic for applications in your Amazon EKS
- // cluster will automatically route traffic to targets in the healthy AZs. For more
- // information about zonal shift in EKS, see [Learn about Amazon Application Recovery Controller (ARC) Zonal Shift in Amazon EKS]in the Amazon EKS User Guide .
- //
- // [Learn about Amazon Application Recovery Controller (ARC) Zonal Shift in Amazon EKS]: https://docs.aws.amazon.com/eks/latest/userguide/zone-shift.html
- ZonalShiftConfig *types.ZonalShiftConfigRequest
-
- noSmithyDocumentSerde
-}
-
-type CreateClusterOutput struct {
-
- // The full description of your new cluster.
- Cluster *types.Cluster
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationCreateClusterMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateCluster{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateCluster{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "CreateCluster"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opCreateClusterMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpCreateClusterValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCluster(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpCreateCluster struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpCreateCluster) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpCreateCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*CreateClusterInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateClusterInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opCreateClusterMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpCreateCluster{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opCreateCluster(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "CreateCluster",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateEksAnywhereSubscription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateEksAnywhereSubscription.go
deleted file mode 100644
index feb52ba3f0bd..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateEksAnywhereSubscription.go
+++ /dev/null
@@ -1,232 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Creates an EKS Anywhere subscription. When a subscription is created, it is a
-// contract agreement for the length of the term specified in the request. Licenses
-// that are used to validate support are provisioned in Amazon Web Services License
-// Manager and the caller account is granted access to EKS Anywhere Curated
-// Packages.
-func (c *Client) CreateEksAnywhereSubscription(ctx context.Context, params *CreateEksAnywhereSubscriptionInput, optFns ...func(*Options)) (*CreateEksAnywhereSubscriptionOutput, error) {
- if params == nil {
- params = &CreateEksAnywhereSubscriptionInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "CreateEksAnywhereSubscription", params, optFns, c.addOperationCreateEksAnywhereSubscriptionMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*CreateEksAnywhereSubscriptionOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type CreateEksAnywhereSubscriptionInput struct {
-
- // The unique name for your subscription. It must be unique in your Amazon Web
- // Services account in the Amazon Web Services Region you're creating the
- // subscription in. The name can contain only alphanumeric characters
- // (case-sensitive), hyphens, and underscores. It must start with an alphabetic
- // character and can't be longer than 100 characters.
- //
- // This member is required.
- Name *string
-
- // An object representing the term duration and term unit type of your
- // subscription. This determines the term length of your subscription. Valid values
- // are MONTHS for term unit and 12 or 36 for term duration, indicating a 12 month
- // or 36 month subscription. This value cannot be changed after creating the
- // subscription.
- //
- // This member is required.
- Term *types.EksAnywhereSubscriptionTerm
-
- // A boolean indicating whether the subscription auto renews at the end of the
- // term.
- AutoRenew bool
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request.
- ClientRequestToken *string
-
- // The number of licenses to purchase with the subscription. Valid values are
- // between 1 and 100. This value can't be changed after creating the subscription.
- LicenseQuantity int32
-
- // The license type for all licenses in the subscription. Valid value is CLUSTER.
- // With the CLUSTER license type, each license covers support for a single EKS
- // Anywhere cluster.
- LicenseType types.EksAnywhereSubscriptionLicenseType
-
- // The metadata for a subscription to assist with categorization and organization.
- // Each tag consists of a key and an optional value. Subscription tags don't
- // propagate to any other resources associated with the subscription.
- Tags map[string]string
-
- noSmithyDocumentSerde
-}
-
-type CreateEksAnywhereSubscriptionOutput struct {
-
- // The full description of the subscription.
- Subscription *types.EksAnywhereSubscription
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationCreateEksAnywhereSubscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateEksAnywhereSubscription{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateEksAnywhereSubscription{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "CreateEksAnywhereSubscription"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opCreateEksAnywhereSubscriptionMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpCreateEksAnywhereSubscriptionValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateEksAnywhereSubscription(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpCreateEksAnywhereSubscription struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpCreateEksAnywhereSubscription) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpCreateEksAnywhereSubscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*CreateEksAnywhereSubscriptionInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateEksAnywhereSubscriptionInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opCreateEksAnywhereSubscriptionMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpCreateEksAnywhereSubscription{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opCreateEksAnywhereSubscription(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "CreateEksAnywhereSubscription",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateFargateProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateFargateProfile.go
deleted file mode 100644
index 4d58792c1743..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateFargateProfile.go
+++ /dev/null
@@ -1,261 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Creates an Fargate profile for your Amazon EKS cluster. You must have at least
-// one Fargate profile in a cluster to be able to run pods on Fargate.
-//
-// The Fargate profile allows an administrator to declare which pods run on
-// Fargate and specify which pods run on which Fargate profile. This declaration is
-// done through the profile's selectors. Each profile can have up to five selectors
-// that contain a namespace and labels. A namespace is required for every selector.
-// The label field consists of multiple optional key-value pairs. Pods that match
-// the selectors are scheduled on Fargate. If a to-be-scheduled pod matches any of
-// the selectors in the Fargate profile, then that pod is run on Fargate.
-//
-// When you create a Fargate profile, you must specify a pod execution role to use
-// with the pods that are scheduled with the profile. This role is added to the
-// cluster's Kubernetes [Role Based Access Control](RBAC) for authorization so that the kubelet that is
-// running on the Fargate infrastructure can register with your Amazon EKS cluster
-// so that it can appear in your cluster as a node. The pod execution role also
-// provides IAM permissions to the Fargate infrastructure to allow read access to
-// Amazon ECR image repositories. For more information, see [Pod Execution Role]in the Amazon EKS User
-// Guide.
-//
-// Fargate profiles are immutable. However, you can create a new updated profile
-// to replace an existing profile and then delete the original after the updated
-// profile has finished creating.
-//
-// If any Fargate profiles in a cluster are in the DELETING status, you must wait
-// for that Fargate profile to finish deleting before you can create any other
-// profiles in that cluster.
-//
-// For more information, see [Fargate profile] in the Amazon EKS User Guide.
-//
-// [Role Based Access Control]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/
-// [Fargate profile]: https://docs.aws.amazon.com/eks/latest/userguide/fargate-profile.html
-// [Pod Execution Role]: https://docs.aws.amazon.com/eks/latest/userguide/pod-execution-role.html
-func (c *Client) CreateFargateProfile(ctx context.Context, params *CreateFargateProfileInput, optFns ...func(*Options)) (*CreateFargateProfileOutput, error) {
- if params == nil {
- params = &CreateFargateProfileInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "CreateFargateProfile", params, optFns, c.addOperationCreateFargateProfileMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*CreateFargateProfileOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type CreateFargateProfileInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The name of the Fargate profile.
- //
- // This member is required.
- FargateProfileName *string
-
- // The Amazon Resource Name (ARN) of the Pod execution role to use for a Pod that
- // matches the selectors in the Fargate profile. The Pod execution role allows
- // Fargate infrastructure to register with your cluster as a node, and it provides
- // read access to Amazon ECR image repositories. For more information, see [Pod execution role]Pod in
- // the Amazon EKS User Guide.
- //
- // [Pod execution role]: https://docs.aws.amazon.com/eks/latest/userguide/pod-execution-role.html
- //
- // This member is required.
- PodExecutionRoleArn *string
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request.
- ClientRequestToken *string
-
- // The selectors to match for a Pod to use this Fargate profile. Each selector
- // must have an associated Kubernetes namespace . Optionally, you can also specify
- // labels for a namespace . You may specify up to five selectors in a Fargate
- // profile.
- Selectors []types.FargateProfileSelector
-
- // The IDs of subnets to launch a Pod into. A Pod running on Fargate isn't
- // assigned a public IP address, so only private subnets (with no direct route to
- // an Internet Gateway) are accepted for this parameter.
- Subnets []string
-
- // Metadata that assists with categorization and organization. Each tag consists
- // of a key and an optional value. You define both. Tags don't propagate to any
- // other cluster or Amazon Web Services resources.
- Tags map[string]string
-
- noSmithyDocumentSerde
-}
-
-type CreateFargateProfileOutput struct {
-
- // The full description of your new Fargate profile.
- FargateProfile *types.FargateProfile
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationCreateFargateProfileMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateFargateProfile{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateFargateProfile{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "CreateFargateProfile"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opCreateFargateProfileMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpCreateFargateProfileValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFargateProfile(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpCreateFargateProfile struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpCreateFargateProfile) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpCreateFargateProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*CreateFargateProfileInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateFargateProfileInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opCreateFargateProfileMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpCreateFargateProfile{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opCreateFargateProfile(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "CreateFargateProfile",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateNodegroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateNodegroup.go
deleted file mode 100644
index e8624a232da3..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateNodegroup.go
+++ /dev/null
@@ -1,360 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Creates a managed node group for an Amazon EKS cluster.
-//
-// You can only create a node group for your cluster that is equal to the current
-// Kubernetes version for the cluster. All node groups are created with the latest
-// AMI release version for the respective minor Kubernetes version of the cluster,
-// unless you deploy a custom AMI using a launch template.
-//
-// For later updates, you will only be able to update a node group using a launch
-// template only if it was originally deployed with a launch template.
-// Additionally, the launch template ID or name must match what was used when the
-// node group was created. You can update the launch template version with
-// necessary changes. For more information about using launch templates, see [Customizing managed nodes with launch templates].
-//
-// An Amazon EKS managed node group is an Amazon EC2 Auto Scaling group and
-// associated Amazon EC2 instances that are managed by Amazon Web Services for an
-// Amazon EKS cluster. For more information, see [Managed node groups]in the Amazon EKS User Guide.
-//
-// Windows AMI types are only supported for commercial Amazon Web Services Regions
-// that support Windows on Amazon EKS.
-//
-// [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html
-// [Managed node groups]: https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html
-func (c *Client) CreateNodegroup(ctx context.Context, params *CreateNodegroupInput, optFns ...func(*Options)) (*CreateNodegroupOutput, error) {
- if params == nil {
- params = &CreateNodegroupInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "CreateNodegroup", params, optFns, c.addOperationCreateNodegroupMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*CreateNodegroupOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type CreateNodegroupInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The Amazon Resource Name (ARN) of the IAM role to associate with your node
- // group. The Amazon EKS worker node kubelet daemon makes calls to Amazon Web
- // Services APIs on your behalf. Nodes receive permissions for these API calls
- // through an IAM instance profile and associated policies. Before you can launch
- // nodes and register them into a cluster, you must create an IAM role for those
- // nodes to use when they are launched. For more information, see [Amazon EKS node IAM role]in the Amazon
- // EKS User Guide . If you specify launchTemplate , then don't specify [IamInstanceProfile] in your
- // launch template, or the node group deployment will fail. For more information
- // about using launch templates with Amazon EKS, see [Customizing managed nodes with launch templates]in the Amazon EKS User Guide.
- //
- // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html
- // [IamInstanceProfile]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IamInstanceProfile.html
- // [Amazon EKS node IAM role]: https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html
- //
- // This member is required.
- NodeRole *string
-
- // The unique name to give your node group.
- //
- // This member is required.
- NodegroupName *string
-
- // The subnets to use for the Auto Scaling group that is created for your node
- // group. If you specify launchTemplate , then don't specify [SubnetId] in your launch
- // template, or the node group deployment will fail. For more information about
- // using launch templates with Amazon EKS, see [Customizing managed nodes with launch templates]in the Amazon EKS User Guide.
- //
- // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html
- // [SubnetId]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html
- //
- // This member is required.
- Subnets []string
-
- // The AMI type for your node group. If you specify launchTemplate , and your
- // launch template uses a custom AMI, then don't specify amiType , or the node
- // group deployment will fail. If your launch template uses a Windows custom AMI,
- // then add eks:kube-proxy-windows to your Windows nodes rolearn in the aws-auth
- // ConfigMap . For more information about using launch templates with Amazon EKS,
- // see [Customizing managed nodes with launch templates]in the Amazon EKS User Guide.
- //
- // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html
- AmiType types.AMITypes
-
- // The capacity type for your node group.
- CapacityType types.CapacityTypes
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request.
- ClientRequestToken *string
-
- // The root device disk size (in GiB) for your node group instances. The default
- // disk size is 20 GiB for Linux and Bottlerocket. The default disk size is 50 GiB
- // for Windows. If you specify launchTemplate , then don't specify diskSize , or
- // the node group deployment will fail. For more information about using launch
- // templates with Amazon EKS, see [Customizing managed nodes with launch templates]in the Amazon EKS User Guide.
- //
- // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html
- DiskSize *int32
-
- // Specify the instance types for a node group. If you specify a GPU instance
- // type, make sure to also specify an applicable GPU AMI type with the amiType
- // parameter. If you specify launchTemplate , then you can specify zero or one
- // instance type in your launch template or you can specify 0-20 instance types for
- // instanceTypes . If however, you specify an instance type in your launch template
- // and specify any instanceTypes , the node group deployment will fail. If you
- // don't specify an instance type in a launch template or for instanceTypes , then
- // t3.medium is used, by default. If you specify Spot for capacityType , then we
- // recommend specifying multiple values for instanceTypes . For more information,
- // see [Managed node group capacity types]and [Customizing managed nodes with launch templates] in the Amazon EKS User Guide.
- //
- // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html
- // [Managed node group capacity types]: https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html#managed-node-group-capacity-types
- InstanceTypes []string
-
- // The Kubernetes labels to apply to the nodes in the node group when they are
- // created.
- Labels map[string]string
-
- // An object representing a node group's launch template specification. When using
- // this object, don't directly specify instanceTypes , diskSize , or remoteAccess .
- // You cannot later specify a different launch template ID or name than what was
- // used to create the node group.
- //
- // Make sure that the launch template meets the requirements in
- // launchTemplateSpecification . Also refer to [Customizing managed nodes with launch templates] in the Amazon EKS User Guide.
- //
- // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html
- LaunchTemplate *types.LaunchTemplateSpecification
-
- // The node auto repair configuration for the node group.
- NodeRepairConfig *types.NodeRepairConfig
-
- // The AMI version of the Amazon EKS optimized AMI to use with your node group. By
- // default, the latest available AMI version for the node group's current
- // Kubernetes version is used. For information about Linux versions, see [Amazon EKS optimized Amazon Linux AMI versions]in the
- // Amazon EKS User Guide. Amazon EKS managed node groups support the November 2022
- // and later releases of the Windows AMIs. For information about Windows versions,
- // see [Amazon EKS optimized Windows AMI versions]in the Amazon EKS User Guide.
- //
- // If you specify launchTemplate , and your launch template uses a custom AMI, then
- // don't specify releaseVersion , or the node group deployment will fail. For more
- // information about using launch templates with Amazon EKS, see [Customizing managed nodes with launch templates]in the Amazon EKS
- // User Guide.
- //
- // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html
- // [Amazon EKS optimized Amazon Linux AMI versions]: https://docs.aws.amazon.com/eks/latest/userguide/eks-linux-ami-versions.html
- // [Amazon EKS optimized Windows AMI versions]: https://docs.aws.amazon.com/eks/latest/userguide/eks-ami-versions-windows.html
- ReleaseVersion *string
-
- // The remote access configuration to use with your node group. For Linux, the
- // protocol is SSH. For Windows, the protocol is RDP. If you specify launchTemplate
- // , then don't specify remoteAccess , or the node group deployment will fail. For
- // more information about using launch templates with Amazon EKS, see [Customizing managed nodes with launch templates]in the
- // Amazon EKS User Guide.
- //
- // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html
- RemoteAccess *types.RemoteAccessConfig
-
- // The scaling configuration details for the Auto Scaling group that is created
- // for your node group.
- ScalingConfig *types.NodegroupScalingConfig
-
- // Metadata that assists with categorization and organization. Each tag consists
- // of a key and an optional value. You define both. Tags don't propagate to any
- // other cluster or Amazon Web Services resources.
- Tags map[string]string
-
- // The Kubernetes taints to be applied to the nodes in the node group. For more
- // information, see [Node taints on managed node groups].
- //
- // [Node taints on managed node groups]: https://docs.aws.amazon.com/eks/latest/userguide/node-taints-managed-node-groups.html
- Taints []types.Taint
-
- // The node group update configuration.
- UpdateConfig *types.NodegroupUpdateConfig
-
- // The Kubernetes version to use for your managed nodes. By default, the
- // Kubernetes version of the cluster is used, and this is the only accepted
- // specified value. If you specify launchTemplate , and your launch template uses a
- // custom AMI, then don't specify version , or the node group deployment will fail.
- // For more information about using launch templates with Amazon EKS, see [Customizing managed nodes with launch templates]in the
- // Amazon EKS User Guide.
- //
- // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html
- Version *string
-
- noSmithyDocumentSerde
-}
-
-type CreateNodegroupOutput struct {
-
- // The full description of your new node group.
- Nodegroup *types.Nodegroup
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationCreateNodegroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateNodegroup{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateNodegroup{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "CreateNodegroup"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opCreateNodegroupMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpCreateNodegroupValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateNodegroup(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpCreateNodegroup struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpCreateNodegroup) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpCreateNodegroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*CreateNodegroupInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateNodegroupInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opCreateNodegroupMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpCreateNodegroup{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opCreateNodegroup(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "CreateNodegroup",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreatePodIdentityAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreatePodIdentityAssociation.go
deleted file mode 100644
index 417bff0bc4a4..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreatePodIdentityAssociation.go
+++ /dev/null
@@ -1,315 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Creates an EKS Pod Identity association between a service account in an Amazon
-// EKS cluster and an IAM role with EKS Pod Identity. Use EKS Pod Identity to give
-// temporary IAM credentials to Pods and the credentials are rotated automatically.
-//
-// Amazon EKS Pod Identity associations provide the ability to manage credentials
-// for your applications, similar to the way that Amazon EC2 instance profiles
-// provide credentials to Amazon EC2 instances.
-//
-// If a Pod uses a service account that has an association, Amazon EKS sets
-// environment variables in the containers of the Pod. The environment variables
-// configure the Amazon Web Services SDKs, including the Command Line Interface, to
-// use the EKS Pod Identity credentials.
-//
-// EKS Pod Identity is a simpler method than IAM roles for service accounts, as
-// this method doesn't use OIDC identity providers. Additionally, you can configure
-// a role for EKS Pod Identity once, and reuse it across clusters.
-//
-// Similar to Amazon Web Services IAM behavior, EKS Pod Identity associations are
-// eventually consistent, and may take several seconds to be effective after the
-// initial API call returns successfully. You must design your applications to
-// account for these potential delays. We recommend that you don’t include
-// association create/updates in the critical, high-availability code paths of your
-// application. Instead, make changes in a separate initialization or setup routine
-// that you run less frequently.
-//
-// You can set a target IAM role in the same or a different account for advanced
-// scenarios. With a target role, EKS Pod Identity automatically performs two role
-// assumptions in sequence: first assuming the role in the association that is in
-// this account, then using those credentials to assume the target IAM role. This
-// process provides your Pod with temporary credentials that have the permissions
-// defined in the target role, allowing secure access to resources in another
-// Amazon Web Services account.
-func (c *Client) CreatePodIdentityAssociation(ctx context.Context, params *CreatePodIdentityAssociationInput, optFns ...func(*Options)) (*CreatePodIdentityAssociationOutput, error) {
- if params == nil {
- params = &CreatePodIdentityAssociationInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "CreatePodIdentityAssociation", params, optFns, c.addOperationCreatePodIdentityAssociationMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*CreatePodIdentityAssociationOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type CreatePodIdentityAssociationInput struct {
-
- // The name of the cluster to create the EKS Pod Identity association in.
- //
- // This member is required.
- ClusterName *string
-
- // The name of the Kubernetes namespace inside the cluster to create the EKS Pod
- // Identity association in. The service account and the Pods that use the service
- // account must be in this namespace.
- //
- // This member is required.
- Namespace *string
-
- // The Amazon Resource Name (ARN) of the IAM role to associate with the service
- // account. The EKS Pod Identity agent manages credentials to assume this role for
- // applications in the containers in the Pods that use this service account.
- //
- // This member is required.
- RoleArn *string
-
- // The name of the Kubernetes service account inside the cluster to associate the
- // IAM credentials with.
- //
- // This member is required.
- ServiceAccount *string
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request.
- ClientRequestToken *string
-
- // Disable the automatic sessions tags that are appended by EKS Pod Identity.
- //
- // EKS Pod Identity adds a pre-defined set of session tags when it assumes the
- // role. You can use these tags to author a single role that can work across
- // resources by allowing access to Amazon Web Services resources based on matching
- // tags. By default, EKS Pod Identity attaches six tags, including tags for cluster
- // name, namespace, and service account name. For the list of tags added by EKS Pod
- // Identity, see [List of session tags added by EKS Pod Identity]in the Amazon EKS User Guide.
- //
- // Amazon Web Services compresses inline session policies, managed policy ARNs,
- // and session tags into a packed binary format that has a separate limit. If you
- // receive a PackedPolicyTooLarge error indicating the packed binary format has
- // exceeded the size limit, you can attempt to reduce the size by disabling the
- // session tags added by EKS Pod Identity.
- //
- // [List of session tags added by EKS Pod Identity]: https://docs.aws.amazon.com/eks/latest/userguide/pod-id-abac.html#pod-id-abac-tags
- DisableSessionTags *bool
-
- // Metadata that assists with categorization and organization. Each tag consists
- // of a key and an optional value. You define both. Tags don't propagate to any
- // other cluster or Amazon Web Services resources.
- //
- // The following basic restrictions apply to tags:
- //
- // - Maximum number of tags per resource – 50
- //
- // - For each resource, each tag key must be unique, and each tag key can have
- // only one value.
- //
- // - Maximum key length – 128 Unicode characters in UTF-8
- //
- // - Maximum value length – 256 Unicode characters in UTF-8
- //
- // - If your tagging schema is used across multiple services and resources,
- // remember that other services may have restrictions on allowed characters.
- // Generally allowed characters are: letters, numbers, and spaces representable in
- // UTF-8, and the following characters: + - = . _ : / @.
- //
- // - Tag keys and values are case-sensitive.
- //
- // - Do not use aws: , AWS: , or any upper or lowercase combination of such as a
- // prefix for either keys or values as it is reserved for Amazon Web Services use.
- // You cannot edit or delete tag keys or values with this prefix. Tags with this
- // prefix do not count against your tags per resource limit.
- Tags map[string]string
-
- // The Amazon Resource Name (ARN) of the target IAM role to associate with the
- // service account. This role is assumed by using the EKS Pod Identity association
- // role, then the credentials for this role are injected into the Pod.
- //
- // When you run applications on Amazon EKS, your application might need to access
- // Amazon Web Services resources from a different role that exists in the same or
- // different Amazon Web Services account. For example, your application running in
- // “Account A” might need to access resources, such as Amazon S3 buckets in
- // “Account B” or within “Account A” itself. You can create a association to access
- // Amazon Web Services resources in “Account B” by creating two IAM roles: a role
- // in “Account A” and a role in “Account B” (which can be the same or different
- // account), each with the necessary trust and permission policies. After you
- // provide these roles in the IAM role and Target IAM role fields, EKS will perform
- // role chaining to ensure your application gets the required permissions. This
- // means Role A will assume Role B, allowing your Pods to securely access resources
- // like S3 buckets in the target account.
- TargetRoleArn *string
-
- noSmithyDocumentSerde
-}
-
-type CreatePodIdentityAssociationOutput struct {
-
- // The full description of your new association.
- //
- // The description includes an ID for the association. Use the ID of the
- // association in further actions to manage the association.
- Association *types.PodIdentityAssociation
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationCreatePodIdentityAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpCreatePodIdentityAssociation{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreatePodIdentityAssociation{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "CreatePodIdentityAssociation"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opCreatePodIdentityAssociationMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpCreatePodIdentityAssociationValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePodIdentityAssociation(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpCreatePodIdentityAssociation struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpCreatePodIdentityAssociation) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpCreatePodIdentityAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*CreatePodIdentityAssociationInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *CreatePodIdentityAssociationInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opCreatePodIdentityAssociationMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpCreatePodIdentityAssociation{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opCreatePodIdentityAssociation(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "CreatePodIdentityAssociation",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteAccessEntry.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteAccessEntry.go
deleted file mode 100644
index 8e89981a0223..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteAccessEntry.go
+++ /dev/null
@@ -1,161 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Deletes an access entry.
-//
-// Deleting an access entry of a type other than Standard can cause your cluster
-// to function improperly. If you delete an access entry in error, you can recreate
-// it.
-func (c *Client) DeleteAccessEntry(ctx context.Context, params *DeleteAccessEntryInput, optFns ...func(*Options)) (*DeleteAccessEntryOutput, error) {
- if params == nil {
- params = &DeleteAccessEntryInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DeleteAccessEntry", params, optFns, c.addOperationDeleteAccessEntryMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DeleteAccessEntryOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DeleteAccessEntryInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The ARN of the IAM principal for the AccessEntry .
- //
- // This member is required.
- PrincipalArn *string
-
- noSmithyDocumentSerde
-}
-
-type DeleteAccessEntryOutput struct {
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDeleteAccessEntryMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteAccessEntry{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteAccessEntry{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAccessEntry"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDeleteAccessEntryValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAccessEntry(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDeleteAccessEntry(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DeleteAccessEntry",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteAddon.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteAddon.go
deleted file mode 100644
index 30157d0d1e00..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteAddon.go
+++ /dev/null
@@ -1,175 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Deletes an Amazon EKS add-on.
-//
-// When you remove an add-on, it's deleted from the cluster. You can always
-// manually start an add-on on the cluster using the Kubernetes API.
-func (c *Client) DeleteAddon(ctx context.Context, params *DeleteAddonInput, optFns ...func(*Options)) (*DeleteAddonOutput, error) {
- if params == nil {
- params = &DeleteAddonInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DeleteAddon", params, optFns, c.addOperationDeleteAddonMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DeleteAddonOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DeleteAddonInput struct {
-
- // The name of the add-on. The name must match one of the names returned by [ListAddons]
- // ListAddons .
- //
- // [ListAddons]: https://docs.aws.amazon.com/eks/latest/APIReference/API_ListAddons.html
- //
- // This member is required.
- AddonName *string
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // Specifying this option preserves the add-on software on your cluster but Amazon
- // EKS stops managing any settings for the add-on. If an IAM account is associated
- // with the add-on, it isn't removed.
- Preserve bool
-
- noSmithyDocumentSerde
-}
-
-type DeleteAddonOutput struct {
-
- // An Amazon EKS add-on. For more information, see [Amazon EKS add-ons] in the Amazon EKS User Guide.
- //
- // [Amazon EKS add-ons]: https://docs.aws.amazon.com/eks/latest/userguide/eks-add-ons.html
- Addon *types.Addon
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDeleteAddonMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteAddon{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteAddon{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAddon"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDeleteAddonValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAddon(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDeleteAddon(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DeleteAddon",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteCapability.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteCapability.go
deleted file mode 100644
index e8fbffb16d13..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteCapability.go
+++ /dev/null
@@ -1,172 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Deletes a managed capability from your Amazon EKS cluster. When you delete a
-// capability, Amazon EKS removes the capability infrastructure but retains all
-// resources that were managed by the capability.
-//
-// Before deleting a capability, you should delete all Kubernetes resources that
-// were created by the capability. After the capability is deleted, these resources
-// become difficult to manage because the controller that managed them is no longer
-// available. To delete resources before removing the capability, use kubectl
-// delete or remove them through your GitOps workflow.
-func (c *Client) DeleteCapability(ctx context.Context, params *DeleteCapabilityInput, optFns ...func(*Options)) (*DeleteCapabilityOutput, error) {
- if params == nil {
- params = &DeleteCapabilityInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DeleteCapability", params, optFns, c.addOperationDeleteCapabilityMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DeleteCapabilityOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DeleteCapabilityInput struct {
-
- // The name of the capability to delete.
- //
- // This member is required.
- CapabilityName *string
-
- // The name of the Amazon EKS cluster that contains the capability you want to
- // delete.
- //
- // This member is required.
- ClusterName *string
-
- noSmithyDocumentSerde
-}
-
-type DeleteCapabilityOutput struct {
-
- // An object containing information about the deleted capability, including its
- // final status and configuration.
- Capability *types.Capability
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDeleteCapabilityMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteCapability{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteCapability{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteCapability"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDeleteCapabilityValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCapability(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDeleteCapability(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DeleteCapability",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteCluster.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteCluster.go
deleted file mode 100644
index 65e25ef19658..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteCluster.go
+++ /dev/null
@@ -1,169 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Deletes an Amazon EKS cluster control plane.
-//
-// If you have active services in your cluster that are associated with a load
-// balancer, you must delete those services before deleting the cluster so that the
-// load balancers are deleted properly. Otherwise, you can have orphaned resources
-// in your VPC that prevent you from being able to delete the VPC. For more
-// information, see [Deleting a cluster]in the Amazon EKS User Guide.
-//
-// If you have managed node groups or Fargate profiles attached to the cluster,
-// you must delete them first. For more information, see DeleteNodgroup and
-// DeleteFargateProfile .
-//
-// [Deleting a cluster]: https://docs.aws.amazon.com/eks/latest/userguide/delete-cluster.html
-func (c *Client) DeleteCluster(ctx context.Context, params *DeleteClusterInput, optFns ...func(*Options)) (*DeleteClusterOutput, error) {
- if params == nil {
- params = &DeleteClusterInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DeleteCluster", params, optFns, c.addOperationDeleteClusterMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DeleteClusterOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DeleteClusterInput struct {
-
- // The name of the cluster to delete.
- //
- // This member is required.
- Name *string
-
- noSmithyDocumentSerde
-}
-
-type DeleteClusterOutput struct {
-
- // The full description of the cluster to delete.
- Cluster *types.Cluster
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDeleteClusterMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteCluster{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteCluster{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteCluster"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDeleteClusterValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCluster(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDeleteCluster(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DeleteCluster",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteEksAnywhereSubscription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteEksAnywhereSubscription.go
deleted file mode 100644
index 5dd06e456757..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteEksAnywhereSubscription.go
+++ /dev/null
@@ -1,161 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Deletes an expired or inactive subscription. Deleting inactive subscriptions
-// removes them from the Amazon Web Services Management Console view and from
-// list/describe API responses. Subscriptions can only be cancelled within 7 days
-// of creation and are cancelled by creating a ticket in the Amazon Web Services
-// Support Center.
-func (c *Client) DeleteEksAnywhereSubscription(ctx context.Context, params *DeleteEksAnywhereSubscriptionInput, optFns ...func(*Options)) (*DeleteEksAnywhereSubscriptionOutput, error) {
- if params == nil {
- params = &DeleteEksAnywhereSubscriptionInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DeleteEksAnywhereSubscription", params, optFns, c.addOperationDeleteEksAnywhereSubscriptionMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DeleteEksAnywhereSubscriptionOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DeleteEksAnywhereSubscriptionInput struct {
-
- // The ID of the subscription.
- //
- // This member is required.
- Id *string
-
- noSmithyDocumentSerde
-}
-
-type DeleteEksAnywhereSubscriptionOutput struct {
-
- // The full description of the subscription to be deleted.
- Subscription *types.EksAnywhereSubscription
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDeleteEksAnywhereSubscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteEksAnywhereSubscription{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteEksAnywhereSubscription{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteEksAnywhereSubscription"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDeleteEksAnywhereSubscriptionValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteEksAnywhereSubscription(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDeleteEksAnywhereSubscription(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DeleteEksAnywhereSubscription",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteFargateProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteFargateProfile.go
deleted file mode 100644
index 07476a9bd59b..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteFargateProfile.go
+++ /dev/null
@@ -1,172 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Deletes an Fargate profile.
-//
-// When you delete a Fargate profile, any Pod running on Fargate that was created
-// with the profile is deleted. If the Pod matches another Fargate profile, then
-// it is scheduled on Fargate with that profile. If it no longer matches any
-// Fargate profiles, then it's not scheduled on Fargate and may remain in a pending
-// state.
-//
-// Only one Fargate profile in a cluster can be in the DELETING status at a time.
-// You must wait for a Fargate profile to finish deleting before you can delete any
-// other profiles in that cluster.
-func (c *Client) DeleteFargateProfile(ctx context.Context, params *DeleteFargateProfileInput, optFns ...func(*Options)) (*DeleteFargateProfileOutput, error) {
- if params == nil {
- params = &DeleteFargateProfileInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DeleteFargateProfile", params, optFns, c.addOperationDeleteFargateProfileMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DeleteFargateProfileOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DeleteFargateProfileInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The name of the Fargate profile to delete.
- //
- // This member is required.
- FargateProfileName *string
-
- noSmithyDocumentSerde
-}
-
-type DeleteFargateProfileOutput struct {
-
- // The deleted Fargate profile.
- FargateProfile *types.FargateProfile
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDeleteFargateProfileMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteFargateProfile{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteFargateProfile{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteFargateProfile"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDeleteFargateProfileValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFargateProfile(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDeleteFargateProfile(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DeleteFargateProfile",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteNodegroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteNodegroup.go
deleted file mode 100644
index 1e076ec97ea8..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteNodegroup.go
+++ /dev/null
@@ -1,162 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Deletes a managed node group.
-func (c *Client) DeleteNodegroup(ctx context.Context, params *DeleteNodegroupInput, optFns ...func(*Options)) (*DeleteNodegroupOutput, error) {
- if params == nil {
- params = &DeleteNodegroupInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DeleteNodegroup", params, optFns, c.addOperationDeleteNodegroupMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DeleteNodegroupOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DeleteNodegroupInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The name of the node group to delete.
- //
- // This member is required.
- NodegroupName *string
-
- noSmithyDocumentSerde
-}
-
-type DeleteNodegroupOutput struct {
-
- // The full description of your deleted node group.
- Nodegroup *types.Nodegroup
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDeleteNodegroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteNodegroup{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteNodegroup{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteNodegroup"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDeleteNodegroupValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNodegroup(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDeleteNodegroup(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DeleteNodegroup",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeletePodIdentityAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeletePodIdentityAssociation.go
deleted file mode 100644
index b227e77ad726..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeletePodIdentityAssociation.go
+++ /dev/null
@@ -1,167 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Deletes a EKS Pod Identity association.
-//
-// The temporary Amazon Web Services credentials from the previous IAM role
-// session might still be valid until the session expiry. If you need to
-// immediately revoke the temporary session credentials, then go to the role in the
-// IAM console.
-func (c *Client) DeletePodIdentityAssociation(ctx context.Context, params *DeletePodIdentityAssociationInput, optFns ...func(*Options)) (*DeletePodIdentityAssociationOutput, error) {
- if params == nil {
- params = &DeletePodIdentityAssociationInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DeletePodIdentityAssociation", params, optFns, c.addOperationDeletePodIdentityAssociationMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DeletePodIdentityAssociationOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DeletePodIdentityAssociationInput struct {
-
- // The ID of the association to be deleted.
- //
- // This member is required.
- AssociationId *string
-
- // The cluster name that
- //
- // This member is required.
- ClusterName *string
-
- noSmithyDocumentSerde
-}
-
-type DeletePodIdentityAssociationOutput struct {
-
- // The full description of the EKS Pod Identity association that was deleted.
- Association *types.PodIdentityAssociation
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDeletePodIdentityAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDeletePodIdentityAssociation{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeletePodIdentityAssociation{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DeletePodIdentityAssociation"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDeletePodIdentityAssociationValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePodIdentityAssociation(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDeletePodIdentityAssociation(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DeletePodIdentityAssociation",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeregisterCluster.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeregisterCluster.go
deleted file mode 100644
index fd0e157d947a..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeregisterCluster.go
+++ /dev/null
@@ -1,162 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Deregisters a connected cluster to remove it from the Amazon EKS control plane.
-//
-// A connected cluster is a Kubernetes cluster that you've connected to your
-// control plane using the [Amazon EKS Connector].
-//
-// [Amazon EKS Connector]: https://docs.aws.amazon.com/eks/latest/userguide/eks-connector.html
-func (c *Client) DeregisterCluster(ctx context.Context, params *DeregisterClusterInput, optFns ...func(*Options)) (*DeregisterClusterOutput, error) {
- if params == nil {
- params = &DeregisterClusterInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DeregisterCluster", params, optFns, c.addOperationDeregisterClusterMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DeregisterClusterOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DeregisterClusterInput struct {
-
- // The name of the connected cluster to deregister.
- //
- // This member is required.
- Name *string
-
- noSmithyDocumentSerde
-}
-
-type DeregisterClusterOutput struct {
-
- // An object representing an Amazon EKS cluster.
- Cluster *types.Cluster
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDeregisterClusterMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDeregisterCluster{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeregisterCluster{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DeregisterCluster"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDeregisterClusterValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterCluster(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDeregisterCluster(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DeregisterCluster",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeAccessEntry.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeAccessEntry.go
deleted file mode 100644
index 221cdf333a4c..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeAccessEntry.go
+++ /dev/null
@@ -1,162 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Describes an access entry.
-func (c *Client) DescribeAccessEntry(ctx context.Context, params *DescribeAccessEntryInput, optFns ...func(*Options)) (*DescribeAccessEntryOutput, error) {
- if params == nil {
- params = &DescribeAccessEntryInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeAccessEntry", params, optFns, c.addOperationDescribeAccessEntryMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeAccessEntryOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeAccessEntryInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The ARN of the IAM principal for the AccessEntry .
- //
- // This member is required.
- PrincipalArn *string
-
- noSmithyDocumentSerde
-}
-
-type DescribeAccessEntryOutput struct {
-
- // Information about the access entry.
- AccessEntry *types.AccessEntry
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeAccessEntryMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeAccessEntry{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeAccessEntry{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAccessEntry"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDescribeAccessEntryValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccessEntry(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDescribeAccessEntry(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeAccessEntry",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeAddon.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeAddon.go
deleted file mode 100644
index a3463119e43c..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeAddon.go
+++ /dev/null
@@ -1,573 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "errors"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithytime "github.com/aws/smithy-go/time"
- smithyhttp "github.com/aws/smithy-go/transport/http"
- smithywaiter "github.com/aws/smithy-go/waiter"
- "time"
-)
-
-// Describes an Amazon EKS add-on.
-func (c *Client) DescribeAddon(ctx context.Context, params *DescribeAddonInput, optFns ...func(*Options)) (*DescribeAddonOutput, error) {
- if params == nil {
- params = &DescribeAddonInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeAddon", params, optFns, c.addOperationDescribeAddonMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeAddonOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeAddonInput struct {
-
- // The name of the add-on. The name must match one of the names returned by [ListAddons]
- // ListAddons .
- //
- // [ListAddons]: https://docs.aws.amazon.com/eks/latest/APIReference/API_ListAddons.html
- //
- // This member is required.
- AddonName *string
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- noSmithyDocumentSerde
-}
-
-type DescribeAddonOutput struct {
-
- // An Amazon EKS add-on. For more information, see [Amazon EKS add-ons] in the Amazon EKS User Guide.
- //
- // [Amazon EKS add-ons]: https://docs.aws.amazon.com/eks/latest/userguide/eks-add-ons.html
- Addon *types.Addon
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeAddonMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeAddon{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeAddon{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAddon"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDescribeAddonValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAddon(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// AddonActiveWaiterOptions are waiter options for AddonActiveWaiter
-type AddonActiveWaiterOptions struct {
-
- // Set of options to modify how an operation is invoked. These apply to all
- // operations invoked for this client. Use functional options on operation call to
- // modify this list for per operation behavior.
- //
- // Passing options here is functionally equivalent to passing values to this
- // config's ClientOptions field that extend the inner client's APIOptions directly.
- APIOptions []func(*middleware.Stack) error
-
- // Functional options to be passed to all operations invoked by this client.
- //
- // Function values that modify the inner APIOptions are applied after the waiter
- // config's own APIOptions modifiers.
- ClientOptions []func(*Options)
-
- // MinDelay is the minimum amount of time to delay between retries. If unset,
- // AddonActiveWaiter will use default minimum delay of 10 seconds. Note that
- // MinDelay must resolve to a value lesser than or equal to the MaxDelay.
- MinDelay time.Duration
-
- // MaxDelay is the maximum amount of time to delay between retries. If unset or
- // set to zero, AddonActiveWaiter will use default max delay of 120 seconds. Note
- // that MaxDelay must resolve to value greater than or equal to the MinDelay.
- MaxDelay time.Duration
-
- // LogWaitAttempts is used to enable logging for waiter retry attempts
- LogWaitAttempts bool
-
- // Retryable is function that can be used to override the service defined
- // waiter-behavior based on operation output, or returned error. This function is
- // used by the waiter to decide if a state is retryable or a terminal state.
- //
- // By default service-modeled logic will populate this option. This option can
- // thus be used to define a custom waiter state with fall-back to service-modeled
- // waiter state mutators.The function returns an error in case of a failure state.
- // In case of retry state, this function returns a bool value of true and nil
- // error, while in case of success it returns a bool value of false and nil error.
- Retryable func(context.Context, *DescribeAddonInput, *DescribeAddonOutput, error) (bool, error)
-}
-
-// AddonActiveWaiter defines the waiters for AddonActive
-type AddonActiveWaiter struct {
- client DescribeAddonAPIClient
-
- options AddonActiveWaiterOptions
-}
-
-// NewAddonActiveWaiter constructs a AddonActiveWaiter.
-func NewAddonActiveWaiter(client DescribeAddonAPIClient, optFns ...func(*AddonActiveWaiterOptions)) *AddonActiveWaiter {
- options := AddonActiveWaiterOptions{}
- options.MinDelay = 10 * time.Second
- options.MaxDelay = 120 * time.Second
- options.Retryable = addonActiveStateRetryable
-
- for _, fn := range optFns {
- fn(&options)
- }
- return &AddonActiveWaiter{
- client: client,
- options: options,
- }
-}
-
-// Wait calls the waiter function for AddonActive waiter. The maxWaitDur is the
-// maximum wait duration the waiter will wait. The maxWaitDur is required and must
-// be greater than zero.
-func (w *AddonActiveWaiter) Wait(ctx context.Context, params *DescribeAddonInput, maxWaitDur time.Duration, optFns ...func(*AddonActiveWaiterOptions)) error {
- _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
- return err
-}
-
-// WaitForOutput calls the waiter function for AddonActive waiter and returns the
-// output of the successful operation. The maxWaitDur is the maximum wait duration
-// the waiter will wait. The maxWaitDur is required and must be greater than zero.
-func (w *AddonActiveWaiter) WaitForOutput(ctx context.Context, params *DescribeAddonInput, maxWaitDur time.Duration, optFns ...func(*AddonActiveWaiterOptions)) (*DescribeAddonOutput, error) {
- if maxWaitDur <= 0 {
- return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
- }
-
- options := w.options
- for _, fn := range optFns {
- fn(&options)
- }
-
- if options.MaxDelay <= 0 {
- options.MaxDelay = 120 * time.Second
- }
-
- if options.MinDelay > options.MaxDelay {
- return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
- }
-
- ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
- defer cancelFn()
-
- logger := smithywaiter.Logger{}
- remainingTime := maxWaitDur
-
- var attempt int64
- for {
-
- attempt++
- apiOptions := options.APIOptions
- start := time.Now()
-
- if options.LogWaitAttempts {
- logger.Attempt = attempt
- apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
- apiOptions = append(apiOptions, logger.AddLogger)
- }
-
- out, err := w.client.DescribeAddon(ctx, params, func(o *Options) {
- baseOpts := []func(*Options){
- addIsWaiterUserAgent,
- }
- o.APIOptions = append(o.APIOptions, apiOptions...)
- for _, opt := range baseOpts {
- opt(o)
- }
- for _, opt := range options.ClientOptions {
- opt(o)
- }
- })
-
- retryable, err := options.Retryable(ctx, params, out, err)
- if err != nil {
- return nil, err
- }
- if !retryable {
- return out, nil
- }
-
- remainingTime -= time.Since(start)
- if remainingTime < options.MinDelay || remainingTime <= 0 {
- break
- }
-
- // compute exponential backoff between waiter retries
- delay, err := smithywaiter.ComputeDelay(
- attempt, options.MinDelay, options.MaxDelay, remainingTime,
- )
- if err != nil {
- return nil, fmt.Errorf("error computing waiter delay, %w", err)
- }
-
- remainingTime -= delay
- // sleep for the delay amount before invoking a request
- if err := smithytime.SleepWithContext(ctx, delay); err != nil {
- return nil, fmt.Errorf("request cancelled while waiting, %w", err)
- }
- }
- return nil, fmt.Errorf("exceeded max wait time for AddonActive waiter")
-}
-
-func addonActiveStateRetryable(ctx context.Context, input *DescribeAddonInput, output *DescribeAddonOutput, err error) (bool, error) {
-
- if err == nil {
- v1 := output.Addon
- var v2 types.AddonStatus
- if v1 != nil {
- v3 := v1.Status
- v2 = v3
- }
- expectedValue := "CREATE_FAILED"
- var pathValue string
- pathValue = string(v2)
- if pathValue == expectedValue {
- return false, fmt.Errorf("waiter state transitioned to Failure")
- }
- }
-
- if err == nil {
- v1 := output.Addon
- var v2 types.AddonStatus
- if v1 != nil {
- v3 := v1.Status
- v2 = v3
- }
- expectedValue := "DEGRADED"
- var pathValue string
- pathValue = string(v2)
- if pathValue == expectedValue {
- return false, fmt.Errorf("waiter state transitioned to Failure")
- }
- }
-
- if err == nil {
- v1 := output.Addon
- var v2 types.AddonStatus
- if v1 != nil {
- v3 := v1.Status
- v2 = v3
- }
- expectedValue := "ACTIVE"
- var pathValue string
- pathValue = string(v2)
- if pathValue == expectedValue {
- return false, nil
- }
- }
-
- if err != nil {
- return false, err
- }
- return true, nil
-}
-
-// AddonDeletedWaiterOptions are waiter options for AddonDeletedWaiter
-type AddonDeletedWaiterOptions struct {
-
- // Set of options to modify how an operation is invoked. These apply to all
- // operations invoked for this client. Use functional options on operation call to
- // modify this list for per operation behavior.
- //
- // Passing options here is functionally equivalent to passing values to this
- // config's ClientOptions field that extend the inner client's APIOptions directly.
- APIOptions []func(*middleware.Stack) error
-
- // Functional options to be passed to all operations invoked by this client.
- //
- // Function values that modify the inner APIOptions are applied after the waiter
- // config's own APIOptions modifiers.
- ClientOptions []func(*Options)
-
- // MinDelay is the minimum amount of time to delay between retries. If unset,
- // AddonDeletedWaiter will use default minimum delay of 10 seconds. Note that
- // MinDelay must resolve to a value lesser than or equal to the MaxDelay.
- MinDelay time.Duration
-
- // MaxDelay is the maximum amount of time to delay between retries. If unset or
- // set to zero, AddonDeletedWaiter will use default max delay of 120 seconds. Note
- // that MaxDelay must resolve to value greater than or equal to the MinDelay.
- MaxDelay time.Duration
-
- // LogWaitAttempts is used to enable logging for waiter retry attempts
- LogWaitAttempts bool
-
- // Retryable is function that can be used to override the service defined
- // waiter-behavior based on operation output, or returned error. This function is
- // used by the waiter to decide if a state is retryable or a terminal state.
- //
- // By default service-modeled logic will populate this option. This option can
- // thus be used to define a custom waiter state with fall-back to service-modeled
- // waiter state mutators.The function returns an error in case of a failure state.
- // In case of retry state, this function returns a bool value of true and nil
- // error, while in case of success it returns a bool value of false and nil error.
- Retryable func(context.Context, *DescribeAddonInput, *DescribeAddonOutput, error) (bool, error)
-}
-
-// AddonDeletedWaiter defines the waiters for AddonDeleted
-type AddonDeletedWaiter struct {
- client DescribeAddonAPIClient
-
- options AddonDeletedWaiterOptions
-}
-
-// NewAddonDeletedWaiter constructs a AddonDeletedWaiter.
-func NewAddonDeletedWaiter(client DescribeAddonAPIClient, optFns ...func(*AddonDeletedWaiterOptions)) *AddonDeletedWaiter {
- options := AddonDeletedWaiterOptions{}
- options.MinDelay = 10 * time.Second
- options.MaxDelay = 120 * time.Second
- options.Retryable = addonDeletedStateRetryable
-
- for _, fn := range optFns {
- fn(&options)
- }
- return &AddonDeletedWaiter{
- client: client,
- options: options,
- }
-}
-
-// Wait calls the waiter function for AddonDeleted waiter. The maxWaitDur is the
-// maximum wait duration the waiter will wait. The maxWaitDur is required and must
-// be greater than zero.
-func (w *AddonDeletedWaiter) Wait(ctx context.Context, params *DescribeAddonInput, maxWaitDur time.Duration, optFns ...func(*AddonDeletedWaiterOptions)) error {
- _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
- return err
-}
-
-// WaitForOutput calls the waiter function for AddonDeleted waiter and returns the
-// output of the successful operation. The maxWaitDur is the maximum wait duration
-// the waiter will wait. The maxWaitDur is required and must be greater than zero.
-func (w *AddonDeletedWaiter) WaitForOutput(ctx context.Context, params *DescribeAddonInput, maxWaitDur time.Duration, optFns ...func(*AddonDeletedWaiterOptions)) (*DescribeAddonOutput, error) {
- if maxWaitDur <= 0 {
- return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
- }
-
- options := w.options
- for _, fn := range optFns {
- fn(&options)
- }
-
- if options.MaxDelay <= 0 {
- options.MaxDelay = 120 * time.Second
- }
-
- if options.MinDelay > options.MaxDelay {
- return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
- }
-
- ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
- defer cancelFn()
-
- logger := smithywaiter.Logger{}
- remainingTime := maxWaitDur
-
- var attempt int64
- for {
-
- attempt++
- apiOptions := options.APIOptions
- start := time.Now()
-
- if options.LogWaitAttempts {
- logger.Attempt = attempt
- apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
- apiOptions = append(apiOptions, logger.AddLogger)
- }
-
- out, err := w.client.DescribeAddon(ctx, params, func(o *Options) {
- baseOpts := []func(*Options){
- addIsWaiterUserAgent,
- }
- o.APIOptions = append(o.APIOptions, apiOptions...)
- for _, opt := range baseOpts {
- opt(o)
- }
- for _, opt := range options.ClientOptions {
- opt(o)
- }
- })
-
- retryable, err := options.Retryable(ctx, params, out, err)
- if err != nil {
- return nil, err
- }
- if !retryable {
- return out, nil
- }
-
- remainingTime -= time.Since(start)
- if remainingTime < options.MinDelay || remainingTime <= 0 {
- break
- }
-
- // compute exponential backoff between waiter retries
- delay, err := smithywaiter.ComputeDelay(
- attempt, options.MinDelay, options.MaxDelay, remainingTime,
- )
- if err != nil {
- return nil, fmt.Errorf("error computing waiter delay, %w", err)
- }
-
- remainingTime -= delay
- // sleep for the delay amount before invoking a request
- if err := smithytime.SleepWithContext(ctx, delay); err != nil {
- return nil, fmt.Errorf("request cancelled while waiting, %w", err)
- }
- }
- return nil, fmt.Errorf("exceeded max wait time for AddonDeleted waiter")
-}
-
-func addonDeletedStateRetryable(ctx context.Context, input *DescribeAddonInput, output *DescribeAddonOutput, err error) (bool, error) {
-
- if err == nil {
- v1 := output.Addon
- var v2 types.AddonStatus
- if v1 != nil {
- v3 := v1.Status
- v2 = v3
- }
- expectedValue := "DELETE_FAILED"
- var pathValue string
- pathValue = string(v2)
- if pathValue == expectedValue {
- return false, fmt.Errorf("waiter state transitioned to Failure")
- }
- }
-
- if err != nil {
- var errorType *types.ResourceNotFoundException
- if errors.As(err, &errorType) {
- return false, nil
- }
- }
-
- if err != nil {
- return false, err
- }
- return true, nil
-}
-
-// DescribeAddonAPIClient is a client that implements the DescribeAddon operation.
-type DescribeAddonAPIClient interface {
- DescribeAddon(context.Context, *DescribeAddonInput, ...func(*Options)) (*DescribeAddonOutput, error)
-}
-
-var _ DescribeAddonAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opDescribeAddon(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeAddon",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeAddonConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeAddonConfiguration.go
deleted file mode 100644
index 678a7be610cd..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeAddonConfiguration.go
+++ /dev/null
@@ -1,180 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Returns configuration options.
-func (c *Client) DescribeAddonConfiguration(ctx context.Context, params *DescribeAddonConfigurationInput, optFns ...func(*Options)) (*DescribeAddonConfigurationOutput, error) {
- if params == nil {
- params = &DescribeAddonConfigurationInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeAddonConfiguration", params, optFns, c.addOperationDescribeAddonConfigurationMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeAddonConfigurationOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeAddonConfigurationInput struct {
-
- // The name of the add-on. The name must match one of the names returned by
- // DescribeAddonVersions .
- //
- // This member is required.
- AddonName *string
-
- // The version of the add-on. The version must match one of the versions returned
- // by [DescribeAddonVersions]DescribeAddonVersions .
- //
- // [DescribeAddonVersions]: https://docs.aws.amazon.com/eks/latest/APIReference/API_DescribeAddonVersions.html
- //
- // This member is required.
- AddonVersion *string
-
- noSmithyDocumentSerde
-}
-
-type DescribeAddonConfigurationOutput struct {
-
- // The name of the add-on.
- AddonName *string
-
- // The version of the add-on. The version must match one of the versions returned
- // by [DescribeAddonVersions]DescribeAddonVersions .
- //
- // [DescribeAddonVersions]: https://docs.aws.amazon.com/eks/latest/APIReference/API_DescribeAddonVersions.html
- AddonVersion *string
-
- // A JSON schema that's used to validate the configuration values you provide when
- // an add-on is created or updated.
- ConfigurationSchema *string
-
- // The Kubernetes service account name used by the add-on, and any suggested IAM
- // policies. Use this information to create an IAM Role for the add-on.
- PodIdentityConfiguration []types.AddonPodIdentityConfiguration
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeAddonConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeAddonConfiguration{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeAddonConfiguration{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAddonConfiguration"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDescribeAddonConfigurationValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAddonConfiguration(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDescribeAddonConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeAddonConfiguration",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeAddonVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeAddonVersions.go
deleted file mode 100644
index c5b78cd09127..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeAddonVersions.go
+++ /dev/null
@@ -1,299 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Describes the versions for an add-on.
-//
-// Information such as the Kubernetes versions that you can use the add-on with,
-// the owner , publisher , and the type of the add-on are returned.
-func (c *Client) DescribeAddonVersions(ctx context.Context, params *DescribeAddonVersionsInput, optFns ...func(*Options)) (*DescribeAddonVersionsOutput, error) {
- if params == nil {
- params = &DescribeAddonVersionsInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeAddonVersions", params, optFns, c.addOperationDescribeAddonVersionsMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeAddonVersionsOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeAddonVersionsInput struct {
-
- // The name of the add-on. The name must match one of the names returned by [ListAddons]
- // ListAddons .
- //
- // [ListAddons]: https://docs.aws.amazon.com/eks/latest/APIReference/API_ListAddons.html
- AddonName *string
-
- // The Kubernetes versions that you can use the add-on with.
- KubernetesVersion *string
-
- // The maximum number of results, returned in paginated output. You receive
- // maxResults in a single page, along with a nextToken response element. You can
- // see the remaining results of the initial request by sending another request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, 100 results and a nextToken value, if applicable, are
- // returned.
- MaxResults *int32
-
- // The nextToken value returned from a previous paginated request, where maxResults
- // was used and the results exceeded the value of that parameter. Pagination
- // continues from the end of the previous results that returned the nextToken
- // value. This value is null when there are no more results to return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- // The owner of the add-on. For valid owners , don't specify a value for this
- // property.
- Owners []string
-
- // The publisher of the add-on. For valid publishers , don't specify a value for
- // this property.
- Publishers []string
-
- // The type of the add-on. For valid types , don't specify a value for this
- // property.
- Types []string
-
- noSmithyDocumentSerde
-}
-
-type DescribeAddonVersionsOutput struct {
-
- // The list of available versions with Kubernetes version compatibility and other
- // properties.
- Addons []types.AddonInfo
-
- // The nextToken value to include in a future DescribeAddonVersions request. When
- // the results of a DescribeAddonVersions request exceed maxResults , you can use
- // this value to retrieve the next page of results. This value is null when there
- // are no more results to return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeAddonVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeAddonVersions{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeAddonVersions{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAddonVersions"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAddonVersions(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// DescribeAddonVersionsPaginatorOptions is the paginator options for
-// DescribeAddonVersions
-type DescribeAddonVersionsPaginatorOptions struct {
- // The maximum number of results, returned in paginated output. You receive
- // maxResults in a single page, along with a nextToken response element. You can
- // see the remaining results of the initial request by sending another request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, 100 results and a nextToken value, if applicable, are
- // returned.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// DescribeAddonVersionsPaginator is a paginator for DescribeAddonVersions
-type DescribeAddonVersionsPaginator struct {
- options DescribeAddonVersionsPaginatorOptions
- client DescribeAddonVersionsAPIClient
- params *DescribeAddonVersionsInput
- nextToken *string
- firstPage bool
-}
-
-// NewDescribeAddonVersionsPaginator returns a new DescribeAddonVersionsPaginator
-func NewDescribeAddonVersionsPaginator(client DescribeAddonVersionsAPIClient, params *DescribeAddonVersionsInput, optFns ...func(*DescribeAddonVersionsPaginatorOptions)) *DescribeAddonVersionsPaginator {
- if params == nil {
- params = &DescribeAddonVersionsInput{}
- }
-
- options := DescribeAddonVersionsPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &DescribeAddonVersionsPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *DescribeAddonVersionsPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next DescribeAddonVersions page.
-func (p *DescribeAddonVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAddonVersionsOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.DescribeAddonVersions(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// DescribeAddonVersionsAPIClient is a client that implements the
-// DescribeAddonVersions operation.
-type DescribeAddonVersionsAPIClient interface {
- DescribeAddonVersions(context.Context, *DescribeAddonVersionsInput, ...func(*Options)) (*DescribeAddonVersionsOutput, error)
-}
-
-var _ DescribeAddonVersionsAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opDescribeAddonVersions(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeAddonVersions",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeCapability.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeCapability.go
deleted file mode 100644
index 041582f167c3..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeCapability.go
+++ /dev/null
@@ -1,167 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Returns detailed information about a specific managed capability in your Amazon
-// EKS cluster, including its current status, configuration, health information,
-// and any issues that may be affecting its operation.
-func (c *Client) DescribeCapability(ctx context.Context, params *DescribeCapabilityInput, optFns ...func(*Options)) (*DescribeCapabilityOutput, error) {
- if params == nil {
- params = &DescribeCapabilityInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeCapability", params, optFns, c.addOperationDescribeCapabilityMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeCapabilityOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeCapabilityInput struct {
-
- // The name of the capability to describe.
- //
- // This member is required.
- CapabilityName *string
-
- // The name of the Amazon EKS cluster that contains the capability you want to
- // describe.
- //
- // This member is required.
- ClusterName *string
-
- noSmithyDocumentSerde
-}
-
-type DescribeCapabilityOutput struct {
-
- // An object containing detailed information about the capability, including its
- // name, ARN, type, status, version, configuration, health status, and timestamps
- // for when it was created and last modified.
- Capability *types.Capability
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeCapabilityMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeCapability{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeCapability{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeCapability"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDescribeCapabilityValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCapability(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDescribeCapability(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeCapability",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeCluster.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeCluster.go
deleted file mode 100644
index 0036535c20ee..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeCluster.go
+++ /dev/null
@@ -1,605 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "errors"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithytime "github.com/aws/smithy-go/time"
- smithyhttp "github.com/aws/smithy-go/transport/http"
- smithywaiter "github.com/aws/smithy-go/waiter"
- "time"
-)
-
-// Describes an Amazon EKS cluster.
-//
-// The API server endpoint and certificate authority data returned by this
-// operation are required for kubelet and kubectl to communicate with your
-// Kubernetes API server. For more information, see [Creating or updating a kubeconfig file for an Amazon EKS cluster]kubeconfig .
-//
-// The API server endpoint and certificate authority data aren't available until
-// the cluster reaches the ACTIVE state.
-//
-// [Creating or updating a kubeconfig file for an Amazon EKS cluster]: https://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html
-func (c *Client) DescribeCluster(ctx context.Context, params *DescribeClusterInput, optFns ...func(*Options)) (*DescribeClusterOutput, error) {
- if params == nil {
- params = &DescribeClusterInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeCluster", params, optFns, c.addOperationDescribeClusterMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeClusterOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeClusterInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- Name *string
-
- noSmithyDocumentSerde
-}
-
-type DescribeClusterOutput struct {
-
- // The full description of your specified cluster.
- Cluster *types.Cluster
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeClusterMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeCluster{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeCluster{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeCluster"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDescribeClusterValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCluster(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ClusterActiveWaiterOptions are waiter options for ClusterActiveWaiter
-type ClusterActiveWaiterOptions struct {
-
- // Set of options to modify how an operation is invoked. These apply to all
- // operations invoked for this client. Use functional options on operation call to
- // modify this list for per operation behavior.
- //
- // Passing options here is functionally equivalent to passing values to this
- // config's ClientOptions field that extend the inner client's APIOptions directly.
- APIOptions []func(*middleware.Stack) error
-
- // Functional options to be passed to all operations invoked by this client.
- //
- // Function values that modify the inner APIOptions are applied after the waiter
- // config's own APIOptions modifiers.
- ClientOptions []func(*Options)
-
- // MinDelay is the minimum amount of time to delay between retries. If unset,
- // ClusterActiveWaiter will use default minimum delay of 30 seconds. Note that
- // MinDelay must resolve to a value lesser than or equal to the MaxDelay.
- MinDelay time.Duration
-
- // MaxDelay is the maximum amount of time to delay between retries. If unset or
- // set to zero, ClusterActiveWaiter will use default max delay of 120 seconds. Note
- // that MaxDelay must resolve to value greater than or equal to the MinDelay.
- MaxDelay time.Duration
-
- // LogWaitAttempts is used to enable logging for waiter retry attempts
- LogWaitAttempts bool
-
- // Retryable is function that can be used to override the service defined
- // waiter-behavior based on operation output, or returned error. This function is
- // used by the waiter to decide if a state is retryable or a terminal state.
- //
- // By default service-modeled logic will populate this option. This option can
- // thus be used to define a custom waiter state with fall-back to service-modeled
- // waiter state mutators.The function returns an error in case of a failure state.
- // In case of retry state, this function returns a bool value of true and nil
- // error, while in case of success it returns a bool value of false and nil error.
- Retryable func(context.Context, *DescribeClusterInput, *DescribeClusterOutput, error) (bool, error)
-}
-
-// ClusterActiveWaiter defines the waiters for ClusterActive
-type ClusterActiveWaiter struct {
- client DescribeClusterAPIClient
-
- options ClusterActiveWaiterOptions
-}
-
-// NewClusterActiveWaiter constructs a ClusterActiveWaiter.
-func NewClusterActiveWaiter(client DescribeClusterAPIClient, optFns ...func(*ClusterActiveWaiterOptions)) *ClusterActiveWaiter {
- options := ClusterActiveWaiterOptions{}
- options.MinDelay = 30 * time.Second
- options.MaxDelay = 120 * time.Second
- options.Retryable = clusterActiveStateRetryable
-
- for _, fn := range optFns {
- fn(&options)
- }
- return &ClusterActiveWaiter{
- client: client,
- options: options,
- }
-}
-
-// Wait calls the waiter function for ClusterActive waiter. The maxWaitDur is the
-// maximum wait duration the waiter will wait. The maxWaitDur is required and must
-// be greater than zero.
-func (w *ClusterActiveWaiter) Wait(ctx context.Context, params *DescribeClusterInput, maxWaitDur time.Duration, optFns ...func(*ClusterActiveWaiterOptions)) error {
- _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
- return err
-}
-
-// WaitForOutput calls the waiter function for ClusterActive waiter and returns
-// the output of the successful operation. The maxWaitDur is the maximum wait
-// duration the waiter will wait. The maxWaitDur is required and must be greater
-// than zero.
-func (w *ClusterActiveWaiter) WaitForOutput(ctx context.Context, params *DescribeClusterInput, maxWaitDur time.Duration, optFns ...func(*ClusterActiveWaiterOptions)) (*DescribeClusterOutput, error) {
- if maxWaitDur <= 0 {
- return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
- }
-
- options := w.options
- for _, fn := range optFns {
- fn(&options)
- }
-
- if options.MaxDelay <= 0 {
- options.MaxDelay = 120 * time.Second
- }
-
- if options.MinDelay > options.MaxDelay {
- return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
- }
-
- ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
- defer cancelFn()
-
- logger := smithywaiter.Logger{}
- remainingTime := maxWaitDur
-
- var attempt int64
- for {
-
- attempt++
- apiOptions := options.APIOptions
- start := time.Now()
-
- if options.LogWaitAttempts {
- logger.Attempt = attempt
- apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
- apiOptions = append(apiOptions, logger.AddLogger)
- }
-
- out, err := w.client.DescribeCluster(ctx, params, func(o *Options) {
- baseOpts := []func(*Options){
- addIsWaiterUserAgent,
- }
- o.APIOptions = append(o.APIOptions, apiOptions...)
- for _, opt := range baseOpts {
- opt(o)
- }
- for _, opt := range options.ClientOptions {
- opt(o)
- }
- })
-
- retryable, err := options.Retryable(ctx, params, out, err)
- if err != nil {
- return nil, err
- }
- if !retryable {
- return out, nil
- }
-
- remainingTime -= time.Since(start)
- if remainingTime < options.MinDelay || remainingTime <= 0 {
- break
- }
-
- // compute exponential backoff between waiter retries
- delay, err := smithywaiter.ComputeDelay(
- attempt, options.MinDelay, options.MaxDelay, remainingTime,
- )
- if err != nil {
- return nil, fmt.Errorf("error computing waiter delay, %w", err)
- }
-
- remainingTime -= delay
- // sleep for the delay amount before invoking a request
- if err := smithytime.SleepWithContext(ctx, delay); err != nil {
- return nil, fmt.Errorf("request cancelled while waiting, %w", err)
- }
- }
- return nil, fmt.Errorf("exceeded max wait time for ClusterActive waiter")
-}
-
-func clusterActiveStateRetryable(ctx context.Context, input *DescribeClusterInput, output *DescribeClusterOutput, err error) (bool, error) {
-
- if err == nil {
- v1 := output.Cluster
- var v2 types.ClusterStatus
- if v1 != nil {
- v3 := v1.Status
- v2 = v3
- }
- expectedValue := "DELETING"
- var pathValue string
- pathValue = string(v2)
- if pathValue == expectedValue {
- return false, fmt.Errorf("waiter state transitioned to Failure")
- }
- }
-
- if err == nil {
- v1 := output.Cluster
- var v2 types.ClusterStatus
- if v1 != nil {
- v3 := v1.Status
- v2 = v3
- }
- expectedValue := "FAILED"
- var pathValue string
- pathValue = string(v2)
- if pathValue == expectedValue {
- return false, fmt.Errorf("waiter state transitioned to Failure")
- }
- }
-
- if err == nil {
- v1 := output.Cluster
- var v2 types.ClusterStatus
- if v1 != nil {
- v3 := v1.Status
- v2 = v3
- }
- expectedValue := "ACTIVE"
- var pathValue string
- pathValue = string(v2)
- if pathValue == expectedValue {
- return false, nil
- }
- }
-
- if err != nil {
- return false, err
- }
- return true, nil
-}
-
-// ClusterDeletedWaiterOptions are waiter options for ClusterDeletedWaiter
-type ClusterDeletedWaiterOptions struct {
-
- // Set of options to modify how an operation is invoked. These apply to all
- // operations invoked for this client. Use functional options on operation call to
- // modify this list for per operation behavior.
- //
- // Passing options here is functionally equivalent to passing values to this
- // config's ClientOptions field that extend the inner client's APIOptions directly.
- APIOptions []func(*middleware.Stack) error
-
- // Functional options to be passed to all operations invoked by this client.
- //
- // Function values that modify the inner APIOptions are applied after the waiter
- // config's own APIOptions modifiers.
- ClientOptions []func(*Options)
-
- // MinDelay is the minimum amount of time to delay between retries. If unset,
- // ClusterDeletedWaiter will use default minimum delay of 30 seconds. Note that
- // MinDelay must resolve to a value lesser than or equal to the MaxDelay.
- MinDelay time.Duration
-
- // MaxDelay is the maximum amount of time to delay between retries. If unset or
- // set to zero, ClusterDeletedWaiter will use default max delay of 120 seconds.
- // Note that MaxDelay must resolve to value greater than or equal to the MinDelay.
- MaxDelay time.Duration
-
- // LogWaitAttempts is used to enable logging for waiter retry attempts
- LogWaitAttempts bool
-
- // Retryable is function that can be used to override the service defined
- // waiter-behavior based on operation output, or returned error. This function is
- // used by the waiter to decide if a state is retryable or a terminal state.
- //
- // By default service-modeled logic will populate this option. This option can
- // thus be used to define a custom waiter state with fall-back to service-modeled
- // waiter state mutators.The function returns an error in case of a failure state.
- // In case of retry state, this function returns a bool value of true and nil
- // error, while in case of success it returns a bool value of false and nil error.
- Retryable func(context.Context, *DescribeClusterInput, *DescribeClusterOutput, error) (bool, error)
-}
-
-// ClusterDeletedWaiter defines the waiters for ClusterDeleted
-type ClusterDeletedWaiter struct {
- client DescribeClusterAPIClient
-
- options ClusterDeletedWaiterOptions
-}
-
-// NewClusterDeletedWaiter constructs a ClusterDeletedWaiter.
-func NewClusterDeletedWaiter(client DescribeClusterAPIClient, optFns ...func(*ClusterDeletedWaiterOptions)) *ClusterDeletedWaiter {
- options := ClusterDeletedWaiterOptions{}
- options.MinDelay = 30 * time.Second
- options.MaxDelay = 120 * time.Second
- options.Retryable = clusterDeletedStateRetryable
-
- for _, fn := range optFns {
- fn(&options)
- }
- return &ClusterDeletedWaiter{
- client: client,
- options: options,
- }
-}
-
-// Wait calls the waiter function for ClusterDeleted waiter. The maxWaitDur is the
-// maximum wait duration the waiter will wait. The maxWaitDur is required and must
-// be greater than zero.
-func (w *ClusterDeletedWaiter) Wait(ctx context.Context, params *DescribeClusterInput, maxWaitDur time.Duration, optFns ...func(*ClusterDeletedWaiterOptions)) error {
- _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
- return err
-}
-
-// WaitForOutput calls the waiter function for ClusterDeleted waiter and returns
-// the output of the successful operation. The maxWaitDur is the maximum wait
-// duration the waiter will wait. The maxWaitDur is required and must be greater
-// than zero.
-func (w *ClusterDeletedWaiter) WaitForOutput(ctx context.Context, params *DescribeClusterInput, maxWaitDur time.Duration, optFns ...func(*ClusterDeletedWaiterOptions)) (*DescribeClusterOutput, error) {
- if maxWaitDur <= 0 {
- return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
- }
-
- options := w.options
- for _, fn := range optFns {
- fn(&options)
- }
-
- if options.MaxDelay <= 0 {
- options.MaxDelay = 120 * time.Second
- }
-
- if options.MinDelay > options.MaxDelay {
- return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
- }
-
- ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
- defer cancelFn()
-
- logger := smithywaiter.Logger{}
- remainingTime := maxWaitDur
-
- var attempt int64
- for {
-
- attempt++
- apiOptions := options.APIOptions
- start := time.Now()
-
- if options.LogWaitAttempts {
- logger.Attempt = attempt
- apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
- apiOptions = append(apiOptions, logger.AddLogger)
- }
-
- out, err := w.client.DescribeCluster(ctx, params, func(o *Options) {
- baseOpts := []func(*Options){
- addIsWaiterUserAgent,
- }
- o.APIOptions = append(o.APIOptions, apiOptions...)
- for _, opt := range baseOpts {
- opt(o)
- }
- for _, opt := range options.ClientOptions {
- opt(o)
- }
- })
-
- retryable, err := options.Retryable(ctx, params, out, err)
- if err != nil {
- return nil, err
- }
- if !retryable {
- return out, nil
- }
-
- remainingTime -= time.Since(start)
- if remainingTime < options.MinDelay || remainingTime <= 0 {
- break
- }
-
- // compute exponential backoff between waiter retries
- delay, err := smithywaiter.ComputeDelay(
- attempt, options.MinDelay, options.MaxDelay, remainingTime,
- )
- if err != nil {
- return nil, fmt.Errorf("error computing waiter delay, %w", err)
- }
-
- remainingTime -= delay
- // sleep for the delay amount before invoking a request
- if err := smithytime.SleepWithContext(ctx, delay); err != nil {
- return nil, fmt.Errorf("request cancelled while waiting, %w", err)
- }
- }
- return nil, fmt.Errorf("exceeded max wait time for ClusterDeleted waiter")
-}
-
-func clusterDeletedStateRetryable(ctx context.Context, input *DescribeClusterInput, output *DescribeClusterOutput, err error) (bool, error) {
-
- if err == nil {
- v1 := output.Cluster
- var v2 types.ClusterStatus
- if v1 != nil {
- v3 := v1.Status
- v2 = v3
- }
- expectedValue := "ACTIVE"
- var pathValue string
- pathValue = string(v2)
- if pathValue == expectedValue {
- return false, fmt.Errorf("waiter state transitioned to Failure")
- }
- }
-
- if err == nil {
- v1 := output.Cluster
- var v2 types.ClusterStatus
- if v1 != nil {
- v3 := v1.Status
- v2 = v3
- }
- expectedValue := "CREATING"
- var pathValue string
- pathValue = string(v2)
- if pathValue == expectedValue {
- return false, fmt.Errorf("waiter state transitioned to Failure")
- }
- }
-
- if err == nil {
- v1 := output.Cluster
- var v2 types.ClusterStatus
- if v1 != nil {
- v3 := v1.Status
- v2 = v3
- }
- expectedValue := "PENDING"
- var pathValue string
- pathValue = string(v2)
- if pathValue == expectedValue {
- return false, fmt.Errorf("waiter state transitioned to Failure")
- }
- }
-
- if err != nil {
- var errorType *types.ResourceNotFoundException
- if errors.As(err, &errorType) {
- return false, nil
- }
- }
-
- if err != nil {
- return false, err
- }
- return true, nil
-}
-
-// DescribeClusterAPIClient is a client that implements the DescribeCluster
-// operation.
-type DescribeClusterAPIClient interface {
- DescribeCluster(context.Context, *DescribeClusterInput, ...func(*Options)) (*DescribeClusterOutput, error)
-}
-
-var _ DescribeClusterAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opDescribeCluster(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeCluster",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeClusterVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeClusterVersions.go
deleted file mode 100644
index 829b637b5857..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeClusterVersions.go
+++ /dev/null
@@ -1,276 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists available Kubernetes versions for Amazon EKS clusters.
-func (c *Client) DescribeClusterVersions(ctx context.Context, params *DescribeClusterVersionsInput, optFns ...func(*Options)) (*DescribeClusterVersionsOutput, error) {
- if params == nil {
- params = &DescribeClusterVersionsInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeClusterVersions", params, optFns, c.addOperationDescribeClusterVersionsMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeClusterVersionsOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeClusterVersionsInput struct {
-
- // The type of cluster to filter versions by.
- ClusterType *string
-
- // List of specific cluster versions to describe.
- ClusterVersions []string
-
- // Filter to show only default versions.
- DefaultOnly *bool
-
- // Include all available versions in the response.
- IncludeAll *bool
-
- // Maximum number of results to return.
- MaxResults *int32
-
- // Pagination token for the next set of results.
- NextToken *string
-
- // This field is deprecated. Use versionStatus instead, as that field matches for
- // input and output of this action.
- //
- // Filter versions by their current status.
- //
- // Deprecated: status has been replaced by versionStatus
- Status types.ClusterVersionStatus
-
- // Filter versions by their current status.
- VersionStatus types.VersionStatus
-
- noSmithyDocumentSerde
-}
-
-type DescribeClusterVersionsOutput struct {
-
- // List of cluster version information objects.
- ClusterVersions []types.ClusterVersionInformation
-
- // Pagination token for the next set of results.
- NextToken *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeClusterVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeClusterVersions{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeClusterVersions{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeClusterVersions"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClusterVersions(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// DescribeClusterVersionsPaginatorOptions is the paginator options for
-// DescribeClusterVersions
-type DescribeClusterVersionsPaginatorOptions struct {
- // Maximum number of results to return.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// DescribeClusterVersionsPaginator is a paginator for DescribeClusterVersions
-type DescribeClusterVersionsPaginator struct {
- options DescribeClusterVersionsPaginatorOptions
- client DescribeClusterVersionsAPIClient
- params *DescribeClusterVersionsInput
- nextToken *string
- firstPage bool
-}
-
-// NewDescribeClusterVersionsPaginator returns a new
-// DescribeClusterVersionsPaginator
-func NewDescribeClusterVersionsPaginator(client DescribeClusterVersionsAPIClient, params *DescribeClusterVersionsInput, optFns ...func(*DescribeClusterVersionsPaginatorOptions)) *DescribeClusterVersionsPaginator {
- if params == nil {
- params = &DescribeClusterVersionsInput{}
- }
-
- options := DescribeClusterVersionsPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &DescribeClusterVersionsPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *DescribeClusterVersionsPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next DescribeClusterVersions page.
-func (p *DescribeClusterVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeClusterVersionsOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.DescribeClusterVersions(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// DescribeClusterVersionsAPIClient is a client that implements the
-// DescribeClusterVersions operation.
-type DescribeClusterVersionsAPIClient interface {
- DescribeClusterVersions(context.Context, *DescribeClusterVersionsInput, ...func(*Options)) (*DescribeClusterVersionsOutput, error)
-}
-
-var _ DescribeClusterVersionsAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opDescribeClusterVersions(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeClusterVersions",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeEksAnywhereSubscription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeEksAnywhereSubscription.go
deleted file mode 100644
index f2523eb01082..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeEksAnywhereSubscription.go
+++ /dev/null
@@ -1,157 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Returns descriptive information about a subscription.
-func (c *Client) DescribeEksAnywhereSubscription(ctx context.Context, params *DescribeEksAnywhereSubscriptionInput, optFns ...func(*Options)) (*DescribeEksAnywhereSubscriptionOutput, error) {
- if params == nil {
- params = &DescribeEksAnywhereSubscriptionInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeEksAnywhereSubscription", params, optFns, c.addOperationDescribeEksAnywhereSubscriptionMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeEksAnywhereSubscriptionOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeEksAnywhereSubscriptionInput struct {
-
- // The ID of the subscription.
- //
- // This member is required.
- Id *string
-
- noSmithyDocumentSerde
-}
-
-type DescribeEksAnywhereSubscriptionOutput struct {
-
- // The full description of the subscription.
- Subscription *types.EksAnywhereSubscription
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeEksAnywhereSubscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeEksAnywhereSubscription{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeEksAnywhereSubscription{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeEksAnywhereSubscription"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDescribeEksAnywhereSubscriptionValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEksAnywhereSubscription(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDescribeEksAnywhereSubscription(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeEksAnywhereSubscription",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeFargateProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeFargateProfile.go
deleted file mode 100644
index 41995c87f0a7..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeFargateProfile.go
+++ /dev/null
@@ -1,560 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "errors"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithytime "github.com/aws/smithy-go/time"
- smithyhttp "github.com/aws/smithy-go/transport/http"
- smithywaiter "github.com/aws/smithy-go/waiter"
- "time"
-)
-
-// Describes an Fargate profile.
-func (c *Client) DescribeFargateProfile(ctx context.Context, params *DescribeFargateProfileInput, optFns ...func(*Options)) (*DescribeFargateProfileOutput, error) {
- if params == nil {
- params = &DescribeFargateProfileInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeFargateProfile", params, optFns, c.addOperationDescribeFargateProfileMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeFargateProfileOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeFargateProfileInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The name of the Fargate profile to describe.
- //
- // This member is required.
- FargateProfileName *string
-
- noSmithyDocumentSerde
-}
-
-type DescribeFargateProfileOutput struct {
-
- // The full description of your Fargate profile.
- FargateProfile *types.FargateProfile
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeFargateProfileMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeFargateProfile{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeFargateProfile{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeFargateProfile"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDescribeFargateProfileValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFargateProfile(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// FargateProfileActiveWaiterOptions are waiter options for
-// FargateProfileActiveWaiter
-type FargateProfileActiveWaiterOptions struct {
-
- // Set of options to modify how an operation is invoked. These apply to all
- // operations invoked for this client. Use functional options on operation call to
- // modify this list for per operation behavior.
- //
- // Passing options here is functionally equivalent to passing values to this
- // config's ClientOptions field that extend the inner client's APIOptions directly.
- APIOptions []func(*middleware.Stack) error
-
- // Functional options to be passed to all operations invoked by this client.
- //
- // Function values that modify the inner APIOptions are applied after the waiter
- // config's own APIOptions modifiers.
- ClientOptions []func(*Options)
-
- // MinDelay is the minimum amount of time to delay between retries. If unset,
- // FargateProfileActiveWaiter will use default minimum delay of 10 seconds. Note
- // that MinDelay must resolve to a value lesser than or equal to the MaxDelay.
- MinDelay time.Duration
-
- // MaxDelay is the maximum amount of time to delay between retries. If unset or
- // set to zero, FargateProfileActiveWaiter will use default max delay of 120
- // seconds. Note that MaxDelay must resolve to value greater than or equal to the
- // MinDelay.
- MaxDelay time.Duration
-
- // LogWaitAttempts is used to enable logging for waiter retry attempts
- LogWaitAttempts bool
-
- // Retryable is function that can be used to override the service defined
- // waiter-behavior based on operation output, or returned error. This function is
- // used by the waiter to decide if a state is retryable or a terminal state.
- //
- // By default service-modeled logic will populate this option. This option can
- // thus be used to define a custom waiter state with fall-back to service-modeled
- // waiter state mutators.The function returns an error in case of a failure state.
- // In case of retry state, this function returns a bool value of true and nil
- // error, while in case of success it returns a bool value of false and nil error.
- Retryable func(context.Context, *DescribeFargateProfileInput, *DescribeFargateProfileOutput, error) (bool, error)
-}
-
-// FargateProfileActiveWaiter defines the waiters for FargateProfileActive
-type FargateProfileActiveWaiter struct {
- client DescribeFargateProfileAPIClient
-
- options FargateProfileActiveWaiterOptions
-}
-
-// NewFargateProfileActiveWaiter constructs a FargateProfileActiveWaiter.
-func NewFargateProfileActiveWaiter(client DescribeFargateProfileAPIClient, optFns ...func(*FargateProfileActiveWaiterOptions)) *FargateProfileActiveWaiter {
- options := FargateProfileActiveWaiterOptions{}
- options.MinDelay = 10 * time.Second
- options.MaxDelay = 120 * time.Second
- options.Retryable = fargateProfileActiveStateRetryable
-
- for _, fn := range optFns {
- fn(&options)
- }
- return &FargateProfileActiveWaiter{
- client: client,
- options: options,
- }
-}
-
-// Wait calls the waiter function for FargateProfileActive waiter. The maxWaitDur
-// is the maximum wait duration the waiter will wait. The maxWaitDur is required
-// and must be greater than zero.
-func (w *FargateProfileActiveWaiter) Wait(ctx context.Context, params *DescribeFargateProfileInput, maxWaitDur time.Duration, optFns ...func(*FargateProfileActiveWaiterOptions)) error {
- _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
- return err
-}
-
-// WaitForOutput calls the waiter function for FargateProfileActive waiter and
-// returns the output of the successful operation. The maxWaitDur is the maximum
-// wait duration the waiter will wait. The maxWaitDur is required and must be
-// greater than zero.
-func (w *FargateProfileActiveWaiter) WaitForOutput(ctx context.Context, params *DescribeFargateProfileInput, maxWaitDur time.Duration, optFns ...func(*FargateProfileActiveWaiterOptions)) (*DescribeFargateProfileOutput, error) {
- if maxWaitDur <= 0 {
- return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
- }
-
- options := w.options
- for _, fn := range optFns {
- fn(&options)
- }
-
- if options.MaxDelay <= 0 {
- options.MaxDelay = 120 * time.Second
- }
-
- if options.MinDelay > options.MaxDelay {
- return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
- }
-
- ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
- defer cancelFn()
-
- logger := smithywaiter.Logger{}
- remainingTime := maxWaitDur
-
- var attempt int64
- for {
-
- attempt++
- apiOptions := options.APIOptions
- start := time.Now()
-
- if options.LogWaitAttempts {
- logger.Attempt = attempt
- apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
- apiOptions = append(apiOptions, logger.AddLogger)
- }
-
- out, err := w.client.DescribeFargateProfile(ctx, params, func(o *Options) {
- baseOpts := []func(*Options){
- addIsWaiterUserAgent,
- }
- o.APIOptions = append(o.APIOptions, apiOptions...)
- for _, opt := range baseOpts {
- opt(o)
- }
- for _, opt := range options.ClientOptions {
- opt(o)
- }
- })
-
- retryable, err := options.Retryable(ctx, params, out, err)
- if err != nil {
- return nil, err
- }
- if !retryable {
- return out, nil
- }
-
- remainingTime -= time.Since(start)
- if remainingTime < options.MinDelay || remainingTime <= 0 {
- break
- }
-
- // compute exponential backoff between waiter retries
- delay, err := smithywaiter.ComputeDelay(
- attempt, options.MinDelay, options.MaxDelay, remainingTime,
- )
- if err != nil {
- return nil, fmt.Errorf("error computing waiter delay, %w", err)
- }
-
- remainingTime -= delay
- // sleep for the delay amount before invoking a request
- if err := smithytime.SleepWithContext(ctx, delay); err != nil {
- return nil, fmt.Errorf("request cancelled while waiting, %w", err)
- }
- }
- return nil, fmt.Errorf("exceeded max wait time for FargateProfileActive waiter")
-}
-
-func fargateProfileActiveStateRetryable(ctx context.Context, input *DescribeFargateProfileInput, output *DescribeFargateProfileOutput, err error) (bool, error) {
-
- if err == nil {
- v1 := output.FargateProfile
- var v2 types.FargateProfileStatus
- if v1 != nil {
- v3 := v1.Status
- v2 = v3
- }
- expectedValue := "CREATE_FAILED"
- var pathValue string
- pathValue = string(v2)
- if pathValue == expectedValue {
- return false, fmt.Errorf("waiter state transitioned to Failure")
- }
- }
-
- if err == nil {
- v1 := output.FargateProfile
- var v2 types.FargateProfileStatus
- if v1 != nil {
- v3 := v1.Status
- v2 = v3
- }
- expectedValue := "ACTIVE"
- var pathValue string
- pathValue = string(v2)
- if pathValue == expectedValue {
- return false, nil
- }
- }
-
- if err != nil {
- return false, err
- }
- return true, nil
-}
-
-// FargateProfileDeletedWaiterOptions are waiter options for
-// FargateProfileDeletedWaiter
-type FargateProfileDeletedWaiterOptions struct {
-
- // Set of options to modify how an operation is invoked. These apply to all
- // operations invoked for this client. Use functional options on operation call to
- // modify this list for per operation behavior.
- //
- // Passing options here is functionally equivalent to passing values to this
- // config's ClientOptions field that extend the inner client's APIOptions directly.
- APIOptions []func(*middleware.Stack) error
-
- // Functional options to be passed to all operations invoked by this client.
- //
- // Function values that modify the inner APIOptions are applied after the waiter
- // config's own APIOptions modifiers.
- ClientOptions []func(*Options)
-
- // MinDelay is the minimum amount of time to delay between retries. If unset,
- // FargateProfileDeletedWaiter will use default minimum delay of 30 seconds. Note
- // that MinDelay must resolve to a value lesser than or equal to the MaxDelay.
- MinDelay time.Duration
-
- // MaxDelay is the maximum amount of time to delay between retries. If unset or
- // set to zero, FargateProfileDeletedWaiter will use default max delay of 120
- // seconds. Note that MaxDelay must resolve to value greater than or equal to the
- // MinDelay.
- MaxDelay time.Duration
-
- // LogWaitAttempts is used to enable logging for waiter retry attempts
- LogWaitAttempts bool
-
- // Retryable is function that can be used to override the service defined
- // waiter-behavior based on operation output, or returned error. This function is
- // used by the waiter to decide if a state is retryable or a terminal state.
- //
- // By default service-modeled logic will populate this option. This option can
- // thus be used to define a custom waiter state with fall-back to service-modeled
- // waiter state mutators.The function returns an error in case of a failure state.
- // In case of retry state, this function returns a bool value of true and nil
- // error, while in case of success it returns a bool value of false and nil error.
- Retryable func(context.Context, *DescribeFargateProfileInput, *DescribeFargateProfileOutput, error) (bool, error)
-}
-
-// FargateProfileDeletedWaiter defines the waiters for FargateProfileDeleted
-type FargateProfileDeletedWaiter struct {
- client DescribeFargateProfileAPIClient
-
- options FargateProfileDeletedWaiterOptions
-}
-
-// NewFargateProfileDeletedWaiter constructs a FargateProfileDeletedWaiter.
-func NewFargateProfileDeletedWaiter(client DescribeFargateProfileAPIClient, optFns ...func(*FargateProfileDeletedWaiterOptions)) *FargateProfileDeletedWaiter {
- options := FargateProfileDeletedWaiterOptions{}
- options.MinDelay = 30 * time.Second
- options.MaxDelay = 120 * time.Second
- options.Retryable = fargateProfileDeletedStateRetryable
-
- for _, fn := range optFns {
- fn(&options)
- }
- return &FargateProfileDeletedWaiter{
- client: client,
- options: options,
- }
-}
-
-// Wait calls the waiter function for FargateProfileDeleted waiter. The maxWaitDur
-// is the maximum wait duration the waiter will wait. The maxWaitDur is required
-// and must be greater than zero.
-func (w *FargateProfileDeletedWaiter) Wait(ctx context.Context, params *DescribeFargateProfileInput, maxWaitDur time.Duration, optFns ...func(*FargateProfileDeletedWaiterOptions)) error {
- _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
- return err
-}
-
-// WaitForOutput calls the waiter function for FargateProfileDeleted waiter and
-// returns the output of the successful operation. The maxWaitDur is the maximum
-// wait duration the waiter will wait. The maxWaitDur is required and must be
-// greater than zero.
-func (w *FargateProfileDeletedWaiter) WaitForOutput(ctx context.Context, params *DescribeFargateProfileInput, maxWaitDur time.Duration, optFns ...func(*FargateProfileDeletedWaiterOptions)) (*DescribeFargateProfileOutput, error) {
- if maxWaitDur <= 0 {
- return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
- }
-
- options := w.options
- for _, fn := range optFns {
- fn(&options)
- }
-
- if options.MaxDelay <= 0 {
- options.MaxDelay = 120 * time.Second
- }
-
- if options.MinDelay > options.MaxDelay {
- return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
- }
-
- ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
- defer cancelFn()
-
- logger := smithywaiter.Logger{}
- remainingTime := maxWaitDur
-
- var attempt int64
- for {
-
- attempt++
- apiOptions := options.APIOptions
- start := time.Now()
-
- if options.LogWaitAttempts {
- logger.Attempt = attempt
- apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
- apiOptions = append(apiOptions, logger.AddLogger)
- }
-
- out, err := w.client.DescribeFargateProfile(ctx, params, func(o *Options) {
- baseOpts := []func(*Options){
- addIsWaiterUserAgent,
- }
- o.APIOptions = append(o.APIOptions, apiOptions...)
- for _, opt := range baseOpts {
- opt(o)
- }
- for _, opt := range options.ClientOptions {
- opt(o)
- }
- })
-
- retryable, err := options.Retryable(ctx, params, out, err)
- if err != nil {
- return nil, err
- }
- if !retryable {
- return out, nil
- }
-
- remainingTime -= time.Since(start)
- if remainingTime < options.MinDelay || remainingTime <= 0 {
- break
- }
-
- // compute exponential backoff between waiter retries
- delay, err := smithywaiter.ComputeDelay(
- attempt, options.MinDelay, options.MaxDelay, remainingTime,
- )
- if err != nil {
- return nil, fmt.Errorf("error computing waiter delay, %w", err)
- }
-
- remainingTime -= delay
- // sleep for the delay amount before invoking a request
- if err := smithytime.SleepWithContext(ctx, delay); err != nil {
- return nil, fmt.Errorf("request cancelled while waiting, %w", err)
- }
- }
- return nil, fmt.Errorf("exceeded max wait time for FargateProfileDeleted waiter")
-}
-
-func fargateProfileDeletedStateRetryable(ctx context.Context, input *DescribeFargateProfileInput, output *DescribeFargateProfileOutput, err error) (bool, error) {
-
- if err == nil {
- v1 := output.FargateProfile
- var v2 types.FargateProfileStatus
- if v1 != nil {
- v3 := v1.Status
- v2 = v3
- }
- expectedValue := "DELETE_FAILED"
- var pathValue string
- pathValue = string(v2)
- if pathValue == expectedValue {
- return false, fmt.Errorf("waiter state transitioned to Failure")
- }
- }
-
- if err != nil {
- var errorType *types.ResourceNotFoundException
- if errors.As(err, &errorType) {
- return false, nil
- }
- }
-
- if err != nil {
- return false, err
- }
- return true, nil
-}
-
-// DescribeFargateProfileAPIClient is a client that implements the
-// DescribeFargateProfile operation.
-type DescribeFargateProfileAPIClient interface {
- DescribeFargateProfile(context.Context, *DescribeFargateProfileInput, ...func(*Options)) (*DescribeFargateProfileOutput, error)
-}
-
-var _ DescribeFargateProfileAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opDescribeFargateProfile(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeFargateProfile",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeIdentityProviderConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeIdentityProviderConfig.go
deleted file mode 100644
index 814d90c74cd2..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeIdentityProviderConfig.go
+++ /dev/null
@@ -1,163 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Describes an identity provider configuration.
-func (c *Client) DescribeIdentityProviderConfig(ctx context.Context, params *DescribeIdentityProviderConfigInput, optFns ...func(*Options)) (*DescribeIdentityProviderConfigOutput, error) {
- if params == nil {
- params = &DescribeIdentityProviderConfigInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeIdentityProviderConfig", params, optFns, c.addOperationDescribeIdentityProviderConfigMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeIdentityProviderConfigOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeIdentityProviderConfigInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // An object representing an identity provider configuration.
- //
- // This member is required.
- IdentityProviderConfig *types.IdentityProviderConfig
-
- noSmithyDocumentSerde
-}
-
-type DescribeIdentityProviderConfigOutput struct {
-
- // The object that represents an OpenID Connect (OIDC) identity provider
- // configuration.
- IdentityProviderConfig *types.IdentityProviderConfigResponse
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeIdentityProviderConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeIdentityProviderConfig{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeIdentityProviderConfig{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeIdentityProviderConfig"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDescribeIdentityProviderConfigValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIdentityProviderConfig(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDescribeIdentityProviderConfig(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeIdentityProviderConfig",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeInsight.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeInsight.go
deleted file mode 100644
index 30ef8f9da3b2..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeInsight.go
+++ /dev/null
@@ -1,162 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Returns details about an insight that you specify using its ID.
-func (c *Client) DescribeInsight(ctx context.Context, params *DescribeInsightInput, optFns ...func(*Options)) (*DescribeInsightOutput, error) {
- if params == nil {
- params = &DescribeInsightInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeInsight", params, optFns, c.addOperationDescribeInsightMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeInsightOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeInsightInput struct {
-
- // The name of the cluster to describe the insight for.
- //
- // This member is required.
- ClusterName *string
-
- // The identity of the insight to describe.
- //
- // This member is required.
- Id *string
-
- noSmithyDocumentSerde
-}
-
-type DescribeInsightOutput struct {
-
- // The full description of the insight.
- Insight *types.Insight
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeInsightMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeInsight{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeInsight{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInsight"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDescribeInsightValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInsight(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDescribeInsight(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeInsight",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeInsightsRefresh.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeInsightsRefresh.go
deleted file mode 100644
index d2da69a742d7..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeInsightsRefresh.go
+++ /dev/null
@@ -1,167 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
- "time"
-)
-
-// Returns the status of the latest on-demand cluster insights refresh operation.
-func (c *Client) DescribeInsightsRefresh(ctx context.Context, params *DescribeInsightsRefreshInput, optFns ...func(*Options)) (*DescribeInsightsRefreshOutput, error) {
- if params == nil {
- params = &DescribeInsightsRefreshInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeInsightsRefresh", params, optFns, c.addOperationDescribeInsightsRefreshMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeInsightsRefreshOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeInsightsRefreshInput struct {
-
- // The name of the cluster associated with the insights refresh operation.
- //
- // This member is required.
- ClusterName *string
-
- noSmithyDocumentSerde
-}
-
-type DescribeInsightsRefreshOutput struct {
-
- // The date and time when the insights refresh operation ended.
- EndedAt *time.Time
-
- // The message associated with the insights refresh operation.
- Message *string
-
- // The date and time when the insights refresh operation started.
- StartedAt *time.Time
-
- // The current status of the insights refresh operation.
- Status types.InsightsRefreshStatus
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeInsightsRefreshMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeInsightsRefresh{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeInsightsRefresh{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInsightsRefresh"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDescribeInsightsRefreshValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInsightsRefresh(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDescribeInsightsRefresh(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeInsightsRefresh",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeNodegroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeNodegroup.go
deleted file mode 100644
index d2bb4d03c23c..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeNodegroup.go
+++ /dev/null
@@ -1,556 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "errors"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithytime "github.com/aws/smithy-go/time"
- smithyhttp "github.com/aws/smithy-go/transport/http"
- smithywaiter "github.com/aws/smithy-go/waiter"
- "time"
-)
-
-// Describes a managed node group.
-func (c *Client) DescribeNodegroup(ctx context.Context, params *DescribeNodegroupInput, optFns ...func(*Options)) (*DescribeNodegroupOutput, error) {
- if params == nil {
- params = &DescribeNodegroupInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeNodegroup", params, optFns, c.addOperationDescribeNodegroupMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeNodegroupOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeNodegroupInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The name of the node group to describe.
- //
- // This member is required.
- NodegroupName *string
-
- noSmithyDocumentSerde
-}
-
-type DescribeNodegroupOutput struct {
-
- // The full description of your node group.
- Nodegroup *types.Nodegroup
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeNodegroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeNodegroup{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeNodegroup{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeNodegroup"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDescribeNodegroupValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNodegroup(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// NodegroupActiveWaiterOptions are waiter options for NodegroupActiveWaiter
-type NodegroupActiveWaiterOptions struct {
-
- // Set of options to modify how an operation is invoked. These apply to all
- // operations invoked for this client. Use functional options on operation call to
- // modify this list for per operation behavior.
- //
- // Passing options here is functionally equivalent to passing values to this
- // config's ClientOptions field that extend the inner client's APIOptions directly.
- APIOptions []func(*middleware.Stack) error
-
- // Functional options to be passed to all operations invoked by this client.
- //
- // Function values that modify the inner APIOptions are applied after the waiter
- // config's own APIOptions modifiers.
- ClientOptions []func(*Options)
-
- // MinDelay is the minimum amount of time to delay between retries. If unset,
- // NodegroupActiveWaiter will use default minimum delay of 30 seconds. Note that
- // MinDelay must resolve to a value lesser than or equal to the MaxDelay.
- MinDelay time.Duration
-
- // MaxDelay is the maximum amount of time to delay between retries. If unset or
- // set to zero, NodegroupActiveWaiter will use default max delay of 120 seconds.
- // Note that MaxDelay must resolve to value greater than or equal to the MinDelay.
- MaxDelay time.Duration
-
- // LogWaitAttempts is used to enable logging for waiter retry attempts
- LogWaitAttempts bool
-
- // Retryable is function that can be used to override the service defined
- // waiter-behavior based on operation output, or returned error. This function is
- // used by the waiter to decide if a state is retryable or a terminal state.
- //
- // By default service-modeled logic will populate this option. This option can
- // thus be used to define a custom waiter state with fall-back to service-modeled
- // waiter state mutators.The function returns an error in case of a failure state.
- // In case of retry state, this function returns a bool value of true and nil
- // error, while in case of success it returns a bool value of false and nil error.
- Retryable func(context.Context, *DescribeNodegroupInput, *DescribeNodegroupOutput, error) (bool, error)
-}
-
-// NodegroupActiveWaiter defines the waiters for NodegroupActive
-type NodegroupActiveWaiter struct {
- client DescribeNodegroupAPIClient
-
- options NodegroupActiveWaiterOptions
-}
-
-// NewNodegroupActiveWaiter constructs a NodegroupActiveWaiter.
-func NewNodegroupActiveWaiter(client DescribeNodegroupAPIClient, optFns ...func(*NodegroupActiveWaiterOptions)) *NodegroupActiveWaiter {
- options := NodegroupActiveWaiterOptions{}
- options.MinDelay = 30 * time.Second
- options.MaxDelay = 120 * time.Second
- options.Retryable = nodegroupActiveStateRetryable
-
- for _, fn := range optFns {
- fn(&options)
- }
- return &NodegroupActiveWaiter{
- client: client,
- options: options,
- }
-}
-
-// Wait calls the waiter function for NodegroupActive waiter. The maxWaitDur is
-// the maximum wait duration the waiter will wait. The maxWaitDur is required and
-// must be greater than zero.
-func (w *NodegroupActiveWaiter) Wait(ctx context.Context, params *DescribeNodegroupInput, maxWaitDur time.Duration, optFns ...func(*NodegroupActiveWaiterOptions)) error {
- _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
- return err
-}
-
-// WaitForOutput calls the waiter function for NodegroupActive waiter and returns
-// the output of the successful operation. The maxWaitDur is the maximum wait
-// duration the waiter will wait. The maxWaitDur is required and must be greater
-// than zero.
-func (w *NodegroupActiveWaiter) WaitForOutput(ctx context.Context, params *DescribeNodegroupInput, maxWaitDur time.Duration, optFns ...func(*NodegroupActiveWaiterOptions)) (*DescribeNodegroupOutput, error) {
- if maxWaitDur <= 0 {
- return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
- }
-
- options := w.options
- for _, fn := range optFns {
- fn(&options)
- }
-
- if options.MaxDelay <= 0 {
- options.MaxDelay = 120 * time.Second
- }
-
- if options.MinDelay > options.MaxDelay {
- return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
- }
-
- ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
- defer cancelFn()
-
- logger := smithywaiter.Logger{}
- remainingTime := maxWaitDur
-
- var attempt int64
- for {
-
- attempt++
- apiOptions := options.APIOptions
- start := time.Now()
-
- if options.LogWaitAttempts {
- logger.Attempt = attempt
- apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
- apiOptions = append(apiOptions, logger.AddLogger)
- }
-
- out, err := w.client.DescribeNodegroup(ctx, params, func(o *Options) {
- baseOpts := []func(*Options){
- addIsWaiterUserAgent,
- }
- o.APIOptions = append(o.APIOptions, apiOptions...)
- for _, opt := range baseOpts {
- opt(o)
- }
- for _, opt := range options.ClientOptions {
- opt(o)
- }
- })
-
- retryable, err := options.Retryable(ctx, params, out, err)
- if err != nil {
- return nil, err
- }
- if !retryable {
- return out, nil
- }
-
- remainingTime -= time.Since(start)
- if remainingTime < options.MinDelay || remainingTime <= 0 {
- break
- }
-
- // compute exponential backoff between waiter retries
- delay, err := smithywaiter.ComputeDelay(
- attempt, options.MinDelay, options.MaxDelay, remainingTime,
- )
- if err != nil {
- return nil, fmt.Errorf("error computing waiter delay, %w", err)
- }
-
- remainingTime -= delay
- // sleep for the delay amount before invoking a request
- if err := smithytime.SleepWithContext(ctx, delay); err != nil {
- return nil, fmt.Errorf("request cancelled while waiting, %w", err)
- }
- }
- return nil, fmt.Errorf("exceeded max wait time for NodegroupActive waiter")
-}
-
-func nodegroupActiveStateRetryable(ctx context.Context, input *DescribeNodegroupInput, output *DescribeNodegroupOutput, err error) (bool, error) {
-
- if err == nil {
- v1 := output.Nodegroup
- var v2 types.NodegroupStatus
- if v1 != nil {
- v3 := v1.Status
- v2 = v3
- }
- expectedValue := "CREATE_FAILED"
- var pathValue string
- pathValue = string(v2)
- if pathValue == expectedValue {
- return false, fmt.Errorf("waiter state transitioned to Failure")
- }
- }
-
- if err == nil {
- v1 := output.Nodegroup
- var v2 types.NodegroupStatus
- if v1 != nil {
- v3 := v1.Status
- v2 = v3
- }
- expectedValue := "ACTIVE"
- var pathValue string
- pathValue = string(v2)
- if pathValue == expectedValue {
- return false, nil
- }
- }
-
- if err != nil {
- return false, err
- }
- return true, nil
-}
-
-// NodegroupDeletedWaiterOptions are waiter options for NodegroupDeletedWaiter
-type NodegroupDeletedWaiterOptions struct {
-
- // Set of options to modify how an operation is invoked. These apply to all
- // operations invoked for this client. Use functional options on operation call to
- // modify this list for per operation behavior.
- //
- // Passing options here is functionally equivalent to passing values to this
- // config's ClientOptions field that extend the inner client's APIOptions directly.
- APIOptions []func(*middleware.Stack) error
-
- // Functional options to be passed to all operations invoked by this client.
- //
- // Function values that modify the inner APIOptions are applied after the waiter
- // config's own APIOptions modifiers.
- ClientOptions []func(*Options)
-
- // MinDelay is the minimum amount of time to delay between retries. If unset,
- // NodegroupDeletedWaiter will use default minimum delay of 30 seconds. Note that
- // MinDelay must resolve to a value lesser than or equal to the MaxDelay.
- MinDelay time.Duration
-
- // MaxDelay is the maximum amount of time to delay between retries. If unset or
- // set to zero, NodegroupDeletedWaiter will use default max delay of 120 seconds.
- // Note that MaxDelay must resolve to value greater than or equal to the MinDelay.
- MaxDelay time.Duration
-
- // LogWaitAttempts is used to enable logging for waiter retry attempts
- LogWaitAttempts bool
-
- // Retryable is function that can be used to override the service defined
- // waiter-behavior based on operation output, or returned error. This function is
- // used by the waiter to decide if a state is retryable or a terminal state.
- //
- // By default service-modeled logic will populate this option. This option can
- // thus be used to define a custom waiter state with fall-back to service-modeled
- // waiter state mutators.The function returns an error in case of a failure state.
- // In case of retry state, this function returns a bool value of true and nil
- // error, while in case of success it returns a bool value of false and nil error.
- Retryable func(context.Context, *DescribeNodegroupInput, *DescribeNodegroupOutput, error) (bool, error)
-}
-
-// NodegroupDeletedWaiter defines the waiters for NodegroupDeleted
-type NodegroupDeletedWaiter struct {
- client DescribeNodegroupAPIClient
-
- options NodegroupDeletedWaiterOptions
-}
-
-// NewNodegroupDeletedWaiter constructs a NodegroupDeletedWaiter.
-func NewNodegroupDeletedWaiter(client DescribeNodegroupAPIClient, optFns ...func(*NodegroupDeletedWaiterOptions)) *NodegroupDeletedWaiter {
- options := NodegroupDeletedWaiterOptions{}
- options.MinDelay = 30 * time.Second
- options.MaxDelay = 120 * time.Second
- options.Retryable = nodegroupDeletedStateRetryable
-
- for _, fn := range optFns {
- fn(&options)
- }
- return &NodegroupDeletedWaiter{
- client: client,
- options: options,
- }
-}
-
-// Wait calls the waiter function for NodegroupDeleted waiter. The maxWaitDur is
-// the maximum wait duration the waiter will wait. The maxWaitDur is required and
-// must be greater than zero.
-func (w *NodegroupDeletedWaiter) Wait(ctx context.Context, params *DescribeNodegroupInput, maxWaitDur time.Duration, optFns ...func(*NodegroupDeletedWaiterOptions)) error {
- _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
- return err
-}
-
-// WaitForOutput calls the waiter function for NodegroupDeleted waiter and returns
-// the output of the successful operation. The maxWaitDur is the maximum wait
-// duration the waiter will wait. The maxWaitDur is required and must be greater
-// than zero.
-func (w *NodegroupDeletedWaiter) WaitForOutput(ctx context.Context, params *DescribeNodegroupInput, maxWaitDur time.Duration, optFns ...func(*NodegroupDeletedWaiterOptions)) (*DescribeNodegroupOutput, error) {
- if maxWaitDur <= 0 {
- return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
- }
-
- options := w.options
- for _, fn := range optFns {
- fn(&options)
- }
-
- if options.MaxDelay <= 0 {
- options.MaxDelay = 120 * time.Second
- }
-
- if options.MinDelay > options.MaxDelay {
- return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
- }
-
- ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
- defer cancelFn()
-
- logger := smithywaiter.Logger{}
- remainingTime := maxWaitDur
-
- var attempt int64
- for {
-
- attempt++
- apiOptions := options.APIOptions
- start := time.Now()
-
- if options.LogWaitAttempts {
- logger.Attempt = attempt
- apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
- apiOptions = append(apiOptions, logger.AddLogger)
- }
-
- out, err := w.client.DescribeNodegroup(ctx, params, func(o *Options) {
- baseOpts := []func(*Options){
- addIsWaiterUserAgent,
- }
- o.APIOptions = append(o.APIOptions, apiOptions...)
- for _, opt := range baseOpts {
- opt(o)
- }
- for _, opt := range options.ClientOptions {
- opt(o)
- }
- })
-
- retryable, err := options.Retryable(ctx, params, out, err)
- if err != nil {
- return nil, err
- }
- if !retryable {
- return out, nil
- }
-
- remainingTime -= time.Since(start)
- if remainingTime < options.MinDelay || remainingTime <= 0 {
- break
- }
-
- // compute exponential backoff between waiter retries
- delay, err := smithywaiter.ComputeDelay(
- attempt, options.MinDelay, options.MaxDelay, remainingTime,
- )
- if err != nil {
- return nil, fmt.Errorf("error computing waiter delay, %w", err)
- }
-
- remainingTime -= delay
- // sleep for the delay amount before invoking a request
- if err := smithytime.SleepWithContext(ctx, delay); err != nil {
- return nil, fmt.Errorf("request cancelled while waiting, %w", err)
- }
- }
- return nil, fmt.Errorf("exceeded max wait time for NodegroupDeleted waiter")
-}
-
-func nodegroupDeletedStateRetryable(ctx context.Context, input *DescribeNodegroupInput, output *DescribeNodegroupOutput, err error) (bool, error) {
-
- if err == nil {
- v1 := output.Nodegroup
- var v2 types.NodegroupStatus
- if v1 != nil {
- v3 := v1.Status
- v2 = v3
- }
- expectedValue := "DELETE_FAILED"
- var pathValue string
- pathValue = string(v2)
- if pathValue == expectedValue {
- return false, fmt.Errorf("waiter state transitioned to Failure")
- }
- }
-
- if err != nil {
- var errorType *types.ResourceNotFoundException
- if errors.As(err, &errorType) {
- return false, nil
- }
- }
-
- if err != nil {
- return false, err
- }
- return true, nil
-}
-
-// DescribeNodegroupAPIClient is a client that implements the DescribeNodegroup
-// operation.
-type DescribeNodegroupAPIClient interface {
- DescribeNodegroup(context.Context, *DescribeNodegroupInput, ...func(*Options)) (*DescribeNodegroupOutput, error)
-}
-
-var _ DescribeNodegroupAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opDescribeNodegroup(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeNodegroup",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribePodIdentityAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribePodIdentityAssociation.go
deleted file mode 100644
index b26b17795d54..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribePodIdentityAssociation.go
+++ /dev/null
@@ -1,167 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Returns descriptive information about an EKS Pod Identity association.
-//
-// This action requires the ID of the association. You can get the ID from the
-// response to the CreatePodIdentityAssocation for newly created associations. Or,
-// you can list the IDs for associations with ListPodIdentityAssociations and
-// filter the list by namespace or service account.
-func (c *Client) DescribePodIdentityAssociation(ctx context.Context, params *DescribePodIdentityAssociationInput, optFns ...func(*Options)) (*DescribePodIdentityAssociationOutput, error) {
- if params == nil {
- params = &DescribePodIdentityAssociationInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribePodIdentityAssociation", params, optFns, c.addOperationDescribePodIdentityAssociationMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribePodIdentityAssociationOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribePodIdentityAssociationInput struct {
-
- // The ID of the association that you want the description of.
- //
- // This member is required.
- AssociationId *string
-
- // The name of the cluster that the association is in.
- //
- // This member is required.
- ClusterName *string
-
- noSmithyDocumentSerde
-}
-
-type DescribePodIdentityAssociationOutput struct {
-
- // The full description of the EKS Pod Identity association.
- Association *types.PodIdentityAssociation
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribePodIdentityAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribePodIdentityAssociation{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribePodIdentityAssociation{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribePodIdentityAssociation"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDescribePodIdentityAssociationValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePodIdentityAssociation(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDescribePodIdentityAssociation(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribePodIdentityAssociation",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeUpdate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeUpdate.go
deleted file mode 100644
index 0abc757a40d8..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeUpdate.go
+++ /dev/null
@@ -1,180 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Describes an update to an Amazon EKS resource.
-//
-// When the status of the update is Successful , the update is complete. If an
-// update fails, the status is Failed , and an error detail explains the reason for
-// the failure.
-func (c *Client) DescribeUpdate(ctx context.Context, params *DescribeUpdateInput, optFns ...func(*Options)) (*DescribeUpdateOutput, error) {
- if params == nil {
- params = &DescribeUpdateInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeUpdate", params, optFns, c.addOperationDescribeUpdateMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeUpdateOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-// Describes an update request.
-type DescribeUpdateInput struct {
-
- // The name of the Amazon EKS cluster associated with the update.
- //
- // This member is required.
- Name *string
-
- // The ID of the update to describe.
- //
- // This member is required.
- UpdateId *string
-
- // The name of the add-on. The name must match one of the names returned by [ListAddons]
- // ListAddons . This parameter is required if the update is an add-on update.
- //
- // [ListAddons]: https://docs.aws.amazon.com/eks/latest/APIReference/API_ListAddons.html
- AddonName *string
-
- // The name of the capability for which you want to describe updates.
- CapabilityName *string
-
- // The name of the Amazon EKS node group associated with the update. This
- // parameter is required if the update is a node group update.
- NodegroupName *string
-
- noSmithyDocumentSerde
-}
-
-type DescribeUpdateOutput struct {
-
- // The full description of the specified update.
- Update *types.Update
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeUpdateMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeUpdate{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeUpdate{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeUpdate"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDescribeUpdateValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeUpdate(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDescribeUpdate(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeUpdate",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DisassociateAccessPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DisassociateAccessPolicy.go
deleted file mode 100644
index fd449611fc7a..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DisassociateAccessPolicy.go
+++ /dev/null
@@ -1,163 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Disassociates an access policy from an access entry.
-func (c *Client) DisassociateAccessPolicy(ctx context.Context, params *DisassociateAccessPolicyInput, optFns ...func(*Options)) (*DisassociateAccessPolicyOutput, error) {
- if params == nil {
- params = &DisassociateAccessPolicyInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DisassociateAccessPolicy", params, optFns, c.addOperationDisassociateAccessPolicyMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DisassociateAccessPolicyOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DisassociateAccessPolicyInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The ARN of the policy to disassociate from the access entry. For a list of
- // associated policies ARNs, use ListAssociatedAccessPolicies .
- //
- // This member is required.
- PolicyArn *string
-
- // The ARN of the IAM principal for the AccessEntry .
- //
- // This member is required.
- PrincipalArn *string
-
- noSmithyDocumentSerde
-}
-
-type DisassociateAccessPolicyOutput struct {
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDisassociateAccessPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDisassociateAccessPolicy{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDisassociateAccessPolicy{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateAccessPolicy"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDisassociateAccessPolicyValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateAccessPolicy(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDisassociateAccessPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DisassociateAccessPolicy",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DisassociateIdentityProviderConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DisassociateIdentityProviderConfig.go
deleted file mode 100644
index aa8ca73c04a1..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DisassociateIdentityProviderConfig.go
+++ /dev/null
@@ -1,206 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Disassociates an identity provider configuration from a cluster.
-//
-// If you disassociate an identity provider from your cluster, users included in
-// the provider can no longer access the cluster. However, you can still access the
-// cluster with IAM principals.
-func (c *Client) DisassociateIdentityProviderConfig(ctx context.Context, params *DisassociateIdentityProviderConfigInput, optFns ...func(*Options)) (*DisassociateIdentityProviderConfigOutput, error) {
- if params == nil {
- params = &DisassociateIdentityProviderConfigInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DisassociateIdentityProviderConfig", params, optFns, c.addOperationDisassociateIdentityProviderConfigMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DisassociateIdentityProviderConfigOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DisassociateIdentityProviderConfigInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // An object representing an identity provider configuration.
- //
- // This member is required.
- IdentityProviderConfig *types.IdentityProviderConfig
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request.
- ClientRequestToken *string
-
- noSmithyDocumentSerde
-}
-
-type DisassociateIdentityProviderConfigOutput struct {
-
- // An object representing an asynchronous update.
- Update *types.Update
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDisassociateIdentityProviderConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpDisassociateIdentityProviderConfig{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDisassociateIdentityProviderConfig{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateIdentityProviderConfig"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opDisassociateIdentityProviderConfigMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpDisassociateIdentityProviderConfigValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateIdentityProviderConfig(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpDisassociateIdentityProviderConfig struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpDisassociateIdentityProviderConfig) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpDisassociateIdentityProviderConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*DisassociateIdentityProviderConfigInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *DisassociateIdentityProviderConfigInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opDisassociateIdentityProviderConfigMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpDisassociateIdentityProviderConfig{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opDisassociateIdentityProviderConfig(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DisassociateIdentityProviderConfig",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListAccessEntries.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListAccessEntries.go
deleted file mode 100644
index 5d7e2a618b0e..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListAccessEntries.go
+++ /dev/null
@@ -1,285 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists the access entries for your cluster.
-func (c *Client) ListAccessEntries(ctx context.Context, params *ListAccessEntriesInput, optFns ...func(*Options)) (*ListAccessEntriesOutput, error) {
- if params == nil {
- params = &ListAccessEntriesInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListAccessEntries", params, optFns, c.addOperationListAccessEntriesMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListAccessEntriesOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListAccessEntriesInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The ARN of an AccessPolicy . When you specify an access policy ARN, only the
- // access entries associated to that access policy are returned. For a list of
- // available policy ARNs, use ListAccessPolicies .
- AssociatedPolicyArn *string
-
- // The maximum number of results, returned in paginated output. You receive
- // maxResults in a single page, along with a nextToken response element. You can
- // see the remaining results of the initial request by sending another request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, 100 results and a nextToken value, if applicable, are
- // returned.
- MaxResults *int32
-
- // The nextToken value returned from a previous paginated request, where maxResults
- // was used and the results exceeded the value of that parameter. Pagination
- // continues from the end of the previous results that returned the nextToken
- // value. This value is null when there are no more results to return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListAccessEntriesOutput struct {
-
- // The list of access entries that exist for the cluster.
- AccessEntries []string
-
- // The nextToken value returned from a previous paginated request, where maxResults
- // was used and the results exceeded the value of that parameter. Pagination
- // continues from the end of the previous results that returned the nextToken
- // value. This value is null when there are no more results to return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListAccessEntriesMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpListAccessEntries{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAccessEntries{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListAccessEntries"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListAccessEntriesValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccessEntries(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListAccessEntriesPaginatorOptions is the paginator options for ListAccessEntries
-type ListAccessEntriesPaginatorOptions struct {
- // The maximum number of results, returned in paginated output. You receive
- // maxResults in a single page, along with a nextToken response element. You can
- // see the remaining results of the initial request by sending another request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, 100 results and a nextToken value, if applicable, are
- // returned.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListAccessEntriesPaginator is a paginator for ListAccessEntries
-type ListAccessEntriesPaginator struct {
- options ListAccessEntriesPaginatorOptions
- client ListAccessEntriesAPIClient
- params *ListAccessEntriesInput
- nextToken *string
- firstPage bool
-}
-
-// NewListAccessEntriesPaginator returns a new ListAccessEntriesPaginator
-func NewListAccessEntriesPaginator(client ListAccessEntriesAPIClient, params *ListAccessEntriesInput, optFns ...func(*ListAccessEntriesPaginatorOptions)) *ListAccessEntriesPaginator {
- if params == nil {
- params = &ListAccessEntriesInput{}
- }
-
- options := ListAccessEntriesPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListAccessEntriesPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListAccessEntriesPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListAccessEntries page.
-func (p *ListAccessEntriesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAccessEntriesOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListAccessEntries(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListAccessEntriesAPIClient is a client that implements the ListAccessEntries
-// operation.
-type ListAccessEntriesAPIClient interface {
- ListAccessEntries(context.Context, *ListAccessEntriesInput, ...func(*Options)) (*ListAccessEntriesOutput, error)
-}
-
-var _ ListAccessEntriesAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListAccessEntries(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListAccessEntries",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListAccessPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListAccessPolicies.go
deleted file mode 100644
index 170ac358d629..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListAccessPolicies.go
+++ /dev/null
@@ -1,277 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists the available access policies.
-func (c *Client) ListAccessPolicies(ctx context.Context, params *ListAccessPoliciesInput, optFns ...func(*Options)) (*ListAccessPoliciesOutput, error) {
- if params == nil {
- params = &ListAccessPoliciesInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListAccessPolicies", params, optFns, c.addOperationListAccessPoliciesMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListAccessPoliciesOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListAccessPoliciesInput struct {
-
- // The maximum number of results, returned in paginated output. You receive
- // maxResults in a single page, along with a nextToken response element. You can
- // see the remaining results of the initial request by sending another request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, 100 results and a nextToken value, if applicable, are
- // returned.
- MaxResults *int32
-
- // The nextToken value returned from a previous paginated request, where maxResults
- // was used and the results exceeded the value of that parameter. Pagination
- // continues from the end of the previous results that returned the nextToken
- // value. This value is null when there are no more results to return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListAccessPoliciesOutput struct {
-
- // The list of available access policies. You can't view the contents of an access
- // policy using the API. To view the contents, see [Access policy permissions]in the Amazon EKS User Guide.
- //
- // [Access policy permissions]: https://docs.aws.amazon.com/eks/latest/userguide/access-policies.html#access-policy-permissions
- AccessPolicies []types.AccessPolicy
-
- // The nextToken value returned from a previous paginated request, where maxResults
- // was used and the results exceeded the value of that parameter. Pagination
- // continues from the end of the previous results that returned the nextToken
- // value. This value is null when there are no more results to return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListAccessPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpListAccessPolicies{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAccessPolicies{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListAccessPolicies"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccessPolicies(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListAccessPoliciesPaginatorOptions is the paginator options for
-// ListAccessPolicies
-type ListAccessPoliciesPaginatorOptions struct {
- // The maximum number of results, returned in paginated output. You receive
- // maxResults in a single page, along with a nextToken response element. You can
- // see the remaining results of the initial request by sending another request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, 100 results and a nextToken value, if applicable, are
- // returned.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListAccessPoliciesPaginator is a paginator for ListAccessPolicies
-type ListAccessPoliciesPaginator struct {
- options ListAccessPoliciesPaginatorOptions
- client ListAccessPoliciesAPIClient
- params *ListAccessPoliciesInput
- nextToken *string
- firstPage bool
-}
-
-// NewListAccessPoliciesPaginator returns a new ListAccessPoliciesPaginator
-func NewListAccessPoliciesPaginator(client ListAccessPoliciesAPIClient, params *ListAccessPoliciesInput, optFns ...func(*ListAccessPoliciesPaginatorOptions)) *ListAccessPoliciesPaginator {
- if params == nil {
- params = &ListAccessPoliciesInput{}
- }
-
- options := ListAccessPoliciesPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListAccessPoliciesPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListAccessPoliciesPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListAccessPolicies page.
-func (p *ListAccessPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAccessPoliciesOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListAccessPolicies(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListAccessPoliciesAPIClient is a client that implements the ListAccessPolicies
-// operation.
-type ListAccessPoliciesAPIClient interface {
- ListAccessPolicies(context.Context, *ListAccessPoliciesInput, ...func(*Options)) (*ListAccessPoliciesOutput, error)
-}
-
-var _ ListAccessPoliciesAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListAccessPolicies(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListAccessPolicies",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListAddons.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListAddons.go
deleted file mode 100644
index aa792f86c751..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListAddons.go
+++ /dev/null
@@ -1,279 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists the installed add-ons.
-func (c *Client) ListAddons(ctx context.Context, params *ListAddonsInput, optFns ...func(*Options)) (*ListAddonsOutput, error) {
- if params == nil {
- params = &ListAddonsInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListAddons", params, optFns, c.addOperationListAddonsMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListAddonsOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListAddonsInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The maximum number of results, returned in paginated output. You receive
- // maxResults in a single page, along with a nextToken response element. You can
- // see the remaining results of the initial request by sending another request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, 100 results and a nextToken value, if applicable, are
- // returned.
- MaxResults *int32
-
- // The nextToken value returned from a previous paginated request, where maxResults
- // was used and the results exceeded the value of that parameter. Pagination
- // continues from the end of the previous results that returned the nextToken
- // value. This value is null when there are no more results to return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListAddonsOutput struct {
-
- // A list of installed add-ons.
- Addons []string
-
- // The nextToken value to include in a future ListAddons request. When the results
- // of a ListAddons request exceed maxResults , you can use this value to retrieve
- // the next page of results. This value is null when there are no more results to
- // return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListAddonsMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpListAddons{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAddons{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListAddons"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListAddonsValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAddons(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListAddonsPaginatorOptions is the paginator options for ListAddons
-type ListAddonsPaginatorOptions struct {
- // The maximum number of results, returned in paginated output. You receive
- // maxResults in a single page, along with a nextToken response element. You can
- // see the remaining results of the initial request by sending another request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, 100 results and a nextToken value, if applicable, are
- // returned.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListAddonsPaginator is a paginator for ListAddons
-type ListAddonsPaginator struct {
- options ListAddonsPaginatorOptions
- client ListAddonsAPIClient
- params *ListAddonsInput
- nextToken *string
- firstPage bool
-}
-
-// NewListAddonsPaginator returns a new ListAddonsPaginator
-func NewListAddonsPaginator(client ListAddonsAPIClient, params *ListAddonsInput, optFns ...func(*ListAddonsPaginatorOptions)) *ListAddonsPaginator {
- if params == nil {
- params = &ListAddonsInput{}
- }
-
- options := ListAddonsPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListAddonsPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListAddonsPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListAddons page.
-func (p *ListAddonsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAddonsOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListAddons(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListAddonsAPIClient is a client that implements the ListAddons operation.
-type ListAddonsAPIClient interface {
- ListAddons(context.Context, *ListAddonsInput, ...func(*Options)) (*ListAddonsOutput, error)
-}
-
-var _ ListAddonsAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListAddons(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListAddons",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListAssociatedAccessPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListAssociatedAccessPolicies.go
deleted file mode 100644
index 0506910d38a3..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListAssociatedAccessPolicies.go
+++ /dev/null
@@ -1,295 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists the access policies associated with an access entry.
-func (c *Client) ListAssociatedAccessPolicies(ctx context.Context, params *ListAssociatedAccessPoliciesInput, optFns ...func(*Options)) (*ListAssociatedAccessPoliciesOutput, error) {
- if params == nil {
- params = &ListAssociatedAccessPoliciesInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListAssociatedAccessPolicies", params, optFns, c.addOperationListAssociatedAccessPoliciesMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListAssociatedAccessPoliciesOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListAssociatedAccessPoliciesInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The ARN of the IAM principal for the AccessEntry .
- //
- // This member is required.
- PrincipalArn *string
-
- // The maximum number of results, returned in paginated output. You receive
- // maxResults in a single page, along with a nextToken response element. You can
- // see the remaining results of the initial request by sending another request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, 100 results and a nextToken value, if applicable, are
- // returned.
- MaxResults *int32
-
- // The nextToken value returned from a previous paginated request, where maxResults
- // was used and the results exceeded the value of that parameter. Pagination
- // continues from the end of the previous results that returned the nextToken
- // value. This value is null when there are no more results to return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListAssociatedAccessPoliciesOutput struct {
-
- // The list of access policies associated with the access entry.
- AssociatedAccessPolicies []types.AssociatedAccessPolicy
-
- // The name of your cluster.
- ClusterName *string
-
- // The nextToken value returned from a previous paginated request, where maxResults
- // was used and the results exceeded the value of that parameter. Pagination
- // continues from the end of the previous results that returned the nextToken
- // value. This value is null when there are no more results to return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- // The ARN of the IAM principal for the AccessEntry .
- PrincipalArn *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListAssociatedAccessPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpListAssociatedAccessPolicies{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAssociatedAccessPolicies{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListAssociatedAccessPolicies"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListAssociatedAccessPoliciesValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAssociatedAccessPolicies(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListAssociatedAccessPoliciesPaginatorOptions is the paginator options for
-// ListAssociatedAccessPolicies
-type ListAssociatedAccessPoliciesPaginatorOptions struct {
- // The maximum number of results, returned in paginated output. You receive
- // maxResults in a single page, along with a nextToken response element. You can
- // see the remaining results of the initial request by sending another request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, 100 results and a nextToken value, if applicable, are
- // returned.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListAssociatedAccessPoliciesPaginator is a paginator for
-// ListAssociatedAccessPolicies
-type ListAssociatedAccessPoliciesPaginator struct {
- options ListAssociatedAccessPoliciesPaginatorOptions
- client ListAssociatedAccessPoliciesAPIClient
- params *ListAssociatedAccessPoliciesInput
- nextToken *string
- firstPage bool
-}
-
-// NewListAssociatedAccessPoliciesPaginator returns a new
-// ListAssociatedAccessPoliciesPaginator
-func NewListAssociatedAccessPoliciesPaginator(client ListAssociatedAccessPoliciesAPIClient, params *ListAssociatedAccessPoliciesInput, optFns ...func(*ListAssociatedAccessPoliciesPaginatorOptions)) *ListAssociatedAccessPoliciesPaginator {
- if params == nil {
- params = &ListAssociatedAccessPoliciesInput{}
- }
-
- options := ListAssociatedAccessPoliciesPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListAssociatedAccessPoliciesPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListAssociatedAccessPoliciesPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListAssociatedAccessPolicies page.
-func (p *ListAssociatedAccessPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAssociatedAccessPoliciesOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListAssociatedAccessPolicies(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListAssociatedAccessPoliciesAPIClient is a client that implements the
-// ListAssociatedAccessPolicies operation.
-type ListAssociatedAccessPoliciesAPIClient interface {
- ListAssociatedAccessPolicies(context.Context, *ListAssociatedAccessPoliciesInput, ...func(*Options)) (*ListAssociatedAccessPoliciesOutput, error)
-}
-
-var _ ListAssociatedAccessPoliciesAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListAssociatedAccessPolicies(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListAssociatedAccessPolicies",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListCapabilities.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListCapabilities.go
deleted file mode 100644
index 4148818315a2..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListCapabilities.go
+++ /dev/null
@@ -1,271 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists all managed capabilities in your Amazon EKS cluster. You can use this
-// operation to get an overview of all capabilities and their current status.
-func (c *Client) ListCapabilities(ctx context.Context, params *ListCapabilitiesInput, optFns ...func(*Options)) (*ListCapabilitiesOutput, error) {
- if params == nil {
- params = &ListCapabilitiesInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListCapabilities", params, optFns, c.addOperationListCapabilitiesMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListCapabilitiesOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListCapabilitiesInput struct {
-
- // The name of the Amazon EKS cluster for which you want to list capabilities.
- //
- // This member is required.
- ClusterName *string
-
- // The maximum number of results to return in a single call. To retrieve the
- // remaining results, make another call with the returned nextToken value. If you
- // don't specify a value, the default is 100 results.
- MaxResults *int32
-
- // The nextToken value returned from a previous paginated request, where maxResults
- // was used and the results exceeded the value of that parameter. Pagination
- // continues from the end of the previous results that returned the nextToken
- // value. This value is null when there are no more results to return.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListCapabilitiesOutput struct {
-
- // A list of capability summary objects, each containing basic information about a
- // capability including its name, ARN, type, status, version, and timestamps.
- Capabilities []types.CapabilitySummary
-
- // The nextToken value to include in a future ListCapabilities request. When the
- // results of a ListCapabilities request exceed maxResults , you can use this value
- // to retrieve the next page of results. This value is null when there are no more
- // results to return.
- NextToken *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListCapabilitiesMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpListCapabilities{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListCapabilities{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListCapabilities"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListCapabilitiesValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCapabilities(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListCapabilitiesPaginatorOptions is the paginator options for ListCapabilities
-type ListCapabilitiesPaginatorOptions struct {
- // The maximum number of results to return in a single call. To retrieve the
- // remaining results, make another call with the returned nextToken value. If you
- // don't specify a value, the default is 100 results.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListCapabilitiesPaginator is a paginator for ListCapabilities
-type ListCapabilitiesPaginator struct {
- options ListCapabilitiesPaginatorOptions
- client ListCapabilitiesAPIClient
- params *ListCapabilitiesInput
- nextToken *string
- firstPage bool
-}
-
-// NewListCapabilitiesPaginator returns a new ListCapabilitiesPaginator
-func NewListCapabilitiesPaginator(client ListCapabilitiesAPIClient, params *ListCapabilitiesInput, optFns ...func(*ListCapabilitiesPaginatorOptions)) *ListCapabilitiesPaginator {
- if params == nil {
- params = &ListCapabilitiesInput{}
- }
-
- options := ListCapabilitiesPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListCapabilitiesPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListCapabilitiesPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListCapabilities page.
-func (p *ListCapabilitiesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCapabilitiesOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListCapabilities(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListCapabilitiesAPIClient is a client that implements the ListCapabilities
-// operation.
-type ListCapabilitiesAPIClient interface {
- ListCapabilities(context.Context, *ListCapabilitiesInput, ...func(*Options)) (*ListCapabilitiesOutput, error)
-}
-
-var _ ListCapabilitiesAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListCapabilities(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListCapabilities",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListClusters.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListClusters.go
deleted file mode 100644
index f24df83c0479..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListClusters.go
+++ /dev/null
@@ -1,280 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists the Amazon EKS clusters in your Amazon Web Services account in the
-// specified Amazon Web Services Region.
-func (c *Client) ListClusters(ctx context.Context, params *ListClustersInput, optFns ...func(*Options)) (*ListClustersOutput, error) {
- if params == nil {
- params = &ListClustersInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListClusters", params, optFns, c.addOperationListClustersMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListClustersOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListClustersInput struct {
-
- // Indicates whether external clusters are included in the returned list. Use ' all
- // ' to return [https://docs.aws.amazon.com/eks/latest/userguide/eks-connector.html]connected clusters, or blank to return only Amazon EKS clusters. '
- // all ' must be in lowercase otherwise an error occurs.
- //
- // [https://docs.aws.amazon.com/eks/latest/userguide/eks-connector.html]: https://docs.aws.amazon.com/eks/latest/userguide/eks-connector.html
- Include []string
-
- // The maximum number of results, returned in paginated output. You receive
- // maxResults in a single page, along with a nextToken response element. You can
- // see the remaining results of the initial request by sending another request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, 100 results and a nextToken value, if applicable, are
- // returned.
- MaxResults *int32
-
- // The nextToken value returned from a previous paginated request, where maxResults
- // was used and the results exceeded the value of that parameter. Pagination
- // continues from the end of the previous results that returned the nextToken
- // value. This value is null when there are no more results to return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListClustersOutput struct {
-
- // A list of all of the clusters for your account in the specified Amazon Web
- // Services Region .
- Clusters []string
-
- // The nextToken value returned from a previous paginated request, where maxResults
- // was used and the results exceeded the value of that parameter. Pagination
- // continues from the end of the previous results that returned the nextToken
- // value. This value is null when there are no more results to return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListClustersMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpListClusters{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListClusters{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListClusters"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListClusters(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListClustersPaginatorOptions is the paginator options for ListClusters
-type ListClustersPaginatorOptions struct {
- // The maximum number of results, returned in paginated output. You receive
- // maxResults in a single page, along with a nextToken response element. You can
- // see the remaining results of the initial request by sending another request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, 100 results and a nextToken value, if applicable, are
- // returned.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListClustersPaginator is a paginator for ListClusters
-type ListClustersPaginator struct {
- options ListClustersPaginatorOptions
- client ListClustersAPIClient
- params *ListClustersInput
- nextToken *string
- firstPage bool
-}
-
-// NewListClustersPaginator returns a new ListClustersPaginator
-func NewListClustersPaginator(client ListClustersAPIClient, params *ListClustersInput, optFns ...func(*ListClustersPaginatorOptions)) *ListClustersPaginator {
- if params == nil {
- params = &ListClustersInput{}
- }
-
- options := ListClustersPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListClustersPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListClustersPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListClusters page.
-func (p *ListClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListClustersOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListClusters(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListClustersAPIClient is a client that implements the ListClusters operation.
-type ListClustersAPIClient interface {
- ListClusters(context.Context, *ListClustersInput, ...func(*Options)) (*ListClustersOutput, error)
-}
-
-var _ ListClustersAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListClusters(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListClusters",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListEksAnywhereSubscriptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListEksAnywhereSubscriptions.go
deleted file mode 100644
index 32cf8b52dcc8..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListEksAnywhereSubscriptions.go
+++ /dev/null
@@ -1,278 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Displays the full description of the subscription.
-func (c *Client) ListEksAnywhereSubscriptions(ctx context.Context, params *ListEksAnywhereSubscriptionsInput, optFns ...func(*Options)) (*ListEksAnywhereSubscriptionsOutput, error) {
- if params == nil {
- params = &ListEksAnywhereSubscriptionsInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListEksAnywhereSubscriptions", params, optFns, c.addOperationListEksAnywhereSubscriptionsMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListEksAnywhereSubscriptionsOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListEksAnywhereSubscriptionsInput struct {
-
- // An array of subscription statuses to filter on.
- IncludeStatus []types.EksAnywhereSubscriptionStatus
-
- // The maximum number of cluster results returned by ListEksAnywhereSubscriptions
- // in paginated output. When you use this parameter, ListEksAnywhereSubscriptions
- // returns only maxResults results in a single page along with a nextToken response
- // element. You can see the remaining results of the initial request by sending
- // another ListEksAnywhereSubscriptions request with the returned nextToken value.
- // This value can be between 1 and 100. If you don't use this parameter,
- // ListEksAnywhereSubscriptions returns up to 10 results and a nextToken value if
- // applicable.
- MaxResults *int32
-
- // The nextToken value returned from a previous paginated
- // ListEksAnywhereSubscriptions request where maxResults was used and the results
- // exceeded the value of that parameter. Pagination continues from the end of the
- // previous results that returned the nextToken value.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListEksAnywhereSubscriptionsOutput struct {
-
- // The nextToken value to include in a future ListEksAnywhereSubscriptions
- // request. When the results of a ListEksAnywhereSubscriptions request exceed
- // maxResults, you can use this value to retrieve the next page of results. This
- // value is null when there are no more results to return.
- NextToken *string
-
- // A list of all subscription objects in the region, filtered by includeStatus and
- // paginated by nextToken and maxResults.
- Subscriptions []types.EksAnywhereSubscription
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListEksAnywhereSubscriptionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpListEksAnywhereSubscriptions{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListEksAnywhereSubscriptions{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListEksAnywhereSubscriptions"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEksAnywhereSubscriptions(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListEksAnywhereSubscriptionsPaginatorOptions is the paginator options for
-// ListEksAnywhereSubscriptions
-type ListEksAnywhereSubscriptionsPaginatorOptions struct {
- // The maximum number of cluster results returned by ListEksAnywhereSubscriptions
- // in paginated output. When you use this parameter, ListEksAnywhereSubscriptions
- // returns only maxResults results in a single page along with a nextToken response
- // element. You can see the remaining results of the initial request by sending
- // another ListEksAnywhereSubscriptions request with the returned nextToken value.
- // This value can be between 1 and 100. If you don't use this parameter,
- // ListEksAnywhereSubscriptions returns up to 10 results and a nextToken value if
- // applicable.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListEksAnywhereSubscriptionsPaginator is a paginator for
-// ListEksAnywhereSubscriptions
-type ListEksAnywhereSubscriptionsPaginator struct {
- options ListEksAnywhereSubscriptionsPaginatorOptions
- client ListEksAnywhereSubscriptionsAPIClient
- params *ListEksAnywhereSubscriptionsInput
- nextToken *string
- firstPage bool
-}
-
-// NewListEksAnywhereSubscriptionsPaginator returns a new
-// ListEksAnywhereSubscriptionsPaginator
-func NewListEksAnywhereSubscriptionsPaginator(client ListEksAnywhereSubscriptionsAPIClient, params *ListEksAnywhereSubscriptionsInput, optFns ...func(*ListEksAnywhereSubscriptionsPaginatorOptions)) *ListEksAnywhereSubscriptionsPaginator {
- if params == nil {
- params = &ListEksAnywhereSubscriptionsInput{}
- }
-
- options := ListEksAnywhereSubscriptionsPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListEksAnywhereSubscriptionsPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListEksAnywhereSubscriptionsPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListEksAnywhereSubscriptions page.
-func (p *ListEksAnywhereSubscriptionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEksAnywhereSubscriptionsOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListEksAnywhereSubscriptions(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListEksAnywhereSubscriptionsAPIClient is a client that implements the
-// ListEksAnywhereSubscriptions operation.
-type ListEksAnywhereSubscriptionsAPIClient interface {
- ListEksAnywhereSubscriptions(context.Context, *ListEksAnywhereSubscriptionsInput, ...func(*Options)) (*ListEksAnywhereSubscriptionsOutput, error)
-}
-
-var _ ListEksAnywhereSubscriptionsAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListEksAnywhereSubscriptions(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListEksAnywhereSubscriptions",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListFargateProfiles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListFargateProfiles.go
deleted file mode 100644
index b7122712ce70..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListFargateProfiles.go
+++ /dev/null
@@ -1,282 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists the Fargate profiles associated with the specified cluster in your Amazon
-// Web Services account in the specified Amazon Web Services Region.
-func (c *Client) ListFargateProfiles(ctx context.Context, params *ListFargateProfilesInput, optFns ...func(*Options)) (*ListFargateProfilesOutput, error) {
- if params == nil {
- params = &ListFargateProfilesInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListFargateProfiles", params, optFns, c.addOperationListFargateProfilesMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListFargateProfilesOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListFargateProfilesInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The maximum number of results, returned in paginated output. You receive
- // maxResults in a single page, along with a nextToken response element. You can
- // see the remaining results of the initial request by sending another request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, 100 results and a nextToken value, if applicable, are
- // returned.
- MaxResults *int32
-
- // The nextToken value returned from a previous paginated request, where maxResults
- // was used and the results exceeded the value of that parameter. Pagination
- // continues from the end of the previous results that returned the nextToken
- // value. This value is null when there are no more results to return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListFargateProfilesOutput struct {
-
- // A list of all of the Fargate profiles associated with the specified cluster.
- FargateProfileNames []string
-
- // The nextToken value returned from a previous paginated request, where maxResults
- // was used and the results exceeded the value of that parameter. Pagination
- // continues from the end of the previous results that returned the nextToken
- // value. This value is null when there are no more results to return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListFargateProfilesMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpListFargateProfiles{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListFargateProfiles{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListFargateProfiles"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListFargateProfilesValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFargateProfiles(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListFargateProfilesPaginatorOptions is the paginator options for
-// ListFargateProfiles
-type ListFargateProfilesPaginatorOptions struct {
- // The maximum number of results, returned in paginated output. You receive
- // maxResults in a single page, along with a nextToken response element. You can
- // see the remaining results of the initial request by sending another request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, 100 results and a nextToken value, if applicable, are
- // returned.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListFargateProfilesPaginator is a paginator for ListFargateProfiles
-type ListFargateProfilesPaginator struct {
- options ListFargateProfilesPaginatorOptions
- client ListFargateProfilesAPIClient
- params *ListFargateProfilesInput
- nextToken *string
- firstPage bool
-}
-
-// NewListFargateProfilesPaginator returns a new ListFargateProfilesPaginator
-func NewListFargateProfilesPaginator(client ListFargateProfilesAPIClient, params *ListFargateProfilesInput, optFns ...func(*ListFargateProfilesPaginatorOptions)) *ListFargateProfilesPaginator {
- if params == nil {
- params = &ListFargateProfilesInput{}
- }
-
- options := ListFargateProfilesPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListFargateProfilesPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListFargateProfilesPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListFargateProfiles page.
-func (p *ListFargateProfilesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListFargateProfilesOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListFargateProfiles(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListFargateProfilesAPIClient is a client that implements the
-// ListFargateProfiles operation.
-type ListFargateProfilesAPIClient interface {
- ListFargateProfiles(context.Context, *ListFargateProfilesInput, ...func(*Options)) (*ListFargateProfilesOutput, error)
-}
-
-var _ ListFargateProfilesAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListFargateProfiles(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListFargateProfiles",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListIdentityProviderConfigs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListIdentityProviderConfigs.go
deleted file mode 100644
index 8d0f1d2415db..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListIdentityProviderConfigs.go
+++ /dev/null
@@ -1,284 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists the identity provider configurations for your cluster.
-func (c *Client) ListIdentityProviderConfigs(ctx context.Context, params *ListIdentityProviderConfigsInput, optFns ...func(*Options)) (*ListIdentityProviderConfigsOutput, error) {
- if params == nil {
- params = &ListIdentityProviderConfigsInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListIdentityProviderConfigs", params, optFns, c.addOperationListIdentityProviderConfigsMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListIdentityProviderConfigsOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListIdentityProviderConfigsInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The maximum number of results, returned in paginated output. You receive
- // maxResults in a single page, along with a nextToken response element. You can
- // see the remaining results of the initial request by sending another request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, 100 results and a nextToken value, if applicable, are
- // returned.
- MaxResults *int32
-
- // The nextToken value returned from a previous paginated request, where maxResults
- // was used and the results exceeded the value of that parameter. Pagination
- // continues from the end of the previous results that returned the nextToken
- // value. This value is null when there are no more results to return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListIdentityProviderConfigsOutput struct {
-
- // The identity provider configurations for the cluster.
- IdentityProviderConfigs []types.IdentityProviderConfig
-
- // The nextToken value to include in a future ListIdentityProviderConfigsResponse
- // request. When the results of a ListIdentityProviderConfigsResponse request
- // exceed maxResults , you can use this value to retrieve the next page of results.
- // This value is null when there are no more results to return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListIdentityProviderConfigsMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpListIdentityProviderConfigs{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListIdentityProviderConfigs{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListIdentityProviderConfigs"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListIdentityProviderConfigsValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIdentityProviderConfigs(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListIdentityProviderConfigsPaginatorOptions is the paginator options for
-// ListIdentityProviderConfigs
-type ListIdentityProviderConfigsPaginatorOptions struct {
- // The maximum number of results, returned in paginated output. You receive
- // maxResults in a single page, along with a nextToken response element. You can
- // see the remaining results of the initial request by sending another request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, 100 results and a nextToken value, if applicable, are
- // returned.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListIdentityProviderConfigsPaginator is a paginator for
-// ListIdentityProviderConfigs
-type ListIdentityProviderConfigsPaginator struct {
- options ListIdentityProviderConfigsPaginatorOptions
- client ListIdentityProviderConfigsAPIClient
- params *ListIdentityProviderConfigsInput
- nextToken *string
- firstPage bool
-}
-
-// NewListIdentityProviderConfigsPaginator returns a new
-// ListIdentityProviderConfigsPaginator
-func NewListIdentityProviderConfigsPaginator(client ListIdentityProviderConfigsAPIClient, params *ListIdentityProviderConfigsInput, optFns ...func(*ListIdentityProviderConfigsPaginatorOptions)) *ListIdentityProviderConfigsPaginator {
- if params == nil {
- params = &ListIdentityProviderConfigsInput{}
- }
-
- options := ListIdentityProviderConfigsPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListIdentityProviderConfigsPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListIdentityProviderConfigsPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListIdentityProviderConfigs page.
-func (p *ListIdentityProviderConfigsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListIdentityProviderConfigsOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListIdentityProviderConfigs(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListIdentityProviderConfigsAPIClient is a client that implements the
-// ListIdentityProviderConfigs operation.
-type ListIdentityProviderConfigsAPIClient interface {
- ListIdentityProviderConfigs(context.Context, *ListIdentityProviderConfigsInput, ...func(*Options)) (*ListIdentityProviderConfigsOutput, error)
-}
-
-var _ ListIdentityProviderConfigsAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListIdentityProviderConfigs(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListIdentityProviderConfigs",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListInsights.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListInsights.go
deleted file mode 100644
index da8e4b3cea3b..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListInsights.go
+++ /dev/null
@@ -1,293 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Returns a list of all insights checked for against the specified cluster. You
-// can filter which insights are returned by category, associated Kubernetes
-// version, and status. The default filter lists all categories and every status.
-//
-// The following lists the available categories:
-//
-// - UPGRADE_READINESS : Amazon EKS identifies issues that could impact your
-// ability to upgrade to new versions of Kubernetes. These are called upgrade
-// insights.
-//
-// - MISCONFIGURATION : Amazon EKS identifies misconfiguration in your EKS Hybrid
-// Nodes setup that could impair functionality of your cluster or workloads. These
-// are called configuration insights.
-func (c *Client) ListInsights(ctx context.Context, params *ListInsightsInput, optFns ...func(*Options)) (*ListInsightsOutput, error) {
- if params == nil {
- params = &ListInsightsInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListInsights", params, optFns, c.addOperationListInsightsMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListInsightsOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListInsightsInput struct {
-
- // The name of the Amazon EKS cluster associated with the insights.
- //
- // This member is required.
- ClusterName *string
-
- // The criteria to filter your list of insights for your cluster. You can filter
- // which insights are returned by category, associated Kubernetes version, and
- // status.
- Filter *types.InsightsFilter
-
- // The maximum number of identity provider configurations returned by ListInsights
- // in paginated output. When you use this parameter, ListInsights returns only
- // maxResults results in a single page along with a nextToken response element.
- // You can see the remaining results of the initial request by sending another
- // ListInsights request with the returned nextToken value. This value can be
- // between 1 and 100. If you don't use this parameter, ListInsights returns up to
- // 100 results and a nextToken value, if applicable.
- MaxResults *int32
-
- // The nextToken value returned from a previous paginated ListInsights request.
- // When the results of a ListInsights request exceed maxResults , you can use this
- // value to retrieve the next page of results. This value is null when there are
- // no more results to return.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListInsightsOutput struct {
-
- // The returned list of insights.
- Insights []types.InsightSummary
-
- // The nextToken value to include in a future ListInsights request. When the
- // results of a ListInsights request exceed maxResults , you can use this value to
- // retrieve the next page of results. This value is null when there are no more
- // results to return.
- NextToken *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListInsightsMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpListInsights{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListInsights{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListInsights"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListInsightsValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInsights(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListInsightsPaginatorOptions is the paginator options for ListInsights
-type ListInsightsPaginatorOptions struct {
- // The maximum number of identity provider configurations returned by ListInsights
- // in paginated output. When you use this parameter, ListInsights returns only
- // maxResults results in a single page along with a nextToken response element.
- // You can see the remaining results of the initial request by sending another
- // ListInsights request with the returned nextToken value. This value can be
- // between 1 and 100. If you don't use this parameter, ListInsights returns up to
- // 100 results and a nextToken value, if applicable.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListInsightsPaginator is a paginator for ListInsights
-type ListInsightsPaginator struct {
- options ListInsightsPaginatorOptions
- client ListInsightsAPIClient
- params *ListInsightsInput
- nextToken *string
- firstPage bool
-}
-
-// NewListInsightsPaginator returns a new ListInsightsPaginator
-func NewListInsightsPaginator(client ListInsightsAPIClient, params *ListInsightsInput, optFns ...func(*ListInsightsPaginatorOptions)) *ListInsightsPaginator {
- if params == nil {
- params = &ListInsightsInput{}
- }
-
- options := ListInsightsPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListInsightsPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListInsightsPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListInsights page.
-func (p *ListInsightsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListInsightsOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListInsights(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListInsightsAPIClient is a client that implements the ListInsights operation.
-type ListInsightsAPIClient interface {
- ListInsights(context.Context, *ListInsightsInput, ...func(*Options)) (*ListInsightsOutput, error)
-}
-
-var _ ListInsightsAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListInsights(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListInsights",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListNodegroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListNodegroups.go
deleted file mode 100644
index 0cf71f7d55ad..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListNodegroups.go
+++ /dev/null
@@ -1,282 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists the managed node groups associated with the specified cluster in your
-// Amazon Web Services account in the specified Amazon Web Services Region.
-// Self-managed node groups aren't listed.
-func (c *Client) ListNodegroups(ctx context.Context, params *ListNodegroupsInput, optFns ...func(*Options)) (*ListNodegroupsOutput, error) {
- if params == nil {
- params = &ListNodegroupsInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListNodegroups", params, optFns, c.addOperationListNodegroupsMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListNodegroupsOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListNodegroupsInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The maximum number of results, returned in paginated output. You receive
- // maxResults in a single page, along with a nextToken response element. You can
- // see the remaining results of the initial request by sending another request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, 100 results and a nextToken value, if applicable, are
- // returned.
- MaxResults *int32
-
- // The nextToken value returned from a previous paginated request, where maxResults
- // was used and the results exceeded the value of that parameter. Pagination
- // continues from the end of the previous results that returned the nextToken
- // value. This value is null when there are no more results to return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListNodegroupsOutput struct {
-
- // The nextToken value returned from a previous paginated request, where maxResults
- // was used and the results exceeded the value of that parameter. Pagination
- // continues from the end of the previous results that returned the nextToken
- // value. This value is null when there are no more results to return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- // A list of all of the node groups associated with the specified cluster.
- Nodegroups []string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListNodegroupsMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpListNodegroups{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListNodegroups{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListNodegroups"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListNodegroupsValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNodegroups(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListNodegroupsPaginatorOptions is the paginator options for ListNodegroups
-type ListNodegroupsPaginatorOptions struct {
- // The maximum number of results, returned in paginated output. You receive
- // maxResults in a single page, along with a nextToken response element. You can
- // see the remaining results of the initial request by sending another request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, 100 results and a nextToken value, if applicable, are
- // returned.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListNodegroupsPaginator is a paginator for ListNodegroups
-type ListNodegroupsPaginator struct {
- options ListNodegroupsPaginatorOptions
- client ListNodegroupsAPIClient
- params *ListNodegroupsInput
- nextToken *string
- firstPage bool
-}
-
-// NewListNodegroupsPaginator returns a new ListNodegroupsPaginator
-func NewListNodegroupsPaginator(client ListNodegroupsAPIClient, params *ListNodegroupsInput, optFns ...func(*ListNodegroupsPaginatorOptions)) *ListNodegroupsPaginator {
- if params == nil {
- params = &ListNodegroupsInput{}
- }
-
- options := ListNodegroupsPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListNodegroupsPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListNodegroupsPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListNodegroups page.
-func (p *ListNodegroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListNodegroupsOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListNodegroups(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListNodegroupsAPIClient is a client that implements the ListNodegroups
-// operation.
-type ListNodegroupsAPIClient interface {
- ListNodegroups(context.Context, *ListNodegroupsInput, ...func(*Options)) (*ListNodegroupsOutput, error)
-}
-
-var _ ListNodegroupsAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListNodegroups(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListNodegroups",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListPodIdentityAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListPodIdentityAssociations.go
deleted file mode 100644
index f3eba51543f3..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListPodIdentityAssociations.go
+++ /dev/null
@@ -1,311 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// List the EKS Pod Identity associations in a cluster. You can filter the list by
-// the namespace that the association is in or the service account that the
-// association uses.
-func (c *Client) ListPodIdentityAssociations(ctx context.Context, params *ListPodIdentityAssociationsInput, optFns ...func(*Options)) (*ListPodIdentityAssociationsOutput, error) {
- if params == nil {
- params = &ListPodIdentityAssociationsInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListPodIdentityAssociations", params, optFns, c.addOperationListPodIdentityAssociationsMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListPodIdentityAssociationsOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListPodIdentityAssociationsInput struct {
-
- // The name of the cluster that the associations are in.
- //
- // This member is required.
- ClusterName *string
-
- // The maximum number of EKS Pod Identity association results returned by
- // ListPodIdentityAssociations in paginated output. When you use this parameter,
- // ListPodIdentityAssociations returns only maxResults results in a single page
- // along with a nextToken response element. You can see the remaining results of
- // the initial request by sending another ListPodIdentityAssociations request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, ListPodIdentityAssociations returns up to 100 results and a
- // nextToken value if applicable.
- MaxResults *int32
-
- // The name of the Kubernetes namespace inside the cluster that the associations
- // are in.
- Namespace *string
-
- // The nextToken value returned from a previous paginated ListUpdates request
- // where maxResults was used and the results exceeded the value of that parameter.
- // Pagination continues from the end of the previous results that returned the
- // nextToken value.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- // The name of the Kubernetes service account that the associations use.
- ServiceAccount *string
-
- noSmithyDocumentSerde
-}
-
-type ListPodIdentityAssociationsOutput struct {
-
- // The list of summarized descriptions of the associations that are in the cluster
- // and match any filters that you provided.
- //
- // Each summary is simplified by removing these fields compared to the full [PodIdentityAssociation]
- // PodIdentityAssociation :
- //
- // - The IAM role: roleArn
- //
- // - The timestamp that the association was created at: createdAt
- //
- // - The most recent timestamp that the association was modified at:. modifiedAt
- //
- // - The tags on the association: tags
- //
- // [PodIdentityAssociation]: https://docs.aws.amazon.com/eks/latest/APIReference/API_PodIdentityAssociation.html
- Associations []types.PodIdentityAssociationSummary
-
- // The nextToken value to include in a future ListPodIdentityAssociations request.
- // When the results of a ListPodIdentityAssociations request exceed maxResults ,
- // you can use this value to retrieve the next page of results. This value is null
- // when there are no more results to return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListPodIdentityAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpListPodIdentityAssociations{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListPodIdentityAssociations{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListPodIdentityAssociations"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListPodIdentityAssociationsValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPodIdentityAssociations(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListPodIdentityAssociationsPaginatorOptions is the paginator options for
-// ListPodIdentityAssociations
-type ListPodIdentityAssociationsPaginatorOptions struct {
- // The maximum number of EKS Pod Identity association results returned by
- // ListPodIdentityAssociations in paginated output. When you use this parameter,
- // ListPodIdentityAssociations returns only maxResults results in a single page
- // along with a nextToken response element. You can see the remaining results of
- // the initial request by sending another ListPodIdentityAssociations request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, ListPodIdentityAssociations returns up to 100 results and a
- // nextToken value if applicable.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListPodIdentityAssociationsPaginator is a paginator for
-// ListPodIdentityAssociations
-type ListPodIdentityAssociationsPaginator struct {
- options ListPodIdentityAssociationsPaginatorOptions
- client ListPodIdentityAssociationsAPIClient
- params *ListPodIdentityAssociationsInput
- nextToken *string
- firstPage bool
-}
-
-// NewListPodIdentityAssociationsPaginator returns a new
-// ListPodIdentityAssociationsPaginator
-func NewListPodIdentityAssociationsPaginator(client ListPodIdentityAssociationsAPIClient, params *ListPodIdentityAssociationsInput, optFns ...func(*ListPodIdentityAssociationsPaginatorOptions)) *ListPodIdentityAssociationsPaginator {
- if params == nil {
- params = &ListPodIdentityAssociationsInput{}
- }
-
- options := ListPodIdentityAssociationsPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListPodIdentityAssociationsPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListPodIdentityAssociationsPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListPodIdentityAssociations page.
-func (p *ListPodIdentityAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListPodIdentityAssociationsOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListPodIdentityAssociations(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListPodIdentityAssociationsAPIClient is a client that implements the
-// ListPodIdentityAssociations operation.
-type ListPodIdentityAssociationsAPIClient interface {
- ListPodIdentityAssociations(context.Context, *ListPodIdentityAssociationsInput, ...func(*Options)) (*ListPodIdentityAssociationsOutput, error)
-}
-
-var _ ListPodIdentityAssociationsAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListPodIdentityAssociations(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListPodIdentityAssociations",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListTagsForResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListTagsForResource.go
deleted file mode 100644
index dce75d9a6466..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListTagsForResource.go
+++ /dev/null
@@ -1,156 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// List the tags for an Amazon EKS resource.
-func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) {
- if params == nil {
- params = &ListTagsForResourceInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListTagsForResourceOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListTagsForResourceInput struct {
-
- // The Amazon Resource Name (ARN) that identifies the resource to list tags for.
- //
- // This member is required.
- ResourceArn *string
-
- noSmithyDocumentSerde
-}
-
-type ListTagsForResourceOutput struct {
-
- // The tags for the resource.
- Tags map[string]string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListTagsForResource"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListTagsForResource",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListUpdates.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListUpdates.go
deleted file mode 100644
index d2791515562f..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_ListUpdates.go
+++ /dev/null
@@ -1,289 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists the updates associated with an Amazon EKS resource in your Amazon Web
-// Services account, in the specified Amazon Web Services Region.
-func (c *Client) ListUpdates(ctx context.Context, params *ListUpdatesInput, optFns ...func(*Options)) (*ListUpdatesOutput, error) {
- if params == nil {
- params = &ListUpdatesInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListUpdates", params, optFns, c.addOperationListUpdatesMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListUpdatesOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListUpdatesInput struct {
-
- // The name of the Amazon EKS cluster to list updates for.
- //
- // This member is required.
- Name *string
-
- // The names of the installed add-ons that have available updates.
- AddonName *string
-
- // The name of the capability for which you want to list updates.
- CapabilityName *string
-
- // The maximum number of results, returned in paginated output. You receive
- // maxResults in a single page, along with a nextToken response element. You can
- // see the remaining results of the initial request by sending another request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, 100 results and a nextToken value, if applicable, are
- // returned.
- MaxResults *int32
-
- // The nextToken value returned from a previous paginated request, where maxResults
- // was used and the results exceeded the value of that parameter. Pagination
- // continues from the end of the previous results that returned the nextToken
- // value. This value is null when there are no more results to return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- // The name of the Amazon EKS managed node group to list updates for.
- NodegroupName *string
-
- noSmithyDocumentSerde
-}
-
-type ListUpdatesOutput struct {
-
- // The nextToken value returned from a previous paginated request, where maxResults
- // was used and the results exceeded the value of that parameter. Pagination
- // continues from the end of the previous results that returned the nextToken
- // value. This value is null when there are no more results to return.
- //
- // This token should be treated as an opaque identifier that is used only to
- // retrieve the next items in a list and not for other programmatic purposes.
- NextToken *string
-
- // A list of all the updates for the specified cluster and Region.
- UpdateIds []string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListUpdatesMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpListUpdates{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListUpdates{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListUpdates"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListUpdatesValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUpdates(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListUpdatesPaginatorOptions is the paginator options for ListUpdates
-type ListUpdatesPaginatorOptions struct {
- // The maximum number of results, returned in paginated output. You receive
- // maxResults in a single page, along with a nextToken response element. You can
- // see the remaining results of the initial request by sending another request with
- // the returned nextToken value. This value can be between 1 and 100. If you don't
- // use this parameter, 100 results and a nextToken value, if applicable, are
- // returned.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListUpdatesPaginator is a paginator for ListUpdates
-type ListUpdatesPaginator struct {
- options ListUpdatesPaginatorOptions
- client ListUpdatesAPIClient
- params *ListUpdatesInput
- nextToken *string
- firstPage bool
-}
-
-// NewListUpdatesPaginator returns a new ListUpdatesPaginator
-func NewListUpdatesPaginator(client ListUpdatesAPIClient, params *ListUpdatesInput, optFns ...func(*ListUpdatesPaginatorOptions)) *ListUpdatesPaginator {
- if params == nil {
- params = &ListUpdatesInput{}
- }
-
- options := ListUpdatesPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListUpdatesPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListUpdatesPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListUpdates page.
-func (p *ListUpdatesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListUpdatesOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListUpdates(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListUpdatesAPIClient is a client that implements the ListUpdates operation.
-type ListUpdatesAPIClient interface {
- ListUpdates(context.Context, *ListUpdatesInput, ...func(*Options)) (*ListUpdatesOutput, error)
-}
-
-var _ ListUpdatesAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListUpdates(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListUpdates",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_RegisterCluster.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_RegisterCluster.go
deleted file mode 100644
index 66461658a439..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_RegisterCluster.go
+++ /dev/null
@@ -1,225 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Connects a Kubernetes cluster to the Amazon EKS control plane.
-//
-// Any Kubernetes cluster can be connected to the Amazon EKS control plane to view
-// current information about the cluster and its nodes.
-//
-// Cluster connection requires two steps. First, send a [RegisterClusterRequest]RegisterClusterRequest to
-// add it to the Amazon EKS control plane.
-//
-// Second, a [Manifest] containing the activationID and activationCode must be applied to
-// the Kubernetes cluster through it's native provider to provide visibility.
-//
-// After the manifest is updated and applied, the connected cluster is visible to
-// the Amazon EKS control plane. If the manifest isn't applied within three days,
-// the connected cluster will no longer be visible and must be deregistered using
-// DeregisterCluster .
-//
-// [RegisterClusterRequest]: https://docs.aws.amazon.com/eks/latest/APIReference/API_RegisterClusterRequest.html
-// [Manifest]: https://amazon-eks.s3.us-west-2.amazonaws.com/eks-connector/manifests/eks-connector/latest/eks-connector.yaml
-func (c *Client) RegisterCluster(ctx context.Context, params *RegisterClusterInput, optFns ...func(*Options)) (*RegisterClusterOutput, error) {
- if params == nil {
- params = &RegisterClusterInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "RegisterCluster", params, optFns, c.addOperationRegisterClusterMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*RegisterClusterOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type RegisterClusterInput struct {
-
- // The configuration settings required to connect the Kubernetes cluster to the
- // Amazon EKS control plane.
- //
- // This member is required.
- ConnectorConfig *types.ConnectorConfigRequest
-
- // A unique name for this cluster in your Amazon Web Services Region.
- //
- // This member is required.
- Name *string
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request.
- ClientRequestToken *string
-
- // Metadata that assists with categorization and organization. Each tag consists
- // of a key and an optional value. You define both. Tags don't propagate to any
- // other cluster or Amazon Web Services resources.
- Tags map[string]string
-
- noSmithyDocumentSerde
-}
-
-type RegisterClusterOutput struct {
-
- // An object representing an Amazon EKS cluster.
- Cluster *types.Cluster
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationRegisterClusterMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpRegisterCluster{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRegisterCluster{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "RegisterCluster"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opRegisterClusterMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpRegisterClusterValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterCluster(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpRegisterCluster struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpRegisterCluster) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpRegisterCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*RegisterClusterInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *RegisterClusterInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opRegisterClusterMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpRegisterCluster{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opRegisterCluster(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "RegisterCluster",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_StartInsightsRefresh.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_StartInsightsRefresh.go
deleted file mode 100644
index ecf9bb9b9f56..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_StartInsightsRefresh.go
+++ /dev/null
@@ -1,161 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Initiates an on-demand refresh operation for cluster insights, getting the
-// latest analysis outside of the standard refresh schedule.
-func (c *Client) StartInsightsRefresh(ctx context.Context, params *StartInsightsRefreshInput, optFns ...func(*Options)) (*StartInsightsRefreshOutput, error) {
- if params == nil {
- params = &StartInsightsRefreshInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "StartInsightsRefresh", params, optFns, c.addOperationStartInsightsRefreshMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*StartInsightsRefreshOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type StartInsightsRefreshInput struct {
-
- // The name of the cluster for the refresh insights operation.
- //
- // This member is required.
- ClusterName *string
-
- noSmithyDocumentSerde
-}
-
-type StartInsightsRefreshOutput struct {
-
- // The message associated with the insights refresh operation.
- Message *string
-
- // The current status of the insights refresh operation.
- Status types.InsightsRefreshStatus
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationStartInsightsRefreshMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpStartInsightsRefresh{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartInsightsRefresh{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "StartInsightsRefresh"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpStartInsightsRefreshValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartInsightsRefresh(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opStartInsightsRefresh(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "StartInsightsRefresh",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_TagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_TagResource.go
deleted file mode 100644
index 23c6f393d9ed..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_TagResource.go
+++ /dev/null
@@ -1,165 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Associates the specified tags to an Amazon EKS resource with the specified
-// resourceArn . If existing tags on a resource are not specified in the request
-// parameters, they aren't changed. When a resource is deleted, the tags associated
-// with that resource are also deleted. Tags that you create for Amazon EKS
-// resources don't propagate to any other resources associated with the cluster.
-// For example, if you tag a cluster with this operation, that tag doesn't
-// automatically propagate to the subnets and nodes associated with the cluster.
-func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) {
- if params == nil {
- params = &TagResourceInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*TagResourceOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type TagResourceInput struct {
-
- // The Amazon Resource Name (ARN) of the resource to add tags to.
- //
- // This member is required.
- ResourceArn *string
-
- // Metadata that assists with categorization and organization. Each tag consists
- // of a key and an optional value. You define both. Tags don't propagate to any
- // other cluster or Amazon Web Services resources.
- //
- // This member is required.
- Tags map[string]string
-
- noSmithyDocumentSerde
-}
-
-type TagResourceOutput struct {
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "TagResource"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpTagResourceValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "TagResource",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UntagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UntagResource.go
deleted file mode 100644
index 4e97988d7f52..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UntagResource.go
+++ /dev/null
@@ -1,157 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Deletes specified tags from an Amazon EKS resource.
-func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) {
- if params == nil {
- params = &UntagResourceInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*UntagResourceOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type UntagResourceInput struct {
-
- // The Amazon Resource Name (ARN) of the resource to delete tags from.
- //
- // This member is required.
- ResourceArn *string
-
- // The keys of the tags to remove.
- //
- // This member is required.
- TagKeys []string
-
- noSmithyDocumentSerde
-}
-
-type UntagResourceOutput struct {
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "UntagResource"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpUntagResourceValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "UntagResource",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateAccessEntry.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateAccessEntry.go
deleted file mode 100644
index 1e0f40c6d99d..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateAccessEntry.go
+++ /dev/null
@@ -1,231 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Updates an access entry.
-func (c *Client) UpdateAccessEntry(ctx context.Context, params *UpdateAccessEntryInput, optFns ...func(*Options)) (*UpdateAccessEntryOutput, error) {
- if params == nil {
- params = &UpdateAccessEntryInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "UpdateAccessEntry", params, optFns, c.addOperationUpdateAccessEntryMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*UpdateAccessEntryOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type UpdateAccessEntryInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The ARN of the IAM principal for the AccessEntry .
- //
- // This member is required.
- PrincipalArn *string
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request.
- ClientRequestToken *string
-
- // The value for name that you've specified for kind: Group as a subject in a
- // Kubernetes RoleBinding or ClusterRoleBinding object. Amazon EKS doesn't confirm
- // that the value for name exists in any bindings on your cluster. You can specify
- // one or more names.
- //
- // Kubernetes authorizes the principalArn of the access entry to access any
- // cluster objects that you've specified in a Kubernetes Role or ClusterRole
- // object that is also specified in a binding's roleRef . For more information
- // about creating Kubernetes RoleBinding , ClusterRoleBinding , Role , or
- // ClusterRole objects, see [Using RBAC Authorization in the Kubernetes documentation].
- //
- // If you want Amazon EKS to authorize the principalArn (instead of, or in
- // addition to Kubernetes authorizing the principalArn ), you can associate one or
- // more access policies to the access entry using AssociateAccessPolicy . If you
- // associate any access policies, the principalARN has all permissions assigned in
- // the associated access policies and all permissions in any Kubernetes Role or
- // ClusterRole objects that the group names are bound to.
- //
- // [Using RBAC Authorization in the Kubernetes documentation]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/
- KubernetesGroups []string
-
- // The username to authenticate to Kubernetes with. We recommend not specifying a
- // username and letting Amazon EKS specify it for you. For more information about
- // the value Amazon EKS specifies for you, or constraints before specifying your
- // own username, see [Creating access entries]in the Amazon EKS User Guide.
- //
- // [Creating access entries]: https://docs.aws.amazon.com/eks/latest/userguide/access-entries.html#creating-access-entries
- Username *string
-
- noSmithyDocumentSerde
-}
-
-type UpdateAccessEntryOutput struct {
-
- // The ARN of the IAM principal for the AccessEntry .
- AccessEntry *types.AccessEntry
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationUpdateAccessEntryMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateAccessEntry{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateAccessEntry{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateAccessEntry"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opUpdateAccessEntryMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpUpdateAccessEntryValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccessEntry(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpUpdateAccessEntry struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpUpdateAccessEntry) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpUpdateAccessEntry) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*UpdateAccessEntryInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateAccessEntryInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opUpdateAccessEntryMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateAccessEntry{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opUpdateAccessEntry(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "UpdateAccessEntry",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateAddon.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateAddon.go
deleted file mode 100644
index eb849fc1a7e0..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateAddon.go
+++ /dev/null
@@ -1,254 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Updates an Amazon EKS add-on.
-func (c *Client) UpdateAddon(ctx context.Context, params *UpdateAddonInput, optFns ...func(*Options)) (*UpdateAddonOutput, error) {
- if params == nil {
- params = &UpdateAddonInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "UpdateAddon", params, optFns, c.addOperationUpdateAddonMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*UpdateAddonOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type UpdateAddonInput struct {
-
- // The name of the add-on. The name must match one of the names returned by [ListAddons]
- // ListAddons .
- //
- // [ListAddons]: https://docs.aws.amazon.com/eks/latest/APIReference/API_ListAddons.html
- //
- // This member is required.
- AddonName *string
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The version of the add-on. The version must match one of the versions returned
- // by [DescribeAddonVersions]DescribeAddonVersions .
- //
- // [DescribeAddonVersions]: https://docs.aws.amazon.com/eks/latest/APIReference/API_DescribeAddonVersions.html
- AddonVersion *string
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request.
- ClientRequestToken *string
-
- // The set of configuration values for the add-on that's created. The values that
- // you provide are validated against the schema returned by
- // DescribeAddonConfiguration .
- ConfigurationValues *string
-
- // An array of EKS Pod Identity associations to be updated. Each association maps
- // a Kubernetes service account to an IAM role. If this value is left blank, no
- // change. If an empty array is provided, existing associations owned by the add-on
- // are deleted.
- //
- // For more information, see [Attach an IAM Role to an Amazon EKS add-on using EKS Pod Identity] in the Amazon EKS User Guide.
- //
- // [Attach an IAM Role to an Amazon EKS add-on using EKS Pod Identity]: https://docs.aws.amazon.com/eks/latest/userguide/add-ons-iam.html
- PodIdentityAssociations []types.AddonPodIdentityAssociations
-
- // How to resolve field value conflicts for an Amazon EKS add-on if you've changed
- // a value from the Amazon EKS default value. Conflicts are handled based on the
- // option you choose:
- //
- // - None – Amazon EKS doesn't change the value. The update might fail.
- //
- // - Overwrite – Amazon EKS overwrites the changed value back to the Amazon EKS
- // default value.
- //
- // - Preserve – Amazon EKS preserves the value. If you choose this option, we
- // recommend that you test any field and value changes on a non-production cluster
- // before updating the add-on on your production cluster.
- ResolveConflicts types.ResolveConflicts
-
- // The Amazon Resource Name (ARN) of an existing IAM role to bind to the add-on's
- // service account. The role must be assigned the IAM permissions required by the
- // add-on. If you don't specify an existing IAM role, then the add-on uses the
- // permissions assigned to the node IAM role. For more information, see [Amazon EKS node IAM role]in the
- // Amazon EKS User Guide.
- //
- // To specify an existing IAM role, you must have an IAM OpenID Connect (OIDC)
- // provider created for your cluster. For more information, see [Enabling IAM roles for service accounts on your cluster]in the Amazon EKS
- // User Guide.
- //
- // [Enabling IAM roles for service accounts on your cluster]: https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html
- // [Amazon EKS node IAM role]: https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html
- ServiceAccountRoleArn *string
-
- noSmithyDocumentSerde
-}
-
-type UpdateAddonOutput struct {
-
- // An object representing an asynchronous update.
- Update *types.Update
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationUpdateAddonMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateAddon{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateAddon{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateAddon"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opUpdateAddonMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpUpdateAddonValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAddon(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpUpdateAddon struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpUpdateAddon) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpUpdateAddon) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*UpdateAddonInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateAddonInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opUpdateAddonMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateAddon{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opUpdateAddon(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "UpdateAddon",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateCapability.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateCapability.go
deleted file mode 100644
index 8bde094521e7..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateCapability.go
+++ /dev/null
@@ -1,223 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Updates the configuration of a managed capability in your Amazon EKS cluster.
-// You can update the IAM role, configuration settings, and delete propagation
-// policy for a capability.
-//
-// When you update a capability, Amazon EKS applies the changes and may restart
-// capability components as needed. The capability remains available during the
-// update process, but some operations may be temporarily unavailable.
-func (c *Client) UpdateCapability(ctx context.Context, params *UpdateCapabilityInput, optFns ...func(*Options)) (*UpdateCapabilityOutput, error) {
- if params == nil {
- params = &UpdateCapabilityInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "UpdateCapability", params, optFns, c.addOperationUpdateCapabilityMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*UpdateCapabilityOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type UpdateCapabilityInput struct {
-
- // The name of the capability to update configuration for.
- //
- // This member is required.
- CapabilityName *string
-
- // The name of the Amazon EKS cluster that contains the capability you want to
- // update configuration for.
- //
- // This member is required.
- ClusterName *string
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request. This token is valid for 24 hours after creation.
- ClientRequestToken *string
-
- // The updated configuration settings for the capability. You only need to specify
- // the configuration parameters you want to change. For Argo CD capabilities, you
- // can update RBAC role mappings and network access settings.
- Configuration *types.UpdateCapabilityConfiguration
-
- // The updated delete propagation policy for the capability. Currently, the only
- // supported value is RETAIN .
- DeletePropagationPolicy types.CapabilityDeletePropagationPolicy
-
- // The Amazon Resource Name (ARN) of the IAM role that the capability uses to
- // interact with Amazon Web Services services. If you specify a new role ARN, the
- // capability will start using the new role for all subsequent operations.
- RoleArn *string
-
- noSmithyDocumentSerde
-}
-
-type UpdateCapabilityOutput struct {
-
- // An object representing an asynchronous update.
- Update *types.Update
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationUpdateCapabilityMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateCapability{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateCapability{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateCapability"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opUpdateCapabilityMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpUpdateCapabilityValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateCapability(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpUpdateCapability struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpUpdateCapability) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpUpdateCapability) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*UpdateCapabilityInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateCapabilityInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opUpdateCapabilityMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateCapability{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opUpdateCapability(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "UpdateCapability",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateClusterConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateClusterConfig.go
deleted file mode 100644
index fd179254da27..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateClusterConfig.go
+++ /dev/null
@@ -1,309 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Updates an Amazon EKS cluster configuration. Your cluster continues to function
-// during the update. The response output includes an update ID that you can use to
-// track the status of your cluster update with DescribeUpdate .
-//
-// You can use this operation to do the following actions:
-//
-// - You can use this API operation to enable or disable exporting the
-// Kubernetes control plane logs for your cluster to CloudWatch Logs. By default,
-// cluster control plane logs aren't exported to CloudWatch Logs. For more
-// information, see [Amazon EKS Cluster control plane logs]in the Amazon EKS User Guide .
-//
-// CloudWatch Logs ingestion, archive storage, and data scanning rates apply to
-//
-// exported control plane logs. For more information, see [CloudWatch Pricing].
-//
-// - You can also use this API operation to enable or disable public and private
-// access to your cluster's Kubernetes API server endpoint. By default, public
-// access is enabled, and private access is disabled. For more information, see [Cluster API server endpoint]
-// in the Amazon EKS User Guide .
-//
-// - You can also use this API operation to choose different subnets and
-// security groups for the cluster. You must specify at least two subnets that are
-// in different Availability Zones. You can't change which VPC the subnets are
-// from, the subnets must be in the same VPC as the subnets that the cluster was
-// created with. For more information about the VPC requirements, see [https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html]in the
-// Amazon EKS User Guide .
-//
-// - You can also use this API operation to enable or disable ARC zonal shift.
-// If zonal shift is enabled, Amazon Web Services configures zonal autoshift for
-// the cluster.
-//
-// - You can also use this API operation to add, change, or remove the
-// configuration in the cluster for EKS Hybrid Nodes. To remove the configuration,
-// use the remoteNetworkConfig key with an object containing both subkeys with
-// empty arrays for each. Here is an inline example: "remoteNetworkConfig": {
-// "remoteNodeNetworks": [], "remotePodNetworks": [] } .
-//
-// Cluster updates are asynchronous, and they should finish within a few minutes.
-// During an update, the cluster status moves to UPDATING (this status transition
-// is eventually consistent). When the update is complete (either Failed or
-// Successful ), the cluster status moves to Active .
-//
-// [Amazon EKS Cluster control plane logs]: https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html
-//
-// [Cluster API server endpoint]: https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html
-// [CloudWatch Pricing]: http://aws.amazon.com/cloudwatch/pricing/
-// [https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html]: https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html
-func (c *Client) UpdateClusterConfig(ctx context.Context, params *UpdateClusterConfigInput, optFns ...func(*Options)) (*UpdateClusterConfigOutput, error) {
- if params == nil {
- params = &UpdateClusterConfigInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "UpdateClusterConfig", params, optFns, c.addOperationUpdateClusterConfigMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*UpdateClusterConfigOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type UpdateClusterConfigInput struct {
-
- // The name of the Amazon EKS cluster to update.
- //
- // This member is required.
- Name *string
-
- // The access configuration for the cluster.
- AccessConfig *types.UpdateAccessConfigRequest
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request.
- ClientRequestToken *string
-
- // Update the configuration of the compute capability of your EKS Auto Mode
- // cluster. For example, enable the capability.
- ComputeConfig *types.ComputeConfigRequest
-
- // The control plane scaling tier configuration. For more information, see EKS
- // Provisioned Control Plane in the Amazon EKS User Guide.
- ControlPlaneScalingConfig *types.ControlPlaneScalingConfig
-
- // Specifies whether to enable or disable deletion protection for the cluster.
- // When enabled ( true ), the cluster cannot be deleted until deletion protection
- // is explicitly disabled. When disabled ( false ), the cluster can be deleted
- // normally.
- DeletionProtection *bool
-
- // The Kubernetes network configuration for the cluster.
- KubernetesNetworkConfig *types.KubernetesNetworkConfigRequest
-
- // Enable or disable exporting the Kubernetes control plane logs for your cluster
- // to CloudWatch Logs . By default, cluster control plane logs aren't exported to
- // CloudWatch Logs . For more information, see [Amazon EKS cluster control plane logs]in the Amazon EKS User Guide .
- //
- // CloudWatch Logs ingestion, archive storage, and data scanning rates apply to
- // exported control plane logs. For more information, see [CloudWatch Pricing].
- //
- // [CloudWatch Pricing]: http://aws.amazon.com/cloudwatch/pricing/
- // [Amazon EKS cluster control plane logs]: https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html
- Logging *types.Logging
-
- // The configuration in the cluster for EKS Hybrid Nodes. You can add, change, or
- // remove this configuration after the cluster is created.
- RemoteNetworkConfig *types.RemoteNetworkConfigRequest
-
- // An object representing the VPC configuration to use for an Amazon EKS cluster.
- ResourcesVpcConfig *types.VpcConfigRequest
-
- // Update the configuration of the block storage capability of your EKS Auto Mode
- // cluster. For example, enable the capability.
- StorageConfig *types.StorageConfigRequest
-
- // You can enable or disable extended support for clusters currently on standard
- // support. You cannot disable extended support once it starts. You must enable
- // extended support before your cluster exits standard support.
- UpgradePolicy *types.UpgradePolicyRequest
-
- // Enable or disable ARC zonal shift for the cluster. If zonal shift is enabled,
- // Amazon Web Services configures zonal autoshift for the cluster.
- //
- // Zonal shift is a feature of Amazon Application Recovery Controller (ARC). ARC
- // zonal shift is designed to be a temporary measure that allows you to move
- // traffic for a resource away from an impaired AZ until the zonal shift expires or
- // you cancel it. You can extend the zonal shift if necessary.
- //
- // You can start a zonal shift for an EKS cluster, or you can allow Amazon Web
- // Services to do it for you by enabling zonal autoshift. This shift updates the
- // flow of east-to-west network traffic in your cluster to only consider network
- // endpoints for Pods running on worker nodes in healthy AZs. Additionally, any ALB
- // or NLB handling ingress traffic for applications in your EKS cluster will
- // automatically route traffic to targets in the healthy AZs. For more information
- // about zonal shift in EKS, see [Learn about Amazon Application Recovery Controller (ARC) Zonal Shift in Amazon EKS]in the Amazon EKS User Guide .
- //
- // [Learn about Amazon Application Recovery Controller (ARC) Zonal Shift in Amazon EKS]: https://docs.aws.amazon.com/eks/latest/userguide/zone-shift.html
- ZonalShiftConfig *types.ZonalShiftConfigRequest
-
- noSmithyDocumentSerde
-}
-
-type UpdateClusterConfigOutput struct {
-
- // An object representing an asynchronous update.
- Update *types.Update
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationUpdateClusterConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateClusterConfig{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateClusterConfig{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateClusterConfig"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opUpdateClusterConfigMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpUpdateClusterConfigValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateClusterConfig(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpUpdateClusterConfig struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpUpdateClusterConfig) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpUpdateClusterConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*UpdateClusterConfigInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateClusterConfigInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opUpdateClusterConfigMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateClusterConfig{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opUpdateClusterConfig(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "UpdateClusterConfig",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateClusterVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateClusterVersion.go
deleted file mode 100644
index 33a371e081c7..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateClusterVersion.go
+++ /dev/null
@@ -1,220 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Updates an Amazon EKS cluster to the specified Kubernetes version. Your cluster
-// continues to function during the update. The response output includes an update
-// ID that you can use to track the status of your cluster update with the [DescribeUpdate]
-// DescribeUpdate API operation.
-//
-// Cluster updates are asynchronous, and they should finish within a few minutes.
-// During an update, the cluster status moves to UPDATING (this status transition
-// is eventually consistent). When the update is complete (either Failed or
-// Successful ), the cluster status moves to Active .
-//
-// If your cluster has managed node groups attached to it, all of your node
-// groups' Kubernetes versions must match the cluster's Kubernetes version in order
-// to update the cluster to a new Kubernetes version.
-//
-// [DescribeUpdate]: https://docs.aws.amazon.com/eks/latest/APIReference/API_DescribeUpdate.html
-func (c *Client) UpdateClusterVersion(ctx context.Context, params *UpdateClusterVersionInput, optFns ...func(*Options)) (*UpdateClusterVersionOutput, error) {
- if params == nil {
- params = &UpdateClusterVersionInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "UpdateClusterVersion", params, optFns, c.addOperationUpdateClusterVersionMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*UpdateClusterVersionOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type UpdateClusterVersionInput struct {
-
- // The name of the Amazon EKS cluster to update.
- //
- // This member is required.
- Name *string
-
- // The desired Kubernetes version following a successful update.
- //
- // This member is required.
- Version *string
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request.
- ClientRequestToken *string
-
- // Set this value to true to override upgrade-blocking readiness checks when
- // updating a cluster.
- Force bool
-
- noSmithyDocumentSerde
-}
-
-type UpdateClusterVersionOutput struct {
-
- // The full description of the specified update
- Update *types.Update
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationUpdateClusterVersionMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateClusterVersion{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateClusterVersion{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateClusterVersion"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opUpdateClusterVersionMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpUpdateClusterVersionValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateClusterVersion(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpUpdateClusterVersion struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpUpdateClusterVersion) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpUpdateClusterVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*UpdateClusterVersionInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateClusterVersionInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opUpdateClusterVersionMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateClusterVersion{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opUpdateClusterVersion(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "UpdateClusterVersion",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateEksAnywhereSubscription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateEksAnywhereSubscription.go
deleted file mode 100644
index 553a643c0e3f..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateEksAnywhereSubscription.go
+++ /dev/null
@@ -1,202 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Update an EKS Anywhere Subscription. Only auto renewal and tags can be updated
-// after subscription creation.
-func (c *Client) UpdateEksAnywhereSubscription(ctx context.Context, params *UpdateEksAnywhereSubscriptionInput, optFns ...func(*Options)) (*UpdateEksAnywhereSubscriptionOutput, error) {
- if params == nil {
- params = &UpdateEksAnywhereSubscriptionInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "UpdateEksAnywhereSubscription", params, optFns, c.addOperationUpdateEksAnywhereSubscriptionMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*UpdateEksAnywhereSubscriptionOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type UpdateEksAnywhereSubscriptionInput struct {
-
- // A boolean indicating whether or not to automatically renew the subscription.
- //
- // This member is required.
- AutoRenew bool
-
- // The ID of the subscription.
- //
- // This member is required.
- Id *string
-
- // Unique, case-sensitive identifier to ensure the idempotency of the request.
- ClientRequestToken *string
-
- noSmithyDocumentSerde
-}
-
-type UpdateEksAnywhereSubscriptionOutput struct {
-
- // The full description of the updated subscription.
- Subscription *types.EksAnywhereSubscription
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationUpdateEksAnywhereSubscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateEksAnywhereSubscription{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateEksAnywhereSubscription{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateEksAnywhereSubscription"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opUpdateEksAnywhereSubscriptionMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpUpdateEksAnywhereSubscriptionValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEksAnywhereSubscription(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpUpdateEksAnywhereSubscription struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpUpdateEksAnywhereSubscription) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpUpdateEksAnywhereSubscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*UpdateEksAnywhereSubscriptionInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateEksAnywhereSubscriptionInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opUpdateEksAnywhereSubscriptionMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateEksAnywhereSubscription{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opUpdateEksAnywhereSubscription(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "UpdateEksAnywhereSubscription",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateNodegroupConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateNodegroupConfig.go
deleted file mode 100644
index 9a09c2504125..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateNodegroupConfig.go
+++ /dev/null
@@ -1,226 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Updates an Amazon EKS managed node group configuration. Your node group
-// continues to function during the update. The response output includes an update
-// ID that you can use to track the status of your node group update with the [DescribeUpdate]
-// DescribeUpdate API operation. You can update the Kubernetes labels and taints
-// for a node group and the scaling and version update configuration.
-//
-// [DescribeUpdate]: https://docs.aws.amazon.com/eks/latest/APIReference/API_DescribeUpdate.html
-func (c *Client) UpdateNodegroupConfig(ctx context.Context, params *UpdateNodegroupConfigInput, optFns ...func(*Options)) (*UpdateNodegroupConfigOutput, error) {
- if params == nil {
- params = &UpdateNodegroupConfigInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "UpdateNodegroupConfig", params, optFns, c.addOperationUpdateNodegroupConfigMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*UpdateNodegroupConfigOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type UpdateNodegroupConfigInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The name of the managed node group to update.
- //
- // This member is required.
- NodegroupName *string
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request.
- ClientRequestToken *string
-
- // The Kubernetes labels to apply to the nodes in the node group after the update.
- Labels *types.UpdateLabelsPayload
-
- // The node auto repair configuration for the node group.
- NodeRepairConfig *types.NodeRepairConfig
-
- // The scaling configuration details for the Auto Scaling group after the update.
- ScalingConfig *types.NodegroupScalingConfig
-
- // The Kubernetes taints to be applied to the nodes in the node group after the
- // update. For more information, see [Node taints on managed node groups].
- //
- // [Node taints on managed node groups]: https://docs.aws.amazon.com/eks/latest/userguide/node-taints-managed-node-groups.html
- Taints *types.UpdateTaintsPayload
-
- // The node group update configuration.
- UpdateConfig *types.NodegroupUpdateConfig
-
- noSmithyDocumentSerde
-}
-
-type UpdateNodegroupConfigOutput struct {
-
- // An object representing an asynchronous update.
- Update *types.Update
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationUpdateNodegroupConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateNodegroupConfig{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateNodegroupConfig{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateNodegroupConfig"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opUpdateNodegroupConfigMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpUpdateNodegroupConfigValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateNodegroupConfig(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpUpdateNodegroupConfig struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpUpdateNodegroupConfig) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpUpdateNodegroupConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*UpdateNodegroupConfigInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateNodegroupConfigInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opUpdateNodegroupConfigMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateNodegroupConfig{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opUpdateNodegroupConfig(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "UpdateNodegroupConfig",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateNodegroupVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateNodegroupVersion.go
deleted file mode 100644
index 5dec84bb8f51..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdateNodegroupVersion.go
+++ /dev/null
@@ -1,274 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Updates the Kubernetes version or AMI version of an Amazon EKS managed node
-// group.
-//
-// You can update a node group using a launch template only if the node group was
-// originally deployed with a launch template. Additionally, the launch template ID
-// or name must match what was used when the node group was created. You can update
-// the launch template version with necessary changes.
-//
-// If you need to update a custom AMI in a node group that was deployed with a
-// launch template, then update your custom AMI, specify the new ID in a new
-// version of the launch template, and then update the node group to the new
-// version of the launch template.
-//
-// If you update without a launch template, then you can update to the latest
-// available AMI version of a node group's current Kubernetes version by not
-// specifying a Kubernetes version in the request. You can update to the latest AMI
-// version of your cluster's current Kubernetes version by specifying your
-// cluster's Kubernetes version in the request. For information about Linux
-// versions, see [Amazon EKS optimized Amazon Linux AMI versions]in the Amazon EKS User Guide. For information about Windows
-// versions, see [Amazon EKS optimized Windows AMI versions]in the Amazon EKS User Guide.
-//
-// You cannot roll back a node group to an earlier Kubernetes version or AMI
-// version.
-//
-// When a node in a managed node group is terminated due to a scaling action or
-// update, every Pod on that node is drained first. Amazon EKS attempts to drain
-// the nodes gracefully and will fail if it is unable to do so. You can force the
-// update if Amazon EKS is unable to drain the nodes as a result of a Pod
-// disruption budget issue.
-//
-// [Amazon EKS optimized Amazon Linux AMI versions]: https://docs.aws.amazon.com/eks/latest/userguide/eks-linux-ami-versions.html
-// [Amazon EKS optimized Windows AMI versions]: https://docs.aws.amazon.com/eks/latest/userguide/eks-ami-versions-windows.html
-func (c *Client) UpdateNodegroupVersion(ctx context.Context, params *UpdateNodegroupVersionInput, optFns ...func(*Options)) (*UpdateNodegroupVersionOutput, error) {
- if params == nil {
- params = &UpdateNodegroupVersionInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "UpdateNodegroupVersion", params, optFns, c.addOperationUpdateNodegroupVersionMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*UpdateNodegroupVersionOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type UpdateNodegroupVersionInput struct {
-
- // The name of your cluster.
- //
- // This member is required.
- ClusterName *string
-
- // The name of the managed node group to update.
- //
- // This member is required.
- NodegroupName *string
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request.
- ClientRequestToken *string
-
- // Force the update if any Pod on the existing node group can't be drained due to
- // a Pod disruption budget issue. If an update fails because all Pods can't be
- // drained, you can force the update after it fails to terminate the old node
- // whether or not any Pod is running on the node.
- Force bool
-
- // An object representing a node group's launch template specification. You can
- // only update a node group using a launch template if the node group was
- // originally deployed with a launch template. When updating, you must specify the
- // same launch template ID or name that was used to create the node group.
- LaunchTemplate *types.LaunchTemplateSpecification
-
- // The AMI version of the Amazon EKS optimized AMI to use for the update. By
- // default, the latest available AMI version for the node group's Kubernetes
- // version is used. For information about Linux versions, see [Amazon EKS optimized Amazon Linux AMI versions]in the Amazon EKS
- // User Guide. Amazon EKS managed node groups support the November 2022 and later
- // releases of the Windows AMIs. For information about Windows versions, see [Amazon EKS optimized Windows AMI versions]in
- // the Amazon EKS User Guide.
- //
- // If you specify launchTemplate , and your launch template uses a custom AMI, then
- // don't specify releaseVersion , or the node group update will fail. For more
- // information about using launch templates with Amazon EKS, see [Customizing managed nodes with launch templates]in the Amazon EKS
- // User Guide.
- //
- // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html
- // [Amazon EKS optimized Amazon Linux AMI versions]: https://docs.aws.amazon.com/eks/latest/userguide/eks-linux-ami-versions.html
- // [Amazon EKS optimized Windows AMI versions]: https://docs.aws.amazon.com/eks/latest/userguide/eks-ami-versions-windows.html
- ReleaseVersion *string
-
- // The Kubernetes version to update to. If no version is specified, then the node
- // group will be updated to match the cluster's current Kubernetes version, and the
- // latest available AMI for that version will be used. You can also specify the
- // Kubernetes version of the cluster to update the node group to the latest AMI
- // version of the cluster's Kubernetes version. If you specify launchTemplate , and
- // your launch template uses a custom AMI, then don't specify version , or the node
- // group update will fail. For more information about using launch templates with
- // Amazon EKS, see [Customizing managed nodes with launch templates]in the Amazon EKS User Guide.
- //
- // [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html
- Version *string
-
- noSmithyDocumentSerde
-}
-
-type UpdateNodegroupVersionOutput struct {
-
- // An object representing an asynchronous update.
- Update *types.Update
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationUpdateNodegroupVersionMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateNodegroupVersion{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateNodegroupVersion{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateNodegroupVersion"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opUpdateNodegroupVersionMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpUpdateNodegroupVersionValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateNodegroupVersion(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpUpdateNodegroupVersion struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpUpdateNodegroupVersion) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpUpdateNodegroupVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*UpdateNodegroupVersionInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateNodegroupVersionInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opUpdateNodegroupVersionMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateNodegroupVersion{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opUpdateNodegroupVersion(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "UpdateNodegroupVersion",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdatePodIdentityAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdatePodIdentityAssociation.go
deleted file mode 100644
index 5e07eac2dbaa..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_UpdatePodIdentityAssociation.go
+++ /dev/null
@@ -1,262 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Updates a EKS Pod Identity association. In an update, you can change the IAM
-// role, the target IAM role, or disableSessionTags . You must change at least one
-// of these in an update. An association can't be moved between clusters,
-// namespaces, or service accounts. If you need to edit the namespace or service
-// account, you need to delete the association and then create a new association
-// with your desired settings.
-//
-// Similar to Amazon Web Services IAM behavior, EKS Pod Identity associations are
-// eventually consistent, and may take several seconds to be effective after the
-// initial API call returns successfully. You must design your applications to
-// account for these potential delays. We recommend that you don’t include
-// association create/updates in the critical, high-availability code paths of your
-// application. Instead, make changes in a separate initialization or setup routine
-// that you run less frequently.
-//
-// You can set a target IAM role in the same or a different account for advanced
-// scenarios. With a target role, EKS Pod Identity automatically performs two role
-// assumptions in sequence: first assuming the role in the association that is in
-// this account, then using those credentials to assume the target IAM role. This
-// process provides your Pod with temporary credentials that have the permissions
-// defined in the target role, allowing secure access to resources in another
-// Amazon Web Services account.
-func (c *Client) UpdatePodIdentityAssociation(ctx context.Context, params *UpdatePodIdentityAssociationInput, optFns ...func(*Options)) (*UpdatePodIdentityAssociationOutput, error) {
- if params == nil {
- params = &UpdatePodIdentityAssociationInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "UpdatePodIdentityAssociation", params, optFns, c.addOperationUpdatePodIdentityAssociationMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*UpdatePodIdentityAssociationOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type UpdatePodIdentityAssociationInput struct {
-
- // The ID of the association to be updated.
- //
- // This member is required.
- AssociationId *string
-
- // The name of the cluster that you want to update the association in.
- //
- // This member is required.
- ClusterName *string
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request.
- ClientRequestToken *string
-
- // Disable the automatic sessions tags that are appended by EKS Pod Identity.
- //
- // EKS Pod Identity adds a pre-defined set of session tags when it assumes the
- // role. You can use these tags to author a single role that can work across
- // resources by allowing access to Amazon Web Services resources based on matching
- // tags. By default, EKS Pod Identity attaches six tags, including tags for cluster
- // name, namespace, and service account name. For the list of tags added by EKS Pod
- // Identity, see [List of session tags added by EKS Pod Identity]in the Amazon EKS User Guide.
- //
- // Amazon Web Services compresses inline session policies, managed policy ARNs,
- // and session tags into a packed binary format that has a separate limit. If you
- // receive a PackedPolicyTooLarge error indicating the packed binary format has
- // exceeded the size limit, you can attempt to reduce the size by disabling the
- // session tags added by EKS Pod Identity.
- //
- // [List of session tags added by EKS Pod Identity]: https://docs.aws.amazon.com/eks/latest/userguide/pod-id-abac.html#pod-id-abac-tags
- DisableSessionTags *bool
-
- // The new IAM role to change in the association.
- RoleArn *string
-
- // The Amazon Resource Name (ARN) of the target IAM role to associate with the
- // service account. This role is assumed by using the EKS Pod Identity association
- // role, then the credentials for this role are injected into the Pod.
- //
- // When you run applications on Amazon EKS, your application might need to access
- // Amazon Web Services resources from a different role that exists in the same or
- // different Amazon Web Services account. For example, your application running in
- // “Account A” might need to access resources, such as buckets in “Account B” or
- // within “Account A” itself. You can create a association to access Amazon Web
- // Services resources in “Account B” by creating two IAM roles: a role in “Account
- // A” and a role in “Account B” (which can be the same or different account), each
- // with the necessary trust and permission policies. After you provide these roles
- // in the IAM role and Target IAM role fields, EKS will perform role chaining to
- // ensure your application gets the required permissions. This means Role A will
- // assume Role B, allowing your Pods to securely access resources like S3 buckets
- // in the target account.
- TargetRoleArn *string
-
- noSmithyDocumentSerde
-}
-
-type UpdatePodIdentityAssociationOutput struct {
-
- // The full description of the association that was updated.
- Association *types.PodIdentityAssociation
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationUpdatePodIdentityAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdatePodIdentityAssociation{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdatePodIdentityAssociation{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "UpdatePodIdentityAssociation"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addTimeOffsetBuild(stack, c); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addIdempotencyToken_opUpdatePodIdentityAssociationMiddleware(stack, options); err != nil {
- return err
- }
- if err = addOpUpdatePodIdentityAssociationValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdatePodIdentityAssociation(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-type idempotencyToken_initializeOpUpdatePodIdentityAssociation struct {
- tokenProvider IdempotencyTokenProvider
-}
-
-func (*idempotencyToken_initializeOpUpdatePodIdentityAssociation) ID() string {
- return "OperationIdempotencyTokenAutoFill"
-}
-
-func (m *idempotencyToken_initializeOpUpdatePodIdentityAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.tokenProvider == nil {
- return next.HandleInitialize(ctx, in)
- }
-
- input, ok := in.Parameters.(*UpdatePodIdentityAssociationInput)
- if !ok {
- return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdatePodIdentityAssociationInput ")
- }
-
- if input.ClientRequestToken == nil {
- t, err := m.tokenProvider.GetIdempotencyToken()
- if err != nil {
- return out, metadata, err
- }
- input.ClientRequestToken = &t
- }
- return next.HandleInitialize(ctx, in)
-}
-func addIdempotencyToken_opUpdatePodIdentityAssociationMiddleware(stack *middleware.Stack, cfg Options) error {
- return stack.Initialize.Add(&idempotencyToken_initializeOpUpdatePodIdentityAssociation{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
-}
-
-func newServiceMetadataMiddleware_opUpdatePodIdentityAssociation(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "UpdatePodIdentityAssociation",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/auth.go
deleted file mode 100644
index 0f2912da39d2..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/auth.go
+++ /dev/null
@@ -1,345 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- smithy "github.com/aws/smithy-go"
- smithyauth "github.com/aws/smithy-go/auth"
- "github.com/aws/smithy-go/metrics"
- "github.com/aws/smithy-go/middleware"
- "github.com/aws/smithy-go/tracing"
- smithyhttp "github.com/aws/smithy-go/transport/http"
- "slices"
- "strings"
-)
-
-func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) error {
- params.Region = options.Region
- return nil
-}
-
-type setLegacyContextSigningOptionsMiddleware struct {
-}
-
-func (*setLegacyContextSigningOptionsMiddleware) ID() string {
- return "setLegacyContextSigningOptions"
-}
-
-func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
- out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
-) {
- rscheme := getResolvedAuthScheme(ctx)
- schemeID := rscheme.Scheme.SchemeID()
-
- if sn := awsmiddleware.GetSigningName(ctx); sn != "" {
- if schemeID == "aws.auth#sigv4" {
- smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn)
- } else if schemeID == "aws.auth#sigv4a" {
- smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn)
- }
- }
-
- if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" {
- if schemeID == "aws.auth#sigv4" {
- smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr)
- } else if schemeID == "aws.auth#sigv4a" {
- smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr})
- }
- }
-
- return next.HandleFinalize(ctx, in)
-}
-
-func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error {
- return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before)
-}
-
-type withAnonymous struct {
- resolver AuthSchemeResolver
-}
-
-var _ AuthSchemeResolver = (*withAnonymous)(nil)
-
-func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) {
- opts, err := v.resolver.ResolveAuthSchemes(ctx, params)
- if err != nil {
- return nil, err
- }
-
- opts = append(opts, &smithyauth.Option{
- SchemeID: smithyauth.SchemeIDAnonymous,
- })
- return opts, nil
-}
-
-func wrapWithAnonymousAuth(options *Options) {
- if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok {
- return
- }
-
- options.AuthSchemeResolver = &withAnonymous{
- resolver: options.AuthSchemeResolver,
- }
-}
-
-// AuthResolverParameters contains the set of inputs necessary for auth scheme
-// resolution.
-type AuthResolverParameters struct {
- // The name of the operation being invoked.
- Operation string
-
- // The region in which the operation is being invoked.
- Region string
-}
-
-func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) (*AuthResolverParameters, error) {
- params := &AuthResolverParameters{
- Operation: operation,
- }
-
- if err := bindAuthParamsRegion(ctx, params, input, options); err != nil {
- return nil, err
- }
-
- return params, nil
-}
-
-// AuthSchemeResolver returns a set of possible authentication options for an
-// operation.
-type AuthSchemeResolver interface {
- ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error)
-}
-
-type defaultAuthSchemeResolver struct{}
-
-var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil)
-
-func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) {
- if overrides, ok := operationAuthOptions[params.Operation]; ok {
- return overrides(params), nil
- }
- return serviceAuthOptions(params), nil
-}
-
-var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{}
-
-func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option {
- return []*smithyauth.Option{
- {
- SchemeID: smithyauth.SchemeIDSigV4,
- SignerProperties: func() smithy.Properties {
- var props smithy.Properties
- smithyhttp.SetSigV4SigningName(&props, "eks")
- smithyhttp.SetSigV4SigningRegion(&props, params.Region)
- return props
- }(),
- },
- }
-}
-
-type resolveAuthSchemeMiddleware struct {
- operation string
- options Options
-}
-
-func (*resolveAuthSchemeMiddleware) ID() string {
- return "ResolveAuthScheme"
-}
-
-func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
- out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "ResolveAuthScheme")
- defer span.End()
-
- params, err := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options)
- if err != nil {
- return out, metadata, fmt.Errorf("bind auth scheme params: %w", err)
- }
- options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params)
- if err != nil {
- return out, metadata, fmt.Errorf("resolve auth scheme: %w", err)
- }
-
- scheme, ok := m.selectScheme(options)
- if !ok {
- return out, metadata, fmt.Errorf("could not select an auth scheme")
- }
-
- ctx = setResolvedAuthScheme(ctx, scheme)
-
- span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID())
- span.End()
- return next.HandleFinalize(ctx, in)
-}
-
-func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) {
- sorted := sortAuthOptions(options, m.options.AuthSchemePreference)
- for _, option := range sorted {
- if option.SchemeID == smithyauth.SchemeIDAnonymous {
- return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true
- }
-
- for _, scheme := range m.options.AuthSchemes {
- if scheme.SchemeID() != option.SchemeID {
- continue
- }
-
- if scheme.IdentityResolver(m.options) != nil {
- return newResolvedAuthScheme(scheme, option), true
- }
- }
- }
-
- return nil, false
-}
-
-func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option {
- byPriority := make([]*smithyauth.Option, 0, len(options))
- for _, prefName := range preferred {
- for _, option := range options {
- optName := option.SchemeID
- if parts := strings.Split(option.SchemeID, "#"); len(parts) == 2 {
- optName = parts[1]
- }
- if prefName == optName {
- byPriority = append(byPriority, option)
- }
- }
- }
- for _, option := range options {
- if !slices.ContainsFunc(byPriority, func(o *smithyauth.Option) bool {
- return o.SchemeID == option.SchemeID
- }) {
- byPriority = append(byPriority, option)
- }
- }
- return byPriority
-}
-
-type resolvedAuthSchemeKey struct{}
-
-type resolvedAuthScheme struct {
- Scheme smithyhttp.AuthScheme
- IdentityProperties smithy.Properties
- SignerProperties smithy.Properties
-}
-
-func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme {
- return &resolvedAuthScheme{
- Scheme: scheme,
- IdentityProperties: option.IdentityProperties,
- SignerProperties: option.SignerProperties,
- }
-}
-
-func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context {
- return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme)
-}
-
-func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme {
- v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme)
- return v
-}
-
-type getIdentityMiddleware struct {
- options Options
-}
-
-func (*getIdentityMiddleware) ID() string {
- return "GetIdentity"
-}
-
-func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
- out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
-) {
- innerCtx, span := tracing.StartSpan(ctx, "GetIdentity")
- defer span.End()
-
- rscheme := getResolvedAuthScheme(innerCtx)
- if rscheme == nil {
- return out, metadata, fmt.Errorf("no resolved auth scheme")
- }
-
- resolver := rscheme.Scheme.IdentityResolver(m.options)
- if resolver == nil {
- return out, metadata, fmt.Errorf("no identity resolver")
- }
-
- identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration",
- func() (smithyauth.Identity, error) {
- return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties)
- },
- func(o *metrics.RecordMetricOptions) {
- o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID())
- })
- if err != nil {
- return out, metadata, fmt.Errorf("get identity: %w", err)
- }
-
- ctx = setIdentity(ctx, identity)
-
- span.End()
- return next.HandleFinalize(ctx, in)
-}
-
-type identityKey struct{}
-
-func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context {
- return middleware.WithStackValue(ctx, identityKey{}, identity)
-}
-
-func getIdentity(ctx context.Context) smithyauth.Identity {
- v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity)
- return v
-}
-
-type signRequestMiddleware struct {
- options Options
-}
-
-func (*signRequestMiddleware) ID() string {
- return "Signing"
-}
-
-func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
- out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "SignRequest")
- defer span.End()
-
- req, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request)
- }
-
- rscheme := getResolvedAuthScheme(ctx)
- if rscheme == nil {
- return out, metadata, fmt.Errorf("no resolved auth scheme")
- }
-
- identity := getIdentity(ctx)
- if identity == nil {
- return out, metadata, fmt.Errorf("no identity")
- }
-
- signer := rscheme.Scheme.Signer()
- if signer == nil {
- return out, metadata, fmt.Errorf("no signer")
- }
-
- _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) {
- return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties)
- }, func(o *metrics.RecordMetricOptions) {
- o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID())
- })
- if err != nil {
- return out, metadata, fmt.Errorf("sign request: %w", err)
- }
-
- span.End()
- return next.HandleFinalize(ctx, in)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/deserializers.go
deleted file mode 100644
index 57ec7feabb23..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/deserializers.go
+++ /dev/null
@@ -1,18914 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "bytes"
- "context"
- "encoding/json"
- "fmt"
- "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- smithy "github.com/aws/smithy-go"
- smithyio "github.com/aws/smithy-go/io"
- "github.com/aws/smithy-go/middleware"
- "github.com/aws/smithy-go/ptr"
- smithytime "github.com/aws/smithy-go/time"
- "github.com/aws/smithy-go/tracing"
- smithyhttp "github.com/aws/smithy-go/transport/http"
- "io"
- "strings"
-)
-
-type awsRestjson1_deserializeOpAssociateAccessPolicy struct {
-}
-
-func (*awsRestjson1_deserializeOpAssociateAccessPolicy) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpAssociateAccessPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorAssociateAccessPolicy(response, &metadata)
- }
- output := &AssociateAccessPolicyOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentAssociateAccessPolicyOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorAssociateAccessPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentAssociateAccessPolicyOutput(v **AssociateAccessPolicyOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *AssociateAccessPolicyOutput
- if *v == nil {
- sv = &AssociateAccessPolicyOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "associatedAccessPolicy":
- if err := awsRestjson1_deserializeDocumentAssociatedAccessPolicy(&sv.AssociatedAccessPolicy, value); err != nil {
- return err
- }
-
- case "clusterName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterName = ptr.String(jtv)
- }
-
- case "principalArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.PrincipalArn = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpAssociateEncryptionConfig struct {
-}
-
-func (*awsRestjson1_deserializeOpAssociateEncryptionConfig) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpAssociateEncryptionConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorAssociateEncryptionConfig(response, &metadata)
- }
- output := &AssociateEncryptionConfigOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentAssociateEncryptionConfigOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorAssociateEncryptionConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceInUseException", errorCode):
- return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ThrottlingException", errorCode):
- return awsRestjson1_deserializeErrorThrottlingException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentAssociateEncryptionConfigOutput(v **AssociateEncryptionConfigOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *AssociateEncryptionConfigOutput
- if *v == nil {
- sv = &AssociateEncryptionConfigOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "update":
- if err := awsRestjson1_deserializeDocumentUpdate(&sv.Update, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpAssociateIdentityProviderConfig struct {
-}
-
-func (*awsRestjson1_deserializeOpAssociateIdentityProviderConfig) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpAssociateIdentityProviderConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorAssociateIdentityProviderConfig(response, &metadata)
- }
- output := &AssociateIdentityProviderConfigOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentAssociateIdentityProviderConfigOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorAssociateIdentityProviderConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceInUseException", errorCode):
- return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ThrottlingException", errorCode):
- return awsRestjson1_deserializeErrorThrottlingException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentAssociateIdentityProviderConfigOutput(v **AssociateIdentityProviderConfigOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *AssociateIdentityProviderConfigOutput
- if *v == nil {
- sv = &AssociateIdentityProviderConfigOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "tags":
- if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil {
- return err
- }
-
- case "update":
- if err := awsRestjson1_deserializeDocumentUpdate(&sv.Update, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpCreateAccessEntry struct {
-}
-
-func (*awsRestjson1_deserializeOpCreateAccessEntry) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpCreateAccessEntry) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorCreateAccessEntry(response, &metadata)
- }
- output := &CreateAccessEntryOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentCreateAccessEntryOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorCreateAccessEntry(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceInUseException", errorCode):
- return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
-
- case strings.EqualFold("ResourceLimitExceededException", errorCode):
- return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentCreateAccessEntryOutput(v **CreateAccessEntryOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *CreateAccessEntryOutput
- if *v == nil {
- sv = &CreateAccessEntryOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "accessEntry":
- if err := awsRestjson1_deserializeDocumentAccessEntry(&sv.AccessEntry, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpCreateAddon struct {
-}
-
-func (*awsRestjson1_deserializeOpCreateAddon) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpCreateAddon) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorCreateAddon(response, &metadata)
- }
- output := &CreateAddonOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentCreateAddonOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorCreateAddon(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceInUseException", errorCode):
- return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentCreateAddonOutput(v **CreateAddonOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *CreateAddonOutput
- if *v == nil {
- sv = &CreateAddonOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "addon":
- if err := awsRestjson1_deserializeDocumentAddon(&sv.Addon, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpCreateCapability struct {
-}
-
-func (*awsRestjson1_deserializeOpCreateCapability) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpCreateCapability) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorCreateCapability(response, &metadata)
- }
- output := &CreateCapabilityOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentCreateCapabilityOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorCreateCapability(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceInUseException", errorCode):
- return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
-
- case strings.EqualFold("ResourceLimitExceededException", errorCode):
- return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ThrottlingException", errorCode):
- return awsRestjson1_deserializeErrorThrottlingException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentCreateCapabilityOutput(v **CreateCapabilityOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *CreateCapabilityOutput
- if *v == nil {
- sv = &CreateCapabilityOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "capability":
- if err := awsRestjson1_deserializeDocumentCapability(&sv.Capability, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpCreateCluster struct {
-}
-
-func (*awsRestjson1_deserializeOpCreateCluster) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpCreateCluster) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorCreateCluster(response, &metadata)
- }
- output := &CreateClusterOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentCreateClusterOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorCreateCluster(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ResourceInUseException", errorCode):
- return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
-
- case strings.EqualFold("ResourceLimitExceededException", errorCode):
- return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ServiceUnavailableException", errorCode):
- return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAvailabilityZoneException", errorCode):
- return awsRestjson1_deserializeErrorUnsupportedAvailabilityZoneException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentCreateClusterOutput(v **CreateClusterOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *CreateClusterOutput
- if *v == nil {
- sv = &CreateClusterOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "cluster":
- if err := awsRestjson1_deserializeDocumentCluster(&sv.Cluster, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpCreateEksAnywhereSubscription struct {
-}
-
-func (*awsRestjson1_deserializeOpCreateEksAnywhereSubscription) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpCreateEksAnywhereSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorCreateEksAnywhereSubscription(response, &metadata)
- }
- output := &CreateEksAnywhereSubscriptionOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentCreateEksAnywhereSubscriptionOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorCreateEksAnywhereSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ResourceLimitExceededException", errorCode):
- return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ServiceUnavailableException", errorCode):
- return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentCreateEksAnywhereSubscriptionOutput(v **CreateEksAnywhereSubscriptionOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *CreateEksAnywhereSubscriptionOutput
- if *v == nil {
- sv = &CreateEksAnywhereSubscriptionOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "subscription":
- if err := awsRestjson1_deserializeDocumentEksAnywhereSubscription(&sv.Subscription, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpCreateFargateProfile struct {
-}
-
-func (*awsRestjson1_deserializeOpCreateFargateProfile) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpCreateFargateProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorCreateFargateProfile(response, &metadata)
- }
- output := &CreateFargateProfileOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentCreateFargateProfileOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorCreateFargateProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceLimitExceededException", errorCode):
- return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAvailabilityZoneException", errorCode):
- return awsRestjson1_deserializeErrorUnsupportedAvailabilityZoneException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentCreateFargateProfileOutput(v **CreateFargateProfileOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *CreateFargateProfileOutput
- if *v == nil {
- sv = &CreateFargateProfileOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "fargateProfile":
- if err := awsRestjson1_deserializeDocumentFargateProfile(&sv.FargateProfile, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpCreateNodegroup struct {
-}
-
-func (*awsRestjson1_deserializeOpCreateNodegroup) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpCreateNodegroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorCreateNodegroup(response, &metadata)
- }
- output := &CreateNodegroupOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentCreateNodegroupOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorCreateNodegroup(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceInUseException", errorCode):
- return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
-
- case strings.EqualFold("ResourceLimitExceededException", errorCode):
- return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ServiceUnavailableException", errorCode):
- return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentCreateNodegroupOutput(v **CreateNodegroupOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *CreateNodegroupOutput
- if *v == nil {
- sv = &CreateNodegroupOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "nodegroup":
- if err := awsRestjson1_deserializeDocumentNodegroup(&sv.Nodegroup, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpCreatePodIdentityAssociation struct {
-}
-
-func (*awsRestjson1_deserializeOpCreatePodIdentityAssociation) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpCreatePodIdentityAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorCreatePodIdentityAssociation(response, &metadata)
- }
- output := &CreatePodIdentityAssociationOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentCreatePodIdentityAssociationOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorCreatePodIdentityAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceInUseException", errorCode):
- return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
-
- case strings.EqualFold("ResourceLimitExceededException", errorCode):
- return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentCreatePodIdentityAssociationOutput(v **CreatePodIdentityAssociationOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *CreatePodIdentityAssociationOutput
- if *v == nil {
- sv = &CreatePodIdentityAssociationOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "association":
- if err := awsRestjson1_deserializeDocumentPodIdentityAssociation(&sv.Association, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDeleteAccessEntry struct {
-}
-
-func (*awsRestjson1_deserializeOpDeleteAccessEntry) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDeleteAccessEntry) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDeleteAccessEntry(response, &metadata)
- }
- output := &DeleteAccessEntryOutput{}
- out.Result = output
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDeleteAccessEntry(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsRestjson1_deserializeOpDeleteAddon struct {
-}
-
-func (*awsRestjson1_deserializeOpDeleteAddon) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDeleteAddon) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDeleteAddon(response, &metadata)
- }
- output := &DeleteAddonOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDeleteAddonOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDeleteAddon(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDeleteAddonOutput(v **DeleteAddonOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DeleteAddonOutput
- if *v == nil {
- sv = &DeleteAddonOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "addon":
- if err := awsRestjson1_deserializeDocumentAddon(&sv.Addon, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDeleteCapability struct {
-}
-
-func (*awsRestjson1_deserializeOpDeleteCapability) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDeleteCapability) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDeleteCapability(response, &metadata)
- }
- output := &DeleteCapabilityOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDeleteCapabilityOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDeleteCapability(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ResourceInUseException", errorCode):
- return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDeleteCapabilityOutput(v **DeleteCapabilityOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DeleteCapabilityOutput
- if *v == nil {
- sv = &DeleteCapabilityOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "capability":
- if err := awsRestjson1_deserializeDocumentCapability(&sv.Capability, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDeleteCluster struct {
-}
-
-func (*awsRestjson1_deserializeOpDeleteCluster) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDeleteCluster) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDeleteCluster(response, &metadata)
- }
- output := &DeleteClusterOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDeleteClusterOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDeleteCluster(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceInUseException", errorCode):
- return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ServiceUnavailableException", errorCode):
- return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDeleteClusterOutput(v **DeleteClusterOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DeleteClusterOutput
- if *v == nil {
- sv = &DeleteClusterOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "cluster":
- if err := awsRestjson1_deserializeDocumentCluster(&sv.Cluster, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDeleteEksAnywhereSubscription struct {
-}
-
-func (*awsRestjson1_deserializeOpDeleteEksAnywhereSubscription) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDeleteEksAnywhereSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDeleteEksAnywhereSubscription(response, &metadata)
- }
- output := &DeleteEksAnywhereSubscriptionOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDeleteEksAnywhereSubscriptionOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDeleteEksAnywhereSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDeleteEksAnywhereSubscriptionOutput(v **DeleteEksAnywhereSubscriptionOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DeleteEksAnywhereSubscriptionOutput
- if *v == nil {
- sv = &DeleteEksAnywhereSubscriptionOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "subscription":
- if err := awsRestjson1_deserializeDocumentEksAnywhereSubscription(&sv.Subscription, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDeleteFargateProfile struct {
-}
-
-func (*awsRestjson1_deserializeOpDeleteFargateProfile) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDeleteFargateProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDeleteFargateProfile(response, &metadata)
- }
- output := &DeleteFargateProfileOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDeleteFargateProfileOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDeleteFargateProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDeleteFargateProfileOutput(v **DeleteFargateProfileOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DeleteFargateProfileOutput
- if *v == nil {
- sv = &DeleteFargateProfileOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "fargateProfile":
- if err := awsRestjson1_deserializeDocumentFargateProfile(&sv.FargateProfile, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDeleteNodegroup struct {
-}
-
-func (*awsRestjson1_deserializeOpDeleteNodegroup) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDeleteNodegroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDeleteNodegroup(response, &metadata)
- }
- output := &DeleteNodegroupOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDeleteNodegroupOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDeleteNodegroup(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ResourceInUseException", errorCode):
- return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ServiceUnavailableException", errorCode):
- return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDeleteNodegroupOutput(v **DeleteNodegroupOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DeleteNodegroupOutput
- if *v == nil {
- sv = &DeleteNodegroupOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "nodegroup":
- if err := awsRestjson1_deserializeDocumentNodegroup(&sv.Nodegroup, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDeletePodIdentityAssociation struct {
-}
-
-func (*awsRestjson1_deserializeOpDeletePodIdentityAssociation) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDeletePodIdentityAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDeletePodIdentityAssociation(response, &metadata)
- }
- output := &DeletePodIdentityAssociationOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDeletePodIdentityAssociationOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDeletePodIdentityAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDeletePodIdentityAssociationOutput(v **DeletePodIdentityAssociationOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DeletePodIdentityAssociationOutput
- if *v == nil {
- sv = &DeletePodIdentityAssociationOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "association":
- if err := awsRestjson1_deserializeDocumentPodIdentityAssociation(&sv.Association, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDeregisterCluster struct {
-}
-
-func (*awsRestjson1_deserializeOpDeregisterCluster) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDeregisterCluster) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDeregisterCluster(response, &metadata)
- }
- output := &DeregisterClusterOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDeregisterClusterOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDeregisterCluster(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("ResourceInUseException", errorCode):
- return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ServiceUnavailableException", errorCode):
- return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDeregisterClusterOutput(v **DeregisterClusterOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DeregisterClusterOutput
- if *v == nil {
- sv = &DeregisterClusterOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "cluster":
- if err := awsRestjson1_deserializeDocumentCluster(&sv.Cluster, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDescribeAccessEntry struct {
-}
-
-func (*awsRestjson1_deserializeOpDescribeAccessEntry) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDescribeAccessEntry) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDescribeAccessEntry(response, &metadata)
- }
- output := &DescribeAccessEntryOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDescribeAccessEntryOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDescribeAccessEntry(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDescribeAccessEntryOutput(v **DescribeAccessEntryOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeAccessEntryOutput
- if *v == nil {
- sv = &DescribeAccessEntryOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "accessEntry":
- if err := awsRestjson1_deserializeDocumentAccessEntry(&sv.AccessEntry, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDescribeAddon struct {
-}
-
-func (*awsRestjson1_deserializeOpDescribeAddon) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDescribeAddon) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDescribeAddon(response, &metadata)
- }
- output := &DescribeAddonOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDescribeAddonOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDescribeAddon(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDescribeAddonOutput(v **DescribeAddonOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeAddonOutput
- if *v == nil {
- sv = &DescribeAddonOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "addon":
- if err := awsRestjson1_deserializeDocumentAddon(&sv.Addon, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDescribeAddonConfiguration struct {
-}
-
-func (*awsRestjson1_deserializeOpDescribeAddonConfiguration) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDescribeAddonConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDescribeAddonConfiguration(response, &metadata)
- }
- output := &DescribeAddonConfigurationOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDescribeAddonConfigurationOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDescribeAddonConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDescribeAddonConfigurationOutput(v **DescribeAddonConfigurationOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeAddonConfigurationOutput
- if *v == nil {
- sv = &DescribeAddonConfigurationOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "addonName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.AddonName = ptr.String(jtv)
- }
-
- case "addonVersion":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.AddonVersion = ptr.String(jtv)
- }
-
- case "configurationSchema":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ConfigurationSchema = ptr.String(jtv)
- }
-
- case "podIdentityConfiguration":
- if err := awsRestjson1_deserializeDocumentAddonPodIdentityConfigurationList(&sv.PodIdentityConfiguration, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDescribeAddonVersions struct {
-}
-
-func (*awsRestjson1_deserializeOpDescribeAddonVersions) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDescribeAddonVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDescribeAddonVersions(response, &metadata)
- }
- output := &DescribeAddonVersionsOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDescribeAddonVersionsOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDescribeAddonVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDescribeAddonVersionsOutput(v **DescribeAddonVersionsOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeAddonVersionsOutput
- if *v == nil {
- sv = &DescribeAddonVersionsOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "addons":
- if err := awsRestjson1_deserializeDocumentAddons(&sv.Addons, value); err != nil {
- return err
- }
-
- case "nextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDescribeCapability struct {
-}
-
-func (*awsRestjson1_deserializeOpDescribeCapability) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDescribeCapability) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDescribeCapability(response, &metadata)
- }
- output := &DescribeCapabilityOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDescribeCapabilityOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDescribeCapability(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDescribeCapabilityOutput(v **DescribeCapabilityOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeCapabilityOutput
- if *v == nil {
- sv = &DescribeCapabilityOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "capability":
- if err := awsRestjson1_deserializeDocumentCapability(&sv.Capability, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDescribeCluster struct {
-}
-
-func (*awsRestjson1_deserializeOpDescribeCluster) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDescribeCluster) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDescribeCluster(response, &metadata)
- }
- output := &DescribeClusterOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDescribeClusterOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDescribeCluster(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ServiceUnavailableException", errorCode):
- return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDescribeClusterOutput(v **DescribeClusterOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeClusterOutput
- if *v == nil {
- sv = &DescribeClusterOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "cluster":
- if err := awsRestjson1_deserializeDocumentCluster(&sv.Cluster, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDescribeClusterVersions struct {
-}
-
-func (*awsRestjson1_deserializeOpDescribeClusterVersions) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDescribeClusterVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDescribeClusterVersions(response, &metadata)
- }
- output := &DescribeClusterVersionsOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDescribeClusterVersionsOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDescribeClusterVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDescribeClusterVersionsOutput(v **DescribeClusterVersionsOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeClusterVersionsOutput
- if *v == nil {
- sv = &DescribeClusterVersionsOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "clusterVersions":
- if err := awsRestjson1_deserializeDocumentClusterVersionList(&sv.ClusterVersions, value); err != nil {
- return err
- }
-
- case "nextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDescribeEksAnywhereSubscription struct {
-}
-
-func (*awsRestjson1_deserializeOpDescribeEksAnywhereSubscription) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDescribeEksAnywhereSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDescribeEksAnywhereSubscription(response, &metadata)
- }
- output := &DescribeEksAnywhereSubscriptionOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDescribeEksAnywhereSubscriptionOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDescribeEksAnywhereSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ServiceUnavailableException", errorCode):
- return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDescribeEksAnywhereSubscriptionOutput(v **DescribeEksAnywhereSubscriptionOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeEksAnywhereSubscriptionOutput
- if *v == nil {
- sv = &DescribeEksAnywhereSubscriptionOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "subscription":
- if err := awsRestjson1_deserializeDocumentEksAnywhereSubscription(&sv.Subscription, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDescribeFargateProfile struct {
-}
-
-func (*awsRestjson1_deserializeOpDescribeFargateProfile) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDescribeFargateProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDescribeFargateProfile(response, &metadata)
- }
- output := &DescribeFargateProfileOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDescribeFargateProfileOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDescribeFargateProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDescribeFargateProfileOutput(v **DescribeFargateProfileOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeFargateProfileOutput
- if *v == nil {
- sv = &DescribeFargateProfileOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "fargateProfile":
- if err := awsRestjson1_deserializeDocumentFargateProfile(&sv.FargateProfile, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDescribeIdentityProviderConfig struct {
-}
-
-func (*awsRestjson1_deserializeOpDescribeIdentityProviderConfig) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDescribeIdentityProviderConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDescribeIdentityProviderConfig(response, &metadata)
- }
- output := &DescribeIdentityProviderConfigOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDescribeIdentityProviderConfigOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDescribeIdentityProviderConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ServiceUnavailableException", errorCode):
- return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDescribeIdentityProviderConfigOutput(v **DescribeIdentityProviderConfigOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeIdentityProviderConfigOutput
- if *v == nil {
- sv = &DescribeIdentityProviderConfigOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "identityProviderConfig":
- if err := awsRestjson1_deserializeDocumentIdentityProviderConfigResponse(&sv.IdentityProviderConfig, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDescribeInsight struct {
-}
-
-func (*awsRestjson1_deserializeOpDescribeInsight) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDescribeInsight) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDescribeInsight(response, &metadata)
- }
- output := &DescribeInsightOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDescribeInsightOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDescribeInsight(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDescribeInsightOutput(v **DescribeInsightOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeInsightOutput
- if *v == nil {
- sv = &DescribeInsightOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "insight":
- if err := awsRestjson1_deserializeDocumentInsight(&sv.Insight, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDescribeInsightsRefresh struct {
-}
-
-func (*awsRestjson1_deserializeOpDescribeInsightsRefresh) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDescribeInsightsRefresh) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDescribeInsightsRefresh(response, &metadata)
- }
- output := &DescribeInsightsRefreshOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDescribeInsightsRefreshOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDescribeInsightsRefresh(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDescribeInsightsRefreshOutput(v **DescribeInsightsRefreshOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeInsightsRefreshOutput
- if *v == nil {
- sv = &DescribeInsightsRefreshOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "endedAt":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.EndedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- case "startedAt":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.StartedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "status":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected InsightsRefreshStatus to be of type string, got %T instead", value)
- }
- sv.Status = types.InsightsRefreshStatus(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDescribeNodegroup struct {
-}
-
-func (*awsRestjson1_deserializeOpDescribeNodegroup) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDescribeNodegroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDescribeNodegroup(response, &metadata)
- }
- output := &DescribeNodegroupOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDescribeNodegroupOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDescribeNodegroup(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ServiceUnavailableException", errorCode):
- return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDescribeNodegroupOutput(v **DescribeNodegroupOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeNodegroupOutput
- if *v == nil {
- sv = &DescribeNodegroupOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "nodegroup":
- if err := awsRestjson1_deserializeDocumentNodegroup(&sv.Nodegroup, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDescribePodIdentityAssociation struct {
-}
-
-func (*awsRestjson1_deserializeOpDescribePodIdentityAssociation) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDescribePodIdentityAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDescribePodIdentityAssociation(response, &metadata)
- }
- output := &DescribePodIdentityAssociationOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDescribePodIdentityAssociationOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDescribePodIdentityAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDescribePodIdentityAssociationOutput(v **DescribePodIdentityAssociationOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribePodIdentityAssociationOutput
- if *v == nil {
- sv = &DescribePodIdentityAssociationOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "association":
- if err := awsRestjson1_deserializeDocumentPodIdentityAssociation(&sv.Association, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDescribeUpdate struct {
-}
-
-func (*awsRestjson1_deserializeOpDescribeUpdate) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDescribeUpdate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDescribeUpdate(response, &metadata)
- }
- output := &DescribeUpdateOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDescribeUpdateOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDescribeUpdate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDescribeUpdateOutput(v **DescribeUpdateOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeUpdateOutput
- if *v == nil {
- sv = &DescribeUpdateOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "update":
- if err := awsRestjson1_deserializeDocumentUpdate(&sv.Update, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpDisassociateAccessPolicy struct {
-}
-
-func (*awsRestjson1_deserializeOpDisassociateAccessPolicy) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDisassociateAccessPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDisassociateAccessPolicy(response, &metadata)
- }
- output := &DisassociateAccessPolicyOutput{}
- out.Result = output
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDisassociateAccessPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsRestjson1_deserializeOpDisassociateIdentityProviderConfig struct {
-}
-
-func (*awsRestjson1_deserializeOpDisassociateIdentityProviderConfig) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpDisassociateIdentityProviderConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorDisassociateIdentityProviderConfig(response, &metadata)
- }
- output := &DisassociateIdentityProviderConfigOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentDisassociateIdentityProviderConfigOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorDisassociateIdentityProviderConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceInUseException", errorCode):
- return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ThrottlingException", errorCode):
- return awsRestjson1_deserializeErrorThrottlingException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentDisassociateIdentityProviderConfigOutput(v **DisassociateIdentityProviderConfigOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DisassociateIdentityProviderConfigOutput
- if *v == nil {
- sv = &DisassociateIdentityProviderConfigOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "update":
- if err := awsRestjson1_deserializeDocumentUpdate(&sv.Update, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpListAccessEntries struct {
-}
-
-func (*awsRestjson1_deserializeOpListAccessEntries) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpListAccessEntries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorListAccessEntries(response, &metadata)
- }
- output := &ListAccessEntriesOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentListAccessEntriesOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorListAccessEntries(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentListAccessEntriesOutput(v **ListAccessEntriesOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListAccessEntriesOutput
- if *v == nil {
- sv = &ListAccessEntriesOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "accessEntries":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.AccessEntries, value); err != nil {
- return err
- }
-
- case "nextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpListAccessPolicies struct {
-}
-
-func (*awsRestjson1_deserializeOpListAccessPolicies) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpListAccessPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorListAccessPolicies(response, &metadata)
- }
- output := &ListAccessPoliciesOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentListAccessPoliciesOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorListAccessPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentListAccessPoliciesOutput(v **ListAccessPoliciesOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListAccessPoliciesOutput
- if *v == nil {
- sv = &ListAccessPoliciesOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "accessPolicies":
- if err := awsRestjson1_deserializeDocumentAccessPoliciesList(&sv.AccessPolicies, value); err != nil {
- return err
- }
-
- case "nextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpListAddons struct {
-}
-
-func (*awsRestjson1_deserializeOpListAddons) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpListAddons) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorListAddons(response, &metadata)
- }
- output := &ListAddonsOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentListAddonsOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorListAddons(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentListAddonsOutput(v **ListAddonsOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListAddonsOutput
- if *v == nil {
- sv = &ListAddonsOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "addons":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.Addons, value); err != nil {
- return err
- }
-
- case "nextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpListAssociatedAccessPolicies struct {
-}
-
-func (*awsRestjson1_deserializeOpListAssociatedAccessPolicies) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpListAssociatedAccessPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorListAssociatedAccessPolicies(response, &metadata)
- }
- output := &ListAssociatedAccessPoliciesOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentListAssociatedAccessPoliciesOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorListAssociatedAccessPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentListAssociatedAccessPoliciesOutput(v **ListAssociatedAccessPoliciesOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListAssociatedAccessPoliciesOutput
- if *v == nil {
- sv = &ListAssociatedAccessPoliciesOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "associatedAccessPolicies":
- if err := awsRestjson1_deserializeDocumentAssociatedAccessPoliciesList(&sv.AssociatedAccessPolicies, value); err != nil {
- return err
- }
-
- case "clusterName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterName = ptr.String(jtv)
- }
-
- case "nextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- case "principalArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.PrincipalArn = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpListCapabilities struct {
-}
-
-func (*awsRestjson1_deserializeOpListCapabilities) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpListCapabilities) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorListCapabilities(response, &metadata)
- }
- output := &ListCapabilitiesOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentListCapabilitiesOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorListCapabilities(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentListCapabilitiesOutput(v **ListCapabilitiesOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListCapabilitiesOutput
- if *v == nil {
- sv = &ListCapabilitiesOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "capabilities":
- if err := awsRestjson1_deserializeDocumentCapabilitySummaryList(&sv.Capabilities, value); err != nil {
- return err
- }
-
- case "nextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpListClusters struct {
-}
-
-func (*awsRestjson1_deserializeOpListClusters) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpListClusters) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorListClusters(response, &metadata)
- }
- output := &ListClustersOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentListClustersOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorListClusters(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ServiceUnavailableException", errorCode):
- return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentListClustersOutput(v **ListClustersOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListClustersOutput
- if *v == nil {
- sv = &ListClustersOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "clusters":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.Clusters, value); err != nil {
- return err
- }
-
- case "nextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpListEksAnywhereSubscriptions struct {
-}
-
-func (*awsRestjson1_deserializeOpListEksAnywhereSubscriptions) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpListEksAnywhereSubscriptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorListEksAnywhereSubscriptions(response, &metadata)
- }
- output := &ListEksAnywhereSubscriptionsOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentListEksAnywhereSubscriptionsOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorListEksAnywhereSubscriptions(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ServiceUnavailableException", errorCode):
- return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentListEksAnywhereSubscriptionsOutput(v **ListEksAnywhereSubscriptionsOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListEksAnywhereSubscriptionsOutput
- if *v == nil {
- sv = &ListEksAnywhereSubscriptionsOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "nextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- case "subscriptions":
- if err := awsRestjson1_deserializeDocumentEksAnywhereSubscriptionList(&sv.Subscriptions, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpListFargateProfiles struct {
-}
-
-func (*awsRestjson1_deserializeOpListFargateProfiles) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpListFargateProfiles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorListFargateProfiles(response, &metadata)
- }
- output := &ListFargateProfilesOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentListFargateProfilesOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorListFargateProfiles(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentListFargateProfilesOutput(v **ListFargateProfilesOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListFargateProfilesOutput
- if *v == nil {
- sv = &ListFargateProfilesOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "fargateProfileNames":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.FargateProfileNames, value); err != nil {
- return err
- }
-
- case "nextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpListIdentityProviderConfigs struct {
-}
-
-func (*awsRestjson1_deserializeOpListIdentityProviderConfigs) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpListIdentityProviderConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorListIdentityProviderConfigs(response, &metadata)
- }
- output := &ListIdentityProviderConfigsOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentListIdentityProviderConfigsOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorListIdentityProviderConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ServiceUnavailableException", errorCode):
- return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentListIdentityProviderConfigsOutput(v **ListIdentityProviderConfigsOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListIdentityProviderConfigsOutput
- if *v == nil {
- sv = &ListIdentityProviderConfigsOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "identityProviderConfigs":
- if err := awsRestjson1_deserializeDocumentIdentityProviderConfigs(&sv.IdentityProviderConfigs, value); err != nil {
- return err
- }
-
- case "nextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpListInsights struct {
-}
-
-func (*awsRestjson1_deserializeOpListInsights) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpListInsights) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorListInsights(response, &metadata)
- }
- output := &ListInsightsOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentListInsightsOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorListInsights(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentListInsightsOutput(v **ListInsightsOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListInsightsOutput
- if *v == nil {
- sv = &ListInsightsOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "insights":
- if err := awsRestjson1_deserializeDocumentInsightSummaries(&sv.Insights, value); err != nil {
- return err
- }
-
- case "nextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpListNodegroups struct {
-}
-
-func (*awsRestjson1_deserializeOpListNodegroups) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpListNodegroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorListNodegroups(response, &metadata)
- }
- output := &ListNodegroupsOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentListNodegroupsOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorListNodegroups(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ServiceUnavailableException", errorCode):
- return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentListNodegroupsOutput(v **ListNodegroupsOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListNodegroupsOutput
- if *v == nil {
- sv = &ListNodegroupsOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "nextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- case "nodegroups":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.Nodegroups, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpListPodIdentityAssociations struct {
-}
-
-func (*awsRestjson1_deserializeOpListPodIdentityAssociations) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpListPodIdentityAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorListPodIdentityAssociations(response, &metadata)
- }
- output := &ListPodIdentityAssociationsOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentListPodIdentityAssociationsOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorListPodIdentityAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentListPodIdentityAssociationsOutput(v **ListPodIdentityAssociationsOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListPodIdentityAssociationsOutput
- if *v == nil {
- sv = &ListPodIdentityAssociationsOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "associations":
- if err := awsRestjson1_deserializeDocumentPodIdentityAssociationSummaries(&sv.Associations, value); err != nil {
- return err
- }
-
- case "nextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpListTagsForResource struct {
-}
-
-func (*awsRestjson1_deserializeOpListTagsForResource) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata)
- }
- output := &ListTagsForResourceOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("BadRequestException", errorCode):
- return awsRestjson1_deserializeErrorBadRequestException(response, errorBody)
-
- case strings.EqualFold("NotFoundException", errorCode):
- return awsRestjson1_deserializeErrorNotFoundException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListTagsForResourceOutput
- if *v == nil {
- sv = &ListTagsForResourceOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "tags":
- if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpListUpdates struct {
-}
-
-func (*awsRestjson1_deserializeOpListUpdates) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpListUpdates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorListUpdates(response, &metadata)
- }
- output := &ListUpdatesOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentListUpdatesOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorListUpdates(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentListUpdatesOutput(v **ListUpdatesOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListUpdatesOutput
- if *v == nil {
- sv = &ListUpdatesOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "nextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- case "updateIds":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.UpdateIds, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpRegisterCluster struct {
-}
-
-func (*awsRestjson1_deserializeOpRegisterCluster) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpRegisterCluster) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorRegisterCluster(response, &metadata)
- }
- output := &RegisterClusterOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentRegisterClusterOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorRegisterCluster(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ResourceInUseException", errorCode):
- return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
-
- case strings.EqualFold("ResourceLimitExceededException", errorCode):
- return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody)
-
- case strings.EqualFold("ResourcePropagationDelayException", errorCode):
- return awsRestjson1_deserializeErrorResourcePropagationDelayException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ServiceUnavailableException", errorCode):
- return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentRegisterClusterOutput(v **RegisterClusterOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *RegisterClusterOutput
- if *v == nil {
- sv = &RegisterClusterOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "cluster":
- if err := awsRestjson1_deserializeDocumentCluster(&sv.Cluster, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpStartInsightsRefresh struct {
-}
-
-func (*awsRestjson1_deserializeOpStartInsightsRefresh) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpStartInsightsRefresh) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorStartInsightsRefresh(response, &metadata)
- }
- output := &StartInsightsRefreshOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentStartInsightsRefreshOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorStartInsightsRefresh(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentStartInsightsRefreshOutput(v **StartInsightsRefreshOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *StartInsightsRefreshOutput
- if *v == nil {
- sv = &StartInsightsRefreshOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- case "status":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected InsightsRefreshStatus to be of type string, got %T instead", value)
- }
- sv.Status = types.InsightsRefreshStatus(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpTagResource struct {
-}
-
-func (*awsRestjson1_deserializeOpTagResource) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata)
- }
- output := &TagResourceOutput{}
- out.Result = output
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("BadRequestException", errorCode):
- return awsRestjson1_deserializeErrorBadRequestException(response, errorBody)
-
- case strings.EqualFold("NotFoundException", errorCode):
- return awsRestjson1_deserializeErrorNotFoundException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsRestjson1_deserializeOpUntagResource struct {
-}
-
-func (*awsRestjson1_deserializeOpUntagResource) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata)
- }
- output := &UntagResourceOutput{}
- out.Result = output
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("BadRequestException", errorCode):
- return awsRestjson1_deserializeErrorBadRequestException(response, errorBody)
-
- case strings.EqualFold("NotFoundException", errorCode):
- return awsRestjson1_deserializeErrorNotFoundException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsRestjson1_deserializeOpUpdateAccessEntry struct {
-}
-
-func (*awsRestjson1_deserializeOpUpdateAccessEntry) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpUpdateAccessEntry) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorUpdateAccessEntry(response, &metadata)
- }
- output := &UpdateAccessEntryOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentUpdateAccessEntryOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorUpdateAccessEntry(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentUpdateAccessEntryOutput(v **UpdateAccessEntryOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *UpdateAccessEntryOutput
- if *v == nil {
- sv = &UpdateAccessEntryOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "accessEntry":
- if err := awsRestjson1_deserializeDocumentAccessEntry(&sv.AccessEntry, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpUpdateAddon struct {
-}
-
-func (*awsRestjson1_deserializeOpUpdateAddon) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpUpdateAddon) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorUpdateAddon(response, &metadata)
- }
- output := &UpdateAddonOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentUpdateAddonOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorUpdateAddon(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceInUseException", errorCode):
- return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentUpdateAddonOutput(v **UpdateAddonOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *UpdateAddonOutput
- if *v == nil {
- sv = &UpdateAddonOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "update":
- if err := awsRestjson1_deserializeDocumentUpdate(&sv.Update, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpUpdateCapability struct {
-}
-
-func (*awsRestjson1_deserializeOpUpdateCapability) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpUpdateCapability) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorUpdateCapability(response, &metadata)
- }
- output := &UpdateCapabilityOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentUpdateCapabilityOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorUpdateCapability(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("ResourceInUseException", errorCode):
- return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentUpdateCapabilityOutput(v **UpdateCapabilityOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *UpdateCapabilityOutput
- if *v == nil {
- sv = &UpdateCapabilityOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "update":
- if err := awsRestjson1_deserializeDocumentUpdate(&sv.Update, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpUpdateClusterConfig struct {
-}
-
-func (*awsRestjson1_deserializeOpUpdateClusterConfig) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpUpdateClusterConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorUpdateClusterConfig(response, &metadata)
- }
- output := &UpdateClusterConfigOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentUpdateClusterConfigOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorUpdateClusterConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceInUseException", errorCode):
- return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ThrottlingException", errorCode):
- return awsRestjson1_deserializeErrorThrottlingException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentUpdateClusterConfigOutput(v **UpdateClusterConfigOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *UpdateClusterConfigOutput
- if *v == nil {
- sv = &UpdateClusterConfigOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "update":
- if err := awsRestjson1_deserializeDocumentUpdate(&sv.Update, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpUpdateClusterVersion struct {
-}
-
-func (*awsRestjson1_deserializeOpUpdateClusterVersion) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpUpdateClusterVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorUpdateClusterVersion(response, &metadata)
- }
- output := &UpdateClusterVersionOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentUpdateClusterVersionOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorUpdateClusterVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("InvalidStateException", errorCode):
- return awsRestjson1_deserializeErrorInvalidStateException(response, errorBody)
-
- case strings.EqualFold("ResourceInUseException", errorCode):
- return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- case strings.EqualFold("ThrottlingException", errorCode):
- return awsRestjson1_deserializeErrorThrottlingException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentUpdateClusterVersionOutput(v **UpdateClusterVersionOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *UpdateClusterVersionOutput
- if *v == nil {
- sv = &UpdateClusterVersionOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "update":
- if err := awsRestjson1_deserializeDocumentUpdate(&sv.Update, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpUpdateEksAnywhereSubscription struct {
-}
-
-func (*awsRestjson1_deserializeOpUpdateEksAnywhereSubscription) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpUpdateEksAnywhereSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorUpdateEksAnywhereSubscription(response, &metadata)
- }
- output := &UpdateEksAnywhereSubscriptionOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentUpdateEksAnywhereSubscriptionOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorUpdateEksAnywhereSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentUpdateEksAnywhereSubscriptionOutput(v **UpdateEksAnywhereSubscriptionOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *UpdateEksAnywhereSubscriptionOutput
- if *v == nil {
- sv = &UpdateEksAnywhereSubscriptionOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "subscription":
- if err := awsRestjson1_deserializeDocumentEksAnywhereSubscription(&sv.Subscription, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpUpdateNodegroupConfig struct {
-}
-
-func (*awsRestjson1_deserializeOpUpdateNodegroupConfig) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpUpdateNodegroupConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorUpdateNodegroupConfig(response, &metadata)
- }
- output := &UpdateNodegroupConfigOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentUpdateNodegroupConfigOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorUpdateNodegroupConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceInUseException", errorCode):
- return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentUpdateNodegroupConfigOutput(v **UpdateNodegroupConfigOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *UpdateNodegroupConfigOutput
- if *v == nil {
- sv = &UpdateNodegroupConfigOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "update":
- if err := awsRestjson1_deserializeDocumentUpdate(&sv.Update, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpUpdateNodegroupVersion struct {
-}
-
-func (*awsRestjson1_deserializeOpUpdateNodegroupVersion) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpUpdateNodegroupVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorUpdateNodegroupVersion(response, &metadata)
- }
- output := &UpdateNodegroupVersionOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentUpdateNodegroupVersionOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorUpdateNodegroupVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("ClientException", errorCode):
- return awsRestjson1_deserializeErrorClientException(response, errorBody)
-
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceInUseException", errorCode):
- return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentUpdateNodegroupVersionOutput(v **UpdateNodegroupVersionOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *UpdateNodegroupVersionOutput
- if *v == nil {
- sv = &UpdateNodegroupVersionOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "update":
- if err := awsRestjson1_deserializeDocumentUpdate(&sv.Update, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type awsRestjson1_deserializeOpUpdatePodIdentityAssociation struct {
-}
-
-func (*awsRestjson1_deserializeOpUpdatePodIdentityAssociation) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsRestjson1_deserializeOpUpdatePodIdentityAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestjson1_deserializeOpErrorUpdatePodIdentityAssociation(response, &metadata)
- }
- output := &UpdatePodIdentityAssociationOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
-
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsRestjson1_deserializeOpDocumentUpdatePodIdentityAssociationOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- }
-
- span.End()
- return out, metadata, err
-}
-
-func awsRestjson1_deserializeOpErrorUpdatePodIdentityAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
- if len(headerCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(headerCode)
- }
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- jsonCode, message, err := restjson.GetErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if len(headerCode) == 0 && len(jsonCode) != 0 {
- errorCode = restjson.SanitizeErrorCode(jsonCode)
- }
- if len(message) != 0 {
- errorMessage = message
- }
-
- switch {
- case strings.EqualFold("InvalidParameterException", errorCode):
- return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody)
-
- case strings.EqualFold("InvalidRequestException", errorCode):
- return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
-
- case strings.EqualFold("ResourceNotFoundException", errorCode):
- return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServerException", errorCode):
- return awsRestjson1_deserializeErrorServerException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsRestjson1_deserializeOpDocumentUpdatePodIdentityAssociationOutput(v **UpdatePodIdentityAssociationOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *UpdatePodIdentityAssociationOutput
- if *v == nil {
- sv = &UpdatePodIdentityAssociationOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "association":
- if err := awsRestjson1_deserializeDocumentPodIdentityAssociation(&sv.Association, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.AccessDeniedException{}
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
-
- return output
-}
-
-func awsRestjson1_deserializeErrorBadRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.BadRequestException{}
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- err := awsRestjson1_deserializeDocumentBadRequestException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
-
- return output
-}
-
-func awsRestjson1_deserializeErrorClientException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.ClientException{}
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- err := awsRestjson1_deserializeDocumentClientException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
-
- return output
-}
-
-func awsRestjson1_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.InvalidParameterException{}
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- err := awsRestjson1_deserializeDocumentInvalidParameterException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
-
- return output
-}
-
-func awsRestjson1_deserializeErrorInvalidRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.InvalidRequestException{}
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- err := awsRestjson1_deserializeDocumentInvalidRequestException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
-
- return output
-}
-
-func awsRestjson1_deserializeErrorInvalidStateException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.InvalidStateException{}
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- err := awsRestjson1_deserializeDocumentInvalidStateException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
-
- return output
-}
-
-func awsRestjson1_deserializeErrorNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.NotFoundException{}
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- err := awsRestjson1_deserializeDocumentNotFoundException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
-
- return output
-}
-
-func awsRestjson1_deserializeErrorResourceInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.ResourceInUseException{}
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- err := awsRestjson1_deserializeDocumentResourceInUseException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
-
- return output
-}
-
-func awsRestjson1_deserializeErrorResourceLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.ResourceLimitExceededException{}
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- err := awsRestjson1_deserializeDocumentResourceLimitExceededException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
-
- return output
-}
-
-func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.ResourceNotFoundException{}
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
-
- return output
-}
-
-func awsRestjson1_deserializeErrorResourcePropagationDelayException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.ResourcePropagationDelayException{}
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- err := awsRestjson1_deserializeDocumentResourcePropagationDelayException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
-
- return output
-}
-
-func awsRestjson1_deserializeErrorServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.ServerException{}
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- err := awsRestjson1_deserializeDocumentServerException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
-
- return output
-}
-
-func awsRestjson1_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.ServiceUnavailableException{}
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- err := awsRestjson1_deserializeDocumentServiceUnavailableException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
-
- return output
-}
-
-func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.ThrottlingException{}
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
-
- return output
-}
-
-func awsRestjson1_deserializeErrorUnsupportedAvailabilityZoneException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- output := &types.UnsupportedAvailabilityZoneException{}
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- err := awsRestjson1_deserializeDocumentUnsupportedAvailabilityZoneException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
-
- return output
-}
-
-func awsRestjson1_deserializeDocumentAccessConfigResponse(v **types.AccessConfigResponse, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AccessConfigResponse
- if *v == nil {
- sv = &types.AccessConfigResponse{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "authenticationMode":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AuthenticationMode to be of type string, got %T instead", value)
- }
- sv.AuthenticationMode = types.AuthenticationMode(jtv)
- }
-
- case "bootstrapClusterCreatorAdminPermissions":
- if value != nil {
- jtv, ok := value.(bool)
- if !ok {
- return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value)
- }
- sv.BootstrapClusterCreatorAdminPermissions = ptr.Bool(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AccessDeniedException
- if *v == nil {
- sv = &types.AccessDeniedException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAccessEntry(v **types.AccessEntry, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AccessEntry
- if *v == nil {
- sv = &types.AccessEntry{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "accessEntryArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.AccessEntryArn = ptr.String(jtv)
- }
-
- case "clusterName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterName = ptr.String(jtv)
- }
-
- case "createdAt":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "kubernetesGroups":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.KubernetesGroups, value); err != nil {
- return err
- }
-
- case "modifiedAt":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "principalArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.PrincipalArn = ptr.String(jtv)
- }
-
- case "tags":
- if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil {
- return err
- }
-
- case "type":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Type = ptr.String(jtv)
- }
-
- case "username":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Username = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAccessPoliciesList(v *[]types.AccessPolicy, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.AccessPolicy
- if *v == nil {
- cv = []types.AccessPolicy{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.AccessPolicy
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentAccessPolicy(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAccessPolicy(v **types.AccessPolicy, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AccessPolicy
- if *v == nil {
- sv = &types.AccessPolicy{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "arn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Arn = ptr.String(jtv)
- }
-
- case "name":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Name = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAccessScope(v **types.AccessScope, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AccessScope
- if *v == nil {
- sv = &types.AccessScope{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "namespaces":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.Namespaces, value); err != nil {
- return err
- }
-
- case "type":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AccessScopeType to be of type string, got %T instead", value)
- }
- sv.Type = types.AccessScopeType(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAdditionalInfoMap(v *map[string]string, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var mv map[string]string
- if *v == nil {
- mv = map[string]string{}
- } else {
- mv = *v
- }
-
- for key, value := range shape {
- var parsedVal string
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- parsedVal = jtv
- }
- mv[key] = parsedVal
-
- }
- *v = mv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAddon(v **types.Addon, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Addon
- if *v == nil {
- sv = &types.Addon{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "addonArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.AddonArn = ptr.String(jtv)
- }
-
- case "addonName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.AddonName = ptr.String(jtv)
- }
-
- case "addonVersion":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.AddonVersion = ptr.String(jtv)
- }
-
- case "clusterName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ClusterName to be of type string, got %T instead", value)
- }
- sv.ClusterName = ptr.String(jtv)
- }
-
- case "configurationValues":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ConfigurationValues = ptr.String(jtv)
- }
-
- case "createdAt":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "health":
- if err := awsRestjson1_deserializeDocumentAddonHealth(&sv.Health, value); err != nil {
- return err
- }
-
- case "marketplaceInformation":
- if err := awsRestjson1_deserializeDocumentMarketplaceInformation(&sv.MarketplaceInformation, value); err != nil {
- return err
- }
-
- case "modifiedAt":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "namespaceConfig":
- if err := awsRestjson1_deserializeDocumentAddonNamespaceConfigResponse(&sv.NamespaceConfig, value); err != nil {
- return err
- }
-
- case "owner":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Owner = ptr.String(jtv)
- }
-
- case "podIdentityAssociations":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.PodIdentityAssociations, value); err != nil {
- return err
- }
-
- case "publisher":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Publisher = ptr.String(jtv)
- }
-
- case "serviceAccountRoleArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ServiceAccountRoleArn = ptr.String(jtv)
- }
-
- case "status":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AddonStatus to be of type string, got %T instead", value)
- }
- sv.Status = types.AddonStatus(jtv)
- }
-
- case "tags":
- if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAddonCompatibilityDetail(v **types.AddonCompatibilityDetail, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AddonCompatibilityDetail
- if *v == nil {
- sv = &types.AddonCompatibilityDetail{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "compatibleVersions":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.CompatibleVersions, value); err != nil {
- return err
- }
-
- case "name":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Name = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAddonCompatibilityDetails(v *[]types.AddonCompatibilityDetail, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.AddonCompatibilityDetail
- if *v == nil {
- cv = []types.AddonCompatibilityDetail{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.AddonCompatibilityDetail
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentAddonCompatibilityDetail(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAddonHealth(v **types.AddonHealth, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AddonHealth
- if *v == nil {
- sv = &types.AddonHealth{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "issues":
- if err := awsRestjson1_deserializeDocumentAddonIssueList(&sv.Issues, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAddonInfo(v **types.AddonInfo, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AddonInfo
- if *v == nil {
- sv = &types.AddonInfo{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "addonName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.AddonName = ptr.String(jtv)
- }
-
- case "addonVersions":
- if err := awsRestjson1_deserializeDocumentAddonVersionInfoList(&sv.AddonVersions, value); err != nil {
- return err
- }
-
- case "defaultNamespace":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.DefaultNamespace = ptr.String(jtv)
- }
-
- case "marketplaceInformation":
- if err := awsRestjson1_deserializeDocumentMarketplaceInformation(&sv.MarketplaceInformation, value); err != nil {
- return err
- }
-
- case "owner":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Owner = ptr.String(jtv)
- }
-
- case "publisher":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Publisher = ptr.String(jtv)
- }
-
- case "type":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Type = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAddonIssue(v **types.AddonIssue, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AddonIssue
- if *v == nil {
- sv = &types.AddonIssue{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "code":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AddonIssueCode to be of type string, got %T instead", value)
- }
- sv.Code = types.AddonIssueCode(jtv)
- }
-
- case "message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- case "resourceIds":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.ResourceIds, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAddonIssueList(v *[]types.AddonIssue, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.AddonIssue
- if *v == nil {
- cv = []types.AddonIssue{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.AddonIssue
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentAddonIssue(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAddonNamespaceConfigResponse(v **types.AddonNamespaceConfigResponse, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AddonNamespaceConfigResponse
- if *v == nil {
- sv = &types.AddonNamespaceConfigResponse{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "namespace":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected namespace to be of type string, got %T instead", value)
- }
- sv.Namespace = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAddonPodIdentityConfiguration(v **types.AddonPodIdentityConfiguration, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AddonPodIdentityConfiguration
- if *v == nil {
- sv = &types.AddonPodIdentityConfiguration{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "recommendedManagedPolicies":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.RecommendedManagedPolicies, value); err != nil {
- return err
- }
-
- case "serviceAccount":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ServiceAccount = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAddonPodIdentityConfigurationList(v *[]types.AddonPodIdentityConfiguration, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.AddonPodIdentityConfiguration
- if *v == nil {
- cv = []types.AddonPodIdentityConfiguration{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.AddonPodIdentityConfiguration
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentAddonPodIdentityConfiguration(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAddons(v *[]types.AddonInfo, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.AddonInfo
- if *v == nil {
- cv = []types.AddonInfo{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.AddonInfo
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentAddonInfo(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAddonVersionInfo(v **types.AddonVersionInfo, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AddonVersionInfo
- if *v == nil {
- sv = &types.AddonVersionInfo{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "addonVersion":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.AddonVersion = ptr.String(jtv)
- }
-
- case "architecture":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.Architecture, value); err != nil {
- return err
- }
-
- case "compatibilities":
- if err := awsRestjson1_deserializeDocumentCompatibilities(&sv.Compatibilities, value); err != nil {
- return err
- }
-
- case "computeTypes":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.ComputeTypes, value); err != nil {
- return err
- }
-
- case "requiresConfiguration":
- if value != nil {
- jtv, ok := value.(bool)
- if !ok {
- return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
- }
- sv.RequiresConfiguration = jtv
- }
-
- case "requiresIamPermissions":
- if value != nil {
- jtv, ok := value.(bool)
- if !ok {
- return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
- }
- sv.RequiresIamPermissions = jtv
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAddonVersionInfoList(v *[]types.AddonVersionInfo, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.AddonVersionInfo
- if *v == nil {
- cv = []types.AddonVersionInfo{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.AddonVersionInfo
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentAddonVersionInfo(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentArgoCdAwsIdcConfigResponse(v **types.ArgoCdAwsIdcConfigResponse, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ArgoCdAwsIdcConfigResponse
- if *v == nil {
- sv = &types.ArgoCdAwsIdcConfigResponse{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "idcInstanceArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.IdcInstanceArn = ptr.String(jtv)
- }
-
- case "idcManagedApplicationArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.IdcManagedApplicationArn = ptr.String(jtv)
- }
-
- case "idcRegion":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.IdcRegion = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentArgoCdConfigResponse(v **types.ArgoCdConfigResponse, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ArgoCdConfigResponse
- if *v == nil {
- sv = &types.ArgoCdConfigResponse{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "awsIdc":
- if err := awsRestjson1_deserializeDocumentArgoCdAwsIdcConfigResponse(&sv.AwsIdc, value); err != nil {
- return err
- }
-
- case "namespace":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Namespace = ptr.String(jtv)
- }
-
- case "networkAccess":
- if err := awsRestjson1_deserializeDocumentArgoCdNetworkAccessConfigResponse(&sv.NetworkAccess, value); err != nil {
- return err
- }
-
- case "rbacRoleMappings":
- if err := awsRestjson1_deserializeDocumentArgoCdRoleMappingList(&sv.RbacRoleMappings, value); err != nil {
- return err
- }
-
- case "serverUrl":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ServerUrl = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentArgoCdNetworkAccessConfigResponse(v **types.ArgoCdNetworkAccessConfigResponse, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ArgoCdNetworkAccessConfigResponse
- if *v == nil {
- sv = &types.ArgoCdNetworkAccessConfigResponse{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "vpceIds":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.VpceIds, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentArgoCdRoleMapping(v **types.ArgoCdRoleMapping, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ArgoCdRoleMapping
- if *v == nil {
- sv = &types.ArgoCdRoleMapping{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "identities":
- if err := awsRestjson1_deserializeDocumentSsoIdentityList(&sv.Identities, value); err != nil {
- return err
- }
-
- case "role":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ArgoCdRole to be of type string, got %T instead", value)
- }
- sv.Role = types.ArgoCdRole(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentArgoCdRoleMappingList(v *[]types.ArgoCdRoleMapping, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.ArgoCdRoleMapping
- if *v == nil {
- cv = []types.ArgoCdRoleMapping{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.ArgoCdRoleMapping
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentArgoCdRoleMapping(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAssociatedAccessPoliciesList(v *[]types.AssociatedAccessPolicy, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.AssociatedAccessPolicy
- if *v == nil {
- cv = []types.AssociatedAccessPolicy{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.AssociatedAccessPolicy
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentAssociatedAccessPolicy(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAssociatedAccessPolicy(v **types.AssociatedAccessPolicy, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AssociatedAccessPolicy
- if *v == nil {
- sv = &types.AssociatedAccessPolicy{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "accessScope":
- if err := awsRestjson1_deserializeDocumentAccessScope(&sv.AccessScope, value); err != nil {
- return err
- }
-
- case "associatedAt":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.AssociatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "modifiedAt":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "policyArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.PolicyArn = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAutoScalingGroup(v **types.AutoScalingGroup, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AutoScalingGroup
- if *v == nil {
- sv = &types.AutoScalingGroup{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "name":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Name = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentAutoScalingGroupList(v *[]types.AutoScalingGroup, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.AutoScalingGroup
- if *v == nil {
- cv = []types.AutoScalingGroup{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.AutoScalingGroup
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentAutoScalingGroup(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentBadRequestException(v **types.BadRequestException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.BadRequestException
- if *v == nil {
- sv = &types.BadRequestException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentBlockStorage(v **types.BlockStorage, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.BlockStorage
- if *v == nil {
- sv = &types.BlockStorage{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "enabled":
- if value != nil {
- jtv, ok := value.(bool)
- if !ok {
- return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value)
- }
- sv.Enabled = ptr.Bool(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentCapability(v **types.Capability, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Capability
- if *v == nil {
- sv = &types.Capability{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "arn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Arn = ptr.String(jtv)
- }
-
- case "capabilityName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.CapabilityName = ptr.String(jtv)
- }
-
- case "clusterName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterName = ptr.String(jtv)
- }
-
- case "configuration":
- if err := awsRestjson1_deserializeDocumentCapabilityConfigurationResponse(&sv.Configuration, value); err != nil {
- return err
- }
-
- case "createdAt":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "deletePropagationPolicy":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected CapabilityDeletePropagationPolicy to be of type string, got %T instead", value)
- }
- sv.DeletePropagationPolicy = types.CapabilityDeletePropagationPolicy(jtv)
- }
-
- case "health":
- if err := awsRestjson1_deserializeDocumentCapabilityHealth(&sv.Health, value); err != nil {
- return err
- }
-
- case "modifiedAt":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "roleArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.RoleArn = ptr.String(jtv)
- }
-
- case "status":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected CapabilityStatus to be of type string, got %T instead", value)
- }
- sv.Status = types.CapabilityStatus(jtv)
- }
-
- case "tags":
- if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil {
- return err
- }
-
- case "type":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected CapabilityType to be of type string, got %T instead", value)
- }
- sv.Type = types.CapabilityType(jtv)
- }
-
- case "version":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Version = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentCapabilityConfigurationResponse(v **types.CapabilityConfigurationResponse, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.CapabilityConfigurationResponse
- if *v == nil {
- sv = &types.CapabilityConfigurationResponse{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "argoCd":
- if err := awsRestjson1_deserializeDocumentArgoCdConfigResponse(&sv.ArgoCd, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentCapabilityHealth(v **types.CapabilityHealth, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.CapabilityHealth
- if *v == nil {
- sv = &types.CapabilityHealth{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "issues":
- if err := awsRestjson1_deserializeDocumentCapabilityIssueList(&sv.Issues, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentCapabilityIssue(v **types.CapabilityIssue, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.CapabilityIssue
- if *v == nil {
- sv = &types.CapabilityIssue{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "code":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected CapabilityIssueCode to be of type string, got %T instead", value)
- }
- sv.Code = types.CapabilityIssueCode(jtv)
- }
-
- case "message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentCapabilityIssueList(v *[]types.CapabilityIssue, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.CapabilityIssue
- if *v == nil {
- cv = []types.CapabilityIssue{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.CapabilityIssue
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentCapabilityIssue(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentCapabilitySummary(v **types.CapabilitySummary, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.CapabilitySummary
- if *v == nil {
- sv = &types.CapabilitySummary{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "arn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Arn = ptr.String(jtv)
- }
-
- case "capabilityName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.CapabilityName = ptr.String(jtv)
- }
-
- case "createdAt":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "modifiedAt":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "status":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected CapabilityStatus to be of type string, got %T instead", value)
- }
- sv.Status = types.CapabilityStatus(jtv)
- }
-
- case "type":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected CapabilityType to be of type string, got %T instead", value)
- }
- sv.Type = types.CapabilityType(jtv)
- }
-
- case "version":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Version = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentCapabilitySummaryList(v *[]types.CapabilitySummary, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.CapabilitySummary
- if *v == nil {
- cv = []types.CapabilitySummary{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.CapabilitySummary
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentCapabilitySummary(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentCertificate(v **types.Certificate, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Certificate
- if *v == nil {
- sv = &types.Certificate{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "data":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Data = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentClientException(v **types.ClientException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ClientException
- if *v == nil {
- sv = &types.ClientException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "addonName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.AddonName = ptr.String(jtv)
- }
-
- case "clusterName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterName = ptr.String(jtv)
- }
-
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- case "nodegroupName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NodegroupName = ptr.String(jtv)
- }
-
- case "subscriptionId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.SubscriptionId = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentClientStat(v **types.ClientStat, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ClientStat
- if *v == nil {
- sv = &types.ClientStat{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "lastRequestTime":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.LastRequestTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "numberOfRequestsLast30Days":
- if value != nil {
- jtv, ok := value.(json.Number)
- if !ok {
- return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
- }
- i64, err := jtv.Int64()
- if err != nil {
- return err
- }
- sv.NumberOfRequestsLast30Days = int32(i64)
- }
-
- case "userAgent":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.UserAgent = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentClientStats(v *[]types.ClientStat, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.ClientStat
- if *v == nil {
- cv = []types.ClientStat{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.ClientStat
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentClientStat(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentCluster(v **types.Cluster, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Cluster
- if *v == nil {
- sv = &types.Cluster{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "accessConfig":
- if err := awsRestjson1_deserializeDocumentAccessConfigResponse(&sv.AccessConfig, value); err != nil {
- return err
- }
-
- case "arn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Arn = ptr.String(jtv)
- }
-
- case "certificateAuthority":
- if err := awsRestjson1_deserializeDocumentCertificate(&sv.CertificateAuthority, value); err != nil {
- return err
- }
-
- case "clientRequestToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClientRequestToken = ptr.String(jtv)
- }
-
- case "computeConfig":
- if err := awsRestjson1_deserializeDocumentComputeConfigResponse(&sv.ComputeConfig, value); err != nil {
- return err
- }
-
- case "connectorConfig":
- if err := awsRestjson1_deserializeDocumentConnectorConfigResponse(&sv.ConnectorConfig, value); err != nil {
- return err
- }
-
- case "controlPlaneScalingConfig":
- if err := awsRestjson1_deserializeDocumentControlPlaneScalingConfig(&sv.ControlPlaneScalingConfig, value); err != nil {
- return err
- }
-
- case "createdAt":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "deletionProtection":
- if value != nil {
- jtv, ok := value.(bool)
- if !ok {
- return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value)
- }
- sv.DeletionProtection = ptr.Bool(jtv)
- }
-
- case "encryptionConfig":
- if err := awsRestjson1_deserializeDocumentEncryptionConfigList(&sv.EncryptionConfig, value); err != nil {
- return err
- }
-
- case "endpoint":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Endpoint = ptr.String(jtv)
- }
-
- case "health":
- if err := awsRestjson1_deserializeDocumentClusterHealth(&sv.Health, value); err != nil {
- return err
- }
-
- case "id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- case "identity":
- if err := awsRestjson1_deserializeDocumentIdentity(&sv.Identity, value); err != nil {
- return err
- }
-
- case "kubernetesNetworkConfig":
- if err := awsRestjson1_deserializeDocumentKubernetesNetworkConfigResponse(&sv.KubernetesNetworkConfig, value); err != nil {
- return err
- }
-
- case "logging":
- if err := awsRestjson1_deserializeDocumentLogging(&sv.Logging, value); err != nil {
- return err
- }
-
- case "name":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Name = ptr.String(jtv)
- }
-
- case "outpostConfig":
- if err := awsRestjson1_deserializeDocumentOutpostConfigResponse(&sv.OutpostConfig, value); err != nil {
- return err
- }
-
- case "platformVersion":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.PlatformVersion = ptr.String(jtv)
- }
-
- case "remoteNetworkConfig":
- if err := awsRestjson1_deserializeDocumentRemoteNetworkConfigResponse(&sv.RemoteNetworkConfig, value); err != nil {
- return err
- }
-
- case "resourcesVpcConfig":
- if err := awsRestjson1_deserializeDocumentVpcConfigResponse(&sv.ResourcesVpcConfig, value); err != nil {
- return err
- }
-
- case "roleArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.RoleArn = ptr.String(jtv)
- }
-
- case "status":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ClusterStatus to be of type string, got %T instead", value)
- }
- sv.Status = types.ClusterStatus(jtv)
- }
-
- case "storageConfig":
- if err := awsRestjson1_deserializeDocumentStorageConfigResponse(&sv.StorageConfig, value); err != nil {
- return err
- }
-
- case "tags":
- if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil {
- return err
- }
-
- case "upgradePolicy":
- if err := awsRestjson1_deserializeDocumentUpgradePolicyResponse(&sv.UpgradePolicy, value); err != nil {
- return err
- }
-
- case "version":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Version = ptr.String(jtv)
- }
-
- case "zonalShiftConfig":
- if err := awsRestjson1_deserializeDocumentZonalShiftConfigResponse(&sv.ZonalShiftConfig, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentClusterHealth(v **types.ClusterHealth, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ClusterHealth
- if *v == nil {
- sv = &types.ClusterHealth{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "issues":
- if err := awsRestjson1_deserializeDocumentClusterIssueList(&sv.Issues, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentClusterIssue(v **types.ClusterIssue, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ClusterIssue
- if *v == nil {
- sv = &types.ClusterIssue{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "code":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ClusterIssueCode to be of type string, got %T instead", value)
- }
- sv.Code = types.ClusterIssueCode(jtv)
- }
-
- case "message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- case "resourceIds":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.ResourceIds, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentClusterIssueList(v *[]types.ClusterIssue, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.ClusterIssue
- if *v == nil {
- cv = []types.ClusterIssue{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.ClusterIssue
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentClusterIssue(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentClusterVersionInformation(v **types.ClusterVersionInformation, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ClusterVersionInformation
- if *v == nil {
- sv = &types.ClusterVersionInformation{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "clusterType":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterType = ptr.String(jtv)
- }
-
- case "clusterVersion":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterVersion = ptr.String(jtv)
- }
-
- case "defaultPlatformVersion":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.DefaultPlatformVersion = ptr.String(jtv)
- }
-
- case "defaultVersion":
- if value != nil {
- jtv, ok := value.(bool)
- if !ok {
- return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
- }
- sv.DefaultVersion = jtv
- }
-
- case "endOfExtendedSupportDate":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.EndOfExtendedSupportDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "endOfStandardSupportDate":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.EndOfStandardSupportDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "kubernetesPatchVersion":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.KubernetesPatchVersion = ptr.String(jtv)
- }
-
- case "releaseDate":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.ReleaseDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "status":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ClusterVersionStatus to be of type string, got %T instead", value)
- }
- sv.Status = types.ClusterVersionStatus(jtv)
- }
-
- case "versionStatus":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected VersionStatus to be of type string, got %T instead", value)
- }
- sv.VersionStatus = types.VersionStatus(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentClusterVersionList(v *[]types.ClusterVersionInformation, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.ClusterVersionInformation
- if *v == nil {
- cv = []types.ClusterVersionInformation{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.ClusterVersionInformation
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentClusterVersionInformation(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentCompatibilities(v *[]types.Compatibility, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.Compatibility
- if *v == nil {
- cv = []types.Compatibility{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.Compatibility
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentCompatibility(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentCompatibility(v **types.Compatibility, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Compatibility
- if *v == nil {
- sv = &types.Compatibility{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "clusterVersion":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterVersion = ptr.String(jtv)
- }
-
- case "defaultVersion":
- if value != nil {
- jtv, ok := value.(bool)
- if !ok {
- return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
- }
- sv.DefaultVersion = jtv
- }
-
- case "platformVersions":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.PlatformVersions, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentComputeConfigResponse(v **types.ComputeConfigResponse, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ComputeConfigResponse
- if *v == nil {
- sv = &types.ComputeConfigResponse{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "enabled":
- if value != nil {
- jtv, ok := value.(bool)
- if !ok {
- return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value)
- }
- sv.Enabled = ptr.Bool(jtv)
- }
-
- case "nodePools":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.NodePools, value); err != nil {
- return err
- }
-
- case "nodeRoleArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NodeRoleArn = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentConnectorConfigResponse(v **types.ConnectorConfigResponse, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ConnectorConfigResponse
- if *v == nil {
- sv = &types.ConnectorConfigResponse{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "activationCode":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ActivationCode = ptr.String(jtv)
- }
-
- case "activationExpiry":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.ActivationExpiry = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "activationId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ActivationId = ptr.String(jtv)
- }
-
- case "provider":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Provider = ptr.String(jtv)
- }
-
- case "roleArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.RoleArn = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentControlPlanePlacementResponse(v **types.ControlPlanePlacementResponse, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ControlPlanePlacementResponse
- if *v == nil {
- sv = &types.ControlPlanePlacementResponse{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "groupName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.GroupName = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentControlPlaneScalingConfig(v **types.ControlPlaneScalingConfig, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ControlPlaneScalingConfig
- if *v == nil {
- sv = &types.ControlPlaneScalingConfig{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "tier":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ProvisionedControlPlaneTier to be of type string, got %T instead", value)
- }
- sv.Tier = types.ProvisionedControlPlaneTier(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentDeprecationDetail(v **types.DeprecationDetail, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.DeprecationDetail
- if *v == nil {
- sv = &types.DeprecationDetail{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "clientStats":
- if err := awsRestjson1_deserializeDocumentClientStats(&sv.ClientStats, value); err != nil {
- return err
- }
-
- case "replacedWith":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ReplacedWith = ptr.String(jtv)
- }
-
- case "startServingReplacementVersion":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.StartServingReplacementVersion = ptr.String(jtv)
- }
-
- case "stopServingVersion":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.StopServingVersion = ptr.String(jtv)
- }
-
- case "usage":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Usage = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentDeprecationDetails(v *[]types.DeprecationDetail, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.DeprecationDetail
- if *v == nil {
- cv = []types.DeprecationDetail{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.DeprecationDetail
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentDeprecationDetail(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentEksAnywhereSubscription(v **types.EksAnywhereSubscription, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.EksAnywhereSubscription
- if *v == nil {
- sv = &types.EksAnywhereSubscription{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "arn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Arn = ptr.String(jtv)
- }
-
- case "autoRenew":
- if value != nil {
- jtv, ok := value.(bool)
- if !ok {
- return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
- }
- sv.AutoRenew = jtv
- }
-
- case "createdAt":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "effectiveDate":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.EffectiveDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "expirationDate":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.ExpirationDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- case "licenseArns":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.LicenseArns, value); err != nil {
- return err
- }
-
- case "licenseQuantity":
- if value != nil {
- jtv, ok := value.(json.Number)
- if !ok {
- return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
- }
- i64, err := jtv.Int64()
- if err != nil {
- return err
- }
- sv.LicenseQuantity = int32(i64)
- }
-
- case "licenses":
- if err := awsRestjson1_deserializeDocumentLicenseList(&sv.Licenses, value); err != nil {
- return err
- }
-
- case "licenseType":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected EksAnywhereSubscriptionLicenseType to be of type string, got %T instead", value)
- }
- sv.LicenseType = types.EksAnywhereSubscriptionLicenseType(jtv)
- }
-
- case "status":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Status = ptr.String(jtv)
- }
-
- case "tags":
- if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil {
- return err
- }
-
- case "term":
- if err := awsRestjson1_deserializeDocumentEksAnywhereSubscriptionTerm(&sv.Term, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentEksAnywhereSubscriptionList(v *[]types.EksAnywhereSubscription, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.EksAnywhereSubscription
- if *v == nil {
- cv = []types.EksAnywhereSubscription{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.EksAnywhereSubscription
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentEksAnywhereSubscription(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentEksAnywhereSubscriptionTerm(v **types.EksAnywhereSubscriptionTerm, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.EksAnywhereSubscriptionTerm
- if *v == nil {
- sv = &types.EksAnywhereSubscriptionTerm{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "duration":
- if value != nil {
- jtv, ok := value.(json.Number)
- if !ok {
- return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
- }
- i64, err := jtv.Int64()
- if err != nil {
- return err
- }
- sv.Duration = int32(i64)
- }
-
- case "unit":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected EksAnywhereSubscriptionTermUnit to be of type string, got %T instead", value)
- }
- sv.Unit = types.EksAnywhereSubscriptionTermUnit(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentElasticLoadBalancing(v **types.ElasticLoadBalancing, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ElasticLoadBalancing
- if *v == nil {
- sv = &types.ElasticLoadBalancing{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "enabled":
- if value != nil {
- jtv, ok := value.(bool)
- if !ok {
- return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value)
- }
- sv.Enabled = ptr.Bool(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentEncryptionConfig(v **types.EncryptionConfig, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.EncryptionConfig
- if *v == nil {
- sv = &types.EncryptionConfig{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "provider":
- if err := awsRestjson1_deserializeDocumentProvider(&sv.Provider, value); err != nil {
- return err
- }
-
- case "resources":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.Resources, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentEncryptionConfigList(v *[]types.EncryptionConfig, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.EncryptionConfig
- if *v == nil {
- cv = []types.EncryptionConfig{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.EncryptionConfig
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentEncryptionConfig(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentErrorDetail(v **types.ErrorDetail, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ErrorDetail
- if *v == nil {
- sv = &types.ErrorDetail{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "errorCode":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value)
- }
- sv.ErrorCode = types.ErrorCode(jtv)
- }
-
- case "errorMessage":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ErrorMessage = ptr.String(jtv)
- }
-
- case "resourceIds":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.ResourceIds, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentErrorDetails(v *[]types.ErrorDetail, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.ErrorDetail
- if *v == nil {
- cv = []types.ErrorDetail{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.ErrorDetail
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentErrorDetail(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentFargateProfile(v **types.FargateProfile, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.FargateProfile
- if *v == nil {
- sv = &types.FargateProfile{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "clusterName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterName = ptr.String(jtv)
- }
-
- case "createdAt":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "fargateProfileArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.FargateProfileArn = ptr.String(jtv)
- }
-
- case "fargateProfileName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.FargateProfileName = ptr.String(jtv)
- }
-
- case "health":
- if err := awsRestjson1_deserializeDocumentFargateProfileHealth(&sv.Health, value); err != nil {
- return err
- }
-
- case "podExecutionRoleArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.PodExecutionRoleArn = ptr.String(jtv)
- }
-
- case "selectors":
- if err := awsRestjson1_deserializeDocumentFargateProfileSelectors(&sv.Selectors, value); err != nil {
- return err
- }
-
- case "status":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected FargateProfileStatus to be of type string, got %T instead", value)
- }
- sv.Status = types.FargateProfileStatus(jtv)
- }
-
- case "subnets":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.Subnets, value); err != nil {
- return err
- }
-
- case "tags":
- if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentFargateProfileHealth(v **types.FargateProfileHealth, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.FargateProfileHealth
- if *v == nil {
- sv = &types.FargateProfileHealth{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "issues":
- if err := awsRestjson1_deserializeDocumentFargateProfileIssueList(&sv.Issues, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentFargateProfileIssue(v **types.FargateProfileIssue, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.FargateProfileIssue
- if *v == nil {
- sv = &types.FargateProfileIssue{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "code":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected FargateProfileIssueCode to be of type string, got %T instead", value)
- }
- sv.Code = types.FargateProfileIssueCode(jtv)
- }
-
- case "message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- case "resourceIds":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.ResourceIds, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentFargateProfileIssueList(v *[]types.FargateProfileIssue, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.FargateProfileIssue
- if *v == nil {
- cv = []types.FargateProfileIssue{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.FargateProfileIssue
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentFargateProfileIssue(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentFargateProfileLabel(v *map[string]string, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var mv map[string]string
- if *v == nil {
- mv = map[string]string{}
- } else {
- mv = *v
- }
-
- for key, value := range shape {
- var parsedVal string
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- parsedVal = jtv
- }
- mv[key] = parsedVal
-
- }
- *v = mv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentFargateProfileSelector(v **types.FargateProfileSelector, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.FargateProfileSelector
- if *v == nil {
- sv = &types.FargateProfileSelector{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "labels":
- if err := awsRestjson1_deserializeDocumentFargateProfileLabel(&sv.Labels, value); err != nil {
- return err
- }
-
- case "namespace":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Namespace = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentFargateProfileSelectors(v *[]types.FargateProfileSelector, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.FargateProfileSelector
- if *v == nil {
- cv = []types.FargateProfileSelector{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.FargateProfileSelector
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentFargateProfileSelector(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentIdentity(v **types.Identity, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Identity
- if *v == nil {
- sv = &types.Identity{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "oidc":
- if err := awsRestjson1_deserializeDocumentOIDC(&sv.Oidc, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentIdentityProviderConfig(v **types.IdentityProviderConfig, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.IdentityProviderConfig
- if *v == nil {
- sv = &types.IdentityProviderConfig{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "name":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Name = ptr.String(jtv)
- }
-
- case "type":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Type = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentIdentityProviderConfigResponse(v **types.IdentityProviderConfigResponse, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.IdentityProviderConfigResponse
- if *v == nil {
- sv = &types.IdentityProviderConfigResponse{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "oidc":
- if err := awsRestjson1_deserializeDocumentOidcIdentityProviderConfig(&sv.Oidc, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentIdentityProviderConfigs(v *[]types.IdentityProviderConfig, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.IdentityProviderConfig
- if *v == nil {
- cv = []types.IdentityProviderConfig{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.IdentityProviderConfig
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentIdentityProviderConfig(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentInsight(v **types.Insight, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Insight
- if *v == nil {
- sv = &types.Insight{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "additionalInfo":
- if err := awsRestjson1_deserializeDocumentAdditionalInfoMap(&sv.AdditionalInfo, value); err != nil {
- return err
- }
-
- case "category":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected Category to be of type string, got %T instead", value)
- }
- sv.Category = types.Category(jtv)
- }
-
- case "categorySpecificSummary":
- if err := awsRestjson1_deserializeDocumentInsightCategorySpecificSummary(&sv.CategorySpecificSummary, value); err != nil {
- return err
- }
-
- case "description":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Description = ptr.String(jtv)
- }
-
- case "id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- case "insightStatus":
- if err := awsRestjson1_deserializeDocumentInsightStatus(&sv.InsightStatus, value); err != nil {
- return err
- }
-
- case "kubernetesVersion":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.KubernetesVersion = ptr.String(jtv)
- }
-
- case "lastRefreshTime":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.LastRefreshTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "lastTransitionTime":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.LastTransitionTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "name":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Name = ptr.String(jtv)
- }
-
- case "recommendation":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Recommendation = ptr.String(jtv)
- }
-
- case "resources":
- if err := awsRestjson1_deserializeDocumentInsightResourceDetails(&sv.Resources, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentInsightCategorySpecificSummary(v **types.InsightCategorySpecificSummary, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.InsightCategorySpecificSummary
- if *v == nil {
- sv = &types.InsightCategorySpecificSummary{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "addonCompatibilityDetails":
- if err := awsRestjson1_deserializeDocumentAddonCompatibilityDetails(&sv.AddonCompatibilityDetails, value); err != nil {
- return err
- }
-
- case "deprecationDetails":
- if err := awsRestjson1_deserializeDocumentDeprecationDetails(&sv.DeprecationDetails, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentInsightResourceDetail(v **types.InsightResourceDetail, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.InsightResourceDetail
- if *v == nil {
- sv = &types.InsightResourceDetail{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "arn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Arn = ptr.String(jtv)
- }
-
- case "insightStatus":
- if err := awsRestjson1_deserializeDocumentInsightStatus(&sv.InsightStatus, value); err != nil {
- return err
- }
-
- case "kubernetesResourceUri":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.KubernetesResourceUri = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentInsightResourceDetails(v *[]types.InsightResourceDetail, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.InsightResourceDetail
- if *v == nil {
- cv = []types.InsightResourceDetail{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.InsightResourceDetail
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentInsightResourceDetail(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentInsightStatus(v **types.InsightStatus, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.InsightStatus
- if *v == nil {
- sv = &types.InsightStatus{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "reason":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Reason = ptr.String(jtv)
- }
-
- case "status":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected InsightStatusValue to be of type string, got %T instead", value)
- }
- sv.Status = types.InsightStatusValue(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentInsightSummaries(v *[]types.InsightSummary, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.InsightSummary
- if *v == nil {
- cv = []types.InsightSummary{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.InsightSummary
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentInsightSummary(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentInsightSummary(v **types.InsightSummary, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.InsightSummary
- if *v == nil {
- sv = &types.InsightSummary{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "category":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected Category to be of type string, got %T instead", value)
- }
- sv.Category = types.Category(jtv)
- }
-
- case "description":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Description = ptr.String(jtv)
- }
-
- case "id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- case "insightStatus":
- if err := awsRestjson1_deserializeDocumentInsightStatus(&sv.InsightStatus, value); err != nil {
- return err
- }
-
- case "kubernetesVersion":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.KubernetesVersion = ptr.String(jtv)
- }
-
- case "lastRefreshTime":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.LastRefreshTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "lastTransitionTime":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.LastTransitionTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "name":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Name = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentInvalidParameterException(v **types.InvalidParameterException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.InvalidParameterException
- if *v == nil {
- sv = &types.InvalidParameterException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "addonName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.AddonName = ptr.String(jtv)
- }
-
- case "clusterName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterName = ptr.String(jtv)
- }
-
- case "fargateProfileName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.FargateProfileName = ptr.String(jtv)
- }
-
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- case "nodegroupName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NodegroupName = ptr.String(jtv)
- }
-
- case "subscriptionId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.SubscriptionId = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentInvalidRequestException(v **types.InvalidRequestException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.InvalidRequestException
- if *v == nil {
- sv = &types.InvalidRequestException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "addonName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.AddonName = ptr.String(jtv)
- }
-
- case "clusterName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterName = ptr.String(jtv)
- }
-
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- case "nodegroupName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NodegroupName = ptr.String(jtv)
- }
-
- case "subscriptionId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.SubscriptionId = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentInvalidStateException(v **types.InvalidStateException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.InvalidStateException
- if *v == nil {
- sv = &types.InvalidStateException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "clusterName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterName = ptr.String(jtv)
- }
-
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentIssue(v **types.Issue, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Issue
- if *v == nil {
- sv = &types.Issue{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "code":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NodegroupIssueCode to be of type string, got %T instead", value)
- }
- sv.Code = types.NodegroupIssueCode(jtv)
- }
-
- case "message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- case "resourceIds":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.ResourceIds, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentIssueList(v *[]types.Issue, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.Issue
- if *v == nil {
- cv = []types.Issue{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.Issue
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentIssue(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentKubernetesNetworkConfigResponse(v **types.KubernetesNetworkConfigResponse, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.KubernetesNetworkConfigResponse
- if *v == nil {
- sv = &types.KubernetesNetworkConfigResponse{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "elasticLoadBalancing":
- if err := awsRestjson1_deserializeDocumentElasticLoadBalancing(&sv.ElasticLoadBalancing, value); err != nil {
- return err
- }
-
- case "ipFamily":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected IpFamily to be of type string, got %T instead", value)
- }
- sv.IpFamily = types.IpFamily(jtv)
- }
-
- case "serviceIpv4Cidr":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ServiceIpv4Cidr = ptr.String(jtv)
- }
-
- case "serviceIpv6Cidr":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ServiceIpv6Cidr = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentLabelsMap(v *map[string]string, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var mv map[string]string
- if *v == nil {
- mv = map[string]string{}
- } else {
- mv = *v
- }
-
- for key, value := range shape {
- var parsedVal string
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected labelValue to be of type string, got %T instead", value)
- }
- parsedVal = jtv
- }
- mv[key] = parsedVal
-
- }
- *v = mv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentLaunchTemplateSpecification(v **types.LaunchTemplateSpecification, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.LaunchTemplateSpecification
- if *v == nil {
- sv = &types.LaunchTemplateSpecification{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- case "name":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Name = ptr.String(jtv)
- }
-
- case "version":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Version = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentLicense(v **types.License, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.License
- if *v == nil {
- sv = &types.License{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- case "token":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Token = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentLicenseList(v *[]types.License, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.License
- if *v == nil {
- cv = []types.License{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.License
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentLicense(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentLogging(v **types.Logging, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Logging
- if *v == nil {
- sv = &types.Logging{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "clusterLogging":
- if err := awsRestjson1_deserializeDocumentLogSetups(&sv.ClusterLogging, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentLogSetup(v **types.LogSetup, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.LogSetup
- if *v == nil {
- sv = &types.LogSetup{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "enabled":
- if value != nil {
- jtv, ok := value.(bool)
- if !ok {
- return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value)
- }
- sv.Enabled = ptr.Bool(jtv)
- }
-
- case "types":
- if err := awsRestjson1_deserializeDocumentLogTypes(&sv.Types, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentLogSetups(v *[]types.LogSetup, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.LogSetup
- if *v == nil {
- cv = []types.LogSetup{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.LogSetup
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentLogSetup(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentLogTypes(v *[]types.LogType, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.LogType
- if *v == nil {
- cv = []types.LogType{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.LogType
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected LogType to be of type string, got %T instead", value)
- }
- col = types.LogType(jtv)
- }
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentMarketplaceInformation(v **types.MarketplaceInformation, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.MarketplaceInformation
- if *v == nil {
- sv = &types.MarketplaceInformation{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "productId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ProductId = ptr.String(jtv)
- }
-
- case "productUrl":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ProductUrl = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentNodegroup(v **types.Nodegroup, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Nodegroup
- if *v == nil {
- sv = &types.Nodegroup{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "amiType":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AMITypes to be of type string, got %T instead", value)
- }
- sv.AmiType = types.AMITypes(jtv)
- }
-
- case "capacityType":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected CapacityTypes to be of type string, got %T instead", value)
- }
- sv.CapacityType = types.CapacityTypes(jtv)
- }
-
- case "clusterName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterName = ptr.String(jtv)
- }
-
- case "createdAt":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "diskSize":
- if value != nil {
- jtv, ok := value.(json.Number)
- if !ok {
- return fmt.Errorf("expected BoxedInteger to be json.Number, got %T instead", value)
- }
- i64, err := jtv.Int64()
- if err != nil {
- return err
- }
- sv.DiskSize = ptr.Int32(int32(i64))
- }
-
- case "health":
- if err := awsRestjson1_deserializeDocumentNodegroupHealth(&sv.Health, value); err != nil {
- return err
- }
-
- case "instanceTypes":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.InstanceTypes, value); err != nil {
- return err
- }
-
- case "labels":
- if err := awsRestjson1_deserializeDocumentLabelsMap(&sv.Labels, value); err != nil {
- return err
- }
-
- case "launchTemplate":
- if err := awsRestjson1_deserializeDocumentLaunchTemplateSpecification(&sv.LaunchTemplate, value); err != nil {
- return err
- }
-
- case "modifiedAt":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "nodegroupArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NodegroupArn = ptr.String(jtv)
- }
-
- case "nodegroupName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NodegroupName = ptr.String(jtv)
- }
-
- case "nodeRepairConfig":
- if err := awsRestjson1_deserializeDocumentNodeRepairConfig(&sv.NodeRepairConfig, value); err != nil {
- return err
- }
-
- case "nodeRole":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NodeRole = ptr.String(jtv)
- }
-
- case "releaseVersion":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ReleaseVersion = ptr.String(jtv)
- }
-
- case "remoteAccess":
- if err := awsRestjson1_deserializeDocumentRemoteAccessConfig(&sv.RemoteAccess, value); err != nil {
- return err
- }
-
- case "resources":
- if err := awsRestjson1_deserializeDocumentNodegroupResources(&sv.Resources, value); err != nil {
- return err
- }
-
- case "scalingConfig":
- if err := awsRestjson1_deserializeDocumentNodegroupScalingConfig(&sv.ScalingConfig, value); err != nil {
- return err
- }
-
- case "status":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NodegroupStatus to be of type string, got %T instead", value)
- }
- sv.Status = types.NodegroupStatus(jtv)
- }
-
- case "subnets":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.Subnets, value); err != nil {
- return err
- }
-
- case "tags":
- if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil {
- return err
- }
-
- case "taints":
- if err := awsRestjson1_deserializeDocumentTaintsList(&sv.Taints, value); err != nil {
- return err
- }
-
- case "updateConfig":
- if err := awsRestjson1_deserializeDocumentNodegroupUpdateConfig(&sv.UpdateConfig, value); err != nil {
- return err
- }
-
- case "version":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Version = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentNodegroupHealth(v **types.NodegroupHealth, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.NodegroupHealth
- if *v == nil {
- sv = &types.NodegroupHealth{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "issues":
- if err := awsRestjson1_deserializeDocumentIssueList(&sv.Issues, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentNodegroupResources(v **types.NodegroupResources, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.NodegroupResources
- if *v == nil {
- sv = &types.NodegroupResources{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "autoScalingGroups":
- if err := awsRestjson1_deserializeDocumentAutoScalingGroupList(&sv.AutoScalingGroups, value); err != nil {
- return err
- }
-
- case "remoteAccessSecurityGroup":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.RemoteAccessSecurityGroup = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentNodegroupScalingConfig(v **types.NodegroupScalingConfig, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.NodegroupScalingConfig
- if *v == nil {
- sv = &types.NodegroupScalingConfig{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "desiredSize":
- if value != nil {
- jtv, ok := value.(json.Number)
- if !ok {
- return fmt.Errorf("expected ZeroCapacity to be json.Number, got %T instead", value)
- }
- i64, err := jtv.Int64()
- if err != nil {
- return err
- }
- sv.DesiredSize = ptr.Int32(int32(i64))
- }
-
- case "maxSize":
- if value != nil {
- jtv, ok := value.(json.Number)
- if !ok {
- return fmt.Errorf("expected Capacity to be json.Number, got %T instead", value)
- }
- i64, err := jtv.Int64()
- if err != nil {
- return err
- }
- sv.MaxSize = ptr.Int32(int32(i64))
- }
-
- case "minSize":
- if value != nil {
- jtv, ok := value.(json.Number)
- if !ok {
- return fmt.Errorf("expected ZeroCapacity to be json.Number, got %T instead", value)
- }
- i64, err := jtv.Int64()
- if err != nil {
- return err
- }
- sv.MinSize = ptr.Int32(int32(i64))
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentNodegroupUpdateConfig(v **types.NodegroupUpdateConfig, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.NodegroupUpdateConfig
- if *v == nil {
- sv = &types.NodegroupUpdateConfig{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "maxUnavailable":
- if value != nil {
- jtv, ok := value.(json.Number)
- if !ok {
- return fmt.Errorf("expected NonZeroInteger to be json.Number, got %T instead", value)
- }
- i64, err := jtv.Int64()
- if err != nil {
- return err
- }
- sv.MaxUnavailable = ptr.Int32(int32(i64))
- }
-
- case "maxUnavailablePercentage":
- if value != nil {
- jtv, ok := value.(json.Number)
- if !ok {
- return fmt.Errorf("expected PercentCapacity to be json.Number, got %T instead", value)
- }
- i64, err := jtv.Int64()
- if err != nil {
- return err
- }
- sv.MaxUnavailablePercentage = ptr.Int32(int32(i64))
- }
-
- case "updateStrategy":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NodegroupUpdateStrategies to be of type string, got %T instead", value)
- }
- sv.UpdateStrategy = types.NodegroupUpdateStrategies(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentNodeRepairConfig(v **types.NodeRepairConfig, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.NodeRepairConfig
- if *v == nil {
- sv = &types.NodeRepairConfig{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "enabled":
- if value != nil {
- jtv, ok := value.(bool)
- if !ok {
- return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value)
- }
- sv.Enabled = ptr.Bool(jtv)
- }
-
- case "maxParallelNodesRepairedCount":
- if value != nil {
- jtv, ok := value.(json.Number)
- if !ok {
- return fmt.Errorf("expected NonZeroInteger to be json.Number, got %T instead", value)
- }
- i64, err := jtv.Int64()
- if err != nil {
- return err
- }
- sv.MaxParallelNodesRepairedCount = ptr.Int32(int32(i64))
- }
-
- case "maxParallelNodesRepairedPercentage":
- if value != nil {
- jtv, ok := value.(json.Number)
- if !ok {
- return fmt.Errorf("expected PercentCapacity to be json.Number, got %T instead", value)
- }
- i64, err := jtv.Int64()
- if err != nil {
- return err
- }
- sv.MaxParallelNodesRepairedPercentage = ptr.Int32(int32(i64))
- }
-
- case "maxUnhealthyNodeThresholdCount":
- if value != nil {
- jtv, ok := value.(json.Number)
- if !ok {
- return fmt.Errorf("expected NonZeroInteger to be json.Number, got %T instead", value)
- }
- i64, err := jtv.Int64()
- if err != nil {
- return err
- }
- sv.MaxUnhealthyNodeThresholdCount = ptr.Int32(int32(i64))
- }
-
- case "maxUnhealthyNodeThresholdPercentage":
- if value != nil {
- jtv, ok := value.(json.Number)
- if !ok {
- return fmt.Errorf("expected PercentCapacity to be json.Number, got %T instead", value)
- }
- i64, err := jtv.Int64()
- if err != nil {
- return err
- }
- sv.MaxUnhealthyNodeThresholdPercentage = ptr.Int32(int32(i64))
- }
-
- case "nodeRepairConfigOverrides":
- if err := awsRestjson1_deserializeDocumentNodeRepairConfigOverridesList(&sv.NodeRepairConfigOverrides, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentNodeRepairConfigOverrides(v **types.NodeRepairConfigOverrides, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.NodeRepairConfigOverrides
- if *v == nil {
- sv = &types.NodeRepairConfigOverrides{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "minRepairWaitTimeMins":
- if value != nil {
- jtv, ok := value.(json.Number)
- if !ok {
- return fmt.Errorf("expected NonZeroInteger to be json.Number, got %T instead", value)
- }
- i64, err := jtv.Int64()
- if err != nil {
- return err
- }
- sv.MinRepairWaitTimeMins = ptr.Int32(int32(i64))
- }
-
- case "nodeMonitoringCondition":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NodeMonitoringCondition = ptr.String(jtv)
- }
-
- case "nodeUnhealthyReason":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NodeUnhealthyReason = ptr.String(jtv)
- }
-
- case "repairAction":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected RepairAction to be of type string, got %T instead", value)
- }
- sv.RepairAction = types.RepairAction(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentNodeRepairConfigOverridesList(v *[]types.NodeRepairConfigOverrides, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.NodeRepairConfigOverrides
- if *v == nil {
- cv = []types.NodeRepairConfigOverrides{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.NodeRepairConfigOverrides
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentNodeRepairConfigOverrides(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentNotFoundException(v **types.NotFoundException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.NotFoundException
- if *v == nil {
- sv = &types.NotFoundException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentOIDC(v **types.OIDC, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.OIDC
- if *v == nil {
- sv = &types.OIDC{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "issuer":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Issuer = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentOidcIdentityProviderConfig(v **types.OidcIdentityProviderConfig, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.OidcIdentityProviderConfig
- if *v == nil {
- sv = &types.OidcIdentityProviderConfig{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "clientId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClientId = ptr.String(jtv)
- }
-
- case "clusterName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterName = ptr.String(jtv)
- }
-
- case "groupsClaim":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.GroupsClaim = ptr.String(jtv)
- }
-
- case "groupsPrefix":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.GroupsPrefix = ptr.String(jtv)
- }
-
- case "identityProviderConfigArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.IdentityProviderConfigArn = ptr.String(jtv)
- }
-
- case "identityProviderConfigName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.IdentityProviderConfigName = ptr.String(jtv)
- }
-
- case "issuerUrl":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.IssuerUrl = ptr.String(jtv)
- }
-
- case "requiredClaims":
- if err := awsRestjson1_deserializeDocumentRequiredClaimsMap(&sv.RequiredClaims, value); err != nil {
- return err
- }
-
- case "status":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected configStatus to be of type string, got %T instead", value)
- }
- sv.Status = types.ConfigStatus(jtv)
- }
-
- case "tags":
- if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil {
- return err
- }
-
- case "usernameClaim":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.UsernameClaim = ptr.String(jtv)
- }
-
- case "usernamePrefix":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.UsernamePrefix = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentOutpostConfigResponse(v **types.OutpostConfigResponse, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.OutpostConfigResponse
- if *v == nil {
- sv = &types.OutpostConfigResponse{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "controlPlaneInstanceType":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ControlPlaneInstanceType = ptr.String(jtv)
- }
-
- case "controlPlanePlacement":
- if err := awsRestjson1_deserializeDocumentControlPlanePlacementResponse(&sv.ControlPlanePlacement, value); err != nil {
- return err
- }
-
- case "outpostArns":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.OutpostArns, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentPodIdentityAssociation(v **types.PodIdentityAssociation, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.PodIdentityAssociation
- if *v == nil {
- sv = &types.PodIdentityAssociation{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "associationArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.AssociationArn = ptr.String(jtv)
- }
-
- case "associationId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.AssociationId = ptr.String(jtv)
- }
-
- case "clusterName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterName = ptr.String(jtv)
- }
-
- case "createdAt":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "disableSessionTags":
- if value != nil {
- jtv, ok := value.(bool)
- if !ok {
- return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value)
- }
- sv.DisableSessionTags = ptr.Bool(jtv)
- }
-
- case "externalId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ExternalId = ptr.String(jtv)
- }
-
- case "modifiedAt":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.ModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "namespace":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Namespace = ptr.String(jtv)
- }
-
- case "ownerArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.OwnerArn = ptr.String(jtv)
- }
-
- case "roleArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.RoleArn = ptr.String(jtv)
- }
-
- case "serviceAccount":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ServiceAccount = ptr.String(jtv)
- }
-
- case "tags":
- if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil {
- return err
- }
-
- case "targetRoleArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.TargetRoleArn = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentPodIdentityAssociationSummaries(v *[]types.PodIdentityAssociationSummary, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.PodIdentityAssociationSummary
- if *v == nil {
- cv = []types.PodIdentityAssociationSummary{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.PodIdentityAssociationSummary
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentPodIdentityAssociationSummary(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentPodIdentityAssociationSummary(v **types.PodIdentityAssociationSummary, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.PodIdentityAssociationSummary
- if *v == nil {
- sv = &types.PodIdentityAssociationSummary{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "associationArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.AssociationArn = ptr.String(jtv)
- }
-
- case "associationId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.AssociationId = ptr.String(jtv)
- }
-
- case "clusterName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterName = ptr.String(jtv)
- }
-
- case "namespace":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Namespace = ptr.String(jtv)
- }
-
- case "ownerArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.OwnerArn = ptr.String(jtv)
- }
-
- case "serviceAccount":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ServiceAccount = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentProvider(v **types.Provider, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Provider
- if *v == nil {
- sv = &types.Provider{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "keyArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.KeyArn = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentRemoteAccessConfig(v **types.RemoteAccessConfig, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.RemoteAccessConfig
- if *v == nil {
- sv = &types.RemoteAccessConfig{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "ec2SshKey":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Ec2SshKey = ptr.String(jtv)
- }
-
- case "sourceSecurityGroups":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.SourceSecurityGroups, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentRemoteNetworkConfigResponse(v **types.RemoteNetworkConfigResponse, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.RemoteNetworkConfigResponse
- if *v == nil {
- sv = &types.RemoteNetworkConfigResponse{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "remoteNodeNetworks":
- if err := awsRestjson1_deserializeDocumentRemoteNodeNetworkList(&sv.RemoteNodeNetworks, value); err != nil {
- return err
- }
-
- case "remotePodNetworks":
- if err := awsRestjson1_deserializeDocumentRemotePodNetworkList(&sv.RemotePodNetworks, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentRemoteNodeNetwork(v **types.RemoteNodeNetwork, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.RemoteNodeNetwork
- if *v == nil {
- sv = &types.RemoteNodeNetwork{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "cidrs":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.Cidrs, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentRemoteNodeNetworkList(v *[]types.RemoteNodeNetwork, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.RemoteNodeNetwork
- if *v == nil {
- cv = []types.RemoteNodeNetwork{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.RemoteNodeNetwork
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentRemoteNodeNetwork(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentRemotePodNetwork(v **types.RemotePodNetwork, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.RemotePodNetwork
- if *v == nil {
- sv = &types.RemotePodNetwork{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "cidrs":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.Cidrs, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentRemotePodNetworkList(v *[]types.RemotePodNetwork, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.RemotePodNetwork
- if *v == nil {
- cv = []types.RemotePodNetwork{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.RemotePodNetwork
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentRemotePodNetwork(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentRequiredClaimsMap(v *map[string]string, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var mv map[string]string
- if *v == nil {
- mv = map[string]string{}
- } else {
- mv = *v
- }
-
- for key, value := range shape {
- var parsedVal string
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected requiredClaimsValue to be of type string, got %T instead", value)
- }
- parsedVal = jtv
- }
- mv[key] = parsedVal
-
- }
- *v = mv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentResourceInUseException(v **types.ResourceInUseException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ResourceInUseException
- if *v == nil {
- sv = &types.ResourceInUseException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "addonName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.AddonName = ptr.String(jtv)
- }
-
- case "clusterName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterName = ptr.String(jtv)
- }
-
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- case "nodegroupName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NodegroupName = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentResourceLimitExceededException(v **types.ResourceLimitExceededException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ResourceLimitExceededException
- if *v == nil {
- sv = &types.ResourceLimitExceededException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "clusterName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterName = ptr.String(jtv)
- }
-
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- case "nodegroupName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NodegroupName = ptr.String(jtv)
- }
-
- case "subscriptionId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.SubscriptionId = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ResourceNotFoundException
- if *v == nil {
- sv = &types.ResourceNotFoundException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "addonName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.AddonName = ptr.String(jtv)
- }
-
- case "clusterName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterName = ptr.String(jtv)
- }
-
- case "fargateProfileName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.FargateProfileName = ptr.String(jtv)
- }
-
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- case "nodegroupName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NodegroupName = ptr.String(jtv)
- }
-
- case "subscriptionId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.SubscriptionId = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentResourcePropagationDelayException(v **types.ResourcePropagationDelayException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ResourcePropagationDelayException
- if *v == nil {
- sv = &types.ResourcePropagationDelayException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentServerException(v **types.ServerException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ServerException
- if *v == nil {
- sv = &types.ServerException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "addonName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.AddonName = ptr.String(jtv)
- }
-
- case "clusterName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterName = ptr.String(jtv)
- }
-
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- case "nodegroupName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NodegroupName = ptr.String(jtv)
- }
-
- case "subscriptionId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.SubscriptionId = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentServiceUnavailableException(v **types.ServiceUnavailableException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ServiceUnavailableException
- if *v == nil {
- sv = &types.ServiceUnavailableException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentSsoIdentity(v **types.SsoIdentity, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.SsoIdentity
- if *v == nil {
- sv = &types.SsoIdentity{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- case "type":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected SsoIdentityType to be of type string, got %T instead", value)
- }
- sv.Type = types.SsoIdentityType(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentSsoIdentityList(v *[]types.SsoIdentity, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.SsoIdentity
- if *v == nil {
- cv = []types.SsoIdentity{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.SsoIdentity
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentSsoIdentity(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentStorageConfigResponse(v **types.StorageConfigResponse, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.StorageConfigResponse
- if *v == nil {
- sv = &types.StorageConfigResponse{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "blockStorage":
- if err := awsRestjson1_deserializeDocumentBlockStorage(&sv.BlockStorage, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentStringList(v *[]string, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []string
- if *v == nil {
- cv = []string{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col string
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- col = jtv
- }
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentTagMap(v *map[string]string, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var mv map[string]string
- if *v == nil {
- mv = map[string]string{}
- } else {
- mv = *v
- }
-
- for key, value := range shape {
- var parsedVal string
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected TagValue to be of type string, got %T instead", value)
- }
- parsedVal = jtv
- }
- mv[key] = parsedVal
-
- }
- *v = mv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentTaint(v **types.Taint, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Taint
- if *v == nil {
- sv = &types.Taint{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "effect":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected TaintEffect to be of type string, got %T instead", value)
- }
- sv.Effect = types.TaintEffect(jtv)
- }
-
- case "key":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected taintKey to be of type string, got %T instead", value)
- }
- sv.Key = ptr.String(jtv)
- }
-
- case "value":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected taintValue to be of type string, got %T instead", value)
- }
- sv.Value = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentTaintsList(v *[]types.Taint, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.Taint
- if *v == nil {
- cv = []types.Taint{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.Taint
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentTaint(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ThrottlingException
- if *v == nil {
- sv = &types.ThrottlingException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "clusterName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterName = ptr.String(jtv)
- }
-
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentUnsupportedAvailabilityZoneException(v **types.UnsupportedAvailabilityZoneException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.UnsupportedAvailabilityZoneException
- if *v == nil {
- sv = &types.UnsupportedAvailabilityZoneException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "clusterName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterName = ptr.String(jtv)
- }
-
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- case "nodegroupName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.NodegroupName = ptr.String(jtv)
- }
-
- case "validZones":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.ValidZones, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentUpdate(v **types.Update, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Update
- if *v == nil {
- sv = &types.Update{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "createdAt":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "errors":
- if err := awsRestjson1_deserializeDocumentErrorDetails(&sv.Errors, value); err != nil {
- return err
- }
-
- case "id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- case "params":
- if err := awsRestjson1_deserializeDocumentUpdateParams(&sv.Params, value); err != nil {
- return err
- }
-
- case "status":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected UpdateStatus to be of type string, got %T instead", value)
- }
- sv.Status = types.UpdateStatus(jtv)
- }
-
- case "type":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected UpdateType to be of type string, got %T instead", value)
- }
- sv.Type = types.UpdateType(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentUpdateParam(v **types.UpdateParam, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.UpdateParam
- if *v == nil {
- sv = &types.UpdateParam{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "type":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected UpdateParamType to be of type string, got %T instead", value)
- }
- sv.Type = types.UpdateParamType(jtv)
- }
-
- case "value":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.Value = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentUpdateParams(v *[]types.UpdateParam, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.UpdateParam
- if *v == nil {
- cv = []types.UpdateParam{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.UpdateParam
- destAddr := &col
- if err := awsRestjson1_deserializeDocumentUpdateParam(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentUpgradePolicyResponse(v **types.UpgradePolicyResponse, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.UpgradePolicyResponse
- if *v == nil {
- sv = &types.UpgradePolicyResponse{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "supportType":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected SupportType to be of type string, got %T instead", value)
- }
- sv.SupportType = types.SupportType(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentVpcConfigResponse(v **types.VpcConfigResponse, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.VpcConfigResponse
- if *v == nil {
- sv = &types.VpcConfigResponse{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "clusterSecurityGroupId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.ClusterSecurityGroupId = ptr.String(jtv)
- }
-
- case "endpointPrivateAccess":
- if value != nil {
- jtv, ok := value.(bool)
- if !ok {
- return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
- }
- sv.EndpointPrivateAccess = jtv
- }
-
- case "endpointPublicAccess":
- if value != nil {
- jtv, ok := value.(bool)
- if !ok {
- return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
- }
- sv.EndpointPublicAccess = jtv
- }
-
- case "publicAccessCidrs":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.PublicAccessCidrs, value); err != nil {
- return err
- }
-
- case "securityGroupIds":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.SecurityGroupIds, value); err != nil {
- return err
- }
-
- case "subnetIds":
- if err := awsRestjson1_deserializeDocumentStringList(&sv.SubnetIds, value); err != nil {
- return err
- }
-
- case "vpcId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected String to be of type string, got %T instead", value)
- }
- sv.VpcId = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsRestjson1_deserializeDocumentZonalShiftConfigResponse(v **types.ZonalShiftConfigResponse, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ZonalShiftConfigResponse
- if *v == nil {
- sv = &types.ZonalShiftConfigResponse{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "enabled":
- if value != nil {
- jtv, ok := value.(bool)
- if !ok {
- return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value)
- }
- sv.Enabled = ptr.Bool(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/doc.go
deleted file mode 100644
index 588db993c11a..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/doc.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-// Package eks provides the API client, operations, and parameter types for Amazon
-// Elastic Kubernetes Service.
-//
-// Amazon Elastic Kubernetes Service (Amazon EKS) is a managed service that makes
-// it easy for you to run Kubernetes on Amazon Web Services without needing to
-// setup or maintain your own Kubernetes control plane. Kubernetes is an
-// open-source system for automating the deployment, scaling, and management of
-// containerized applications.
-//
-// Amazon EKS runs up-to-date versions of the open-source Kubernetes software, so
-// you can use all the existing plugins and tooling from the Kubernetes community.
-// Applications running on Amazon EKS are fully compatible with applications
-// running on any standard Kubernetes environment, whether running in on-premises
-// data centers or public clouds. This means that you can easily migrate any
-// standard Kubernetes application to Amazon EKS without any code modification
-// required.
-package eks
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/endpoints.go
deleted file mode 100644
index a0e50f670f54..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/endpoints.go
+++ /dev/null
@@ -1,590 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "errors"
- "fmt"
- "github.com/aws/aws-sdk-go-v2/aws"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
- "github.com/aws/aws-sdk-go-v2/internal/endpoints"
- "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn"
- internalendpoints "github.com/aws/aws-sdk-go-v2/service/eks/internal/endpoints"
- smithyauth "github.com/aws/smithy-go/auth"
- smithyendpoints "github.com/aws/smithy-go/endpoints"
- "github.com/aws/smithy-go/endpoints/private/rulesfn"
- "github.com/aws/smithy-go/middleware"
- "github.com/aws/smithy-go/ptr"
- "github.com/aws/smithy-go/tracing"
- smithyhttp "github.com/aws/smithy-go/transport/http"
- "net/http"
- "net/url"
- "os"
- "strings"
-)
-
-// EndpointResolverOptions is the service endpoint resolver options
-type EndpointResolverOptions = internalendpoints.Options
-
-// EndpointResolver interface for resolving service endpoints.
-type EndpointResolver interface {
- ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
-}
-
-var _ EndpointResolver = &internalendpoints.Resolver{}
-
-// NewDefaultEndpointResolver constructs a new service endpoint resolver
-func NewDefaultEndpointResolver() *internalendpoints.Resolver {
- return internalendpoints.New()
-}
-
-// EndpointResolverFunc is a helper utility that wraps a function so it satisfies
-// the EndpointResolver interface. This is useful when you want to add additional
-// endpoint resolving logic, or stub out specific endpoints with custom values.
-type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)
-
-func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
- return fn(region, options)
-}
-
-// EndpointResolverFromURL returns an EndpointResolver configured using the
-// provided endpoint url. By default, the resolved endpoint resolver uses the
-// client region as signing region, and the endpoint source is set to
-// EndpointSourceCustom.You can provide functional options to configure endpoint
-// values for the resolved endpoint.
-func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver {
- e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom}
- for _, fn := range optFns {
- fn(&e)
- }
-
- return EndpointResolverFunc(
- func(region string, options EndpointResolverOptions) (aws.Endpoint, error) {
- if len(e.SigningRegion) == 0 {
- e.SigningRegion = region
- }
- return e, nil
- },
- )
-}
-
-type ResolveEndpoint struct {
- Resolver EndpointResolver
- Options EndpointResolverOptions
-}
-
-func (*ResolveEndpoint) ID() string {
- return "ResolveEndpoint"
-}
-
-func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
- return next.HandleSerialize(ctx, in)
- }
-
- req, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
- }
-
- if m.Resolver == nil {
- return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
- }
-
- eo := m.Options
- eo.Logger = middleware.GetLogger(ctx)
-
- var endpoint aws.Endpoint
- endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo)
- if err != nil {
- nf := (&aws.EndpointNotFoundError{})
- if errors.As(err, &nf) {
- ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false)
- return next.HandleSerialize(ctx, in)
- }
- return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
- }
-
- req.URL, err = url.Parse(endpoint.URL)
- if err != nil {
- return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err)
- }
-
- if len(awsmiddleware.GetSigningName(ctx)) == 0 {
- signingName := endpoint.SigningName
- if len(signingName) == 0 {
- signingName = "eks"
- }
- ctx = awsmiddleware.SetSigningName(ctx, signingName)
- }
- ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source)
- ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable)
- ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion)
- ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID)
- return next.HandleSerialize(ctx, in)
-}
-func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error {
- return stack.Serialize.Insert(&ResolveEndpoint{
- Resolver: o.EndpointResolver,
- Options: o.EndpointOptions,
- }, "OperationSerializer", middleware.Before)
-}
-
-func removeResolveEndpointMiddleware(stack *middleware.Stack) error {
- _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID())
- return err
-}
-
-type wrappedEndpointResolver struct {
- awsResolver aws.EndpointResolverWithOptions
-}
-
-func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
- return w.awsResolver.ResolveEndpoint(ServiceID, region, options)
-}
-
-type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error)
-
-func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) {
- return a(service, region)
-}
-
-var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil)
-
-// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver.
-// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error,
-// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked
-// via its middleware.
-//
-// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated.
-func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver {
- var resolver aws.EndpointResolverWithOptions
-
- if awsResolverWithOptions != nil {
- resolver = awsResolverWithOptions
- } else if awsResolver != nil {
- resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint)
- }
-
- return &wrappedEndpointResolver{
- awsResolver: resolver,
- }
-}
-
-func finalizeClientEndpointResolverOptions(options *Options) {
- options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage()
-
- if len(options.EndpointOptions.ResolvedRegion) == 0 {
- const fipsInfix = "-fips-"
- const fipsPrefix = "fips-"
- const fipsSuffix = "-fips"
-
- if strings.Contains(options.Region, fipsInfix) ||
- strings.Contains(options.Region, fipsPrefix) ||
- strings.Contains(options.Region, fipsSuffix) {
- options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(
- options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "")
- options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled
- }
- }
-
-}
-
-func resolveEndpointResolverV2(options *Options) {
- if options.EndpointResolverV2 == nil {
- options.EndpointResolverV2 = NewDefaultEndpointResolverV2()
- }
-}
-
-func resolveBaseEndpoint(cfg aws.Config, o *Options) {
- if cfg.BaseEndpoint != nil {
- o.BaseEndpoint = cfg.BaseEndpoint
- }
-
- _, g := os.LookupEnv("AWS_ENDPOINT_URL")
- _, s := os.LookupEnv("AWS_ENDPOINT_URL_EKS")
-
- if g && !s {
- return
- }
-
- value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "EKS", cfg.ConfigSources)
- if found && err == nil {
- o.BaseEndpoint = &value
- }
-}
-
-func bindRegion(region string) (*string, error) {
- if region == "" {
- return nil, nil
- }
- if !rulesfn.IsValidHostLabel(region, true) {
- return nil, fmt.Errorf("invalid input region %s", region)
- }
-
- return aws.String(endpoints.MapFIPSRegion(region)), nil
-}
-
-// EndpointParameters provides the parameters that influence how endpoints are
-// resolved.
-type EndpointParameters struct {
- // The AWS region used to dispatch the request.
- //
- // Parameter is
- // required.
- //
- // AWS::Region
- Region *string
-
- // When true, use the dual-stack endpoint. If the configured endpoint does not
- // support dual-stack, dispatching the request MAY return an error.
- //
- // Defaults to
- // false if no value is provided.
- //
- // AWS::UseDualStack
- UseDualStack *bool
-
- // When true, send this request to the FIPS-compliant regional endpoint. If the
- // configured endpoint does not have a FIPS compliant endpoint, dispatching the
- // request will return an error.
- //
- // Defaults to false if no value is
- // provided.
- //
- // AWS::UseFIPS
- UseFIPS *bool
-
- // Override the endpoint used to send this request
- //
- // Parameter is
- // required.
- //
- // SDK::Endpoint
- Endpoint *string
-}
-
-// ValidateRequired validates required parameters are set.
-func (p EndpointParameters) ValidateRequired() error {
- if p.UseDualStack == nil {
- return fmt.Errorf("parameter UseDualStack is required")
- }
-
- if p.UseFIPS == nil {
- return fmt.Errorf("parameter UseFIPS is required")
- }
-
- return nil
-}
-
-// WithDefaults returns a shallow copy of EndpointParameterswith default values
-// applied to members where applicable.
-func (p EndpointParameters) WithDefaults() EndpointParameters {
- if p.UseDualStack == nil {
- p.UseDualStack = ptr.Bool(false)
- }
-
- if p.UseFIPS == nil {
- p.UseFIPS = ptr.Bool(false)
- }
- return p
-}
-
-type stringSlice []string
-
-func (s stringSlice) Get(i int) *string {
- if i < 0 || i >= len(s) {
- return nil
- }
-
- v := s[i]
- return &v
-}
-
-// EndpointResolverV2 provides the interface for resolving service endpoints.
-type EndpointResolverV2 interface {
- // ResolveEndpoint attempts to resolve the endpoint with the provided options,
- // returning the endpoint if found. Otherwise an error is returned.
- ResolveEndpoint(ctx context.Context, params EndpointParameters) (
- smithyendpoints.Endpoint, error,
- )
-}
-
-// resolver provides the implementation for resolving endpoints.
-type resolver struct{}
-
-func NewDefaultEndpointResolverV2() EndpointResolverV2 {
- return &resolver{}
-}
-
-// ResolveEndpoint attempts to resolve the endpoint with the provided options,
-// returning the endpoint if found. Otherwise an error is returned.
-func (r *resolver) ResolveEndpoint(
- ctx context.Context, params EndpointParameters,
-) (
- endpoint smithyendpoints.Endpoint, err error,
-) {
- params = params.WithDefaults()
- if err = params.ValidateRequired(); err != nil {
- return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err)
- }
- _UseDualStack := *params.UseDualStack
- _ = _UseDualStack
- _UseFIPS := *params.UseFIPS
- _ = _UseFIPS
-
- if exprVal := params.Endpoint; exprVal != nil {
- _Endpoint := *exprVal
- _ = _Endpoint
- if _UseFIPS == true {
- return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported")
- }
- if _UseDualStack == true {
- return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported")
- }
- uriString := _Endpoint
-
- uri, err := url.Parse(uriString)
- if err != nil {
- return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
- }
-
- return smithyendpoints.Endpoint{
- URI: *uri,
- Headers: http.Header{},
- }, nil
- }
- if exprVal := params.Region; exprVal != nil {
- _Region := *exprVal
- _ = _Region
- if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
- _PartitionResult := *exprVal
- _ = _PartitionResult
- if _UseFIPS == true {
- if _UseDualStack == true {
- if true == _PartitionResult.SupportsFIPS {
- if true == _PartitionResult.SupportsDualStack {
- uriString := func() string {
- var out strings.Builder
- out.WriteString("https://eks-fips.")
- out.WriteString(_Region)
- out.WriteString(".")
- out.WriteString(_PartitionResult.DualStackDnsSuffix)
- return out.String()
- }()
-
- uri, err := url.Parse(uriString)
- if err != nil {
- return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
- }
-
- return smithyendpoints.Endpoint{
- URI: *uri,
- Headers: http.Header{},
- }, nil
- }
- }
- return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both")
- }
- }
- if _UseFIPS == true {
- if _PartitionResult.SupportsFIPS == true {
- if _PartitionResult.Name == "aws" {
- uriString := func() string {
- var out strings.Builder
- out.WriteString("https://fips.eks.")
- out.WriteString(_Region)
- out.WriteString(".amazonaws.com")
- return out.String()
- }()
-
- uri, err := url.Parse(uriString)
- if err != nil {
- return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
- }
-
- return smithyendpoints.Endpoint{
- URI: *uri,
- Headers: http.Header{},
- }, nil
- }
- if _PartitionResult.Name == "aws-us-gov" {
- uriString := func() string {
- var out strings.Builder
- out.WriteString("https://eks.")
- out.WriteString(_Region)
- out.WriteString(".amazonaws.com")
- return out.String()
- }()
-
- uri, err := url.Parse(uriString)
- if err != nil {
- return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
- }
-
- return smithyendpoints.Endpoint{
- URI: *uri,
- Headers: http.Header{},
- }, nil
- }
- uriString := func() string {
- var out strings.Builder
- out.WriteString("https://eks-fips.")
- out.WriteString(_Region)
- out.WriteString(".")
- out.WriteString(_PartitionResult.DnsSuffix)
- return out.String()
- }()
-
- uri, err := url.Parse(uriString)
- if err != nil {
- return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
- }
-
- return smithyendpoints.Endpoint{
- URI: *uri,
- Headers: http.Header{},
- }, nil
- }
- return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS")
- }
- if _UseDualStack == true {
- if true == _PartitionResult.SupportsDualStack {
- uriString := func() string {
- var out strings.Builder
- out.WriteString("https://eks.")
- out.WriteString(_Region)
- out.WriteString(".")
- out.WriteString(_PartitionResult.DualStackDnsSuffix)
- return out.String()
- }()
-
- uri, err := url.Parse(uriString)
- if err != nil {
- return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
- }
-
- return smithyendpoints.Endpoint{
- URI: *uri,
- Headers: http.Header{},
- }, nil
- }
- return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack")
- }
- uriString := func() string {
- var out strings.Builder
- out.WriteString("https://eks.")
- out.WriteString(_Region)
- out.WriteString(".")
- out.WriteString(_PartitionResult.DnsSuffix)
- return out.String()
- }()
-
- uri, err := url.Parse(uriString)
- if err != nil {
- return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
- }
-
- return smithyendpoints.Endpoint{
- URI: *uri,
- Headers: http.Header{},
- }, nil
- }
- return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
- }
- return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region")
-}
-
-type endpointParamsBinder interface {
- bindEndpointParams(*EndpointParameters)
-}
-
-func bindEndpointParams(ctx context.Context, input interface{}, options Options) (*EndpointParameters, error) {
- params := &EndpointParameters{}
-
- region, err := bindRegion(options.Region)
- if err != nil {
- return nil, err
- }
- params.Region = region
-
- params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled)
- params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled)
- params.Endpoint = options.BaseEndpoint
-
- if b, ok := input.(endpointParamsBinder); ok {
- b.bindEndpointParams(params)
- }
-
- return params, nil
-}
-
-type resolveEndpointV2Middleware struct {
- options Options
-}
-
-func (*resolveEndpointV2Middleware) ID() string {
- return "ResolveEndpointV2"
-}
-
-func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
- out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "ResolveEndpoint")
- defer span.End()
-
- if awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
- return next.HandleFinalize(ctx, in)
- }
-
- req, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
- }
-
- if m.options.EndpointResolverV2 == nil {
- return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
- }
-
- params, err := bindEndpointParams(ctx, getOperationInput(ctx), m.options)
- if err != nil {
- return out, metadata, fmt.Errorf("failed to bind endpoint params, %w", err)
- }
- endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration",
- func() (smithyendpoints.Endpoint, error) {
- return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params)
- })
- if err != nil {
- return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
- }
-
- span.SetProperty("client.call.resolved_endpoint", endpt.URI.String())
-
- if endpt.URI.RawPath == "" && req.URL.RawPath != "" {
- endpt.URI.RawPath = endpt.URI.Path
- }
- req.URL.Scheme = endpt.URI.Scheme
- req.URL.Host = endpt.URI.Host
- req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path)
- req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath)
- for k := range endpt.Headers {
- req.Header.Set(k, endpt.Headers.Get(k))
- }
-
- rscheme := getResolvedAuthScheme(ctx)
- if rscheme == nil {
- return out, metadata, fmt.Errorf("no resolved auth scheme")
- }
-
- opts, _ := smithyauth.GetAuthOptions(&endpt.Properties)
- for _, o := range opts {
- rscheme.SignerProperties.SetAll(&o.SignerProperties)
- }
-
- span.End()
- return next.HandleFinalize(ctx, in)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/generated.json
deleted file mode 100644
index ef8f2d52953b..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/generated.json
+++ /dev/null
@@ -1,97 +0,0 @@
-{
- "dependencies": {
- "github.com/aws/aws-sdk-go-v2": "v1.4.0",
- "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000",
- "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000",
- "github.com/aws/smithy-go": "v1.4.0"
- },
- "files": [
- "api_client.go",
- "api_client_test.go",
- "api_op_AssociateAccessPolicy.go",
- "api_op_AssociateEncryptionConfig.go",
- "api_op_AssociateIdentityProviderConfig.go",
- "api_op_CreateAccessEntry.go",
- "api_op_CreateAddon.go",
- "api_op_CreateCapability.go",
- "api_op_CreateCluster.go",
- "api_op_CreateEksAnywhereSubscription.go",
- "api_op_CreateFargateProfile.go",
- "api_op_CreateNodegroup.go",
- "api_op_CreatePodIdentityAssociation.go",
- "api_op_DeleteAccessEntry.go",
- "api_op_DeleteAddon.go",
- "api_op_DeleteCapability.go",
- "api_op_DeleteCluster.go",
- "api_op_DeleteEksAnywhereSubscription.go",
- "api_op_DeleteFargateProfile.go",
- "api_op_DeleteNodegroup.go",
- "api_op_DeletePodIdentityAssociation.go",
- "api_op_DeregisterCluster.go",
- "api_op_DescribeAccessEntry.go",
- "api_op_DescribeAddon.go",
- "api_op_DescribeAddonConfiguration.go",
- "api_op_DescribeAddonVersions.go",
- "api_op_DescribeCapability.go",
- "api_op_DescribeCluster.go",
- "api_op_DescribeClusterVersions.go",
- "api_op_DescribeEksAnywhereSubscription.go",
- "api_op_DescribeFargateProfile.go",
- "api_op_DescribeIdentityProviderConfig.go",
- "api_op_DescribeInsight.go",
- "api_op_DescribeInsightsRefresh.go",
- "api_op_DescribeNodegroup.go",
- "api_op_DescribePodIdentityAssociation.go",
- "api_op_DescribeUpdate.go",
- "api_op_DisassociateAccessPolicy.go",
- "api_op_DisassociateIdentityProviderConfig.go",
- "api_op_ListAccessEntries.go",
- "api_op_ListAccessPolicies.go",
- "api_op_ListAddons.go",
- "api_op_ListAssociatedAccessPolicies.go",
- "api_op_ListCapabilities.go",
- "api_op_ListClusters.go",
- "api_op_ListEksAnywhereSubscriptions.go",
- "api_op_ListFargateProfiles.go",
- "api_op_ListIdentityProviderConfigs.go",
- "api_op_ListInsights.go",
- "api_op_ListNodegroups.go",
- "api_op_ListPodIdentityAssociations.go",
- "api_op_ListTagsForResource.go",
- "api_op_ListUpdates.go",
- "api_op_RegisterCluster.go",
- "api_op_StartInsightsRefresh.go",
- "api_op_TagResource.go",
- "api_op_UntagResource.go",
- "api_op_UpdateAccessEntry.go",
- "api_op_UpdateAddon.go",
- "api_op_UpdateCapability.go",
- "api_op_UpdateClusterConfig.go",
- "api_op_UpdateClusterVersion.go",
- "api_op_UpdateEksAnywhereSubscription.go",
- "api_op_UpdateNodegroupConfig.go",
- "api_op_UpdateNodegroupVersion.go",
- "api_op_UpdatePodIdentityAssociation.go",
- "auth.go",
- "deserializers.go",
- "doc.go",
- "endpoints.go",
- "endpoints_config_test.go",
- "endpoints_test.go",
- "generated.json",
- "internal/endpoints/endpoints.go",
- "internal/endpoints/endpoints_test.go",
- "options.go",
- "protocol_test.go",
- "serializers.go",
- "snapshot_test.go",
- "sra_operation_order_test.go",
- "types/enums.go",
- "types/errors.go",
- "types/types.go",
- "validators.go"
- ],
- "go": "1.23",
- "module": "github.com/aws/aws-sdk-go-v2/service/eks",
- "unstable": false
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/go_module_metadata.go
deleted file mode 100644
index a7926342bd6c..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/go_module_metadata.go
+++ /dev/null
@@ -1,6 +0,0 @@
-// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
-
-package eks
-
-// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.77.0"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/internal/endpoints/endpoints.go
deleted file mode 100644
index dc103a57fe57..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/internal/endpoints/endpoints.go
+++ /dev/null
@@ -1,577 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package endpoints
-
-import (
- "github.com/aws/aws-sdk-go-v2/aws"
- endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2"
- "github.com/aws/smithy-go/logging"
- "regexp"
-)
-
-// Options is the endpoint resolver configuration options
-type Options struct {
- // Logger is a logging implementation that log events should be sent to.
- Logger logging.Logger
-
- // LogDeprecated indicates that deprecated endpoints should be logged to the
- // provided logger.
- LogDeprecated bool
-
- // ResolvedRegion is used to override the region to be resolved, rather then the
- // using the value passed to the ResolveEndpoint method. This value is used by the
- // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative
- // name. You must not set this value directly in your application.
- ResolvedRegion string
-
- // DisableHTTPS informs the resolver to return an endpoint that does not use the
- // HTTPS scheme.
- DisableHTTPS bool
-
- // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint.
- UseDualStackEndpoint aws.DualStackEndpointState
-
- // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
- UseFIPSEndpoint aws.FIPSEndpointState
-}
-
-func (o Options) GetResolvedRegion() string {
- return o.ResolvedRegion
-}
-
-func (o Options) GetDisableHTTPS() bool {
- return o.DisableHTTPS
-}
-
-func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState {
- return o.UseDualStackEndpoint
-}
-
-func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState {
- return o.UseFIPSEndpoint
-}
-
-func transformToSharedOptions(options Options) endpoints.Options {
- return endpoints.Options{
- Logger: options.Logger,
- LogDeprecated: options.LogDeprecated,
- ResolvedRegion: options.ResolvedRegion,
- DisableHTTPS: options.DisableHTTPS,
- UseDualStackEndpoint: options.UseDualStackEndpoint,
- UseFIPSEndpoint: options.UseFIPSEndpoint,
- }
-}
-
-// Resolver EKS endpoint resolver
-type Resolver struct {
- partitions endpoints.Partitions
-}
-
-// ResolveEndpoint resolves the service endpoint for the given region and options
-func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) {
- if len(region) == 0 {
- return endpoint, &aws.MissingRegionError{}
- }
-
- opt := transformToSharedOptions(options)
- return r.partitions.ResolveEndpoint(region, opt)
-}
-
-// New returns a new Resolver
-func New() *Resolver {
- return &Resolver{
- partitions: defaultPartitions,
- }
-}
-
-var partitionRegexp = struct {
- Aws *regexp.Regexp
- AwsCn *regexp.Regexp
- AwsEusc *regexp.Regexp
- AwsIso *regexp.Regexp
- AwsIsoB *regexp.Regexp
- AwsIsoE *regexp.Regexp
- AwsIsoF *regexp.Regexp
- AwsUsGov *regexp.Regexp
-}{
-
- Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"),
- AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
- AwsEusc: regexp.MustCompile("^eusc\\-(de)\\-\\w+\\-\\d+$"),
- AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
- AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
- AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"),
- AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"),
- AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"),
-}
-
-var defaultPartitions = endpoints.Partitions{
- {
- ID: "aws",
- Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
- {
- Variant: endpoints.DualStackVariant,
- }: {
- Hostname: "eks.{region}.api.aws",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "fips.eks.{region}.amazonaws.com",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
- }: {
- Hostname: "eks-fips.{region}.api.aws",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: 0,
- }: {
- Hostname: "eks.{region}.amazonaws.com",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v4"},
- },
- },
- RegionRegex: partitionRegexp.Aws,
- IsRegionalized: true,
- Endpoints: endpoints.Endpoints{
- endpoints.EndpointKey{
- Region: "af-south-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "ap-east-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "ap-east-2",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "ap-northeast-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "ap-northeast-2",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "ap-northeast-3",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "ap-south-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "ap-south-2",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "ap-southeast-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "ap-southeast-2",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "ap-southeast-3",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "ap-southeast-4",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "ap-southeast-5",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "ap-southeast-6",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "ap-southeast-7",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "ca-central-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "ca-west-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "eu-central-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "eu-central-2",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "eu-north-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "eu-south-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "eu-south-2",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "eu-west-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "eu-west-2",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "eu-west-3",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "fips-us-east-1",
- }: endpoints.Endpoint{
- Hostname: "fips.eks.us-east-1.amazonaws.com",
- CredentialScope: endpoints.CredentialScope{
- Region: "us-east-1",
- },
- Deprecated: aws.TrueTernary,
- },
- endpoints.EndpointKey{
- Region: "fips-us-east-2",
- }: endpoints.Endpoint{
- Hostname: "fips.eks.us-east-2.amazonaws.com",
- CredentialScope: endpoints.CredentialScope{
- Region: "us-east-2",
- },
- Deprecated: aws.TrueTernary,
- },
- endpoints.EndpointKey{
- Region: "fips-us-west-1",
- }: endpoints.Endpoint{
- Hostname: "fips.eks.us-west-1.amazonaws.com",
- CredentialScope: endpoints.CredentialScope{
- Region: "us-west-1",
- },
- Deprecated: aws.TrueTernary,
- },
- endpoints.EndpointKey{
- Region: "fips-us-west-2",
- }: endpoints.Endpoint{
- Hostname: "fips.eks.us-west-2.amazonaws.com",
- CredentialScope: endpoints.CredentialScope{
- Region: "us-west-2",
- },
- Deprecated: aws.TrueTernary,
- },
- endpoints.EndpointKey{
- Region: "il-central-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "me-central-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "me-south-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "mx-central-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "sa-east-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "us-east-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "us-east-1",
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "fips.eks.us-east-1.amazonaws.com",
- },
- endpoints.EndpointKey{
- Region: "us-east-2",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "us-east-2",
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "fips.eks.us-east-2.amazonaws.com",
- },
- endpoints.EndpointKey{
- Region: "us-west-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "us-west-1",
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "fips.eks.us-west-1.amazonaws.com",
- },
- endpoints.EndpointKey{
- Region: "us-west-2",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "us-west-2",
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "fips.eks.us-west-2.amazonaws.com",
- },
- },
- },
- {
- ID: "aws-cn",
- Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
- {
- Variant: endpoints.DualStackVariant,
- }: {
- Hostname: "eks.{region}.api.amazonwebservices.com.cn",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "eks-fips.{region}.amazonaws.com.cn",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
- }: {
- Hostname: "eks-fips.{region}.api.amazonwebservices.com.cn",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: 0,
- }: {
- Hostname: "eks.{region}.amazonaws.com.cn",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v4"},
- },
- },
- RegionRegex: partitionRegexp.AwsCn,
- IsRegionalized: true,
- Endpoints: endpoints.Endpoints{
- endpoints.EndpointKey{
- Region: "cn-north-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "cn-northwest-1",
- }: endpoints.Endpoint{},
- },
- },
- {
- ID: "aws-eusc",
- Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
- {
- Variant: endpoints.DualStackVariant,
- }: {
- Hostname: "eks.{region}.api.amazonwebservices.eu",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "eks-fips.{region}.amazonaws.eu",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
- }: {
- Hostname: "eks-fips.{region}.api.amazonwebservices.eu",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: 0,
- }: {
- Hostname: "eks.{region}.amazonaws.eu",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- },
- RegionRegex: partitionRegexp.AwsEusc,
- IsRegionalized: true,
- Endpoints: endpoints.Endpoints{
- endpoints.EndpointKey{
- Region: "eusc-de-east-1",
- }: endpoints.Endpoint{},
- },
- },
- {
- ID: "aws-iso",
- Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
- {
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "eks-fips.{region}.c2s.ic.gov",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: 0,
- }: {
- Hostname: "eks.{region}.c2s.ic.gov",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v4"},
- },
- },
- RegionRegex: partitionRegexp.AwsIso,
- IsRegionalized: true,
- Endpoints: endpoints.Endpoints{
- endpoints.EndpointKey{
- Region: "us-iso-east-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "us-iso-west-1",
- }: endpoints.Endpoint{},
- },
- },
- {
- ID: "aws-iso-b",
- Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
- {
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "eks-fips.{region}.sc2s.sgov.gov",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: 0,
- }: {
- Hostname: "eks.{region}.sc2s.sgov.gov",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v4"},
- },
- },
- RegionRegex: partitionRegexp.AwsIsoB,
- IsRegionalized: true,
- Endpoints: endpoints.Endpoints{
- endpoints.EndpointKey{
- Region: "us-isob-east-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "us-isob-west-1",
- }: endpoints.Endpoint{},
- },
- },
- {
- ID: "aws-iso-e",
- Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
- {
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "eks-fips.{region}.cloud.adc-e.uk",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: 0,
- }: {
- Hostname: "eks.{region}.cloud.adc-e.uk",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v4"},
- },
- },
- RegionRegex: partitionRegexp.AwsIsoE,
- IsRegionalized: true,
- Endpoints: endpoints.Endpoints{
- endpoints.EndpointKey{
- Region: "eu-isoe-west-1",
- }: endpoints.Endpoint{},
- },
- },
- {
- ID: "aws-iso-f",
- Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
- {
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "eks-fips.{region}.csp.hci.ic.gov",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: 0,
- }: {
- Hostname: "eks.{region}.csp.hci.ic.gov",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v4"},
- },
- },
- RegionRegex: partitionRegexp.AwsIsoF,
- IsRegionalized: true,
- Endpoints: endpoints.Endpoints{
- endpoints.EndpointKey{
- Region: "us-isof-east-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "us-isof-south-1",
- }: endpoints.Endpoint{},
- },
- },
- {
- ID: "aws-us-gov",
- Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
- {
- Variant: endpoints.DualStackVariant,
- }: {
- Hostname: "eks.{region}.api.aws",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "eks.{region}.amazonaws.com",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
- }: {
- Hostname: "eks-fips.{region}.api.aws",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: 0,
- }: {
- Hostname: "eks.{region}.amazonaws.com",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v4"},
- },
- },
- RegionRegex: partitionRegexp.AwsUsGov,
- IsRegionalized: true,
- Endpoints: endpoints.Endpoints{
- endpoints.EndpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoints.Endpoint{
- Hostname: "eks.us-gov-east-1.amazonaws.com",
- CredentialScope: endpoints.CredentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: aws.TrueTernary,
- },
- endpoints.EndpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoints.Endpoint{
- Hostname: "eks.us-gov-west-1.amazonaws.com",
- CredentialScope: endpoints.CredentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: aws.TrueTernary,
- },
- endpoints.EndpointKey{
- Region: "us-gov-east-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "us-gov-east-1",
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "eks.us-gov-east-1.amazonaws.com",
- },
- endpoints.EndpointKey{
- Region: "us-gov-west-1",
- }: endpoints.Endpoint{},
- endpoints.EndpointKey{
- Region: "us-gov-west-1",
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "eks.us-gov-west-1.amazonaws.com",
- },
- },
- },
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/options.go
deleted file mode 100644
index 08a625bf275f..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/options.go
+++ /dev/null
@@ -1,243 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "github.com/aws/aws-sdk-go-v2/aws"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
- smithyauth "github.com/aws/smithy-go/auth"
- "github.com/aws/smithy-go/logging"
- "github.com/aws/smithy-go/metrics"
- "github.com/aws/smithy-go/middleware"
- "github.com/aws/smithy-go/tracing"
- smithyhttp "github.com/aws/smithy-go/transport/http"
- "net/http"
-)
-
-type HTTPClient interface {
- Do(*http.Request) (*http.Response, error)
-}
-
-type Options struct {
- // Set of options to modify how an operation is invoked. These apply to all
- // operations invoked for this client. Use functional options on operation call to
- // modify this list for per operation behavior.
- APIOptions []func(*middleware.Stack) error
-
- // The optional application specific identifier appended to the User-Agent header.
- AppID string
-
- // This endpoint will be given as input to an EndpointResolverV2. It is used for
- // providing a custom base endpoint that is subject to modifications by the
- // processing EndpointResolverV2.
- BaseEndpoint *string
-
- // Configures the events that will be sent to the configured logger.
- ClientLogMode aws.ClientLogMode
-
- // The credentials object to use when signing requests.
- Credentials aws.CredentialsProvider
-
- // The configuration DefaultsMode that the SDK should use when constructing the
- // clients initial default settings.
- DefaultsMode aws.DefaultsMode
-
- // The endpoint options to be used when attempting to resolve an endpoint.
- EndpointOptions EndpointResolverOptions
-
- // The service endpoint resolver.
- //
- // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a
- // value for this field will likely prevent you from using any endpoint-related
- // service features released after the introduction of EndpointResolverV2 and
- // BaseEndpoint.
- //
- // To migrate an EndpointResolver implementation that uses a custom endpoint, set
- // the client option BaseEndpoint instead.
- EndpointResolver EndpointResolver
-
- // Resolves the endpoint used for a particular service operation. This should be
- // used over the deprecated EndpointResolver.
- EndpointResolverV2 EndpointResolverV2
-
- // Signature Version 4 (SigV4) Signer
- HTTPSignerV4 HTTPSignerV4
-
- // Provides idempotency tokens values that will be automatically populated into
- // idempotent API operations.
- IdempotencyTokenProvider IdempotencyTokenProvider
-
- // The logger writer interface to write logging messages to.
- Logger logging.Logger
-
- // The client meter provider.
- MeterProvider metrics.MeterProvider
-
- // The region to send requests to. (Required)
- Region string
-
- // RetryMaxAttempts specifies the maximum number attempts an API client will call
- // an operation that fails with a retryable error. A value of 0 is ignored, and
- // will not be used to configure the API client created default retryer, or modify
- // per operation call's retry max attempts.
- //
- // If specified in an operation call's functional options with a value that is
- // different than the constructed client's Options, the Client's Retryer will be
- // wrapped to use the operation's specific RetryMaxAttempts value.
- RetryMaxAttempts int
-
- // RetryMode specifies the retry mode the API client will be created with, if
- // Retryer option is not also specified.
- //
- // When creating a new API Clients this member will only be used if the Retryer
- // Options member is nil. This value will be ignored if Retryer is not nil.
- //
- // Currently does not support per operation call overrides, may in the future.
- RetryMode aws.RetryMode
-
- // Retryer guides how HTTP requests should be retried in case of recoverable
- // failures. When nil the API client will use a default retryer. The kind of
- // default retry created by the API client can be changed with the RetryMode
- // option.
- Retryer aws.Retryer
-
- // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
- // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You
- // should not populate this structure programmatically, or rely on the values here
- // within your applications.
- RuntimeEnvironment aws.RuntimeEnvironment
-
- // The client tracer provider.
- TracerProvider tracing.TracerProvider
-
- // The initial DefaultsMode used when the client options were constructed. If the
- // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
- // value was at that point in time.
- //
- // Currently does not support per operation call overrides, may in the future.
- resolvedDefaultsMode aws.DefaultsMode
-
- // The HTTP client to invoke API calls with. Defaults to client's default HTTP
- // implementation if nil.
- HTTPClient HTTPClient
-
- // Client registry of operation interceptors.
- Interceptors smithyhttp.InterceptorRegistry
-
- // The auth scheme resolver which determines how to authenticate for each
- // operation.
- AuthSchemeResolver AuthSchemeResolver
-
- // The list of auth schemes supported by the client.
- AuthSchemes []smithyhttp.AuthScheme
-
- // Priority list of preferred auth scheme names (e.g. sigv4a).
- AuthSchemePreference []string
-}
-
-// Copy creates a clone where the APIOptions list is deep copied.
-func (o Options) Copy() Options {
- to := o
- to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
- copy(to.APIOptions, o.APIOptions)
- to.Interceptors = o.Interceptors.Copy()
-
- return to
-}
-
-func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver {
- if schemeID == "aws.auth#sigv4" {
- return getSigV4IdentityResolver(o)
- }
- if schemeID == "smithy.api#noAuth" {
- return &smithyauth.AnonymousIdentityResolver{}
- }
- return nil
-}
-
-// WithAPIOptions returns a functional option for setting the Client's APIOptions
-// option.
-func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
- return func(o *Options) {
- o.APIOptions = append(o.APIOptions, optFns...)
- }
-}
-
-// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for
-// this field will likely prevent you from using any endpoint-related service
-// features released after the introduction of EndpointResolverV2 and BaseEndpoint.
-//
-// To migrate an EndpointResolver implementation that uses a custom endpoint, set
-// the client option BaseEndpoint instead.
-func WithEndpointResolver(v EndpointResolver) func(*Options) {
- return func(o *Options) {
- o.EndpointResolver = v
- }
-}
-
-// WithEndpointResolverV2 returns a functional option for setting the Client's
-// EndpointResolverV2 option.
-func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) {
- return func(o *Options) {
- o.EndpointResolverV2 = v
- }
-}
-
-func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver {
- if o.Credentials != nil {
- return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials}
- }
- return nil
-}
-
-// WithSigV4SigningName applies an override to the authentication workflow to
-// use the given signing name for SigV4-authenticated operations.
-//
-// This is an advanced setting. The value here is FINAL, taking precedence over
-// the resolved signing name from both auth scheme resolution and endpoint
-// resolution.
-func WithSigV4SigningName(name string) func(*Options) {
- fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
- ) {
- return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in)
- }
- return func(o *Options) {
- o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error {
- return s.Initialize.Add(
- middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn),
- middleware.Before,
- )
- })
- }
-}
-
-// WithSigV4SigningRegion applies an override to the authentication workflow to
-// use the given signing region for SigV4-authenticated operations.
-//
-// This is an advanced setting. The value here is FINAL, taking precedence over
-// the resolved signing region from both auth scheme resolution and endpoint
-// resolution.
-func WithSigV4SigningRegion(region string) func(*Options) {
- fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
- ) {
- return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in)
- }
- return func(o *Options) {
- o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error {
- return s.Initialize.Add(
- middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn),
- middleware.Before,
- )
- })
- }
-}
-
-func ignoreAnonymousAuth(options *Options) {
- if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) {
- options.Credentials = nil
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/serializers.go
deleted file mode 100644
index 82d902a8ff24..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/serializers.go
+++ /dev/null
@@ -1,7354 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "bytes"
- "context"
- "fmt"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- smithy "github.com/aws/smithy-go"
- "github.com/aws/smithy-go/encoding/httpbinding"
- smithyjson "github.com/aws/smithy-go/encoding/json"
- "github.com/aws/smithy-go/middleware"
- "github.com/aws/smithy-go/tracing"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-type awsRestjson1_serializeOpAssociateAccessPolicy struct {
-}
-
-func (*awsRestjson1_serializeOpAssociateAccessPolicy) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpAssociateAccessPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*AssociateAccessPolicyInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/access-entries/{principalArn}/access-policies")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsAssociateAccessPolicyInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentAssociateAccessPolicyInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsAssociateAccessPolicyInput(v *AssociateAccessPolicyInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.PrincipalArn == nil || len(*v.PrincipalArn) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member principalArn must not be empty")}
- }
- if v.PrincipalArn != nil {
- if err := encoder.SetURI("principalArn").String(*v.PrincipalArn); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentAssociateAccessPolicyInput(v *AssociateAccessPolicyInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.AccessScope != nil {
- ok := object.Key("accessScope")
- if err := awsRestjson1_serializeDocumentAccessScope(v.AccessScope, ok); err != nil {
- return err
- }
- }
-
- if v.PolicyArn != nil {
- ok := object.Key("policyArn")
- ok.String(*v.PolicyArn)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpAssociateEncryptionConfig struct {
-}
-
-func (*awsRestjson1_serializeOpAssociateEncryptionConfig) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpAssociateEncryptionConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*AssociateEncryptionConfigInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/encryption-config/associate")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsAssociateEncryptionConfigInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentAssociateEncryptionConfigInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsAssociateEncryptionConfigInput(v *AssociateEncryptionConfigInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentAssociateEncryptionConfigInput(v *AssociateEncryptionConfigInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- if v.EncryptionConfig != nil {
- ok := object.Key("encryptionConfig")
- if err := awsRestjson1_serializeDocumentEncryptionConfigList(v.EncryptionConfig, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpAssociateIdentityProviderConfig struct {
-}
-
-func (*awsRestjson1_serializeOpAssociateIdentityProviderConfig) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpAssociateIdentityProviderConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*AssociateIdentityProviderConfigInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/identity-provider-configs/associate")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsAssociateIdentityProviderConfigInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentAssociateIdentityProviderConfigInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsAssociateIdentityProviderConfigInput(v *AssociateIdentityProviderConfigInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentAssociateIdentityProviderConfigInput(v *AssociateIdentityProviderConfigInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- if v.Oidc != nil {
- ok := object.Key("oidc")
- if err := awsRestjson1_serializeDocumentOidcIdentityProviderConfigRequest(v.Oidc, ok); err != nil {
- return err
- }
- }
-
- if v.Tags != nil {
- ok := object.Key("tags")
- if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpCreateAccessEntry struct {
-}
-
-func (*awsRestjson1_serializeOpCreateAccessEntry) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpCreateAccessEntry) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*CreateAccessEntryInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/access-entries")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsCreateAccessEntryInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentCreateAccessEntryInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsCreateAccessEntryInput(v *CreateAccessEntryInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentCreateAccessEntryInput(v *CreateAccessEntryInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- if v.KubernetesGroups != nil {
- ok := object.Key("kubernetesGroups")
- if err := awsRestjson1_serializeDocumentStringList(v.KubernetesGroups, ok); err != nil {
- return err
- }
- }
-
- if v.PrincipalArn != nil {
- ok := object.Key("principalArn")
- ok.String(*v.PrincipalArn)
- }
-
- if v.Tags != nil {
- ok := object.Key("tags")
- if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil {
- return err
- }
- }
-
- if v.Type != nil {
- ok := object.Key("type")
- ok.String(*v.Type)
- }
-
- if v.Username != nil {
- ok := object.Key("username")
- ok.String(*v.Username)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpCreateAddon struct {
-}
-
-func (*awsRestjson1_serializeOpCreateAddon) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpCreateAddon) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*CreateAddonInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/addons")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsCreateAddonInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentCreateAddonInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsCreateAddonInput(v *CreateAddonInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentCreateAddonInput(v *CreateAddonInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.AddonName != nil {
- ok := object.Key("addonName")
- ok.String(*v.AddonName)
- }
-
- if v.AddonVersion != nil {
- ok := object.Key("addonVersion")
- ok.String(*v.AddonVersion)
- }
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- if v.ConfigurationValues != nil {
- ok := object.Key("configurationValues")
- ok.String(*v.ConfigurationValues)
- }
-
- if v.NamespaceConfig != nil {
- ok := object.Key("namespaceConfig")
- if err := awsRestjson1_serializeDocumentAddonNamespaceConfigRequest(v.NamespaceConfig, ok); err != nil {
- return err
- }
- }
-
- if v.PodIdentityAssociations != nil {
- ok := object.Key("podIdentityAssociations")
- if err := awsRestjson1_serializeDocumentAddonPodIdentityAssociationsList(v.PodIdentityAssociations, ok); err != nil {
- return err
- }
- }
-
- if len(v.ResolveConflicts) > 0 {
- ok := object.Key("resolveConflicts")
- ok.String(string(v.ResolveConflicts))
- }
-
- if v.ServiceAccountRoleArn != nil {
- ok := object.Key("serviceAccountRoleArn")
- ok.String(*v.ServiceAccountRoleArn)
- }
-
- if v.Tags != nil {
- ok := object.Key("tags")
- if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpCreateCapability struct {
-}
-
-func (*awsRestjson1_serializeOpCreateCapability) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpCreateCapability) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*CreateCapabilityInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/capabilities")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsCreateCapabilityInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentCreateCapabilityInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsCreateCapabilityInput(v *CreateCapabilityInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentCreateCapabilityInput(v *CreateCapabilityInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.CapabilityName != nil {
- ok := object.Key("capabilityName")
- ok.String(*v.CapabilityName)
- }
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- if v.Configuration != nil {
- ok := object.Key("configuration")
- if err := awsRestjson1_serializeDocumentCapabilityConfigurationRequest(v.Configuration, ok); err != nil {
- return err
- }
- }
-
- if len(v.DeletePropagationPolicy) > 0 {
- ok := object.Key("deletePropagationPolicy")
- ok.String(string(v.DeletePropagationPolicy))
- }
-
- if v.RoleArn != nil {
- ok := object.Key("roleArn")
- ok.String(*v.RoleArn)
- }
-
- if v.Tags != nil {
- ok := object.Key("tags")
- if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil {
- return err
- }
- }
-
- if len(v.Type) > 0 {
- ok := object.Key("type")
- ok.String(string(v.Type))
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpCreateCluster struct {
-}
-
-func (*awsRestjson1_serializeOpCreateCluster) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpCreateCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*CreateClusterInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentCreateClusterInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsCreateClusterInput(v *CreateClusterInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentCreateClusterInput(v *CreateClusterInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.AccessConfig != nil {
- ok := object.Key("accessConfig")
- if err := awsRestjson1_serializeDocumentCreateAccessConfigRequest(v.AccessConfig, ok); err != nil {
- return err
- }
- }
-
- if v.BootstrapSelfManagedAddons != nil {
- ok := object.Key("bootstrapSelfManagedAddons")
- ok.Boolean(*v.BootstrapSelfManagedAddons)
- }
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- if v.ComputeConfig != nil {
- ok := object.Key("computeConfig")
- if err := awsRestjson1_serializeDocumentComputeConfigRequest(v.ComputeConfig, ok); err != nil {
- return err
- }
- }
-
- if v.ControlPlaneScalingConfig != nil {
- ok := object.Key("controlPlaneScalingConfig")
- if err := awsRestjson1_serializeDocumentControlPlaneScalingConfig(v.ControlPlaneScalingConfig, ok); err != nil {
- return err
- }
- }
-
- if v.DeletionProtection != nil {
- ok := object.Key("deletionProtection")
- ok.Boolean(*v.DeletionProtection)
- }
-
- if v.EncryptionConfig != nil {
- ok := object.Key("encryptionConfig")
- if err := awsRestjson1_serializeDocumentEncryptionConfigList(v.EncryptionConfig, ok); err != nil {
- return err
- }
- }
-
- if v.KubernetesNetworkConfig != nil {
- ok := object.Key("kubernetesNetworkConfig")
- if err := awsRestjson1_serializeDocumentKubernetesNetworkConfigRequest(v.KubernetesNetworkConfig, ok); err != nil {
- return err
- }
- }
-
- if v.Logging != nil {
- ok := object.Key("logging")
- if err := awsRestjson1_serializeDocumentLogging(v.Logging, ok); err != nil {
- return err
- }
- }
-
- if v.Name != nil {
- ok := object.Key("name")
- ok.String(*v.Name)
- }
-
- if v.OutpostConfig != nil {
- ok := object.Key("outpostConfig")
- if err := awsRestjson1_serializeDocumentOutpostConfigRequest(v.OutpostConfig, ok); err != nil {
- return err
- }
- }
-
- if v.RemoteNetworkConfig != nil {
- ok := object.Key("remoteNetworkConfig")
- if err := awsRestjson1_serializeDocumentRemoteNetworkConfigRequest(v.RemoteNetworkConfig, ok); err != nil {
- return err
- }
- }
-
- if v.ResourcesVpcConfig != nil {
- ok := object.Key("resourcesVpcConfig")
- if err := awsRestjson1_serializeDocumentVpcConfigRequest(v.ResourcesVpcConfig, ok); err != nil {
- return err
- }
- }
-
- if v.RoleArn != nil {
- ok := object.Key("roleArn")
- ok.String(*v.RoleArn)
- }
-
- if v.StorageConfig != nil {
- ok := object.Key("storageConfig")
- if err := awsRestjson1_serializeDocumentStorageConfigRequest(v.StorageConfig, ok); err != nil {
- return err
- }
- }
-
- if v.Tags != nil {
- ok := object.Key("tags")
- if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil {
- return err
- }
- }
-
- if v.UpgradePolicy != nil {
- ok := object.Key("upgradePolicy")
- if err := awsRestjson1_serializeDocumentUpgradePolicyRequest(v.UpgradePolicy, ok); err != nil {
- return err
- }
- }
-
- if v.Version != nil {
- ok := object.Key("version")
- ok.String(*v.Version)
- }
-
- if v.ZonalShiftConfig != nil {
- ok := object.Key("zonalShiftConfig")
- if err := awsRestjson1_serializeDocumentZonalShiftConfigRequest(v.ZonalShiftConfig, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpCreateEksAnywhereSubscription struct {
-}
-
-func (*awsRestjson1_serializeOpCreateEksAnywhereSubscription) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpCreateEksAnywhereSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*CreateEksAnywhereSubscriptionInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/eks-anywhere-subscriptions")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentCreateEksAnywhereSubscriptionInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsCreateEksAnywhereSubscriptionInput(v *CreateEksAnywhereSubscriptionInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentCreateEksAnywhereSubscriptionInput(v *CreateEksAnywhereSubscriptionInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.AutoRenew {
- ok := object.Key("autoRenew")
- ok.Boolean(v.AutoRenew)
- }
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- if v.LicenseQuantity != 0 {
- ok := object.Key("licenseQuantity")
- ok.Integer(v.LicenseQuantity)
- }
-
- if len(v.LicenseType) > 0 {
- ok := object.Key("licenseType")
- ok.String(string(v.LicenseType))
- }
-
- if v.Name != nil {
- ok := object.Key("name")
- ok.String(*v.Name)
- }
-
- if v.Tags != nil {
- ok := object.Key("tags")
- if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil {
- return err
- }
- }
-
- if v.Term != nil {
- ok := object.Key("term")
- if err := awsRestjson1_serializeDocumentEksAnywhereSubscriptionTerm(v.Term, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpCreateFargateProfile struct {
-}
-
-func (*awsRestjson1_serializeOpCreateFargateProfile) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpCreateFargateProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*CreateFargateProfileInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/fargate-profiles")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsCreateFargateProfileInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentCreateFargateProfileInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsCreateFargateProfileInput(v *CreateFargateProfileInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentCreateFargateProfileInput(v *CreateFargateProfileInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- if v.FargateProfileName != nil {
- ok := object.Key("fargateProfileName")
- ok.String(*v.FargateProfileName)
- }
-
- if v.PodExecutionRoleArn != nil {
- ok := object.Key("podExecutionRoleArn")
- ok.String(*v.PodExecutionRoleArn)
- }
-
- if v.Selectors != nil {
- ok := object.Key("selectors")
- if err := awsRestjson1_serializeDocumentFargateProfileSelectors(v.Selectors, ok); err != nil {
- return err
- }
- }
-
- if v.Subnets != nil {
- ok := object.Key("subnets")
- if err := awsRestjson1_serializeDocumentStringList(v.Subnets, ok); err != nil {
- return err
- }
- }
-
- if v.Tags != nil {
- ok := object.Key("tags")
- if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpCreateNodegroup struct {
-}
-
-func (*awsRestjson1_serializeOpCreateNodegroup) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpCreateNodegroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*CreateNodegroupInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/node-groups")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsCreateNodegroupInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentCreateNodegroupInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsCreateNodegroupInput(v *CreateNodegroupInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentCreateNodegroupInput(v *CreateNodegroupInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if len(v.AmiType) > 0 {
- ok := object.Key("amiType")
- ok.String(string(v.AmiType))
- }
-
- if len(v.CapacityType) > 0 {
- ok := object.Key("capacityType")
- ok.String(string(v.CapacityType))
- }
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- if v.DiskSize != nil {
- ok := object.Key("diskSize")
- ok.Integer(*v.DiskSize)
- }
-
- if v.InstanceTypes != nil {
- ok := object.Key("instanceTypes")
- if err := awsRestjson1_serializeDocumentStringList(v.InstanceTypes, ok); err != nil {
- return err
- }
- }
-
- if v.Labels != nil {
- ok := object.Key("labels")
- if err := awsRestjson1_serializeDocumentLabelsMap(v.Labels, ok); err != nil {
- return err
- }
- }
-
- if v.LaunchTemplate != nil {
- ok := object.Key("launchTemplate")
- if err := awsRestjson1_serializeDocumentLaunchTemplateSpecification(v.LaunchTemplate, ok); err != nil {
- return err
- }
- }
-
- if v.NodegroupName != nil {
- ok := object.Key("nodegroupName")
- ok.String(*v.NodegroupName)
- }
-
- if v.NodeRepairConfig != nil {
- ok := object.Key("nodeRepairConfig")
- if err := awsRestjson1_serializeDocumentNodeRepairConfig(v.NodeRepairConfig, ok); err != nil {
- return err
- }
- }
-
- if v.NodeRole != nil {
- ok := object.Key("nodeRole")
- ok.String(*v.NodeRole)
- }
-
- if v.ReleaseVersion != nil {
- ok := object.Key("releaseVersion")
- ok.String(*v.ReleaseVersion)
- }
-
- if v.RemoteAccess != nil {
- ok := object.Key("remoteAccess")
- if err := awsRestjson1_serializeDocumentRemoteAccessConfig(v.RemoteAccess, ok); err != nil {
- return err
- }
- }
-
- if v.ScalingConfig != nil {
- ok := object.Key("scalingConfig")
- if err := awsRestjson1_serializeDocumentNodegroupScalingConfig(v.ScalingConfig, ok); err != nil {
- return err
- }
- }
-
- if v.Subnets != nil {
- ok := object.Key("subnets")
- if err := awsRestjson1_serializeDocumentStringList(v.Subnets, ok); err != nil {
- return err
- }
- }
-
- if v.Tags != nil {
- ok := object.Key("tags")
- if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil {
- return err
- }
- }
-
- if v.Taints != nil {
- ok := object.Key("taints")
- if err := awsRestjson1_serializeDocumentTaintsList(v.Taints, ok); err != nil {
- return err
- }
- }
-
- if v.UpdateConfig != nil {
- ok := object.Key("updateConfig")
- if err := awsRestjson1_serializeDocumentNodegroupUpdateConfig(v.UpdateConfig, ok); err != nil {
- return err
- }
- }
-
- if v.Version != nil {
- ok := object.Key("version")
- ok.String(*v.Version)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpCreatePodIdentityAssociation struct {
-}
-
-func (*awsRestjson1_serializeOpCreatePodIdentityAssociation) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpCreatePodIdentityAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*CreatePodIdentityAssociationInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/pod-identity-associations")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsCreatePodIdentityAssociationInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentCreatePodIdentityAssociationInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsCreatePodIdentityAssociationInput(v *CreatePodIdentityAssociationInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentCreatePodIdentityAssociationInput(v *CreatePodIdentityAssociationInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- if v.DisableSessionTags != nil {
- ok := object.Key("disableSessionTags")
- ok.Boolean(*v.DisableSessionTags)
- }
-
- if v.Namespace != nil {
- ok := object.Key("namespace")
- ok.String(*v.Namespace)
- }
-
- if v.RoleArn != nil {
- ok := object.Key("roleArn")
- ok.String(*v.RoleArn)
- }
-
- if v.ServiceAccount != nil {
- ok := object.Key("serviceAccount")
- ok.String(*v.ServiceAccount)
- }
-
- if v.Tags != nil {
- ok := object.Key("tags")
- if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil {
- return err
- }
- }
-
- if v.TargetRoleArn != nil {
- ok := object.Key("targetRoleArn")
- ok.String(*v.TargetRoleArn)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDeleteAccessEntry struct {
-}
-
-func (*awsRestjson1_serializeOpDeleteAccessEntry) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDeleteAccessEntry) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DeleteAccessEntryInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/access-entries/{principalArn}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "DELETE"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDeleteAccessEntryInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDeleteAccessEntryInput(v *DeleteAccessEntryInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.PrincipalArn == nil || len(*v.PrincipalArn) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member principalArn must not be empty")}
- }
- if v.PrincipalArn != nil {
- if err := encoder.SetURI("principalArn").String(*v.PrincipalArn); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDeleteAddon struct {
-}
-
-func (*awsRestjson1_serializeOpDeleteAddon) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDeleteAddon) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DeleteAddonInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/addons/{addonName}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "DELETE"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDeleteAddonInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDeleteAddonInput(v *DeleteAddonInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.AddonName == nil || len(*v.AddonName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member addonName must not be empty")}
- }
- if v.AddonName != nil {
- if err := encoder.SetURI("addonName").String(*v.AddonName); err != nil {
- return err
- }
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.Preserve {
- encoder.SetQuery("preserve").Boolean(v.Preserve)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDeleteCapability struct {
-}
-
-func (*awsRestjson1_serializeOpDeleteCapability) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDeleteCapability) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DeleteCapabilityInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/capabilities/{capabilityName}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "DELETE"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDeleteCapabilityInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDeleteCapabilityInput(v *DeleteCapabilityInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.CapabilityName == nil || len(*v.CapabilityName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member capabilityName must not be empty")}
- }
- if v.CapabilityName != nil {
- if err := encoder.SetURI("capabilityName").String(*v.CapabilityName); err != nil {
- return err
- }
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDeleteCluster struct {
-}
-
-func (*awsRestjson1_serializeOpDeleteCluster) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDeleteCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DeleteClusterInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{name}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "DELETE"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDeleteClusterInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDeleteClusterInput(v *DeleteClusterInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.Name == nil || len(*v.Name) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")}
- }
- if v.Name != nil {
- if err := encoder.SetURI("name").String(*v.Name); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDeleteEksAnywhereSubscription struct {
-}
-
-func (*awsRestjson1_serializeOpDeleteEksAnywhereSubscription) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDeleteEksAnywhereSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DeleteEksAnywhereSubscriptionInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/eks-anywhere-subscriptions/{id}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "DELETE"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDeleteEksAnywhereSubscriptionInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDeleteEksAnywhereSubscriptionInput(v *DeleteEksAnywhereSubscriptionInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.Id == nil || len(*v.Id) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")}
- }
- if v.Id != nil {
- if err := encoder.SetURI("id").String(*v.Id); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDeleteFargateProfile struct {
-}
-
-func (*awsRestjson1_serializeOpDeleteFargateProfile) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDeleteFargateProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DeleteFargateProfileInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/fargate-profiles/{fargateProfileName}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "DELETE"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDeleteFargateProfileInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDeleteFargateProfileInput(v *DeleteFargateProfileInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.FargateProfileName == nil || len(*v.FargateProfileName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member fargateProfileName must not be empty")}
- }
- if v.FargateProfileName != nil {
- if err := encoder.SetURI("fargateProfileName").String(*v.FargateProfileName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDeleteNodegroup struct {
-}
-
-func (*awsRestjson1_serializeOpDeleteNodegroup) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDeleteNodegroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DeleteNodegroupInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/node-groups/{nodegroupName}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "DELETE"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDeleteNodegroupInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDeleteNodegroupInput(v *DeleteNodegroupInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.NodegroupName == nil || len(*v.NodegroupName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member nodegroupName must not be empty")}
- }
- if v.NodegroupName != nil {
- if err := encoder.SetURI("nodegroupName").String(*v.NodegroupName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDeletePodIdentityAssociation struct {
-}
-
-func (*awsRestjson1_serializeOpDeletePodIdentityAssociation) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDeletePodIdentityAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DeletePodIdentityAssociationInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/pod-identity-associations/{associationId}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "DELETE"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDeletePodIdentityAssociationInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDeletePodIdentityAssociationInput(v *DeletePodIdentityAssociationInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.AssociationId == nil || len(*v.AssociationId) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member associationId must not be empty")}
- }
- if v.AssociationId != nil {
- if err := encoder.SetURI("associationId").String(*v.AssociationId); err != nil {
- return err
- }
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDeregisterCluster struct {
-}
-
-func (*awsRestjson1_serializeOpDeregisterCluster) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDeregisterCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DeregisterClusterInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/cluster-registrations/{name}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "DELETE"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDeregisterClusterInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDeregisterClusterInput(v *DeregisterClusterInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.Name == nil || len(*v.Name) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")}
- }
- if v.Name != nil {
- if err := encoder.SetURI("name").String(*v.Name); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDescribeAccessEntry struct {
-}
-
-func (*awsRestjson1_serializeOpDescribeAccessEntry) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDescribeAccessEntry) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeAccessEntryInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/access-entries/{principalArn}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDescribeAccessEntryInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDescribeAccessEntryInput(v *DescribeAccessEntryInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.PrincipalArn == nil || len(*v.PrincipalArn) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member principalArn must not be empty")}
- }
- if v.PrincipalArn != nil {
- if err := encoder.SetURI("principalArn").String(*v.PrincipalArn); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDescribeAddon struct {
-}
-
-func (*awsRestjson1_serializeOpDescribeAddon) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDescribeAddon) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeAddonInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/addons/{addonName}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDescribeAddonInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDescribeAddonInput(v *DescribeAddonInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.AddonName == nil || len(*v.AddonName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member addonName must not be empty")}
- }
- if v.AddonName != nil {
- if err := encoder.SetURI("addonName").String(*v.AddonName); err != nil {
- return err
- }
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDescribeAddonConfiguration struct {
-}
-
-func (*awsRestjson1_serializeOpDescribeAddonConfiguration) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDescribeAddonConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeAddonConfigurationInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/addons/configuration-schemas")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDescribeAddonConfigurationInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDescribeAddonConfigurationInput(v *DescribeAddonConfigurationInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.AddonName != nil {
- encoder.SetQuery("addonName").String(*v.AddonName)
- }
-
- if v.AddonVersion != nil {
- encoder.SetQuery("addonVersion").String(*v.AddonVersion)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDescribeAddonVersions struct {
-}
-
-func (*awsRestjson1_serializeOpDescribeAddonVersions) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDescribeAddonVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeAddonVersionsInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/addons/supported-versions")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDescribeAddonVersionsInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDescribeAddonVersionsInput(v *DescribeAddonVersionsInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.AddonName != nil {
- encoder.SetQuery("addonName").String(*v.AddonName)
- }
-
- if v.KubernetesVersion != nil {
- encoder.SetQuery("kubernetesVersion").String(*v.KubernetesVersion)
- }
-
- if v.MaxResults != nil {
- encoder.SetQuery("maxResults").Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- encoder.SetQuery("nextToken").String(*v.NextToken)
- }
-
- if v.Owners != nil {
- for i := range v.Owners {
- encoder.AddQuery("owners").String(v.Owners[i])
- }
- }
-
- if v.Publishers != nil {
- for i := range v.Publishers {
- encoder.AddQuery("publishers").String(v.Publishers[i])
- }
- }
-
- if v.Types != nil {
- for i := range v.Types {
- encoder.AddQuery("types").String(v.Types[i])
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDescribeCapability struct {
-}
-
-func (*awsRestjson1_serializeOpDescribeCapability) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDescribeCapability) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeCapabilityInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/capabilities/{capabilityName}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDescribeCapabilityInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDescribeCapabilityInput(v *DescribeCapabilityInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.CapabilityName == nil || len(*v.CapabilityName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member capabilityName must not be empty")}
- }
- if v.CapabilityName != nil {
- if err := encoder.SetURI("capabilityName").String(*v.CapabilityName); err != nil {
- return err
- }
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDescribeCluster struct {
-}
-
-func (*awsRestjson1_serializeOpDescribeCluster) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDescribeCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeClusterInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{name}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDescribeClusterInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDescribeClusterInput(v *DescribeClusterInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.Name == nil || len(*v.Name) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")}
- }
- if v.Name != nil {
- if err := encoder.SetURI("name").String(*v.Name); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDescribeClusterVersions struct {
-}
-
-func (*awsRestjson1_serializeOpDescribeClusterVersions) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDescribeClusterVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeClusterVersionsInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/cluster-versions")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDescribeClusterVersionsInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDescribeClusterVersionsInput(v *DescribeClusterVersionsInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterType != nil {
- encoder.SetQuery("clusterType").String(*v.ClusterType)
- }
-
- if v.ClusterVersions != nil {
- for i := range v.ClusterVersions {
- encoder.AddQuery("clusterVersions").String(v.ClusterVersions[i])
- }
- }
-
- if v.DefaultOnly != nil {
- encoder.SetQuery("defaultOnly").Boolean(*v.DefaultOnly)
- }
-
- if v.IncludeAll != nil {
- encoder.SetQuery("includeAll").Boolean(*v.IncludeAll)
- }
-
- if v.MaxResults != nil {
- encoder.SetQuery("maxResults").Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- encoder.SetQuery("nextToken").String(*v.NextToken)
- }
-
- if len(v.Status) > 0 {
- encoder.SetQuery("status").String(string(v.Status))
- }
-
- if len(v.VersionStatus) > 0 {
- encoder.SetQuery("versionStatus").String(string(v.VersionStatus))
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDescribeEksAnywhereSubscription struct {
-}
-
-func (*awsRestjson1_serializeOpDescribeEksAnywhereSubscription) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDescribeEksAnywhereSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeEksAnywhereSubscriptionInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/eks-anywhere-subscriptions/{id}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDescribeEksAnywhereSubscriptionInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDescribeEksAnywhereSubscriptionInput(v *DescribeEksAnywhereSubscriptionInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.Id == nil || len(*v.Id) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")}
- }
- if v.Id != nil {
- if err := encoder.SetURI("id").String(*v.Id); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDescribeFargateProfile struct {
-}
-
-func (*awsRestjson1_serializeOpDescribeFargateProfile) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDescribeFargateProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeFargateProfileInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/fargate-profiles/{fargateProfileName}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDescribeFargateProfileInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDescribeFargateProfileInput(v *DescribeFargateProfileInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.FargateProfileName == nil || len(*v.FargateProfileName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member fargateProfileName must not be empty")}
- }
- if v.FargateProfileName != nil {
- if err := encoder.SetURI("fargateProfileName").String(*v.FargateProfileName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDescribeIdentityProviderConfig struct {
-}
-
-func (*awsRestjson1_serializeOpDescribeIdentityProviderConfig) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDescribeIdentityProviderConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeIdentityProviderConfigInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/identity-provider-configs/describe")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDescribeIdentityProviderConfigInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentDescribeIdentityProviderConfigInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDescribeIdentityProviderConfigInput(v *DescribeIdentityProviderConfigInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentDescribeIdentityProviderConfigInput(v *DescribeIdentityProviderConfigInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.IdentityProviderConfig != nil {
- ok := object.Key("identityProviderConfig")
- if err := awsRestjson1_serializeDocumentIdentityProviderConfig(v.IdentityProviderConfig, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDescribeInsight struct {
-}
-
-func (*awsRestjson1_serializeOpDescribeInsight) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDescribeInsight) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeInsightInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/insights/{id}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDescribeInsightInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDescribeInsightInput(v *DescribeInsightInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.Id == nil || len(*v.Id) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")}
- }
- if v.Id != nil {
- if err := encoder.SetURI("id").String(*v.Id); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDescribeInsightsRefresh struct {
-}
-
-func (*awsRestjson1_serializeOpDescribeInsightsRefresh) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDescribeInsightsRefresh) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeInsightsRefreshInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/insights-refresh")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDescribeInsightsRefreshInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDescribeInsightsRefreshInput(v *DescribeInsightsRefreshInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDescribeNodegroup struct {
-}
-
-func (*awsRestjson1_serializeOpDescribeNodegroup) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDescribeNodegroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeNodegroupInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/node-groups/{nodegroupName}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDescribeNodegroupInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDescribeNodegroupInput(v *DescribeNodegroupInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.NodegroupName == nil || len(*v.NodegroupName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member nodegroupName must not be empty")}
- }
- if v.NodegroupName != nil {
- if err := encoder.SetURI("nodegroupName").String(*v.NodegroupName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDescribePodIdentityAssociation struct {
-}
-
-func (*awsRestjson1_serializeOpDescribePodIdentityAssociation) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDescribePodIdentityAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribePodIdentityAssociationInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/pod-identity-associations/{associationId}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDescribePodIdentityAssociationInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDescribePodIdentityAssociationInput(v *DescribePodIdentityAssociationInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.AssociationId == nil || len(*v.AssociationId) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member associationId must not be empty")}
- }
- if v.AssociationId != nil {
- if err := encoder.SetURI("associationId").String(*v.AssociationId); err != nil {
- return err
- }
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDescribeUpdate struct {
-}
-
-func (*awsRestjson1_serializeOpDescribeUpdate) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDescribeUpdate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeUpdateInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{name}/updates/{updateId}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDescribeUpdateInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDescribeUpdateInput(v *DescribeUpdateInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.AddonName != nil {
- encoder.SetQuery("addonName").String(*v.AddonName)
- }
-
- if v.CapabilityName != nil {
- encoder.SetQuery("capabilityName").String(*v.CapabilityName)
- }
-
- if v.Name == nil || len(*v.Name) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")}
- }
- if v.Name != nil {
- if err := encoder.SetURI("name").String(*v.Name); err != nil {
- return err
- }
- }
-
- if v.NodegroupName != nil {
- encoder.SetQuery("nodegroupName").String(*v.NodegroupName)
- }
-
- if v.UpdateId == nil || len(*v.UpdateId) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member updateId must not be empty")}
- }
- if v.UpdateId != nil {
- if err := encoder.SetURI("updateId").String(*v.UpdateId); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDisassociateAccessPolicy struct {
-}
-
-func (*awsRestjson1_serializeOpDisassociateAccessPolicy) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDisassociateAccessPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DisassociateAccessPolicyInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/access-entries/{principalArn}/access-policies/{policyArn}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "DELETE"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDisassociateAccessPolicyInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDisassociateAccessPolicyInput(v *DisassociateAccessPolicyInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.PolicyArn == nil || len(*v.PolicyArn) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member policyArn must not be empty")}
- }
- if v.PolicyArn != nil {
- if err := encoder.SetURI("policyArn").String(*v.PolicyArn); err != nil {
- return err
- }
- }
-
- if v.PrincipalArn == nil || len(*v.PrincipalArn) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member principalArn must not be empty")}
- }
- if v.PrincipalArn != nil {
- if err := encoder.SetURI("principalArn").String(*v.PrincipalArn); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpDisassociateIdentityProviderConfig struct {
-}
-
-func (*awsRestjson1_serializeOpDisassociateIdentityProviderConfig) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpDisassociateIdentityProviderConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DisassociateIdentityProviderConfigInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/identity-provider-configs/disassociate")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsDisassociateIdentityProviderConfigInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentDisassociateIdentityProviderConfigInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsDisassociateIdentityProviderConfigInput(v *DisassociateIdentityProviderConfigInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentDisassociateIdentityProviderConfigInput(v *DisassociateIdentityProviderConfigInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- if v.IdentityProviderConfig != nil {
- ok := object.Key("identityProviderConfig")
- if err := awsRestjson1_serializeDocumentIdentityProviderConfig(v.IdentityProviderConfig, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpListAccessEntries struct {
-}
-
-func (*awsRestjson1_serializeOpListAccessEntries) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpListAccessEntries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListAccessEntriesInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/access-entries")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsListAccessEntriesInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsListAccessEntriesInput(v *ListAccessEntriesInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.AssociatedPolicyArn != nil {
- encoder.SetQuery("associatedPolicyArn").String(*v.AssociatedPolicyArn)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.MaxResults != nil {
- encoder.SetQuery("maxResults").Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- encoder.SetQuery("nextToken").String(*v.NextToken)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpListAccessPolicies struct {
-}
-
-func (*awsRestjson1_serializeOpListAccessPolicies) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpListAccessPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListAccessPoliciesInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/access-policies")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsListAccessPoliciesInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsListAccessPoliciesInput(v *ListAccessPoliciesInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.MaxResults != nil {
- encoder.SetQuery("maxResults").Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- encoder.SetQuery("nextToken").String(*v.NextToken)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpListAddons struct {
-}
-
-func (*awsRestjson1_serializeOpListAddons) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpListAddons) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListAddonsInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/addons")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsListAddonsInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsListAddonsInput(v *ListAddonsInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.MaxResults != nil {
- encoder.SetQuery("maxResults").Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- encoder.SetQuery("nextToken").String(*v.NextToken)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpListAssociatedAccessPolicies struct {
-}
-
-func (*awsRestjson1_serializeOpListAssociatedAccessPolicies) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpListAssociatedAccessPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListAssociatedAccessPoliciesInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/access-entries/{principalArn}/access-policies")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsListAssociatedAccessPoliciesInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsListAssociatedAccessPoliciesInput(v *ListAssociatedAccessPoliciesInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.MaxResults != nil {
- encoder.SetQuery("maxResults").Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- encoder.SetQuery("nextToken").String(*v.NextToken)
- }
-
- if v.PrincipalArn == nil || len(*v.PrincipalArn) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member principalArn must not be empty")}
- }
- if v.PrincipalArn != nil {
- if err := encoder.SetURI("principalArn").String(*v.PrincipalArn); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpListCapabilities struct {
-}
-
-func (*awsRestjson1_serializeOpListCapabilities) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpListCapabilities) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListCapabilitiesInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/capabilities")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsListCapabilitiesInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsListCapabilitiesInput(v *ListCapabilitiesInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.MaxResults != nil {
- encoder.SetQuery("maxResults").Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- encoder.SetQuery("nextToken").String(*v.NextToken)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpListClusters struct {
-}
-
-func (*awsRestjson1_serializeOpListClusters) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpListClusters) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListClustersInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsListClustersInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsListClustersInput(v *ListClustersInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.Include != nil {
- for i := range v.Include {
- encoder.AddQuery("include").String(v.Include[i])
- }
- }
-
- if v.MaxResults != nil {
- encoder.SetQuery("maxResults").Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- encoder.SetQuery("nextToken").String(*v.NextToken)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpListEksAnywhereSubscriptions struct {
-}
-
-func (*awsRestjson1_serializeOpListEksAnywhereSubscriptions) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpListEksAnywhereSubscriptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListEksAnywhereSubscriptionsInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/eks-anywhere-subscriptions")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsListEksAnywhereSubscriptionsInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsListEksAnywhereSubscriptionsInput(v *ListEksAnywhereSubscriptionsInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.IncludeStatus != nil {
- for i := range v.IncludeStatus {
- encoder.AddQuery("includeStatus").String(string(v.IncludeStatus[i]))
- }
- }
-
- if v.MaxResults != nil {
- encoder.SetQuery("maxResults").Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- encoder.SetQuery("nextToken").String(*v.NextToken)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpListFargateProfiles struct {
-}
-
-func (*awsRestjson1_serializeOpListFargateProfiles) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpListFargateProfiles) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListFargateProfilesInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/fargate-profiles")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsListFargateProfilesInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsListFargateProfilesInput(v *ListFargateProfilesInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.MaxResults != nil {
- encoder.SetQuery("maxResults").Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- encoder.SetQuery("nextToken").String(*v.NextToken)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpListIdentityProviderConfigs struct {
-}
-
-func (*awsRestjson1_serializeOpListIdentityProviderConfigs) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpListIdentityProviderConfigs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListIdentityProviderConfigsInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/identity-provider-configs")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsListIdentityProviderConfigsInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsListIdentityProviderConfigsInput(v *ListIdentityProviderConfigsInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.MaxResults != nil {
- encoder.SetQuery("maxResults").Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- encoder.SetQuery("nextToken").String(*v.NextToken)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpListInsights struct {
-}
-
-func (*awsRestjson1_serializeOpListInsights) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpListInsights) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListInsightsInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/insights")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsListInsightsInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentListInsightsInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsListInsightsInput(v *ListInsightsInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentListInsightsInput(v *ListInsightsInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Filter != nil {
- ok := object.Key("filter")
- if err := awsRestjson1_serializeDocumentInsightsFilter(v.Filter, ok); err != nil {
- return err
- }
- }
-
- if v.MaxResults != nil {
- ok := object.Key("maxResults")
- ok.Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- ok := object.Key("nextToken")
- ok.String(*v.NextToken)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpListNodegroups struct {
-}
-
-func (*awsRestjson1_serializeOpListNodegroups) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpListNodegroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListNodegroupsInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/node-groups")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsListNodegroupsInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsListNodegroupsInput(v *ListNodegroupsInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.MaxResults != nil {
- encoder.SetQuery("maxResults").Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- encoder.SetQuery("nextToken").String(*v.NextToken)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpListPodIdentityAssociations struct {
-}
-
-func (*awsRestjson1_serializeOpListPodIdentityAssociations) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpListPodIdentityAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListPodIdentityAssociationsInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/pod-identity-associations")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsListPodIdentityAssociationsInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsListPodIdentityAssociationsInput(v *ListPodIdentityAssociationsInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.MaxResults != nil {
- encoder.SetQuery("maxResults").Integer(*v.MaxResults)
- }
-
- if v.Namespace != nil {
- encoder.SetQuery("namespace").String(*v.Namespace)
- }
-
- if v.NextToken != nil {
- encoder.SetQuery("nextToken").String(*v.NextToken)
- }
-
- if v.ServiceAccount != nil {
- encoder.SetQuery("serviceAccount").String(*v.ServiceAccount)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpListTagsForResource struct {
-}
-
-func (*awsRestjson1_serializeOpListTagsForResource) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListTagsForResourceInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ResourceArn == nil || len(*v.ResourceArn) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")}
- }
- if v.ResourceArn != nil {
- if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpListUpdates struct {
-}
-
-func (*awsRestjson1_serializeOpListUpdates) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpListUpdates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListUpdatesInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{name}/updates")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "GET"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsListUpdatesInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsListUpdatesInput(v *ListUpdatesInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.AddonName != nil {
- encoder.SetQuery("addonName").String(*v.AddonName)
- }
-
- if v.CapabilityName != nil {
- encoder.SetQuery("capabilityName").String(*v.CapabilityName)
- }
-
- if v.MaxResults != nil {
- encoder.SetQuery("maxResults").Integer(*v.MaxResults)
- }
-
- if v.Name == nil || len(*v.Name) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")}
- }
- if v.Name != nil {
- if err := encoder.SetURI("name").String(*v.Name); err != nil {
- return err
- }
- }
-
- if v.NextToken != nil {
- encoder.SetQuery("nextToken").String(*v.NextToken)
- }
-
- if v.NodegroupName != nil {
- encoder.SetQuery("nodegroupName").String(*v.NodegroupName)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpRegisterCluster struct {
-}
-
-func (*awsRestjson1_serializeOpRegisterCluster) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpRegisterCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*RegisterClusterInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/cluster-registrations")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentRegisterClusterInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsRegisterClusterInput(v *RegisterClusterInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentRegisterClusterInput(v *RegisterClusterInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- if v.ConnectorConfig != nil {
- ok := object.Key("connectorConfig")
- if err := awsRestjson1_serializeDocumentConnectorConfigRequest(v.ConnectorConfig, ok); err != nil {
- return err
- }
- }
-
- if v.Name != nil {
- ok := object.Key("name")
- ok.String(*v.Name)
- }
-
- if v.Tags != nil {
- ok := object.Key("tags")
- if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpStartInsightsRefresh struct {
-}
-
-func (*awsRestjson1_serializeOpStartInsightsRefresh) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpStartInsightsRefresh) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*StartInsightsRefreshInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/insights-refresh")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsStartInsightsRefreshInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsStartInsightsRefreshInput(v *StartInsightsRefreshInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpTagResource struct {
-}
-
-func (*awsRestjson1_serializeOpTagResource) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*TagResourceInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ResourceArn == nil || len(*v.ResourceArn) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")}
- }
- if v.ResourceArn != nil {
- if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Tags != nil {
- ok := object.Key("tags")
- if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpUntagResource struct {
-}
-
-func (*awsRestjson1_serializeOpUntagResource) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*UntagResourceInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "DELETE"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ResourceArn == nil || len(*v.ResourceArn) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")}
- }
- if v.ResourceArn != nil {
- if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil {
- return err
- }
- }
-
- if v.TagKeys != nil {
- for i := range v.TagKeys {
- encoder.AddQuery("tagKeys").String(v.TagKeys[i])
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpUpdateAccessEntry struct {
-}
-
-func (*awsRestjson1_serializeOpUpdateAccessEntry) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpUpdateAccessEntry) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*UpdateAccessEntryInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/access-entries/{principalArn}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsUpdateAccessEntryInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentUpdateAccessEntryInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsUpdateAccessEntryInput(v *UpdateAccessEntryInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.PrincipalArn == nil || len(*v.PrincipalArn) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member principalArn must not be empty")}
- }
- if v.PrincipalArn != nil {
- if err := encoder.SetURI("principalArn").String(*v.PrincipalArn); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentUpdateAccessEntryInput(v *UpdateAccessEntryInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- if v.KubernetesGroups != nil {
- ok := object.Key("kubernetesGroups")
- if err := awsRestjson1_serializeDocumentStringList(v.KubernetesGroups, ok); err != nil {
- return err
- }
- }
-
- if v.Username != nil {
- ok := object.Key("username")
- ok.String(*v.Username)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpUpdateAddon struct {
-}
-
-func (*awsRestjson1_serializeOpUpdateAddon) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpUpdateAddon) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*UpdateAddonInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/addons/{addonName}/update")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsUpdateAddonInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentUpdateAddonInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsUpdateAddonInput(v *UpdateAddonInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.AddonName == nil || len(*v.AddonName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member addonName must not be empty")}
- }
- if v.AddonName != nil {
- if err := encoder.SetURI("addonName").String(*v.AddonName); err != nil {
- return err
- }
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentUpdateAddonInput(v *UpdateAddonInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.AddonVersion != nil {
- ok := object.Key("addonVersion")
- ok.String(*v.AddonVersion)
- }
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- if v.ConfigurationValues != nil {
- ok := object.Key("configurationValues")
- ok.String(*v.ConfigurationValues)
- }
-
- if v.PodIdentityAssociations != nil {
- ok := object.Key("podIdentityAssociations")
- if err := awsRestjson1_serializeDocumentAddonPodIdentityAssociationsList(v.PodIdentityAssociations, ok); err != nil {
- return err
- }
- }
-
- if len(v.ResolveConflicts) > 0 {
- ok := object.Key("resolveConflicts")
- ok.String(string(v.ResolveConflicts))
- }
-
- if v.ServiceAccountRoleArn != nil {
- ok := object.Key("serviceAccountRoleArn")
- ok.String(*v.ServiceAccountRoleArn)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpUpdateCapability struct {
-}
-
-func (*awsRestjson1_serializeOpUpdateCapability) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpUpdateCapability) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*UpdateCapabilityInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/capabilities/{capabilityName}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsUpdateCapabilityInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentUpdateCapabilityInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsUpdateCapabilityInput(v *UpdateCapabilityInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.CapabilityName == nil || len(*v.CapabilityName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member capabilityName must not be empty")}
- }
- if v.CapabilityName != nil {
- if err := encoder.SetURI("capabilityName").String(*v.CapabilityName); err != nil {
- return err
- }
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentUpdateCapabilityInput(v *UpdateCapabilityInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- if v.Configuration != nil {
- ok := object.Key("configuration")
- if err := awsRestjson1_serializeDocumentUpdateCapabilityConfiguration(v.Configuration, ok); err != nil {
- return err
- }
- }
-
- if len(v.DeletePropagationPolicy) > 0 {
- ok := object.Key("deletePropagationPolicy")
- ok.String(string(v.DeletePropagationPolicy))
- }
-
- if v.RoleArn != nil {
- ok := object.Key("roleArn")
- ok.String(*v.RoleArn)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpUpdateClusterConfig struct {
-}
-
-func (*awsRestjson1_serializeOpUpdateClusterConfig) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpUpdateClusterConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*UpdateClusterConfigInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{name}/update-config")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsUpdateClusterConfigInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentUpdateClusterConfigInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsUpdateClusterConfigInput(v *UpdateClusterConfigInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.Name == nil || len(*v.Name) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")}
- }
- if v.Name != nil {
- if err := encoder.SetURI("name").String(*v.Name); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentUpdateClusterConfigInput(v *UpdateClusterConfigInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.AccessConfig != nil {
- ok := object.Key("accessConfig")
- if err := awsRestjson1_serializeDocumentUpdateAccessConfigRequest(v.AccessConfig, ok); err != nil {
- return err
- }
- }
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- if v.ComputeConfig != nil {
- ok := object.Key("computeConfig")
- if err := awsRestjson1_serializeDocumentComputeConfigRequest(v.ComputeConfig, ok); err != nil {
- return err
- }
- }
-
- if v.ControlPlaneScalingConfig != nil {
- ok := object.Key("controlPlaneScalingConfig")
- if err := awsRestjson1_serializeDocumentControlPlaneScalingConfig(v.ControlPlaneScalingConfig, ok); err != nil {
- return err
- }
- }
-
- if v.DeletionProtection != nil {
- ok := object.Key("deletionProtection")
- ok.Boolean(*v.DeletionProtection)
- }
-
- if v.KubernetesNetworkConfig != nil {
- ok := object.Key("kubernetesNetworkConfig")
- if err := awsRestjson1_serializeDocumentKubernetesNetworkConfigRequest(v.KubernetesNetworkConfig, ok); err != nil {
- return err
- }
- }
-
- if v.Logging != nil {
- ok := object.Key("logging")
- if err := awsRestjson1_serializeDocumentLogging(v.Logging, ok); err != nil {
- return err
- }
- }
-
- if v.RemoteNetworkConfig != nil {
- ok := object.Key("remoteNetworkConfig")
- if err := awsRestjson1_serializeDocumentRemoteNetworkConfigRequest(v.RemoteNetworkConfig, ok); err != nil {
- return err
- }
- }
-
- if v.ResourcesVpcConfig != nil {
- ok := object.Key("resourcesVpcConfig")
- if err := awsRestjson1_serializeDocumentVpcConfigRequest(v.ResourcesVpcConfig, ok); err != nil {
- return err
- }
- }
-
- if v.StorageConfig != nil {
- ok := object.Key("storageConfig")
- if err := awsRestjson1_serializeDocumentStorageConfigRequest(v.StorageConfig, ok); err != nil {
- return err
- }
- }
-
- if v.UpgradePolicy != nil {
- ok := object.Key("upgradePolicy")
- if err := awsRestjson1_serializeDocumentUpgradePolicyRequest(v.UpgradePolicy, ok); err != nil {
- return err
- }
- }
-
- if v.ZonalShiftConfig != nil {
- ok := object.Key("zonalShiftConfig")
- if err := awsRestjson1_serializeDocumentZonalShiftConfigRequest(v.ZonalShiftConfig, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpUpdateClusterVersion struct {
-}
-
-func (*awsRestjson1_serializeOpUpdateClusterVersion) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpUpdateClusterVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*UpdateClusterVersionInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{name}/updates")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsUpdateClusterVersionInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentUpdateClusterVersionInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsUpdateClusterVersionInput(v *UpdateClusterVersionInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.Name == nil || len(*v.Name) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")}
- }
- if v.Name != nil {
- if err := encoder.SetURI("name").String(*v.Name); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentUpdateClusterVersionInput(v *UpdateClusterVersionInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- if v.Force {
- ok := object.Key("force")
- ok.Boolean(v.Force)
- }
-
- if v.Version != nil {
- ok := object.Key("version")
- ok.String(*v.Version)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpUpdateEksAnywhereSubscription struct {
-}
-
-func (*awsRestjson1_serializeOpUpdateEksAnywhereSubscription) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpUpdateEksAnywhereSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*UpdateEksAnywhereSubscriptionInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/eks-anywhere-subscriptions/{id}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsUpdateEksAnywhereSubscriptionInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentUpdateEksAnywhereSubscriptionInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsUpdateEksAnywhereSubscriptionInput(v *UpdateEksAnywhereSubscriptionInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.Id == nil || len(*v.Id) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")}
- }
- if v.Id != nil {
- if err := encoder.SetURI("id").String(*v.Id); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentUpdateEksAnywhereSubscriptionInput(v *UpdateEksAnywhereSubscriptionInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- {
- ok := object.Key("autoRenew")
- ok.Boolean(v.AutoRenew)
- }
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpUpdateNodegroupConfig struct {
-}
-
-func (*awsRestjson1_serializeOpUpdateNodegroupConfig) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpUpdateNodegroupConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*UpdateNodegroupConfigInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/node-groups/{nodegroupName}/update-config")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsUpdateNodegroupConfigInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentUpdateNodegroupConfigInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsUpdateNodegroupConfigInput(v *UpdateNodegroupConfigInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.NodegroupName == nil || len(*v.NodegroupName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member nodegroupName must not be empty")}
- }
- if v.NodegroupName != nil {
- if err := encoder.SetURI("nodegroupName").String(*v.NodegroupName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentUpdateNodegroupConfigInput(v *UpdateNodegroupConfigInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- if v.Labels != nil {
- ok := object.Key("labels")
- if err := awsRestjson1_serializeDocumentUpdateLabelsPayload(v.Labels, ok); err != nil {
- return err
- }
- }
-
- if v.NodeRepairConfig != nil {
- ok := object.Key("nodeRepairConfig")
- if err := awsRestjson1_serializeDocumentNodeRepairConfig(v.NodeRepairConfig, ok); err != nil {
- return err
- }
- }
-
- if v.ScalingConfig != nil {
- ok := object.Key("scalingConfig")
- if err := awsRestjson1_serializeDocumentNodegroupScalingConfig(v.ScalingConfig, ok); err != nil {
- return err
- }
- }
-
- if v.Taints != nil {
- ok := object.Key("taints")
- if err := awsRestjson1_serializeDocumentUpdateTaintsPayload(v.Taints, ok); err != nil {
- return err
- }
- }
-
- if v.UpdateConfig != nil {
- ok := object.Key("updateConfig")
- if err := awsRestjson1_serializeDocumentNodegroupUpdateConfig(v.UpdateConfig, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpUpdateNodegroupVersion struct {
-}
-
-func (*awsRestjson1_serializeOpUpdateNodegroupVersion) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpUpdateNodegroupVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*UpdateNodegroupVersionInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/node-groups/{nodegroupName}/update-version")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsUpdateNodegroupVersionInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentUpdateNodegroupVersionInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsUpdateNodegroupVersionInput(v *UpdateNodegroupVersionInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- if v.NodegroupName == nil || len(*v.NodegroupName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member nodegroupName must not be empty")}
- }
- if v.NodegroupName != nil {
- if err := encoder.SetURI("nodegroupName").String(*v.NodegroupName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentUpdateNodegroupVersionInput(v *UpdateNodegroupVersionInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- if v.Force {
- ok := object.Key("force")
- ok.Boolean(v.Force)
- }
-
- if v.LaunchTemplate != nil {
- ok := object.Key("launchTemplate")
- if err := awsRestjson1_serializeDocumentLaunchTemplateSpecification(v.LaunchTemplate, ok); err != nil {
- return err
- }
- }
-
- if v.ReleaseVersion != nil {
- ok := object.Key("releaseVersion")
- ok.String(*v.ReleaseVersion)
- }
-
- if v.Version != nil {
- ok := object.Key("version")
- ok.String(*v.Version)
- }
-
- return nil
-}
-
-type awsRestjson1_serializeOpUpdatePodIdentityAssociation struct {
-}
-
-func (*awsRestjson1_serializeOpUpdatePodIdentityAssociation) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsRestjson1_serializeOpUpdatePodIdentityAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*UpdatePodIdentityAssociationInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- opPath, opQuery := httpbinding.SplitURI("/clusters/{clusterName}/pod-identity-associations/{associationId}")
- request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
- request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
- request.Method = "POST"
- var restEncoder *httpbinding.Encoder
- if request.URL.RawPath == "" {
- restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- } else {
- request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
- restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
- }
-
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if err := awsRestjson1_serializeOpHttpBindingsUpdatePodIdentityAssociationInput(input, restEncoder); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- restEncoder.SetHeader("Content-Type").String("application/json")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsRestjson1_serializeOpDocumentUpdatePodIdentityAssociationInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = restEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsRestjson1_serializeOpHttpBindingsUpdatePodIdentityAssociationInput(v *UpdatePodIdentityAssociationInput, encoder *httpbinding.Encoder) error {
- if v == nil {
- return fmt.Errorf("unsupported serialization of nil %T", v)
- }
-
- if v.AssociationId == nil || len(*v.AssociationId) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member associationId must not be empty")}
- }
- if v.AssociationId != nil {
- if err := encoder.SetURI("associationId").String(*v.AssociationId); err != nil {
- return err
- }
- }
-
- if v.ClusterName == nil || len(*v.ClusterName) == 0 {
- return &smithy.SerializationError{Err: fmt.Errorf("input member clusterName must not be empty")}
- }
- if v.ClusterName != nil {
- if err := encoder.SetURI("clusterName").String(*v.ClusterName); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeOpDocumentUpdatePodIdentityAssociationInput(v *UpdatePodIdentityAssociationInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ClientRequestToken != nil {
- ok := object.Key("clientRequestToken")
- ok.String(*v.ClientRequestToken)
- }
-
- if v.DisableSessionTags != nil {
- ok := object.Key("disableSessionTags")
- ok.Boolean(*v.DisableSessionTags)
- }
-
- if v.RoleArn != nil {
- ok := object.Key("roleArn")
- ok.String(*v.RoleArn)
- }
-
- if v.TargetRoleArn != nil {
- ok := object.Key("targetRoleArn")
- ok.String(*v.TargetRoleArn)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentAccessScope(v *types.AccessScope, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Namespaces != nil {
- ok := object.Key("namespaces")
- if err := awsRestjson1_serializeDocumentStringList(v.Namespaces, ok); err != nil {
- return err
- }
- }
-
- if len(v.Type) > 0 {
- ok := object.Key("type")
- ok.String(string(v.Type))
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentAddonNamespaceConfigRequest(v *types.AddonNamespaceConfigRequest, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Namespace != nil {
- ok := object.Key("namespace")
- ok.String(*v.Namespace)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentAddonPodIdentityAssociations(v *types.AddonPodIdentityAssociations, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.RoleArn != nil {
- ok := object.Key("roleArn")
- ok.String(*v.RoleArn)
- }
-
- if v.ServiceAccount != nil {
- ok := object.Key("serviceAccount")
- ok.String(*v.ServiceAccount)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentAddonPodIdentityAssociationsList(v []types.AddonPodIdentityAssociations, value smithyjson.Value) error {
- array := value.Array()
- defer array.Close()
-
- for i := range v {
- av := array.Value()
- if err := awsRestjson1_serializeDocumentAddonPodIdentityAssociations(&v[i], av); err != nil {
- return err
- }
- }
- return nil
-}
-
-func awsRestjson1_serializeDocumentArgoCdAwsIdcConfigRequest(v *types.ArgoCdAwsIdcConfigRequest, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.IdcInstanceArn != nil {
- ok := object.Key("idcInstanceArn")
- ok.String(*v.IdcInstanceArn)
- }
-
- if v.IdcRegion != nil {
- ok := object.Key("idcRegion")
- ok.String(*v.IdcRegion)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentArgoCdConfigRequest(v *types.ArgoCdConfigRequest, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.AwsIdc != nil {
- ok := object.Key("awsIdc")
- if err := awsRestjson1_serializeDocumentArgoCdAwsIdcConfigRequest(v.AwsIdc, ok); err != nil {
- return err
- }
- }
-
- if v.Namespace != nil {
- ok := object.Key("namespace")
- ok.String(*v.Namespace)
- }
-
- if v.NetworkAccess != nil {
- ok := object.Key("networkAccess")
- if err := awsRestjson1_serializeDocumentArgoCdNetworkAccessConfigRequest(v.NetworkAccess, ok); err != nil {
- return err
- }
- }
-
- if v.RbacRoleMappings != nil {
- ok := object.Key("rbacRoleMappings")
- if err := awsRestjson1_serializeDocumentArgoCdRoleMappingList(v.RbacRoleMappings, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentArgoCdNetworkAccessConfigRequest(v *types.ArgoCdNetworkAccessConfigRequest, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.VpceIds != nil {
- ok := object.Key("vpceIds")
- if err := awsRestjson1_serializeDocumentStringList(v.VpceIds, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentArgoCdRoleMapping(v *types.ArgoCdRoleMapping, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Identities != nil {
- ok := object.Key("identities")
- if err := awsRestjson1_serializeDocumentSsoIdentityList(v.Identities, ok); err != nil {
- return err
- }
- }
-
- if len(v.Role) > 0 {
- ok := object.Key("role")
- ok.String(string(v.Role))
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentArgoCdRoleMappingList(v []types.ArgoCdRoleMapping, value smithyjson.Value) error {
- array := value.Array()
- defer array.Close()
-
- for i := range v {
- av := array.Value()
- if err := awsRestjson1_serializeDocumentArgoCdRoleMapping(&v[i], av); err != nil {
- return err
- }
- }
- return nil
-}
-
-func awsRestjson1_serializeDocumentBlockStorage(v *types.BlockStorage, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Enabled != nil {
- ok := object.Key("enabled")
- ok.Boolean(*v.Enabled)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentCapabilityConfigurationRequest(v *types.CapabilityConfigurationRequest, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ArgoCd != nil {
- ok := object.Key("argoCd")
- if err := awsRestjson1_serializeDocumentArgoCdConfigRequest(v.ArgoCd, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentCategoryList(v []types.Category, value smithyjson.Value) error {
- array := value.Array()
- defer array.Close()
-
- for i := range v {
- av := array.Value()
- av.String(string(v[i]))
- }
- return nil
-}
-
-func awsRestjson1_serializeDocumentComputeConfigRequest(v *types.ComputeConfigRequest, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Enabled != nil {
- ok := object.Key("enabled")
- ok.Boolean(*v.Enabled)
- }
-
- if v.NodePools != nil {
- ok := object.Key("nodePools")
- if err := awsRestjson1_serializeDocumentStringList(v.NodePools, ok); err != nil {
- return err
- }
- }
-
- if v.NodeRoleArn != nil {
- ok := object.Key("nodeRoleArn")
- ok.String(*v.NodeRoleArn)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentConnectorConfigRequest(v *types.ConnectorConfigRequest, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if len(v.Provider) > 0 {
- ok := object.Key("provider")
- ok.String(string(v.Provider))
- }
-
- if v.RoleArn != nil {
- ok := object.Key("roleArn")
- ok.String(*v.RoleArn)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentControlPlanePlacementRequest(v *types.ControlPlanePlacementRequest, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.GroupName != nil {
- ok := object.Key("groupName")
- ok.String(*v.GroupName)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentControlPlaneScalingConfig(v *types.ControlPlaneScalingConfig, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if len(v.Tier) > 0 {
- ok := object.Key("tier")
- ok.String(string(v.Tier))
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentCreateAccessConfigRequest(v *types.CreateAccessConfigRequest, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if len(v.AuthenticationMode) > 0 {
- ok := object.Key("authenticationMode")
- ok.String(string(v.AuthenticationMode))
- }
-
- if v.BootstrapClusterCreatorAdminPermissions != nil {
- ok := object.Key("bootstrapClusterCreatorAdminPermissions")
- ok.Boolean(*v.BootstrapClusterCreatorAdminPermissions)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentEksAnywhereSubscriptionTerm(v *types.EksAnywhereSubscriptionTerm, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Duration != 0 {
- ok := object.Key("duration")
- ok.Integer(v.Duration)
- }
-
- if len(v.Unit) > 0 {
- ok := object.Key("unit")
- ok.String(string(v.Unit))
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentElasticLoadBalancing(v *types.ElasticLoadBalancing, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Enabled != nil {
- ok := object.Key("enabled")
- ok.Boolean(*v.Enabled)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentEncryptionConfig(v *types.EncryptionConfig, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Provider != nil {
- ok := object.Key("provider")
- if err := awsRestjson1_serializeDocumentProvider(v.Provider, ok); err != nil {
- return err
- }
- }
-
- if v.Resources != nil {
- ok := object.Key("resources")
- if err := awsRestjson1_serializeDocumentStringList(v.Resources, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentEncryptionConfigList(v []types.EncryptionConfig, value smithyjson.Value) error {
- array := value.Array()
- defer array.Close()
-
- for i := range v {
- av := array.Value()
- if err := awsRestjson1_serializeDocumentEncryptionConfig(&v[i], av); err != nil {
- return err
- }
- }
- return nil
-}
-
-func awsRestjson1_serializeDocumentFargateProfileLabel(v map[string]string, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- for key := range v {
- om := object.Key(key)
- om.String(v[key])
- }
- return nil
-}
-
-func awsRestjson1_serializeDocumentFargateProfileSelector(v *types.FargateProfileSelector, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Labels != nil {
- ok := object.Key("labels")
- if err := awsRestjson1_serializeDocumentFargateProfileLabel(v.Labels, ok); err != nil {
- return err
- }
- }
-
- if v.Namespace != nil {
- ok := object.Key("namespace")
- ok.String(*v.Namespace)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentFargateProfileSelectors(v []types.FargateProfileSelector, value smithyjson.Value) error {
- array := value.Array()
- defer array.Close()
-
- for i := range v {
- av := array.Value()
- if err := awsRestjson1_serializeDocumentFargateProfileSelector(&v[i], av); err != nil {
- return err
- }
- }
- return nil
-}
-
-func awsRestjson1_serializeDocumentIdentityProviderConfig(v *types.IdentityProviderConfig, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Name != nil {
- ok := object.Key("name")
- ok.String(*v.Name)
- }
-
- if v.Type != nil {
- ok := object.Key("type")
- ok.String(*v.Type)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentInsightsFilter(v *types.InsightsFilter, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Categories != nil {
- ok := object.Key("categories")
- if err := awsRestjson1_serializeDocumentCategoryList(v.Categories, ok); err != nil {
- return err
- }
- }
-
- if v.KubernetesVersions != nil {
- ok := object.Key("kubernetesVersions")
- if err := awsRestjson1_serializeDocumentStringList(v.KubernetesVersions, ok); err != nil {
- return err
- }
- }
-
- if v.Statuses != nil {
- ok := object.Key("statuses")
- if err := awsRestjson1_serializeDocumentInsightStatusValueList(v.Statuses, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentInsightStatusValueList(v []types.InsightStatusValue, value smithyjson.Value) error {
- array := value.Array()
- defer array.Close()
-
- for i := range v {
- av := array.Value()
- av.String(string(v[i]))
- }
- return nil
-}
-
-func awsRestjson1_serializeDocumentKubernetesNetworkConfigRequest(v *types.KubernetesNetworkConfigRequest, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ElasticLoadBalancing != nil {
- ok := object.Key("elasticLoadBalancing")
- if err := awsRestjson1_serializeDocumentElasticLoadBalancing(v.ElasticLoadBalancing, ok); err != nil {
- return err
- }
- }
-
- if len(v.IpFamily) > 0 {
- ok := object.Key("ipFamily")
- ok.String(string(v.IpFamily))
- }
-
- if v.ServiceIpv4Cidr != nil {
- ok := object.Key("serviceIpv4Cidr")
- ok.String(*v.ServiceIpv4Cidr)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentLabelsKeyList(v []string, value smithyjson.Value) error {
- array := value.Array()
- defer array.Close()
-
- for i := range v {
- av := array.Value()
- av.String(v[i])
- }
- return nil
-}
-
-func awsRestjson1_serializeDocumentLabelsMap(v map[string]string, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- for key := range v {
- om := object.Key(key)
- om.String(v[key])
- }
- return nil
-}
-
-func awsRestjson1_serializeDocumentLaunchTemplateSpecification(v *types.LaunchTemplateSpecification, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Id != nil {
- ok := object.Key("id")
- ok.String(*v.Id)
- }
-
- if v.Name != nil {
- ok := object.Key("name")
- ok.String(*v.Name)
- }
-
- if v.Version != nil {
- ok := object.Key("version")
- ok.String(*v.Version)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentLogging(v *types.Logging, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ClusterLogging != nil {
- ok := object.Key("clusterLogging")
- if err := awsRestjson1_serializeDocumentLogSetups(v.ClusterLogging, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentLogSetup(v *types.LogSetup, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Enabled != nil {
- ok := object.Key("enabled")
- ok.Boolean(*v.Enabled)
- }
-
- if v.Types != nil {
- ok := object.Key("types")
- if err := awsRestjson1_serializeDocumentLogTypes(v.Types, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentLogSetups(v []types.LogSetup, value smithyjson.Value) error {
- array := value.Array()
- defer array.Close()
-
- for i := range v {
- av := array.Value()
- if err := awsRestjson1_serializeDocumentLogSetup(&v[i], av); err != nil {
- return err
- }
- }
- return nil
-}
-
-func awsRestjson1_serializeDocumentLogTypes(v []types.LogType, value smithyjson.Value) error {
- array := value.Array()
- defer array.Close()
-
- for i := range v {
- av := array.Value()
- av.String(string(v[i]))
- }
- return nil
-}
-
-func awsRestjson1_serializeDocumentNodegroupScalingConfig(v *types.NodegroupScalingConfig, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.DesiredSize != nil {
- ok := object.Key("desiredSize")
- ok.Integer(*v.DesiredSize)
- }
-
- if v.MaxSize != nil {
- ok := object.Key("maxSize")
- ok.Integer(*v.MaxSize)
- }
-
- if v.MinSize != nil {
- ok := object.Key("minSize")
- ok.Integer(*v.MinSize)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentNodegroupUpdateConfig(v *types.NodegroupUpdateConfig, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.MaxUnavailable != nil {
- ok := object.Key("maxUnavailable")
- ok.Integer(*v.MaxUnavailable)
- }
-
- if v.MaxUnavailablePercentage != nil {
- ok := object.Key("maxUnavailablePercentage")
- ok.Integer(*v.MaxUnavailablePercentage)
- }
-
- if len(v.UpdateStrategy) > 0 {
- ok := object.Key("updateStrategy")
- ok.String(string(v.UpdateStrategy))
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentNodeRepairConfig(v *types.NodeRepairConfig, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Enabled != nil {
- ok := object.Key("enabled")
- ok.Boolean(*v.Enabled)
- }
-
- if v.MaxParallelNodesRepairedCount != nil {
- ok := object.Key("maxParallelNodesRepairedCount")
- ok.Integer(*v.MaxParallelNodesRepairedCount)
- }
-
- if v.MaxParallelNodesRepairedPercentage != nil {
- ok := object.Key("maxParallelNodesRepairedPercentage")
- ok.Integer(*v.MaxParallelNodesRepairedPercentage)
- }
-
- if v.MaxUnhealthyNodeThresholdCount != nil {
- ok := object.Key("maxUnhealthyNodeThresholdCount")
- ok.Integer(*v.MaxUnhealthyNodeThresholdCount)
- }
-
- if v.MaxUnhealthyNodeThresholdPercentage != nil {
- ok := object.Key("maxUnhealthyNodeThresholdPercentage")
- ok.Integer(*v.MaxUnhealthyNodeThresholdPercentage)
- }
-
- if v.NodeRepairConfigOverrides != nil {
- ok := object.Key("nodeRepairConfigOverrides")
- if err := awsRestjson1_serializeDocumentNodeRepairConfigOverridesList(v.NodeRepairConfigOverrides, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentNodeRepairConfigOverrides(v *types.NodeRepairConfigOverrides, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.MinRepairWaitTimeMins != nil {
- ok := object.Key("minRepairWaitTimeMins")
- ok.Integer(*v.MinRepairWaitTimeMins)
- }
-
- if v.NodeMonitoringCondition != nil {
- ok := object.Key("nodeMonitoringCondition")
- ok.String(*v.NodeMonitoringCondition)
- }
-
- if v.NodeUnhealthyReason != nil {
- ok := object.Key("nodeUnhealthyReason")
- ok.String(*v.NodeUnhealthyReason)
- }
-
- if len(v.RepairAction) > 0 {
- ok := object.Key("repairAction")
- ok.String(string(v.RepairAction))
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentNodeRepairConfigOverridesList(v []types.NodeRepairConfigOverrides, value smithyjson.Value) error {
- array := value.Array()
- defer array.Close()
-
- for i := range v {
- av := array.Value()
- if err := awsRestjson1_serializeDocumentNodeRepairConfigOverrides(&v[i], av); err != nil {
- return err
- }
- }
- return nil
-}
-
-func awsRestjson1_serializeDocumentOidcIdentityProviderConfigRequest(v *types.OidcIdentityProviderConfigRequest, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ClientId != nil {
- ok := object.Key("clientId")
- ok.String(*v.ClientId)
- }
-
- if v.GroupsClaim != nil {
- ok := object.Key("groupsClaim")
- ok.String(*v.GroupsClaim)
- }
-
- if v.GroupsPrefix != nil {
- ok := object.Key("groupsPrefix")
- ok.String(*v.GroupsPrefix)
- }
-
- if v.IdentityProviderConfigName != nil {
- ok := object.Key("identityProviderConfigName")
- ok.String(*v.IdentityProviderConfigName)
- }
-
- if v.IssuerUrl != nil {
- ok := object.Key("issuerUrl")
- ok.String(*v.IssuerUrl)
- }
-
- if v.RequiredClaims != nil {
- ok := object.Key("requiredClaims")
- if err := awsRestjson1_serializeDocumentRequiredClaimsMap(v.RequiredClaims, ok); err != nil {
- return err
- }
- }
-
- if v.UsernameClaim != nil {
- ok := object.Key("usernameClaim")
- ok.String(*v.UsernameClaim)
- }
-
- if v.UsernamePrefix != nil {
- ok := object.Key("usernamePrefix")
- ok.String(*v.UsernamePrefix)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentOutpostConfigRequest(v *types.OutpostConfigRequest, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ControlPlaneInstanceType != nil {
- ok := object.Key("controlPlaneInstanceType")
- ok.String(*v.ControlPlaneInstanceType)
- }
-
- if v.ControlPlanePlacement != nil {
- ok := object.Key("controlPlanePlacement")
- if err := awsRestjson1_serializeDocumentControlPlanePlacementRequest(v.ControlPlanePlacement, ok); err != nil {
- return err
- }
- }
-
- if v.OutpostArns != nil {
- ok := object.Key("outpostArns")
- if err := awsRestjson1_serializeDocumentStringList(v.OutpostArns, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentProvider(v *types.Provider, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.KeyArn != nil {
- ok := object.Key("keyArn")
- ok.String(*v.KeyArn)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentRemoteAccessConfig(v *types.RemoteAccessConfig, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Ec2SshKey != nil {
- ok := object.Key("ec2SshKey")
- ok.String(*v.Ec2SshKey)
- }
-
- if v.SourceSecurityGroups != nil {
- ok := object.Key("sourceSecurityGroups")
- if err := awsRestjson1_serializeDocumentStringList(v.SourceSecurityGroups, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentRemoteNetworkConfigRequest(v *types.RemoteNetworkConfigRequest, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.RemoteNodeNetworks != nil {
- ok := object.Key("remoteNodeNetworks")
- if err := awsRestjson1_serializeDocumentRemoteNodeNetworkList(v.RemoteNodeNetworks, ok); err != nil {
- return err
- }
- }
-
- if v.RemotePodNetworks != nil {
- ok := object.Key("remotePodNetworks")
- if err := awsRestjson1_serializeDocumentRemotePodNetworkList(v.RemotePodNetworks, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentRemoteNodeNetwork(v *types.RemoteNodeNetwork, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Cidrs != nil {
- ok := object.Key("cidrs")
- if err := awsRestjson1_serializeDocumentStringList(v.Cidrs, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentRemoteNodeNetworkList(v []types.RemoteNodeNetwork, value smithyjson.Value) error {
- array := value.Array()
- defer array.Close()
-
- for i := range v {
- av := array.Value()
- if err := awsRestjson1_serializeDocumentRemoteNodeNetwork(&v[i], av); err != nil {
- return err
- }
- }
- return nil
-}
-
-func awsRestjson1_serializeDocumentRemotePodNetwork(v *types.RemotePodNetwork, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Cidrs != nil {
- ok := object.Key("cidrs")
- if err := awsRestjson1_serializeDocumentStringList(v.Cidrs, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentRemotePodNetworkList(v []types.RemotePodNetwork, value smithyjson.Value) error {
- array := value.Array()
- defer array.Close()
-
- for i := range v {
- av := array.Value()
- if err := awsRestjson1_serializeDocumentRemotePodNetwork(&v[i], av); err != nil {
- return err
- }
- }
- return nil
-}
-
-func awsRestjson1_serializeDocumentRequiredClaimsMap(v map[string]string, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- for key := range v {
- om := object.Key(key)
- om.String(v[key])
- }
- return nil
-}
-
-func awsRestjson1_serializeDocumentSsoIdentity(v *types.SsoIdentity, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Id != nil {
- ok := object.Key("id")
- ok.String(*v.Id)
- }
-
- if len(v.Type) > 0 {
- ok := object.Key("type")
- ok.String(string(v.Type))
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentSsoIdentityList(v []types.SsoIdentity, value smithyjson.Value) error {
- array := value.Array()
- defer array.Close()
-
- for i := range v {
- av := array.Value()
- if err := awsRestjson1_serializeDocumentSsoIdentity(&v[i], av); err != nil {
- return err
- }
- }
- return nil
-}
-
-func awsRestjson1_serializeDocumentStorageConfigRequest(v *types.StorageConfigRequest, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.BlockStorage != nil {
- ok := object.Key("blockStorage")
- if err := awsRestjson1_serializeDocumentBlockStorage(v.BlockStorage, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentStringList(v []string, value smithyjson.Value) error {
- array := value.Array()
- defer array.Close()
-
- for i := range v {
- av := array.Value()
- av.String(v[i])
- }
- return nil
-}
-
-func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- for key := range v {
- om := object.Key(key)
- om.String(v[key])
- }
- return nil
-}
-
-func awsRestjson1_serializeDocumentTaint(v *types.Taint, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if len(v.Effect) > 0 {
- ok := object.Key("effect")
- ok.String(string(v.Effect))
- }
-
- if v.Key != nil {
- ok := object.Key("key")
- ok.String(*v.Key)
- }
-
- if v.Value != nil {
- ok := object.Key("value")
- ok.String(*v.Value)
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentTaintsList(v []types.Taint, value smithyjson.Value) error {
- array := value.Array()
- defer array.Close()
-
- for i := range v {
- av := array.Value()
- if err := awsRestjson1_serializeDocumentTaint(&v[i], av); err != nil {
- return err
- }
- }
- return nil
-}
-
-func awsRestjson1_serializeDocumentUpdateAccessConfigRequest(v *types.UpdateAccessConfigRequest, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if len(v.AuthenticationMode) > 0 {
- ok := object.Key("authenticationMode")
- ok.String(string(v.AuthenticationMode))
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentUpdateArgoCdConfig(v *types.UpdateArgoCdConfig, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.NetworkAccess != nil {
- ok := object.Key("networkAccess")
- if err := awsRestjson1_serializeDocumentArgoCdNetworkAccessConfigRequest(v.NetworkAccess, ok); err != nil {
- return err
- }
- }
-
- if v.RbacRoleMappings != nil {
- ok := object.Key("rbacRoleMappings")
- if err := awsRestjson1_serializeDocumentUpdateRoleMappings(v.RbacRoleMappings, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentUpdateCapabilityConfiguration(v *types.UpdateCapabilityConfiguration, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ArgoCd != nil {
- ok := object.Key("argoCd")
- if err := awsRestjson1_serializeDocumentUpdateArgoCdConfig(v.ArgoCd, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentUpdateLabelsPayload(v *types.UpdateLabelsPayload, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.AddOrUpdateLabels != nil {
- ok := object.Key("addOrUpdateLabels")
- if err := awsRestjson1_serializeDocumentLabelsMap(v.AddOrUpdateLabels, ok); err != nil {
- return err
- }
- }
-
- if v.RemoveLabels != nil {
- ok := object.Key("removeLabels")
- if err := awsRestjson1_serializeDocumentLabelsKeyList(v.RemoveLabels, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentUpdateRoleMappings(v *types.UpdateRoleMappings, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.AddOrUpdateRoleMappings != nil {
- ok := object.Key("addOrUpdateRoleMappings")
- if err := awsRestjson1_serializeDocumentArgoCdRoleMappingList(v.AddOrUpdateRoleMappings, ok); err != nil {
- return err
- }
- }
-
- if v.RemoveRoleMappings != nil {
- ok := object.Key("removeRoleMappings")
- if err := awsRestjson1_serializeDocumentArgoCdRoleMappingList(v.RemoveRoleMappings, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentUpdateTaintsPayload(v *types.UpdateTaintsPayload, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.AddOrUpdateTaints != nil {
- ok := object.Key("addOrUpdateTaints")
- if err := awsRestjson1_serializeDocumentTaintsList(v.AddOrUpdateTaints, ok); err != nil {
- return err
- }
- }
-
- if v.RemoveTaints != nil {
- ok := object.Key("removeTaints")
- if err := awsRestjson1_serializeDocumentTaintsList(v.RemoveTaints, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentUpgradePolicyRequest(v *types.UpgradePolicyRequest, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if len(v.SupportType) > 0 {
- ok := object.Key("supportType")
- ok.String(string(v.SupportType))
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentVpcConfigRequest(v *types.VpcConfigRequest, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.EndpointPrivateAccess != nil {
- ok := object.Key("endpointPrivateAccess")
- ok.Boolean(*v.EndpointPrivateAccess)
- }
-
- if v.EndpointPublicAccess != nil {
- ok := object.Key("endpointPublicAccess")
- ok.Boolean(*v.EndpointPublicAccess)
- }
-
- if v.PublicAccessCidrs != nil {
- ok := object.Key("publicAccessCidrs")
- if err := awsRestjson1_serializeDocumentStringList(v.PublicAccessCidrs, ok); err != nil {
- return err
- }
- }
-
- if v.SecurityGroupIds != nil {
- ok := object.Key("securityGroupIds")
- if err := awsRestjson1_serializeDocumentStringList(v.SecurityGroupIds, ok); err != nil {
- return err
- }
- }
-
- if v.SubnetIds != nil {
- ok := object.Key("subnetIds")
- if err := awsRestjson1_serializeDocumentStringList(v.SubnetIds, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsRestjson1_serializeDocumentZonalShiftConfigRequest(v *types.ZonalShiftConfigRequest, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Enabled != nil {
- ok := object.Key("enabled")
- ok.Boolean(*v.Enabled)
- }
-
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/types/enums.go
deleted file mode 100644
index ad0b1fe4893c..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/types/enums.go
+++ /dev/null
@@ -1,1163 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package types
-
-type AccessScopeType string
-
-// Enum values for AccessScopeType
-const (
- AccessScopeTypeCluster AccessScopeType = "cluster"
- AccessScopeTypeNamespace AccessScopeType = "namespace"
-)
-
-// Values returns all known values for AccessScopeType. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (AccessScopeType) Values() []AccessScopeType {
- return []AccessScopeType{
- "cluster",
- "namespace",
- }
-}
-
-type AddonIssueCode string
-
-// Enum values for AddonIssueCode
-const (
- AddonIssueCodeAccessDenied AddonIssueCode = "AccessDenied"
- AddonIssueCodeInternalFailure AddonIssueCode = "InternalFailure"
- AddonIssueCodeClusterUnreachable AddonIssueCode = "ClusterUnreachable"
- AddonIssueCodeInsufficientNumberOfReplicas AddonIssueCode = "InsufficientNumberOfReplicas"
- AddonIssueCodeConfigurationConflict AddonIssueCode = "ConfigurationConflict"
- AddonIssueCodeAdmissionRequestDenied AddonIssueCode = "AdmissionRequestDenied"
- AddonIssueCodeUnsupportedAddonModification AddonIssueCode = "UnsupportedAddonModification"
- AddonIssueCodeK8sResourceNotFound AddonIssueCode = "K8sResourceNotFound"
- AddonIssueCodeAddonSubscriptionNeeded AddonIssueCode = "AddonSubscriptionNeeded"
- AddonIssueCodeAddonPermissionFailure AddonIssueCode = "AddonPermissionFailure"
-)
-
-// Values returns all known values for AddonIssueCode. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (AddonIssueCode) Values() []AddonIssueCode {
- return []AddonIssueCode{
- "AccessDenied",
- "InternalFailure",
- "ClusterUnreachable",
- "InsufficientNumberOfReplicas",
- "ConfigurationConflict",
- "AdmissionRequestDenied",
- "UnsupportedAddonModification",
- "K8sResourceNotFound",
- "AddonSubscriptionNeeded",
- "AddonPermissionFailure",
- }
-}
-
-type AddonStatus string
-
-// Enum values for AddonStatus
-const (
- AddonStatusCreating AddonStatus = "CREATING"
- AddonStatusActive AddonStatus = "ACTIVE"
- AddonStatusCreateFailed AddonStatus = "CREATE_FAILED"
- AddonStatusUpdating AddonStatus = "UPDATING"
- AddonStatusDeleting AddonStatus = "DELETING"
- AddonStatusDeleteFailed AddonStatus = "DELETE_FAILED"
- AddonStatusDegraded AddonStatus = "DEGRADED"
- AddonStatusUpdateFailed AddonStatus = "UPDATE_FAILED"
-)
-
-// Values returns all known values for AddonStatus. Note that this can be expanded
-// in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (AddonStatus) Values() []AddonStatus {
- return []AddonStatus{
- "CREATING",
- "ACTIVE",
- "CREATE_FAILED",
- "UPDATING",
- "DELETING",
- "DELETE_FAILED",
- "DEGRADED",
- "UPDATE_FAILED",
- }
-}
-
-type AMITypes string
-
-// Enum values for AMITypes
-const (
- AMITypesAl2X8664 AMITypes = "AL2_x86_64"
- AMITypesAl2X8664Gpu AMITypes = "AL2_x86_64_GPU"
- AMITypesAl2Arm64 AMITypes = "AL2_ARM_64"
- AMITypesCustom AMITypes = "CUSTOM"
- AMITypesBottlerocketArm64 AMITypes = "BOTTLEROCKET_ARM_64"
- AMITypesBottlerocketX8664 AMITypes = "BOTTLEROCKET_x86_64"
- AMITypesBottlerocketArm64Fips AMITypes = "BOTTLEROCKET_ARM_64_FIPS"
- AMITypesBottlerocketX8664Fips AMITypes = "BOTTLEROCKET_x86_64_FIPS"
- AMITypesBottlerocketArm64Nvidia AMITypes = "BOTTLEROCKET_ARM_64_NVIDIA"
- AMITypesBottlerocketX8664Nvidia AMITypes = "BOTTLEROCKET_x86_64_NVIDIA"
- AMITypesBottlerocketArm64NvidiaFips AMITypes = "BOTTLEROCKET_ARM_64_NVIDIA_FIPS"
- AMITypesBottlerocketX8664NvidiaFips AMITypes = "BOTTLEROCKET_x86_64_NVIDIA_FIPS"
- AMITypesWindowsCore2019X8664 AMITypes = "WINDOWS_CORE_2019_x86_64"
- AMITypesWindowsFull2019X8664 AMITypes = "WINDOWS_FULL_2019_x86_64"
- AMITypesWindowsCore2022X8664 AMITypes = "WINDOWS_CORE_2022_x86_64"
- AMITypesWindowsFull2022X8664 AMITypes = "WINDOWS_FULL_2022_x86_64"
- AMITypesAl2023X8664Standard AMITypes = "AL2023_x86_64_STANDARD"
- AMITypesAl2023Arm64Standard AMITypes = "AL2023_ARM_64_STANDARD"
- AMITypesAl2023X8664Neuron AMITypes = "AL2023_x86_64_NEURON"
- AMITypesAl2023X8664Nvidia AMITypes = "AL2023_x86_64_NVIDIA"
- AMITypesAl2023Arm64Nvidia AMITypes = "AL2023_ARM_64_NVIDIA"
-)
-
-// Values returns all known values for AMITypes. Note that this can be expanded in
-// the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (AMITypes) Values() []AMITypes {
- return []AMITypes{
- "AL2_x86_64",
- "AL2_x86_64_GPU",
- "AL2_ARM_64",
- "CUSTOM",
- "BOTTLEROCKET_ARM_64",
- "BOTTLEROCKET_x86_64",
- "BOTTLEROCKET_ARM_64_FIPS",
- "BOTTLEROCKET_x86_64_FIPS",
- "BOTTLEROCKET_ARM_64_NVIDIA",
- "BOTTLEROCKET_x86_64_NVIDIA",
- "BOTTLEROCKET_ARM_64_NVIDIA_FIPS",
- "BOTTLEROCKET_x86_64_NVIDIA_FIPS",
- "WINDOWS_CORE_2019_x86_64",
- "WINDOWS_FULL_2019_x86_64",
- "WINDOWS_CORE_2022_x86_64",
- "WINDOWS_FULL_2022_x86_64",
- "AL2023_x86_64_STANDARD",
- "AL2023_ARM_64_STANDARD",
- "AL2023_x86_64_NEURON",
- "AL2023_x86_64_NVIDIA",
- "AL2023_ARM_64_NVIDIA",
- }
-}
-
-type ArgoCdRole string
-
-// Enum values for ArgoCdRole
-const (
- ArgoCdRoleAdmin ArgoCdRole = "ADMIN"
- ArgoCdRoleEditor ArgoCdRole = "EDITOR"
- ArgoCdRoleViewer ArgoCdRole = "VIEWER"
-)
-
-// Values returns all known values for ArgoCdRole. Note that this can be expanded
-// in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (ArgoCdRole) Values() []ArgoCdRole {
- return []ArgoCdRole{
- "ADMIN",
- "EDITOR",
- "VIEWER",
- }
-}
-
-type AuthenticationMode string
-
-// Enum values for AuthenticationMode
-const (
- AuthenticationModeApi AuthenticationMode = "API"
- AuthenticationModeApiAndConfigMap AuthenticationMode = "API_AND_CONFIG_MAP"
- AuthenticationModeConfigMap AuthenticationMode = "CONFIG_MAP"
-)
-
-// Values returns all known values for AuthenticationMode. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (AuthenticationMode) Values() []AuthenticationMode {
- return []AuthenticationMode{
- "API",
- "API_AND_CONFIG_MAP",
- "CONFIG_MAP",
- }
-}
-
-type CapabilityDeletePropagationPolicy string
-
-// Enum values for CapabilityDeletePropagationPolicy
-const (
- CapabilityDeletePropagationPolicyRetain CapabilityDeletePropagationPolicy = "RETAIN"
-)
-
-// Values returns all known values for CapabilityDeletePropagationPolicy. Note
-// that this can be expanded in the future, and so it is only as up to date as the
-// client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (CapabilityDeletePropagationPolicy) Values() []CapabilityDeletePropagationPolicy {
- return []CapabilityDeletePropagationPolicy{
- "RETAIN",
- }
-}
-
-type CapabilityIssueCode string
-
-// Enum values for CapabilityIssueCode
-const (
- CapabilityIssueCodeAccessDenied CapabilityIssueCode = "AccessDenied"
- CapabilityIssueCodeClusterUnreachable CapabilityIssueCode = "ClusterUnreachable"
-)
-
-// Values returns all known values for CapabilityIssueCode. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (CapabilityIssueCode) Values() []CapabilityIssueCode {
- return []CapabilityIssueCode{
- "AccessDenied",
- "ClusterUnreachable",
- }
-}
-
-type CapabilityStatus string
-
-// Enum values for CapabilityStatus
-const (
- CapabilityStatusCreating CapabilityStatus = "CREATING"
- CapabilityStatusCreateFailed CapabilityStatus = "CREATE_FAILED"
- CapabilityStatusUpdating CapabilityStatus = "UPDATING"
- CapabilityStatusDeleting CapabilityStatus = "DELETING"
- CapabilityStatusDeleteFailed CapabilityStatus = "DELETE_FAILED"
- CapabilityStatusActive CapabilityStatus = "ACTIVE"
- CapabilityStatusDegraded CapabilityStatus = "DEGRADED"
-)
-
-// Values returns all known values for CapabilityStatus. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (CapabilityStatus) Values() []CapabilityStatus {
- return []CapabilityStatus{
- "CREATING",
- "CREATE_FAILED",
- "UPDATING",
- "DELETING",
- "DELETE_FAILED",
- "ACTIVE",
- "DEGRADED",
- }
-}
-
-type CapabilityType string
-
-// Enum values for CapabilityType
-const (
- CapabilityTypeAck CapabilityType = "ACK"
- CapabilityTypeKro CapabilityType = "KRO"
- CapabilityTypeArgocd CapabilityType = "ARGOCD"
-)
-
-// Values returns all known values for CapabilityType. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (CapabilityType) Values() []CapabilityType {
- return []CapabilityType{
- "ACK",
- "KRO",
- "ARGOCD",
- }
-}
-
-type CapacityTypes string
-
-// Enum values for CapacityTypes
-const (
- CapacityTypesOnDemand CapacityTypes = "ON_DEMAND"
- CapacityTypesSpot CapacityTypes = "SPOT"
- CapacityTypesCapacityBlock CapacityTypes = "CAPACITY_BLOCK"
-)
-
-// Values returns all known values for CapacityTypes. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (CapacityTypes) Values() []CapacityTypes {
- return []CapacityTypes{
- "ON_DEMAND",
- "SPOT",
- "CAPACITY_BLOCK",
- }
-}
-
-type Category string
-
-// Enum values for Category
-const (
- CategoryUpgradeReadiness Category = "UPGRADE_READINESS"
- CategoryMisconfiguration Category = "MISCONFIGURATION"
-)
-
-// Values returns all known values for Category. Note that this can be expanded in
-// the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (Category) Values() []Category {
- return []Category{
- "UPGRADE_READINESS",
- "MISCONFIGURATION",
- }
-}
-
-type ClusterIssueCode string
-
-// Enum values for ClusterIssueCode
-const (
- ClusterIssueCodeAccessDenied ClusterIssueCode = "AccessDenied"
- ClusterIssueCodeClusterUnreachable ClusterIssueCode = "ClusterUnreachable"
- ClusterIssueCodeConfigurationConflict ClusterIssueCode = "ConfigurationConflict"
- ClusterIssueCodeInternalFailure ClusterIssueCode = "InternalFailure"
- ClusterIssueCodeResourceLimitExceeded ClusterIssueCode = "ResourceLimitExceeded"
- ClusterIssueCodeResourceNotFound ClusterIssueCode = "ResourceNotFound"
- ClusterIssueCodeIamRoleNotFound ClusterIssueCode = "IamRoleNotFound"
- ClusterIssueCodeVpcNotFound ClusterIssueCode = "VpcNotFound"
- ClusterIssueCodeInsufficientFreeAddresses ClusterIssueCode = "InsufficientFreeAddresses"
- ClusterIssueCodeEc2ServiceNotSubscribed ClusterIssueCode = "Ec2ServiceNotSubscribed"
- ClusterIssueCodeEc2SubnetNotFound ClusterIssueCode = "Ec2SubnetNotFound"
- ClusterIssueCodeEc2SecurityGroupNotFound ClusterIssueCode = "Ec2SecurityGroupNotFound"
- ClusterIssueCodeKmsGrantRevoked ClusterIssueCode = "KmsGrantRevoked"
- ClusterIssueCodeKmsKeyNotFound ClusterIssueCode = "KmsKeyNotFound"
- ClusterIssueCodeKmsKeyMarkedForDeletion ClusterIssueCode = "KmsKeyMarkedForDeletion"
- ClusterIssueCodeKmsKeyDisabled ClusterIssueCode = "KmsKeyDisabled"
- ClusterIssueCodeStsRegionalEndpointDisabled ClusterIssueCode = "StsRegionalEndpointDisabled"
- ClusterIssueCodeUnsupportedVersion ClusterIssueCode = "UnsupportedVersion"
- ClusterIssueCodeOther ClusterIssueCode = "Other"
-)
-
-// Values returns all known values for ClusterIssueCode. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (ClusterIssueCode) Values() []ClusterIssueCode {
- return []ClusterIssueCode{
- "AccessDenied",
- "ClusterUnreachable",
- "ConfigurationConflict",
- "InternalFailure",
- "ResourceLimitExceeded",
- "ResourceNotFound",
- "IamRoleNotFound",
- "VpcNotFound",
- "InsufficientFreeAddresses",
- "Ec2ServiceNotSubscribed",
- "Ec2SubnetNotFound",
- "Ec2SecurityGroupNotFound",
- "KmsGrantRevoked",
- "KmsKeyNotFound",
- "KmsKeyMarkedForDeletion",
- "KmsKeyDisabled",
- "StsRegionalEndpointDisabled",
- "UnsupportedVersion",
- "Other",
- }
-}
-
-type ClusterStatus string
-
-// Enum values for ClusterStatus
-const (
- ClusterStatusCreating ClusterStatus = "CREATING"
- ClusterStatusActive ClusterStatus = "ACTIVE"
- ClusterStatusDeleting ClusterStatus = "DELETING"
- ClusterStatusFailed ClusterStatus = "FAILED"
- ClusterStatusUpdating ClusterStatus = "UPDATING"
- ClusterStatusPending ClusterStatus = "PENDING"
-)
-
-// Values returns all known values for ClusterStatus. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (ClusterStatus) Values() []ClusterStatus {
- return []ClusterStatus{
- "CREATING",
- "ACTIVE",
- "DELETING",
- "FAILED",
- "UPDATING",
- "PENDING",
- }
-}
-
-type ClusterVersionStatus string
-
-// Enum values for ClusterVersionStatus
-const (
- ClusterVersionStatusUnsupported ClusterVersionStatus = "unsupported"
- ClusterVersionStatusStandardSupport ClusterVersionStatus = "standard-support"
- ClusterVersionStatusExtendedSupport ClusterVersionStatus = "extended-support"
-)
-
-// Values returns all known values for ClusterVersionStatus. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (ClusterVersionStatus) Values() []ClusterVersionStatus {
- return []ClusterVersionStatus{
- "unsupported",
- "standard-support",
- "extended-support",
- }
-}
-
-type ConfigStatus string
-
-// Enum values for ConfigStatus
-const (
- ConfigStatusCreating ConfigStatus = "CREATING"
- ConfigStatusDeleting ConfigStatus = "DELETING"
- ConfigStatusActive ConfigStatus = "ACTIVE"
-)
-
-// Values returns all known values for ConfigStatus. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (ConfigStatus) Values() []ConfigStatus {
- return []ConfigStatus{
- "CREATING",
- "DELETING",
- "ACTIVE",
- }
-}
-
-type ConnectorConfigProvider string
-
-// Enum values for ConnectorConfigProvider
-const (
- ConnectorConfigProviderEksAnywhere ConnectorConfigProvider = "EKS_ANYWHERE"
- ConnectorConfigProviderAnthos ConnectorConfigProvider = "ANTHOS"
- ConnectorConfigProviderGke ConnectorConfigProvider = "GKE"
- ConnectorConfigProviderAks ConnectorConfigProvider = "AKS"
- ConnectorConfigProviderOpenshift ConnectorConfigProvider = "OPENSHIFT"
- ConnectorConfigProviderTanzu ConnectorConfigProvider = "TANZU"
- ConnectorConfigProviderRancher ConnectorConfigProvider = "RANCHER"
- ConnectorConfigProviderEc2 ConnectorConfigProvider = "EC2"
- ConnectorConfigProviderOther ConnectorConfigProvider = "OTHER"
-)
-
-// Values returns all known values for ConnectorConfigProvider. Note that this can
-// be expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (ConnectorConfigProvider) Values() []ConnectorConfigProvider {
- return []ConnectorConfigProvider{
- "EKS_ANYWHERE",
- "ANTHOS",
- "GKE",
- "AKS",
- "OPENSHIFT",
- "TANZU",
- "RANCHER",
- "EC2",
- "OTHER",
- }
-}
-
-type EksAnywhereSubscriptionLicenseType string
-
-// Enum values for EksAnywhereSubscriptionLicenseType
-const (
- EksAnywhereSubscriptionLicenseTypeCluster EksAnywhereSubscriptionLicenseType = "Cluster"
-)
-
-// Values returns all known values for EksAnywhereSubscriptionLicenseType. Note
-// that this can be expanded in the future, and so it is only as up to date as the
-// client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (EksAnywhereSubscriptionLicenseType) Values() []EksAnywhereSubscriptionLicenseType {
- return []EksAnywhereSubscriptionLicenseType{
- "Cluster",
- }
-}
-
-type EksAnywhereSubscriptionStatus string
-
-// Enum values for EksAnywhereSubscriptionStatus
-const (
- EksAnywhereSubscriptionStatusCreating EksAnywhereSubscriptionStatus = "CREATING"
- EksAnywhereSubscriptionStatusActive EksAnywhereSubscriptionStatus = "ACTIVE"
- EksAnywhereSubscriptionStatusUpdating EksAnywhereSubscriptionStatus = "UPDATING"
- EksAnywhereSubscriptionStatusExpiring EksAnywhereSubscriptionStatus = "EXPIRING"
- EksAnywhereSubscriptionStatusExpired EksAnywhereSubscriptionStatus = "EXPIRED"
- EksAnywhereSubscriptionStatusDeleting EksAnywhereSubscriptionStatus = "DELETING"
-)
-
-// Values returns all known values for EksAnywhereSubscriptionStatus. Note that
-// this can be expanded in the future, and so it is only as up to date as the
-// client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (EksAnywhereSubscriptionStatus) Values() []EksAnywhereSubscriptionStatus {
- return []EksAnywhereSubscriptionStatus{
- "CREATING",
- "ACTIVE",
- "UPDATING",
- "EXPIRING",
- "EXPIRED",
- "DELETING",
- }
-}
-
-type EksAnywhereSubscriptionTermUnit string
-
-// Enum values for EksAnywhereSubscriptionTermUnit
-const (
- EksAnywhereSubscriptionTermUnitMonths EksAnywhereSubscriptionTermUnit = "MONTHS"
-)
-
-// Values returns all known values for EksAnywhereSubscriptionTermUnit. Note that
-// this can be expanded in the future, and so it is only as up to date as the
-// client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (EksAnywhereSubscriptionTermUnit) Values() []EksAnywhereSubscriptionTermUnit {
- return []EksAnywhereSubscriptionTermUnit{
- "MONTHS",
- }
-}
-
-type ErrorCode string
-
-// Enum values for ErrorCode
-const (
- ErrorCodeSubnetNotFound ErrorCode = "SubnetNotFound"
- ErrorCodeSecurityGroupNotFound ErrorCode = "SecurityGroupNotFound"
- ErrorCodeEniLimitReached ErrorCode = "EniLimitReached"
- ErrorCodeIpNotAvailable ErrorCode = "IpNotAvailable"
- ErrorCodeAccessDenied ErrorCode = "AccessDenied"
- ErrorCodeOperationNotPermitted ErrorCode = "OperationNotPermitted"
- ErrorCodeVpcIdNotFound ErrorCode = "VpcIdNotFound"
- ErrorCodeUnknown ErrorCode = "Unknown"
- ErrorCodeNodeCreationFailure ErrorCode = "NodeCreationFailure"
- ErrorCodePodEvictionFailure ErrorCode = "PodEvictionFailure"
- ErrorCodeInsufficientFreeAddresses ErrorCode = "InsufficientFreeAddresses"
- ErrorCodeClusterUnreachable ErrorCode = "ClusterUnreachable"
- ErrorCodeInsufficientNumberOfReplicas ErrorCode = "InsufficientNumberOfReplicas"
- ErrorCodeConfigurationConflict ErrorCode = "ConfigurationConflict"
- ErrorCodeAdmissionRequestDenied ErrorCode = "AdmissionRequestDenied"
- ErrorCodeUnsupportedAddonModification ErrorCode = "UnsupportedAddonModification"
- ErrorCodeK8sResourceNotFound ErrorCode = "K8sResourceNotFound"
-)
-
-// Values returns all known values for ErrorCode. Note that this can be expanded
-// in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (ErrorCode) Values() []ErrorCode {
- return []ErrorCode{
- "SubnetNotFound",
- "SecurityGroupNotFound",
- "EniLimitReached",
- "IpNotAvailable",
- "AccessDenied",
- "OperationNotPermitted",
- "VpcIdNotFound",
- "Unknown",
- "NodeCreationFailure",
- "PodEvictionFailure",
- "InsufficientFreeAddresses",
- "ClusterUnreachable",
- "InsufficientNumberOfReplicas",
- "ConfigurationConflict",
- "AdmissionRequestDenied",
- "UnsupportedAddonModification",
- "K8sResourceNotFound",
- }
-}
-
-type FargateProfileIssueCode string
-
-// Enum values for FargateProfileIssueCode
-const (
- FargateProfileIssueCodePodExecutionRoleAlreadyInUse FargateProfileIssueCode = "PodExecutionRoleAlreadyInUse"
- FargateProfileIssueCodeAccessDenied FargateProfileIssueCode = "AccessDenied"
- FargateProfileIssueCodeClusterUnreachable FargateProfileIssueCode = "ClusterUnreachable"
- FargateProfileIssueCodeInternalFailure FargateProfileIssueCode = "InternalFailure"
-)
-
-// Values returns all known values for FargateProfileIssueCode. Note that this can
-// be expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (FargateProfileIssueCode) Values() []FargateProfileIssueCode {
- return []FargateProfileIssueCode{
- "PodExecutionRoleAlreadyInUse",
- "AccessDenied",
- "ClusterUnreachable",
- "InternalFailure",
- }
-}
-
-type FargateProfileStatus string
-
-// Enum values for FargateProfileStatus
-const (
- FargateProfileStatusCreating FargateProfileStatus = "CREATING"
- FargateProfileStatusActive FargateProfileStatus = "ACTIVE"
- FargateProfileStatusDeleting FargateProfileStatus = "DELETING"
- FargateProfileStatusCreateFailed FargateProfileStatus = "CREATE_FAILED"
- FargateProfileStatusDeleteFailed FargateProfileStatus = "DELETE_FAILED"
-)
-
-// Values returns all known values for FargateProfileStatus. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (FargateProfileStatus) Values() []FargateProfileStatus {
- return []FargateProfileStatus{
- "CREATING",
- "ACTIVE",
- "DELETING",
- "CREATE_FAILED",
- "DELETE_FAILED",
- }
-}
-
-type InsightsRefreshStatus string
-
-// Enum values for InsightsRefreshStatus
-const (
- InsightsRefreshStatusInProgress InsightsRefreshStatus = "IN_PROGRESS"
- InsightsRefreshStatusFailed InsightsRefreshStatus = "FAILED"
- InsightsRefreshStatusCompleted InsightsRefreshStatus = "COMPLETED"
-)
-
-// Values returns all known values for InsightsRefreshStatus. Note that this can
-// be expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (InsightsRefreshStatus) Values() []InsightsRefreshStatus {
- return []InsightsRefreshStatus{
- "IN_PROGRESS",
- "FAILED",
- "COMPLETED",
- }
-}
-
-type InsightStatusValue string
-
-// Enum values for InsightStatusValue
-const (
- InsightStatusValuePassing InsightStatusValue = "PASSING"
- InsightStatusValueWarning InsightStatusValue = "WARNING"
- InsightStatusValueError InsightStatusValue = "ERROR"
- InsightStatusValueUnknown InsightStatusValue = "UNKNOWN"
-)
-
-// Values returns all known values for InsightStatusValue. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (InsightStatusValue) Values() []InsightStatusValue {
- return []InsightStatusValue{
- "PASSING",
- "WARNING",
- "ERROR",
- "UNKNOWN",
- }
-}
-
-type IpFamily string
-
-// Enum values for IpFamily
-const (
- IpFamilyIpv4 IpFamily = "ipv4"
- IpFamilyIpv6 IpFamily = "ipv6"
-)
-
-// Values returns all known values for IpFamily. Note that this can be expanded in
-// the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (IpFamily) Values() []IpFamily {
- return []IpFamily{
- "ipv4",
- "ipv6",
- }
-}
-
-type LogType string
-
-// Enum values for LogType
-const (
- LogTypeApi LogType = "api"
- LogTypeAudit LogType = "audit"
- LogTypeAuthenticator LogType = "authenticator"
- LogTypeControllerManager LogType = "controllerManager"
- LogTypeScheduler LogType = "scheduler"
-)
-
-// Values returns all known values for LogType. Note that this can be expanded in
-// the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (LogType) Values() []LogType {
- return []LogType{
- "api",
- "audit",
- "authenticator",
- "controllerManager",
- "scheduler",
- }
-}
-
-type NodegroupIssueCode string
-
-// Enum values for NodegroupIssueCode
-const (
- NodegroupIssueCodeAutoScalingGroupNotFound NodegroupIssueCode = "AutoScalingGroupNotFound"
- NodegroupIssueCodeAutoScalingGroupInvalidConfiguration NodegroupIssueCode = "AutoScalingGroupInvalidConfiguration"
- NodegroupIssueCodeEc2SecurityGroupNotFound NodegroupIssueCode = "Ec2SecurityGroupNotFound"
- NodegroupIssueCodeEc2SecurityGroupDeletionFailure NodegroupIssueCode = "Ec2SecurityGroupDeletionFailure"
- NodegroupIssueCodeEc2LaunchTemplateNotFound NodegroupIssueCode = "Ec2LaunchTemplateNotFound"
- NodegroupIssueCodeEc2LaunchTemplateVersionMismatch NodegroupIssueCode = "Ec2LaunchTemplateVersionMismatch"
- NodegroupIssueCodeEc2SubnetNotFound NodegroupIssueCode = "Ec2SubnetNotFound"
- NodegroupIssueCodeEc2SubnetInvalidConfiguration NodegroupIssueCode = "Ec2SubnetInvalidConfiguration"
- NodegroupIssueCodeIamInstanceProfileNotFound NodegroupIssueCode = "IamInstanceProfileNotFound"
- NodegroupIssueCodeEc2SubnetMissingIpv6Assignment NodegroupIssueCode = "Ec2SubnetMissingIpv6Assignment"
- NodegroupIssueCodeIamLimitExceeded NodegroupIssueCode = "IamLimitExceeded"
- NodegroupIssueCodeIamNodeRoleNotFound NodegroupIssueCode = "IamNodeRoleNotFound"
- NodegroupIssueCodeNodeCreationFailure NodegroupIssueCode = "NodeCreationFailure"
- NodegroupIssueCodeAsgInstanceLaunchFailures NodegroupIssueCode = "AsgInstanceLaunchFailures"
- NodegroupIssueCodeInstanceLimitExceeded NodegroupIssueCode = "InstanceLimitExceeded"
- NodegroupIssueCodeInsufficientFreeAddresses NodegroupIssueCode = "InsufficientFreeAddresses"
- NodegroupIssueCodeAccessDenied NodegroupIssueCode = "AccessDenied"
- NodegroupIssueCodeInternalFailure NodegroupIssueCode = "InternalFailure"
- NodegroupIssueCodeClusterUnreachable NodegroupIssueCode = "ClusterUnreachable"
- NodegroupIssueCodeAmiIdNotFound NodegroupIssueCode = "AmiIdNotFound"
- NodegroupIssueCodeAutoScalingGroupOptInRequired NodegroupIssueCode = "AutoScalingGroupOptInRequired"
- NodegroupIssueCodeAutoScalingGroupRateLimitExceeded NodegroupIssueCode = "AutoScalingGroupRateLimitExceeded"
- NodegroupIssueCodeEc2LaunchTemplateDeletionFailure NodegroupIssueCode = "Ec2LaunchTemplateDeletionFailure"
- NodegroupIssueCodeEc2LaunchTemplateInvalidConfiguration NodegroupIssueCode = "Ec2LaunchTemplateInvalidConfiguration"
- NodegroupIssueCodeEc2LaunchTemplateMaxLimitExceeded NodegroupIssueCode = "Ec2LaunchTemplateMaxLimitExceeded"
- NodegroupIssueCodeEc2SubnetListTooLong NodegroupIssueCode = "Ec2SubnetListTooLong"
- NodegroupIssueCodeIamThrottling NodegroupIssueCode = "IamThrottling"
- NodegroupIssueCodeNodeTerminationFailure NodegroupIssueCode = "NodeTerminationFailure"
- NodegroupIssueCodePodEvictionFailure NodegroupIssueCode = "PodEvictionFailure"
- NodegroupIssueCodeSourceEc2LaunchTemplateNotFound NodegroupIssueCode = "SourceEc2LaunchTemplateNotFound"
- NodegroupIssueCodeLimitExceeded NodegroupIssueCode = "LimitExceeded"
- NodegroupIssueCodeUnknown NodegroupIssueCode = "Unknown"
- NodegroupIssueCodeAutoScalingGroupInstanceRefreshActive NodegroupIssueCode = "AutoScalingGroupInstanceRefreshActive"
- NodegroupIssueCodeKubernetesLabelInvalid NodegroupIssueCode = "KubernetesLabelInvalid"
- NodegroupIssueCodeEc2LaunchTemplateVersionMaxLimitExceeded NodegroupIssueCode = "Ec2LaunchTemplateVersionMaxLimitExceeded"
- NodegroupIssueCodeEc2InstanceTypeDoesNotExist NodegroupIssueCode = "Ec2InstanceTypeDoesNotExist"
-)
-
-// Values returns all known values for NodegroupIssueCode. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (NodegroupIssueCode) Values() []NodegroupIssueCode {
- return []NodegroupIssueCode{
- "AutoScalingGroupNotFound",
- "AutoScalingGroupInvalidConfiguration",
- "Ec2SecurityGroupNotFound",
- "Ec2SecurityGroupDeletionFailure",
- "Ec2LaunchTemplateNotFound",
- "Ec2LaunchTemplateVersionMismatch",
- "Ec2SubnetNotFound",
- "Ec2SubnetInvalidConfiguration",
- "IamInstanceProfileNotFound",
- "Ec2SubnetMissingIpv6Assignment",
- "IamLimitExceeded",
- "IamNodeRoleNotFound",
- "NodeCreationFailure",
- "AsgInstanceLaunchFailures",
- "InstanceLimitExceeded",
- "InsufficientFreeAddresses",
- "AccessDenied",
- "InternalFailure",
- "ClusterUnreachable",
- "AmiIdNotFound",
- "AutoScalingGroupOptInRequired",
- "AutoScalingGroupRateLimitExceeded",
- "Ec2LaunchTemplateDeletionFailure",
- "Ec2LaunchTemplateInvalidConfiguration",
- "Ec2LaunchTemplateMaxLimitExceeded",
- "Ec2SubnetListTooLong",
- "IamThrottling",
- "NodeTerminationFailure",
- "PodEvictionFailure",
- "SourceEc2LaunchTemplateNotFound",
- "LimitExceeded",
- "Unknown",
- "AutoScalingGroupInstanceRefreshActive",
- "KubernetesLabelInvalid",
- "Ec2LaunchTemplateVersionMaxLimitExceeded",
- "Ec2InstanceTypeDoesNotExist",
- }
-}
-
-type NodegroupStatus string
-
-// Enum values for NodegroupStatus
-const (
- NodegroupStatusCreating NodegroupStatus = "CREATING"
- NodegroupStatusActive NodegroupStatus = "ACTIVE"
- NodegroupStatusUpdating NodegroupStatus = "UPDATING"
- NodegroupStatusDeleting NodegroupStatus = "DELETING"
- NodegroupStatusCreateFailed NodegroupStatus = "CREATE_FAILED"
- NodegroupStatusDeleteFailed NodegroupStatus = "DELETE_FAILED"
- NodegroupStatusDegraded NodegroupStatus = "DEGRADED"
-)
-
-// Values returns all known values for NodegroupStatus. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (NodegroupStatus) Values() []NodegroupStatus {
- return []NodegroupStatus{
- "CREATING",
- "ACTIVE",
- "UPDATING",
- "DELETING",
- "CREATE_FAILED",
- "DELETE_FAILED",
- "DEGRADED",
- }
-}
-
-type NodegroupUpdateStrategies string
-
-// Enum values for NodegroupUpdateStrategies
-const (
- NodegroupUpdateStrategiesDefault NodegroupUpdateStrategies = "DEFAULT"
- NodegroupUpdateStrategiesMinimal NodegroupUpdateStrategies = "MINIMAL"
-)
-
-// Values returns all known values for NodegroupUpdateStrategies. Note that this
-// can be expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (NodegroupUpdateStrategies) Values() []NodegroupUpdateStrategies {
- return []NodegroupUpdateStrategies{
- "DEFAULT",
- "MINIMAL",
- }
-}
-
-type ProvisionedControlPlaneTier string
-
-// Enum values for ProvisionedControlPlaneTier
-const (
- ProvisionedControlPlaneTierStandard ProvisionedControlPlaneTier = "standard"
- ProvisionedControlPlaneTierTierXl ProvisionedControlPlaneTier = "tier-xl"
- ProvisionedControlPlaneTierTier2xl ProvisionedControlPlaneTier = "tier-2xl"
- ProvisionedControlPlaneTierTier4xl ProvisionedControlPlaneTier = "tier-4xl"
-)
-
-// Values returns all known values for ProvisionedControlPlaneTier. Note that this
-// can be expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (ProvisionedControlPlaneTier) Values() []ProvisionedControlPlaneTier {
- return []ProvisionedControlPlaneTier{
- "standard",
- "tier-xl",
- "tier-2xl",
- "tier-4xl",
- }
-}
-
-type RepairAction string
-
-// Enum values for RepairAction
-const (
- RepairActionReplace RepairAction = "Replace"
- RepairActionReboot RepairAction = "Reboot"
- RepairActionNoAction RepairAction = "NoAction"
-)
-
-// Values returns all known values for RepairAction. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (RepairAction) Values() []RepairAction {
- return []RepairAction{
- "Replace",
- "Reboot",
- "NoAction",
- }
-}
-
-type ResolveConflicts string
-
-// Enum values for ResolveConflicts
-const (
- ResolveConflictsOverwrite ResolveConflicts = "OVERWRITE"
- ResolveConflictsNone ResolveConflicts = "NONE"
- ResolveConflictsPreserve ResolveConflicts = "PRESERVE"
-)
-
-// Values returns all known values for ResolveConflicts. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (ResolveConflicts) Values() []ResolveConflicts {
- return []ResolveConflicts{
- "OVERWRITE",
- "NONE",
- "PRESERVE",
- }
-}
-
-type SsoIdentityType string
-
-// Enum values for SsoIdentityType
-const (
- SsoIdentityTypeSsoUser SsoIdentityType = "SSO_USER"
- SsoIdentityTypeSsoGroup SsoIdentityType = "SSO_GROUP"
-)
-
-// Values returns all known values for SsoIdentityType. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (SsoIdentityType) Values() []SsoIdentityType {
- return []SsoIdentityType{
- "SSO_USER",
- "SSO_GROUP",
- }
-}
-
-type SupportType string
-
-// Enum values for SupportType
-const (
- SupportTypeStandard SupportType = "STANDARD"
- SupportTypeExtended SupportType = "EXTENDED"
-)
-
-// Values returns all known values for SupportType. Note that this can be expanded
-// in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (SupportType) Values() []SupportType {
- return []SupportType{
- "STANDARD",
- "EXTENDED",
- }
-}
-
-type TaintEffect string
-
-// Enum values for TaintEffect
-const (
- TaintEffectNoSchedule TaintEffect = "NO_SCHEDULE"
- TaintEffectNoExecute TaintEffect = "NO_EXECUTE"
- TaintEffectPreferNoSchedule TaintEffect = "PREFER_NO_SCHEDULE"
-)
-
-// Values returns all known values for TaintEffect. Note that this can be expanded
-// in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (TaintEffect) Values() []TaintEffect {
- return []TaintEffect{
- "NO_SCHEDULE",
- "NO_EXECUTE",
- "PREFER_NO_SCHEDULE",
- }
-}
-
-type UpdateParamType string
-
-// Enum values for UpdateParamType
-const (
- UpdateParamTypeVersion UpdateParamType = "Version"
- UpdateParamTypePlatformVersion UpdateParamType = "PlatformVersion"
- UpdateParamTypeEndpointPrivateAccess UpdateParamType = "EndpointPrivateAccess"
- UpdateParamTypeEndpointPublicAccess UpdateParamType = "EndpointPublicAccess"
- UpdateParamTypeClusterLogging UpdateParamType = "ClusterLogging"
- UpdateParamTypeDesiredSize UpdateParamType = "DesiredSize"
- UpdateParamTypeLabelsToAdd UpdateParamType = "LabelsToAdd"
- UpdateParamTypeLabelsToRemove UpdateParamType = "LabelsToRemove"
- UpdateParamTypeTaintsToAdd UpdateParamType = "TaintsToAdd"
- UpdateParamTypeTaintsToRemove UpdateParamType = "TaintsToRemove"
- UpdateParamTypeMaxSize UpdateParamType = "MaxSize"
- UpdateParamTypeMinSize UpdateParamType = "MinSize"
- UpdateParamTypeReleaseVersion UpdateParamType = "ReleaseVersion"
- UpdateParamTypePublicAccessCidrs UpdateParamType = "PublicAccessCidrs"
- UpdateParamTypeLaunchTemplateName UpdateParamType = "LaunchTemplateName"
- UpdateParamTypeLaunchTemplateVersion UpdateParamType = "LaunchTemplateVersion"
- UpdateParamTypeIdentityProviderConfig UpdateParamType = "IdentityProviderConfig"
- UpdateParamTypeEncryptionConfig UpdateParamType = "EncryptionConfig"
- UpdateParamTypeAddonVersion UpdateParamType = "AddonVersion"
- UpdateParamTypeServiceAccountRoleArn UpdateParamType = "ServiceAccountRoleArn"
- UpdateParamTypeResolveConflicts UpdateParamType = "ResolveConflicts"
- UpdateParamTypeMaxUnavailable UpdateParamType = "MaxUnavailable"
- UpdateParamTypeMaxUnavailablePercentage UpdateParamType = "MaxUnavailablePercentage"
- UpdateParamTypeNodeRepairEnabled UpdateParamType = "NodeRepairEnabled"
- UpdateParamTypeUpdateStrategy UpdateParamType = "UpdateStrategy"
- UpdateParamTypeConfigurationValues UpdateParamType = "ConfigurationValues"
- UpdateParamTypeSecurityGroups UpdateParamType = "SecurityGroups"
- UpdateParamTypeSubnets UpdateParamType = "Subnets"
- UpdateParamTypeAuthenticationMode UpdateParamType = "AuthenticationMode"
- UpdateParamTypePodIdentityAssociations UpdateParamType = "PodIdentityAssociations"
- UpdateParamTypeUpgradePolicy UpdateParamType = "UpgradePolicy"
- UpdateParamTypeZonalShiftConfig UpdateParamType = "ZonalShiftConfig"
- UpdateParamTypeComputeConfig UpdateParamType = "ComputeConfig"
- UpdateParamTypeStorageConfig UpdateParamType = "StorageConfig"
- UpdateParamTypeKubernetesNetworkConfig UpdateParamType = "KubernetesNetworkConfig"
- UpdateParamTypeRemoteNetworkConfig UpdateParamType = "RemoteNetworkConfig"
- UpdateParamTypeDeletionProtection UpdateParamType = "DeletionProtection"
- UpdateParamTypeNodeRepairConfig UpdateParamType = "NodeRepairConfig"
- UpdateParamTypeUpdatedTier UpdateParamType = "UpdatedTier"
- UpdateParamTypePreviousTier UpdateParamType = "PreviousTier"
-)
-
-// Values returns all known values for UpdateParamType. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (UpdateParamType) Values() []UpdateParamType {
- return []UpdateParamType{
- "Version",
- "PlatformVersion",
- "EndpointPrivateAccess",
- "EndpointPublicAccess",
- "ClusterLogging",
- "DesiredSize",
- "LabelsToAdd",
- "LabelsToRemove",
- "TaintsToAdd",
- "TaintsToRemove",
- "MaxSize",
- "MinSize",
- "ReleaseVersion",
- "PublicAccessCidrs",
- "LaunchTemplateName",
- "LaunchTemplateVersion",
- "IdentityProviderConfig",
- "EncryptionConfig",
- "AddonVersion",
- "ServiceAccountRoleArn",
- "ResolveConflicts",
- "MaxUnavailable",
- "MaxUnavailablePercentage",
- "NodeRepairEnabled",
- "UpdateStrategy",
- "ConfigurationValues",
- "SecurityGroups",
- "Subnets",
- "AuthenticationMode",
- "PodIdentityAssociations",
- "UpgradePolicy",
- "ZonalShiftConfig",
- "ComputeConfig",
- "StorageConfig",
- "KubernetesNetworkConfig",
- "RemoteNetworkConfig",
- "DeletionProtection",
- "NodeRepairConfig",
- "UpdatedTier",
- "PreviousTier",
- }
-}
-
-type UpdateStatus string
-
-// Enum values for UpdateStatus
-const (
- UpdateStatusInProgress UpdateStatus = "InProgress"
- UpdateStatusFailed UpdateStatus = "Failed"
- UpdateStatusCancelled UpdateStatus = "Cancelled"
- UpdateStatusSuccessful UpdateStatus = "Successful"
-)
-
-// Values returns all known values for UpdateStatus. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (UpdateStatus) Values() []UpdateStatus {
- return []UpdateStatus{
- "InProgress",
- "Failed",
- "Cancelled",
- "Successful",
- }
-}
-
-type UpdateType string
-
-// Enum values for UpdateType
-const (
- UpdateTypeVersionUpdate UpdateType = "VersionUpdate"
- UpdateTypeEndpointAccessUpdate UpdateType = "EndpointAccessUpdate"
- UpdateTypeLoggingUpdate UpdateType = "LoggingUpdate"
- UpdateTypeConfigUpdate UpdateType = "ConfigUpdate"
- UpdateTypeAssociateIdentityProviderConfig UpdateType = "AssociateIdentityProviderConfig"
- UpdateTypeDisassociateIdentityProviderConfig UpdateType = "DisassociateIdentityProviderConfig"
- UpdateTypeAssociateEncryptionConfig UpdateType = "AssociateEncryptionConfig"
- UpdateTypeAddonUpdate UpdateType = "AddonUpdate"
- UpdateTypeVpcConfigUpdate UpdateType = "VpcConfigUpdate"
- UpdateTypeAccessConfigUpdate UpdateType = "AccessConfigUpdate"
- UpdateTypeUpgradePolicyUpdate UpdateType = "UpgradePolicyUpdate"
- UpdateTypeZonalShiftConfigUpdate UpdateType = "ZonalShiftConfigUpdate"
- UpdateTypeAutoModeUpdate UpdateType = "AutoModeUpdate"
- UpdateTypeRemoteNetworkConfigUpdate UpdateType = "RemoteNetworkConfigUpdate"
- UpdateTypeDeletionProtectionUpdate UpdateType = "DeletionProtectionUpdate"
- UpdateTypeControlPlaneScalingConfigUpdate UpdateType = "ControlPlaneScalingConfigUpdate"
-)
-
-// Values returns all known values for UpdateType. Note that this can be expanded
-// in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (UpdateType) Values() []UpdateType {
- return []UpdateType{
- "VersionUpdate",
- "EndpointAccessUpdate",
- "LoggingUpdate",
- "ConfigUpdate",
- "AssociateIdentityProviderConfig",
- "DisassociateIdentityProviderConfig",
- "AssociateEncryptionConfig",
- "AddonUpdate",
- "VpcConfigUpdate",
- "AccessConfigUpdate",
- "UpgradePolicyUpdate",
- "ZonalShiftConfigUpdate",
- "AutoModeUpdate",
- "RemoteNetworkConfigUpdate",
- "DeletionProtectionUpdate",
- "ControlPlaneScalingConfigUpdate",
- }
-}
-
-type VersionStatus string
-
-// Enum values for VersionStatus
-const (
- VersionStatusUnsupported VersionStatus = "UNSUPPORTED"
- VersionStatusStandardSupport VersionStatus = "STANDARD_SUPPORT"
- VersionStatusExtendedSupport VersionStatus = "EXTENDED_SUPPORT"
-)
-
-// Values returns all known values for VersionStatus. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (VersionStatus) Values() []VersionStatus {
- return []VersionStatus{
- "UNSUPPORTED",
- "STANDARD_SUPPORT",
- "EXTENDED_SUPPORT",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/types/errors.go
deleted file mode 100644
index fa4899b26458..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/types/errors.go
+++ /dev/null
@@ -1,469 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package types
-
-import (
- "fmt"
- smithy "github.com/aws/smithy-go"
-)
-
-// You don't have permissions to perform the requested operation. The [IAM principal] making the
-// request must have at least one IAM permissions policy attached that grants the
-// required permissions. For more information, see [Access management]in the IAM User Guide.
-//
-// [Access management]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html
-// [IAM principal]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html
-type AccessDeniedException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *AccessDeniedException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *AccessDeniedException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *AccessDeniedException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "AccessDeniedException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// This exception is thrown if the request contains a semantic error. The precise
-// meaning will depend on the API, and will be documented in the error message.
-type BadRequestException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *BadRequestException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *BadRequestException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *BadRequestException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "BadRequestException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *BadRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// These errors are usually caused by a client action. Actions can include using
-// an action or resource on behalf of an [IAM principal]that doesn't have permissions to use the
-// action or resource or specifying an identifier that is not valid.
-//
-// [IAM principal]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html
-type ClientException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- ClusterName *string
- NodegroupName *string
- AddonName *string
- SubscriptionId *string
-
- noSmithyDocumentSerde
-}
-
-func (e *ClientException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *ClientException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *ClientException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "ClientException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *ClientException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// The specified parameter is invalid. Review the available parameters for the API
-// request.
-type InvalidParameterException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- ClusterName *string
- NodegroupName *string
- FargateProfileName *string
- AddonName *string
- SubscriptionId *string
-
- noSmithyDocumentSerde
-}
-
-func (e *InvalidParameterException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *InvalidParameterException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *InvalidParameterException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "InvalidParameterException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *InvalidParameterException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// The request is invalid given the state of the cluster. Check the state of the
-// cluster and the associated operations.
-type InvalidRequestException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- ClusterName *string
- NodegroupName *string
- AddonName *string
- SubscriptionId *string
-
- noSmithyDocumentSerde
-}
-
-func (e *InvalidRequestException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *InvalidRequestException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *InvalidRequestException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "InvalidRequestException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// Amazon EKS detected upgrade readiness issues. Call the [ListInsights]ListInsights API to view
-// detected upgrade blocking issues. Pass the [force]force flag when updating to override
-// upgrade readiness errors.
-//
-// [ListInsights]: https://docs.aws.amazon.com/eks/latest/APIReference/API_ListInsights.html
-// [force]: https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateClusterVersion.html#API_UpdateClusterVersion_RequestBody
-type InvalidStateException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- ClusterName *string
-
- noSmithyDocumentSerde
-}
-
-func (e *InvalidStateException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *InvalidStateException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *InvalidStateException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "InvalidStateException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *InvalidStateException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// A service resource associated with the request could not be found. Clients
-// should not retry such requests.
-type NotFoundException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *NotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *NotFoundException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *NotFoundException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "NotFoundException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *NotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// The specified resource is in use.
-type ResourceInUseException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- ClusterName *string
- NodegroupName *string
- AddonName *string
-
- noSmithyDocumentSerde
-}
-
-func (e *ResourceInUseException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *ResourceInUseException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *ResourceInUseException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "ResourceInUseException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *ResourceInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// You have encountered a service limit on the specified resource.
-type ResourceLimitExceededException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- ClusterName *string
- NodegroupName *string
- SubscriptionId *string
-
- noSmithyDocumentSerde
-}
-
-func (e *ResourceLimitExceededException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *ResourceLimitExceededException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *ResourceLimitExceededException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "ResourceLimitExceededException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *ResourceLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// The specified resource could not be found. You can view your available clusters
-// with ListClusters . You can view your available managed node groups with
-// ListNodegroups . Amazon EKS clusters and node groups are Amazon Web Services
-// Region specific.
-type ResourceNotFoundException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- ClusterName *string
- NodegroupName *string
- FargateProfileName *string
- AddonName *string
- SubscriptionId *string
-
- noSmithyDocumentSerde
-}
-
-func (e *ResourceNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *ResourceNotFoundException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *ResourceNotFoundException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "ResourceNotFoundException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// Required resources (such as service-linked roles) were created and are still
-// propagating. Retry later.
-type ResourcePropagationDelayException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *ResourcePropagationDelayException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *ResourcePropagationDelayException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *ResourcePropagationDelayException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "ResourcePropagationDelayException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *ResourcePropagationDelayException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// These errors are usually caused by a server-side issue.
-type ServerException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- ClusterName *string
- NodegroupName *string
- AddonName *string
- SubscriptionId *string
-
- noSmithyDocumentSerde
-}
-
-func (e *ServerException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *ServerException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *ServerException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "ServerException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *ServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
-
-// The service is unavailable. Back off and retry the operation.
-type ServiceUnavailableException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *ServiceUnavailableException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *ServiceUnavailableException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *ServiceUnavailableException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "ServiceUnavailableException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *ServiceUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
-
-// The request or operation couldn't be performed because a service is throttling
-// requests.
-type ThrottlingException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- ClusterName *string
-
- noSmithyDocumentSerde
-}
-
-func (e *ThrottlingException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *ThrottlingException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *ThrottlingException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "ThrottlingException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// At least one of your specified cluster subnets is in an Availability Zone that
-// does not support Amazon EKS. The exception output specifies the supported
-// Availability Zones for your account, from which you can choose subnets for your
-// cluster.
-type UnsupportedAvailabilityZoneException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- ClusterName *string
- NodegroupName *string
- ValidZones []string
-
- noSmithyDocumentSerde
-}
-
-func (e *UnsupportedAvailabilityZoneException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *UnsupportedAvailabilityZoneException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *UnsupportedAvailabilityZoneException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "UnsupportedAvailabilityZoneException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *UnsupportedAvailabilityZoneException) ErrorFault() smithy.ErrorFault {
- return smithy.FaultClient
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/types/types.go
deleted file mode 100644
index 0bf296c6a923..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/types/types.go
+++ /dev/null
@@ -1,2880 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package types
-
-import (
- smithydocument "github.com/aws/smithy-go/document"
- "time"
-)
-
-// The access configuration for the cluster.
-type AccessConfigResponse struct {
-
- // The current authentication mode of the cluster.
- AuthenticationMode AuthenticationMode
-
- // Specifies whether or not the cluster creator IAM principal was set as a cluster
- // admin access entry during cluster creation time.
- BootstrapClusterCreatorAdminPermissions *bool
-
- noSmithyDocumentSerde
-}
-
-// An access entry allows an IAM principal (user or role) to access your cluster.
-// Access entries can replace the need to maintain the aws-auth ConfigMap for
-// authentication. For more information about access entries, see [Access entries]in the Amazon
-// EKS User Guide.
-//
-// [Access entries]: https://docs.aws.amazon.com/eks/latest/userguide/access-entries.html
-type AccessEntry struct {
-
- // The ARN of the access entry.
- AccessEntryArn *string
-
- // The name of your cluster.
- ClusterName *string
-
- // The Unix epoch timestamp at object creation.
- CreatedAt *time.Time
-
- // A name that you've specified in a Kubernetes RoleBinding or ClusterRoleBinding
- // object so that Kubernetes authorizes the principalARN access to cluster objects.
- KubernetesGroups []string
-
- // The Unix epoch timestamp for the last modification to the object.
- ModifiedAt *time.Time
-
- // The ARN of the IAM principal for the access entry. If you ever delete the IAM
- // principal with this ARN, the access entry isn't automatically deleted. We
- // recommend that you delete the access entry with an ARN for an IAM principal that
- // you delete. If you don't delete the access entry and ever recreate the IAM
- // principal, even if it has the same ARN, the access entry won't work. This is
- // because even though the ARN is the same for the recreated IAM principal, the
- // roleID or userID (you can see this with the Security Token Service
- // GetCallerIdentity API) is different for the recreated IAM principal than it was
- // for the original IAM principal. Even though you don't see the IAM principal's
- // roleID or userID for an access entry, Amazon EKS stores it with the access
- // entry.
- PrincipalArn *string
-
- // Metadata that assists with categorization and organization. Each tag consists
- // of a key and an optional value. You define both. Tags don't propagate to any
- // other cluster or Amazon Web Services resources.
- Tags map[string]string
-
- // The type of the access entry.
- Type *string
-
- // The name of a user that can authenticate to your cluster.
- Username *string
-
- noSmithyDocumentSerde
-}
-
-// An access policy includes permissions that allow Amazon EKS to authorize an IAM
-// principal to work with Kubernetes objects on your cluster. The policies are
-// managed by Amazon EKS, but they're not IAM policies. You can't view the
-// permissions in the policies using the API. The permissions for many of the
-// policies are similar to the Kubernetes cluster-admin , admin , edit , and view
-// cluster roles. For more information about these cluster roles, see [User-facing roles]in the
-// Kubernetes documentation. To view the contents of the policies, see [Access policy permissions]in the
-// Amazon EKS User Guide.
-//
-// [User-facing roles]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
-// [Access policy permissions]: https://docs.aws.amazon.com/eks/latest/userguide/access-policies.html#access-policy-permissions
-type AccessPolicy struct {
-
- // The ARN of the access policy.
- Arn *string
-
- // The name of the access policy.
- Name *string
-
- noSmithyDocumentSerde
-}
-
-// The scope of an AccessPolicy that's associated to an AccessEntry .
-type AccessScope struct {
-
- // A Kubernetes namespace that an access policy is scoped to. A value is required
- // if you specified namespace for Type .
- Namespaces []string
-
- // The scope type of an access policy.
- Type AccessScopeType
-
- noSmithyDocumentSerde
-}
-
-// An Amazon EKS add-on. For more information, see [Amazon EKS add-ons] in the Amazon EKS User Guide.
-//
-// [Amazon EKS add-ons]: https://docs.aws.amazon.com/eks/latest/userguide/eks-add-ons.html
-type Addon struct {
-
- // The Amazon Resource Name (ARN) of the add-on.
- AddonArn *string
-
- // The name of the add-on.
- AddonName *string
-
- // The version of the add-on.
- AddonVersion *string
-
- // The name of your cluster.
- ClusterName *string
-
- // The configuration values that you provided.
- ConfigurationValues *string
-
- // The Unix epoch timestamp at object creation.
- CreatedAt *time.Time
-
- // An object that represents the health of the add-on.
- Health *AddonHealth
-
- // Information about an Amazon EKS add-on from the Amazon Web Services Marketplace.
- MarketplaceInformation *MarketplaceInformation
-
- // The Unix epoch timestamp for the last modification to the object.
- ModifiedAt *time.Time
-
- // The namespace configuration for the addon. This specifies the Kubernetes
- // namespace where the addon is installed.
- NamespaceConfig *AddonNamespaceConfigResponse
-
- // The owner of the add-on.
- Owner *string
-
- // An array of EKS Pod Identity associations owned by the add-on. Each association
- // maps a role to a service account in a namespace in the cluster.
- //
- // For more information, see [Attach an IAM Role to an Amazon EKS add-on using EKS Pod Identity] in the Amazon EKS User Guide.
- //
- // [Attach an IAM Role to an Amazon EKS add-on using EKS Pod Identity]: https://docs.aws.amazon.com/eks/latest/userguide/add-ons-iam.html
- PodIdentityAssociations []string
-
- // The publisher of the add-on.
- Publisher *string
-
- // The Amazon Resource Name (ARN) of the IAM role that's bound to the Kubernetes
- // ServiceAccount object that the add-on uses.
- ServiceAccountRoleArn *string
-
- // The status of the add-on.
- Status AddonStatus
-
- // Metadata that assists with categorization and organization. Each tag consists
- // of a key and an optional value. You define both. Tags don't propagate to any
- // other cluster or Amazon Web Services resources.
- Tags map[string]string
-
- noSmithyDocumentSerde
-}
-
-// The summary information about the Amazon EKS add-on compatibility for the next
-// Kubernetes version for an insight check in the UPGRADE_READINESS category.
-type AddonCompatibilityDetail struct {
-
- // The list of compatible Amazon EKS add-on versions for the next Kubernetes
- // version.
- CompatibleVersions []string
-
- // The name of the Amazon EKS add-on.
- Name *string
-
- noSmithyDocumentSerde
-}
-
-// The health of the add-on.
-type AddonHealth struct {
-
- // An object representing the health issues for an add-on.
- Issues []AddonIssue
-
- noSmithyDocumentSerde
-}
-
-// Information about an add-on.
-type AddonInfo struct {
-
- // The name of the add-on.
- AddonName *string
-
- // An object representing information about available add-on versions and
- // compatible Kubernetes versions.
- AddonVersions []AddonVersionInfo
-
- // The default Kubernetes namespace where this addon is typically installed if no
- // custom namespace is specified.
- DefaultNamespace *string
-
- // Information about the add-on from the Amazon Web Services Marketplace.
- MarketplaceInformation *MarketplaceInformation
-
- // The owner of the add-on.
- Owner *string
-
- // The publisher of the add-on.
- Publisher *string
-
- // The type of the add-on.
- Type *string
-
- noSmithyDocumentSerde
-}
-
-// An issue related to an add-on.
-type AddonIssue struct {
-
- // A code that describes the type of issue.
- Code AddonIssueCode
-
- // A message that provides details about the issue and what might cause it.
- Message *string
-
- // The resource IDs of the issue.
- ResourceIds []string
-
- noSmithyDocumentSerde
-}
-
-// The namespace configuration request object for specifying a custom namespace
-// when creating an addon.
-type AddonNamespaceConfigRequest struct {
-
- // The name of the Kubernetes namespace to install the addon in. Must be a valid
- // RFC 1123 DNS label.
- Namespace *string
-
- noSmithyDocumentSerde
-}
-
-// The namespace configuration response object containing information about the
-// namespace where an addon is installed.
-type AddonNamespaceConfigResponse struct {
-
- // The name of the Kubernetes namespace where the addon is installed.
- Namespace *string
-
- noSmithyDocumentSerde
-}
-
-// A type of EKS Pod Identity association owned by an Amazon EKS add-on.
-//
-// Each association maps a role to a service account in a namespace in the cluster.
-//
-// For more information, see [Attach an IAM Role to an Amazon EKS add-on using EKS Pod Identity] in the Amazon EKS User Guide.
-//
-// [Attach an IAM Role to an Amazon EKS add-on using EKS Pod Identity]: https://docs.aws.amazon.com/eks/latest/userguide/add-ons-iam.html
-type AddonPodIdentityAssociations struct {
-
- // The ARN of an IAM Role.
- //
- // This member is required.
- RoleArn *string
-
- // The name of a Kubernetes Service Account.
- //
- // This member is required.
- ServiceAccount *string
-
- noSmithyDocumentSerde
-}
-
-// Information about how to configure IAM for an add-on.
-type AddonPodIdentityConfiguration struct {
-
- // A suggested IAM Policy for the add-on.
- RecommendedManagedPolicies []string
-
- // The Kubernetes Service Account name used by the add-on.
- ServiceAccount *string
-
- noSmithyDocumentSerde
-}
-
-// Information about an add-on version.
-type AddonVersionInfo struct {
-
- // The version of the add-on.
- AddonVersion *string
-
- // The architectures that the version supports.
- Architecture []string
-
- // An object representing the compatibilities of a version.
- Compatibilities []Compatibility
-
- // Indicates the compute type of the add-on version.
- ComputeTypes []string
-
- // Whether the add-on requires configuration.
- RequiresConfiguration bool
-
- // Indicates if the add-on requires IAM Permissions to operate, such as networking
- // permissions.
- RequiresIamPermissions bool
-
- noSmithyDocumentSerde
-}
-
-// Configuration for integrating Argo CD with IAM Identity CenterIAM; Identity
-// Center. This allows you to use your organization's identity provider for
-// authentication to Argo CD.
-type ArgoCdAwsIdcConfigRequest struct {
-
- // The Amazon Resource Name (ARN) of the IAM Identity CenterIAM; Identity Center
- // instance to use for authentication.
- //
- // This member is required.
- IdcInstanceArn *string
-
- // The Region where your IAM Identity CenterIAM; Identity Center instance is
- // located.
- IdcRegion *string
-
- noSmithyDocumentSerde
-}
-
-// The response object containing IAM Identity CenterIAM; Identity Center
-// configuration details for an Argo CD capability.
-type ArgoCdAwsIdcConfigResponse struct {
-
- // The Amazon Resource Name (ARN) of the IAM Identity CenterIAM; Identity Center
- // instance used for authentication.
- IdcInstanceArn *string
-
- // The Amazon Resource Name (ARN) of the managed application created in IAM
- // Identity CenterIAM; Identity Center for this Argo CD capability. This
- // application is automatically created and managed by Amazon EKS.
- IdcManagedApplicationArn *string
-
- // The Region where the IAM Identity CenterIAM; Identity Center instance is
- // located.
- IdcRegion *string
-
- noSmithyDocumentSerde
-}
-
-// Configuration settings for an Argo CD capability. This includes the Kubernetes
-// namespace, IAM Identity CenterIAM; Identity Center integration, RBAC role
-// mappings, and network access configuration.
-type ArgoCdConfigRequest struct {
-
- // Configuration for IAM Identity CenterIAM; Identity Center integration. When
- // configured, users can authenticate to Argo CD using their IAM Identity
- // CenterIAM; Identity Center credentials.
- //
- // This member is required.
- AwsIdc *ArgoCdAwsIdcConfigRequest
-
- // The Kubernetes namespace where Argo CD resources will be created. If not
- // specified, the default namespace is used.
- Namespace *string
-
- // Configuration for network access to the Argo CD capability's managed API server
- // endpoint. By default, the Argo CD server is accessible via a public endpoint.
- // You can optionally specify one or more VPC endpoint IDs to enable private
- // connectivity from your VPCs. When VPC endpoints are configured, public access is
- // blocked and the Argo CD server is only accessible through the specified VPC
- // endpoints.
- NetworkAccess *ArgoCdNetworkAccessConfigRequest
-
- // A list of role mappings that define which IAM Identity CenterIAM; Identity
- // Center users or groups have which Argo CD roles. Each mapping associates an Argo
- // CD role ( ADMIN , EDITOR , or VIEWER ) with one or more IAM Identity CenterIAM;
- // Identity Center identities.
- RbacRoleMappings []ArgoCdRoleMapping
-
- noSmithyDocumentSerde
-}
-
-// The response object containing Argo CD configuration details, including the
-// server URL that you use to access the Argo CD web interface and API.
-type ArgoCdConfigResponse struct {
-
- // The IAM Identity CenterIAM; Identity Center integration configuration.
- AwsIdc *ArgoCdAwsIdcConfigResponse
-
- // The Kubernetes namespace where Argo CD resources are monitored by your Argo CD
- // Capability.
- Namespace *string
-
- // The network access configuration for the Argo CD capability's managed API
- // server endpoint. If VPC endpoint IDs are specified, public access is blocked and
- // the Argo CD server is only accessible through the specified VPC endpoints.
- NetworkAccess *ArgoCdNetworkAccessConfigResponse
-
- // The list of role mappings that define which IAM Identity CenterIAM; Identity
- // Center users or groups have which Argo CD roles.
- RbacRoleMappings []ArgoCdRoleMapping
-
- // The URL of the Argo CD server. Use this URL to access the Argo CD web interface
- // and API.
- ServerUrl *string
-
- noSmithyDocumentSerde
-}
-
-// Configuration for network access to the Argo CD capability's managed API server
-// endpoint. When VPC endpoint IDs are specified, public access is blocked and the
-// Argo CD server is only accessible through the specified VPC endpoints.
-type ArgoCdNetworkAccessConfigRequest struct {
-
- // A list of VPC endpoint IDs to associate with the managed Argo CD API server
- // endpoint. Each VPC endpoint provides private connectivity from a specific VPC to
- // the Argo CD server. You can specify multiple VPC endpoint IDs to enable access
- // from multiple VPCs.
- VpceIds []string
-
- noSmithyDocumentSerde
-}
-
-// The response object containing network access configuration for the Argo CD
-// capability's managed API server endpoint. If VPC endpoint IDs are present,
-// public access is blocked and the Argo CD server is only accessible through the
-// specified VPC endpoints.
-type ArgoCdNetworkAccessConfigResponse struct {
-
- // The list of VPC endpoint IDs associated with the managed Argo CD API server
- // endpoint. Each VPC endpoint provides private connectivity from a specific VPC to
- // the Argo CD server.
- VpceIds []string
-
- noSmithyDocumentSerde
-}
-
-// A mapping between an Argo CD role and IAM Identity CenterIAM; Identity Center
-// identities. This defines which users or groups have specific permissions in Argo
-// CD.
-type ArgoCdRoleMapping struct {
-
- // A list of IAM Identity CenterIAM; Identity Center identities (users or groups)
- // that should be assigned this Argo CD role.
- //
- // This member is required.
- Identities []SsoIdentity
-
- // The Argo CD role to assign. Valid values are:
- //
- // - ADMIN – Full administrative access to Argo CD.
- //
- // - EDITOR – Edit access to Argo CD resources.
- //
- // - VIEWER – Read-only access to Argo CD resources.
- //
- // This member is required.
- Role ArgoCdRole
-
- noSmithyDocumentSerde
-}
-
-// An access policy association.
-type AssociatedAccessPolicy struct {
-
- // The scope of the access policy.
- AccessScope *AccessScope
-
- // The date and time the AccessPolicy was associated with an AccessEntry .
- AssociatedAt *time.Time
-
- // The Unix epoch timestamp for the last modification to the object.
- ModifiedAt *time.Time
-
- // The ARN of the AccessPolicy .
- PolicyArn *string
-
- noSmithyDocumentSerde
-}
-
-// An Auto Scaling group that is associated with an Amazon EKS managed node group.
-type AutoScalingGroup struct {
-
- // The name of the Auto Scaling group associated with an Amazon EKS managed node
- // group.
- Name *string
-
- noSmithyDocumentSerde
-}
-
-// Indicates the current configuration of the block storage capability on your EKS
-// Auto Mode cluster. For example, if the capability is enabled or disabled. If the
-// block storage capability is enabled, EKS Auto Mode will create and delete EBS
-// volumes in your Amazon Web Services account. For more information, see EKS Auto
-// Mode block storage capability in the Amazon EKS User Guide.
-type BlockStorage struct {
-
- // Indicates if the block storage capability is enabled on your EKS Auto Mode
- // cluster. If the block storage capability is enabled, EKS Auto Mode will create
- // and delete EBS volumes in your Amazon Web Services account.
- Enabled *bool
-
- noSmithyDocumentSerde
-}
-
-// An object representing a managed capability in an Amazon EKS cluster. This
-// includes all configuration, status, and health information for the capability.
-type Capability struct {
-
- // The Amazon Resource Name (ARN) of the capability.
- Arn *string
-
- // The unique name of the capability within the cluster.
- CapabilityName *string
-
- // The name of the Amazon EKS cluster that contains this capability.
- ClusterName *string
-
- // The configuration settings for the capability. The structure varies depending
- // on the capability type.
- Configuration *CapabilityConfigurationResponse
-
- // The Unix epoch timestamp in seconds for when the capability was created.
- CreatedAt *time.Time
-
- // The delete propagation policy for the capability. Currently, the only supported
- // value is RETAIN , which keeps all resources managed by the capability when the
- // capability is deleted.
- DeletePropagationPolicy CapabilityDeletePropagationPolicy
-
- // Health information for the capability, including any issues that may be
- // affecting its operation.
- Health *CapabilityHealth
-
- // The Unix epoch timestamp in seconds for when the capability was last modified.
- ModifiedAt *time.Time
-
- // The Amazon Resource Name (ARN) of the IAM role that the capability uses to
- // interact with Amazon Web Services services.
- RoleArn *string
-
- // The current status of the capability. Valid values include:
- //
- // - CREATING – The capability is being created.
- //
- // - ACTIVE – The capability is running and available.
- //
- // - UPDATING – The capability is being updated.
- //
- // - DELETING – The capability is being deleted.
- //
- // - CREATE_FAILED – The capability creation failed.
- //
- // - UPDATE_FAILED – The capability update failed.
- //
- // - DELETE_FAILED – The capability deletion failed.
- Status CapabilityStatus
-
- // The metadata that you apply to a resource to help you categorize and organize
- // them. Each tag consists of a key and an optional value. You define them.
- //
- // The following basic restrictions apply to tags:
- //
- // - Maximum number of tags per resource – 50
- //
- // - For each resource, each tag key must be unique, and each tag key can have
- // only one value.
- //
- // - Maximum key length – 128 Unicode characters in UTF-8
- //
- // - Maximum value length – 256 Unicode characters in UTF-8
- //
- // - If your tagging schema is used across multiple services and resources,
- // remember that other services may have restrictions on allowed characters.
- // Generally allowed characters are: letters, numbers, and spaces representable in
- // UTF-8, and the following characters: + - = . _ : / @.
- //
- // - Tag keys and values are case-sensitive.
- //
- // - Do not use aws: , AWS: , or any upper or lowercase combination of such as a
- // prefix for either keys or values as it is reserved for Amazon Web Services use.
- // You cannot edit or delete tag keys or values with this prefix. Tags with this
- // prefix do not count against your tags per resource limit.
- Tags map[string]string
-
- // The type of capability. Valid values are ACK , ARGOCD , or KRO .
- Type CapabilityType
-
- // The version of the capability software that is currently running.
- Version *string
-
- noSmithyDocumentSerde
-}
-
-// Configuration settings for a capability. The structure of this object varies
-// depending on the capability type.
-type CapabilityConfigurationRequest struct {
-
- // Configuration settings specific to Argo CD capabilities. This field is only
- // used when creating or updating an Argo CD capability.
- ArgoCd *ArgoCdConfigRequest
-
- noSmithyDocumentSerde
-}
-
-// The response object containing capability configuration details.
-type CapabilityConfigurationResponse struct {
-
- // Configuration settings for an Argo CD capability, including the server URL and
- // other Argo CD-specific settings.
- ArgoCd *ArgoCdConfigResponse
-
- noSmithyDocumentSerde
-}
-
-// Health information for a capability, including any issues that may be affecting
-// its operation.
-type CapabilityHealth struct {
-
- // A list of issues affecting the capability. If this list is empty, the
- // capability is healthy.
- Issues []CapabilityIssue
-
- noSmithyDocumentSerde
-}
-
-// An issue affecting a capability's health or operation.
-type CapabilityIssue struct {
-
- // A code identifying the type of issue. This can be used to programmatically
- // handle specific issue types.
- Code CapabilityIssueCode
-
- // A human-readable message describing the issue and potential remediation steps.
- Message *string
-
- noSmithyDocumentSerde
-}
-
-// A summary of a capability, containing basic information without the full
-// configuration details. This is returned by the ListCapabilities operation.
-type CapabilitySummary struct {
-
- // The Amazon Resource Name (ARN) of the capability.
- Arn *string
-
- // The unique name of the capability within the cluster.
- CapabilityName *string
-
- // The Unix epoch timestamp in seconds for when the capability was created.
- CreatedAt *time.Time
-
- // The Unix epoch timestamp in seconds for when the capability was last modified.
- ModifiedAt *time.Time
-
- // The current status of the capability.
- Status CapabilityStatus
-
- // The type of capability. Valid values are ACK , ARGOCD , or KRO .
- Type CapabilityType
-
- // The version of the capability software that is currently running.
- Version *string
-
- noSmithyDocumentSerde
-}
-
-// An object representing the certificate-authority-data for your cluster.
-type Certificate struct {
-
- // The Base64-encoded certificate data required to communicate with your cluster.
- // Add this to the certificate-authority-data section of the kubeconfig file for
- // your cluster.
- Data *string
-
- noSmithyDocumentSerde
-}
-
-// Details about clients using the deprecated resources.
-type ClientStat struct {
-
- // The timestamp of the last request seen from the Kubernetes client.
- LastRequestTime *time.Time
-
- // The number of requests from the Kubernetes client seen over the last 30 days.
- NumberOfRequestsLast30Days int32
-
- // The user agent of the Kubernetes client using the deprecated resource.
- UserAgent *string
-
- noSmithyDocumentSerde
-}
-
-// An object representing an Amazon EKS cluster.
-type Cluster struct {
-
- // The access configuration for the cluster.
- AccessConfig *AccessConfigResponse
-
- // The Amazon Resource Name (ARN) of the cluster.
- Arn *string
-
- // The certificate-authority-data for your cluster.
- CertificateAuthority *Certificate
-
- // A unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request.
- ClientRequestToken *string
-
- // Indicates the current configuration of the compute capability on your EKS Auto
- // Mode cluster. For example, if the capability is enabled or disabled. If the
- // compute capability is enabled, EKS Auto Mode will create and delete EC2 Managed
- // Instances in your Amazon Web Services account. For more information, see EKS
- // Auto Mode compute capability in the Amazon EKS User Guide.
- ComputeConfig *ComputeConfigResponse
-
- // The configuration used to connect to a cluster for registration.
- ConnectorConfig *ConnectorConfigResponse
-
- // The control plane scaling tier configuration. For more information, see EKS
- // Provisioned Control Plane in the Amazon EKS User Guide.
- ControlPlaneScalingConfig *ControlPlaneScalingConfig
-
- // The Unix epoch timestamp at object creation.
- CreatedAt *time.Time
-
- // The current deletion protection setting for the cluster. When true , deletion
- // protection is enabled and the cluster cannot be deleted until protection is
- // disabled. When false , the cluster can be deleted normally. This setting only
- // applies to clusters in an active state.
- DeletionProtection *bool
-
- // The encryption configuration for the cluster.
- EncryptionConfig []EncryptionConfig
-
- // The endpoint for your Kubernetes API server.
- Endpoint *string
-
- // An object representing the health of your Amazon EKS cluster.
- Health *ClusterHealth
-
- // The ID of your local Amazon EKS cluster on an Amazon Web Services Outpost. This
- // property isn't available for an Amazon EKS cluster on the Amazon Web Services
- // cloud.
- Id *string
-
- // The identity provider information for the cluster.
- Identity *Identity
-
- // The Kubernetes network configuration for the cluster.
- KubernetesNetworkConfig *KubernetesNetworkConfigResponse
-
- // The logging configuration for your cluster.
- Logging *Logging
-
- // The name of your cluster.
- Name *string
-
- // An object representing the configuration of your local Amazon EKS cluster on an
- // Amazon Web Services Outpost. This object isn't available for clusters on the
- // Amazon Web Services cloud.
- OutpostConfig *OutpostConfigResponse
-
- // The platform version of your Amazon EKS cluster. For more information about
- // clusters deployed on the Amazon Web Services Cloud, see [Platform versions]in the Amazon EKS User
- // Guide . For more information about local clusters deployed on an Outpost, see [Amazon EKS local cluster platform versions]
- // in the Amazon EKS User Guide .
- //
- // [Platform versions]: https://docs.aws.amazon.com/eks/latest/userguide/platform-versions.html
- // [Amazon EKS local cluster platform versions]: https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-platform-versions.html
- PlatformVersion *string
-
- // The configuration in the cluster for EKS Hybrid Nodes. You can add, change, or
- // remove this configuration after the cluster is created.
- RemoteNetworkConfig *RemoteNetworkConfigResponse
-
- // The VPC configuration used by the cluster control plane. Amazon EKS VPC
- // resources have specific requirements to work properly with Kubernetes. For more
- // information, see [Cluster VPC considerations]and [Cluster security group considerations] in the Amazon EKS User Guide.
- //
- // [Cluster security group considerations]: https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html
- // [Cluster VPC considerations]: https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html
- ResourcesVpcConfig *VpcConfigResponse
-
- // The Amazon Resource Name (ARN) of the IAM role that provides permissions for
- // the Kubernetes control plane to make calls to Amazon Web Services API operations
- // on your behalf.
- RoleArn *string
-
- // The current status of the cluster.
- Status ClusterStatus
-
- // Indicates the current configuration of the block storage capability on your EKS
- // Auto Mode cluster. For example, if the capability is enabled or disabled. If the
- // block storage capability is enabled, EKS Auto Mode will create and delete EBS
- // volumes in your Amazon Web Services account. For more information, see EKS Auto
- // Mode block storage capability in the Amazon EKS User Guide.
- StorageConfig *StorageConfigResponse
-
- // Metadata that assists with categorization and organization. Each tag consists
- // of a key and an optional value. You define both. Tags don't propagate to any
- // other cluster or Amazon Web Services resources.
- Tags map[string]string
-
- // This value indicates if extended support is enabled or disabled for the cluster.
- //
- // [Learn more about EKS Extended Support in the Amazon EKS User Guide.]
- //
- // [Learn more about EKS Extended Support in the Amazon EKS User Guide.]: https://docs.aws.amazon.com/eks/latest/userguide/extended-support-control.html
- UpgradePolicy *UpgradePolicyResponse
-
- // The Kubernetes server version for the cluster.
- Version *string
-
- // The configuration for zonal shift for the cluster.
- ZonalShiftConfig *ZonalShiftConfigResponse
-
- noSmithyDocumentSerde
-}
-
-// An object representing the health of your Amazon EKS cluster.
-type ClusterHealth struct {
-
- // An object representing the health issues of your Amazon EKS cluster.
- Issues []ClusterIssue
-
- noSmithyDocumentSerde
-}
-
-// An issue with your Amazon EKS cluster.
-type ClusterIssue struct {
-
- // The error code of the issue.
- Code ClusterIssueCode
-
- // A description of the issue.
- Message *string
-
- // The resource IDs that the issue relates to.
- ResourceIds []string
-
- noSmithyDocumentSerde
-}
-
-// Contains details about a specific EKS cluster version.
-type ClusterVersionInformation struct {
-
- // The type of cluster this version is for.
- ClusterType *string
-
- // The Kubernetes version for the cluster.
- ClusterVersion *string
-
- // Default platform version for this Kubernetes version.
- DefaultPlatformVersion *string
-
- // Indicates if this is a default version.
- DefaultVersion bool
-
- // Date when extended support ends for this version.
- EndOfExtendedSupportDate *time.Time
-
- // Date when standard support ends for this version.
- EndOfStandardSupportDate *time.Time
-
- // The patch version of Kubernetes for this cluster version.
- KubernetesPatchVersion *string
-
- // The release date of this cluster version.
- ReleaseDate *time.Time
-
- // This field is deprecated. Use versionStatus instead, as that field matches for
- // input and output of this action.
- //
- // Current status of this cluster version.
- Status ClusterVersionStatus
-
- // Current status of this cluster version.
- VersionStatus VersionStatus
-
- noSmithyDocumentSerde
-}
-
-// Compatibility information.
-type Compatibility struct {
-
- // The supported Kubernetes version of the cluster.
- ClusterVersion *string
-
- // The supported default version.
- DefaultVersion bool
-
- // The supported compute platform.
- PlatformVersions []string
-
- noSmithyDocumentSerde
-}
-
-// Request to update the configuration of the compute capability of your EKS Auto
-// Mode cluster. For example, enable the capability. For more information, see EKS
-// Auto Mode compute capability in the Amazon EKS User Guide.
-type ComputeConfigRequest struct {
-
- // Request to enable or disable the compute capability on your EKS Auto Mode
- // cluster. If the compute capability is enabled, EKS Auto Mode will create and
- // delete EC2 Managed Instances in your Amazon Web Services account.
- Enabled *bool
-
- // Configuration for node pools that defines the compute resources for your EKS
- // Auto Mode cluster. For more information, see EKS Auto Mode Node Pools in the
- // Amazon EKS User Guide.
- NodePools []string
-
- // The ARN of the IAM Role EKS will assign to EC2 Managed Instances in your EKS
- // Auto Mode cluster. This value cannot be changed after the compute capability of
- // EKS Auto Mode is enabled. For more information, see the IAM Reference in the
- // Amazon EKS User Guide.
- NodeRoleArn *string
-
- noSmithyDocumentSerde
-}
-
-// Indicates the status of the request to update the compute capability of your
-// EKS Auto Mode cluster.
-type ComputeConfigResponse struct {
-
- // Indicates if the compute capability is enabled on your EKS Auto Mode cluster.
- // If the compute capability is enabled, EKS Auto Mode will create and delete EC2
- // Managed Instances in your Amazon Web Services account.
- Enabled *bool
-
- // Indicates the current configuration of node pools in your EKS Auto Mode
- // cluster. For more information, see EKS Auto Mode Node Pools in the Amazon EKS
- // User Guide.
- NodePools []string
-
- // The ARN of the IAM Role EKS will assign to EC2 Managed Instances in your EKS
- // Auto Mode cluster.
- NodeRoleArn *string
-
- noSmithyDocumentSerde
-}
-
-// The configuration sent to a cluster for configuration.
-type ConnectorConfigRequest struct {
-
- // The cloud provider for the target cluster to connect.
- //
- // This member is required.
- Provider ConnectorConfigProvider
-
- // The Amazon Resource Name (ARN) of the role that is authorized to request the
- // connector configuration.
- //
- // This member is required.
- RoleArn *string
-
- noSmithyDocumentSerde
-}
-
-// The full description of your connected cluster.
-type ConnectorConfigResponse struct {
-
- // A unique code associated with the cluster for registration purposes.
- ActivationCode *string
-
- // The expiration time of the connected cluster. The cluster's YAML file must be
- // applied through the native provider.
- ActivationExpiry *time.Time
-
- // A unique ID associated with the cluster for registration purposes.
- ActivationId *string
-
- // The cluster's cloud service provider.
- Provider *string
-
- // The Amazon Resource Name (ARN) of the role to communicate with services from
- // the connected Kubernetes cluster.
- RoleArn *string
-
- noSmithyDocumentSerde
-}
-
-// The placement configuration for all the control plane instances of your local
-// Amazon EKS cluster on an Amazon Web Services Outpost. For more information, see [Capacity considerations]
-// in the Amazon EKS User Guide.
-//
-// [Capacity considerations]: https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-capacity-considerations.html
-type ControlPlanePlacementRequest struct {
-
- // The name of the placement group for the Kubernetes control plane instances.
- // This setting can't be changed after cluster creation.
- GroupName *string
-
- noSmithyDocumentSerde
-}
-
-// The placement configuration for all the control plane instances of your local
-// Amazon EKS cluster on an Amazon Web Services Outpost. For more information, see [Capacity considerations]
-// in the Amazon EKS User Guide.
-//
-// [Capacity considerations]: https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-capacity-considerations.html
-type ControlPlanePlacementResponse struct {
-
- // The name of the placement group for the Kubernetes control plane instances.
- GroupName *string
-
- noSmithyDocumentSerde
-}
-
-// The control plane scaling tier configuration. For more information, see EKS
-// Provisioned Control Plane in the Amazon EKS User Guide.
-type ControlPlaneScalingConfig struct {
-
- // The control plane scaling tier configuration. Available options are standard ,
- // tier-xl , tier-2xl , or tier-4xl . For more information, see EKS Provisioned
- // Control Plane in the Amazon EKS User Guide.
- Tier ProvisionedControlPlaneTier
-
- noSmithyDocumentSerde
-}
-
-// The access configuration information for the cluster.
-type CreateAccessConfigRequest struct {
-
- // The desired authentication mode for the cluster. If you create a cluster by
- // using the EKS API, Amazon Web Services SDKs, or CloudFormation, the default is
- // CONFIG_MAP . If you create the cluster by using the Amazon Web Services
- // Management Console, the default value is API_AND_CONFIG_MAP .
- AuthenticationMode AuthenticationMode
-
- // Specifies whether or not the cluster creator IAM principal was set as a cluster
- // admin access entry during cluster creation time. The default value is true .
- BootstrapClusterCreatorAdminPermissions *bool
-
- noSmithyDocumentSerde
-}
-
-// The summary information about deprecated resource usage for an insight check in
-// the UPGRADE_READINESS category.
-type DeprecationDetail struct {
-
- // Details about Kubernetes clients using the deprecated resources.
- ClientStats []ClientStat
-
- // The newer version of the resource to migrate to if applicable.
- ReplacedWith *string
-
- // The version of the software where the newer resource version became available
- // to migrate to if applicable.
- StartServingReplacementVersion *string
-
- // The version of the software where the deprecated resource version will stop
- // being served.
- StopServingVersion *string
-
- // The deprecated version of the resource.
- Usage *string
-
- noSmithyDocumentSerde
-}
-
-// An EKS Anywhere subscription authorizing the customer to support for licensed
-// clusters and access to EKS Anywhere Curated Packages.
-type EksAnywhereSubscription struct {
-
- // The Amazon Resource Name (ARN) for the subscription.
- Arn *string
-
- // A boolean indicating whether or not a subscription will auto renew when it
- // expires.
- AutoRenew bool
-
- // The Unix timestamp in seconds for when the subscription was created.
- CreatedAt *time.Time
-
- // The Unix timestamp in seconds for when the subscription is effective.
- EffectiveDate *time.Time
-
- // The Unix timestamp in seconds for when the subscription will expire or auto
- // renew, depending on the auto renew configuration of the subscription object.
- ExpirationDate *time.Time
-
- // UUID identifying a subscription.
- Id *string
-
- // Amazon Web Services License Manager ARN associated with the subscription.
- LicenseArns []string
-
- // The number of licenses included in a subscription. Valid values are between 1
- // and 100.
- LicenseQuantity int32
-
- // The type of licenses included in the subscription. Valid value is CLUSTER. With
- // the CLUSTER license type, each license covers support for a single EKS Anywhere
- // cluster.
- LicenseType EksAnywhereSubscriptionLicenseType
-
- // Includes all of the claims in the license token necessary to validate the
- // license for extended support.
- Licenses []License
-
- // The status of a subscription.
- Status *string
-
- // The metadata for a subscription to assist with categorization and organization.
- // Each tag consists of a key and an optional value. Subscription tags do not
- // propagate to any other resources associated with the subscription.
- Tags map[string]string
-
- // An EksAnywhereSubscriptionTerm object.
- Term *EksAnywhereSubscriptionTerm
-
- noSmithyDocumentSerde
-}
-
-// An object representing the term duration and term unit type of your
-// subscription. This determines the term length of your subscription. Valid values
-// are MONTHS for term unit and 12 or 36 for term duration, indicating a 12 month
-// or 36 month subscription.
-type EksAnywhereSubscriptionTerm struct {
-
- // The duration of the subscription term. Valid values are 12 and 36, indicating a
- // 12 month or 36 month subscription.
- Duration int32
-
- // The term unit of the subscription. Valid value is MONTHS .
- Unit EksAnywhereSubscriptionTermUnit
-
- noSmithyDocumentSerde
-}
-
-// Indicates the current configuration of the load balancing capability on your
-// EKS Auto Mode cluster. For example, if the capability is enabled or disabled.
-// For more information, see EKS Auto Mode load balancing capability in the Amazon
-// EKS User Guide.
-type ElasticLoadBalancing struct {
-
- // Indicates if the load balancing capability is enabled on your EKS Auto Mode
- // cluster. If the load balancing capability is enabled, EKS Auto Mode will create
- // and delete load balancers in your Amazon Web Services account.
- Enabled *bool
-
- noSmithyDocumentSerde
-}
-
-// The encryption configuration for the cluster.
-type EncryptionConfig struct {
-
- // Key Management Service (KMS) key. Either the ARN or the alias can be used.
- Provider *Provider
-
- // Specifies the resources to be encrypted. The only supported value is secrets .
- Resources []string
-
- noSmithyDocumentSerde
-}
-
-// An object representing an error when an asynchronous operation fails.
-type ErrorDetail struct {
-
- // A brief description of the error.
- //
- // - SubnetNotFound: We couldn't find one of the subnets associated with the
- // cluster.
- //
- // - SecurityGroupNotFound: We couldn't find one of the security groups
- // associated with the cluster.
- //
- // - EniLimitReached: You have reached the elastic network interface limit for
- // your account.
- //
- // - IpNotAvailable: A subnet associated with the cluster doesn't have any
- // available IP addresses.
- //
- // - AccessDenied: You don't have permissions to perform the specified operation.
- //
- // - OperationNotPermitted: The service role associated with the cluster doesn't
- // have the required access permissions for Amazon EKS.
- //
- // - VpcIdNotFound: We couldn't find the VPC associated with the cluster.
- ErrorCode ErrorCode
-
- // A more complete description of the error.
- ErrorMessage *string
-
- // An optional field that contains the resource IDs associated with the error.
- ResourceIds []string
-
- noSmithyDocumentSerde
-}
-
-// An object representing an Fargate profile.
-type FargateProfile struct {
-
- // The name of your cluster.
- ClusterName *string
-
- // The Unix epoch timestamp at object creation.
- CreatedAt *time.Time
-
- // The full Amazon Resource Name (ARN) of the Fargate profile.
- FargateProfileArn *string
-
- // The name of the Fargate profile.
- FargateProfileName *string
-
- // The health status of the Fargate profile. If there are issues with your Fargate
- // profile's health, they are listed here.
- Health *FargateProfileHealth
-
- // The Amazon Resource Name (ARN) of the Pod execution role to use for any Pod
- // that matches the selectors in the Fargate profile. For more information, see [Pod execution role]Pod
- // in the Amazon EKS User Guide.
- //
- // [Pod execution role]: https://docs.aws.amazon.com/eks/latest/userguide/pod-execution-role.html
- PodExecutionRoleArn *string
-
- // The selectors to match for a Pod to use this Fargate profile.
- Selectors []FargateProfileSelector
-
- // The current status of the Fargate profile.
- Status FargateProfileStatus
-
- // The IDs of subnets to launch a Pod into.
- Subnets []string
-
- // Metadata that assists with categorization and organization. Each tag consists
- // of a key and an optional value. You define both. Tags don't propagate to any
- // other cluster or Amazon Web Services resources.
- Tags map[string]string
-
- noSmithyDocumentSerde
-}
-
-// The health status of the Fargate profile. If there are issues with your Fargate
-// profile's health, they are listed here.
-type FargateProfileHealth struct {
-
- // Any issues that are associated with the Fargate profile.
- Issues []FargateProfileIssue
-
- noSmithyDocumentSerde
-}
-
-// An issue that is associated with the Fargate profile.
-type FargateProfileIssue struct {
-
- // A brief description of the error.
- Code FargateProfileIssueCode
-
- // The error message associated with the issue.
- Message *string
-
- // The Amazon Web Services resources that are affected by this issue.
- ResourceIds []string
-
- noSmithyDocumentSerde
-}
-
-// An object representing an Fargate profile selector.
-type FargateProfileSelector struct {
-
- // The Kubernetes labels that the selector should match. A pod must contain all of
- // the labels that are specified in the selector for it to be considered a match.
- Labels map[string]string
-
- // The Kubernetes namespace that the selector should match.
- Namespace *string
-
- noSmithyDocumentSerde
-}
-
-// An object representing an identity provider.
-type Identity struct {
-
- // An object representing the [OpenID Connect] identity provider information.
- //
- // [OpenID Connect]: https://openid.net/connect/
- Oidc *OIDC
-
- noSmithyDocumentSerde
-}
-
-// An object representing an identity provider configuration.
-type IdentityProviderConfig struct {
-
- // The name of the identity provider configuration.
- //
- // This member is required.
- Name *string
-
- // The type of the identity provider configuration. The only type available is oidc
- // .
- //
- // This member is required.
- Type *string
-
- noSmithyDocumentSerde
-}
-
-// The full description of your identity configuration.
-type IdentityProviderConfigResponse struct {
-
- // An object representing an OpenID Connect (OIDC) identity provider configuration.
- Oidc *OidcIdentityProviderConfig
-
- noSmithyDocumentSerde
-}
-
-// A check that provides recommendations to remedy potential upgrade-impacting
-// issues.
-type Insight struct {
-
- // Links to sources that provide additional context on the insight.
- AdditionalInfo map[string]string
-
- // The category of the insight.
- Category Category
-
- // Summary information that relates to the category of the insight. Currently only
- // returned with certain insights having category UPGRADE_READINESS .
- CategorySpecificSummary *InsightCategorySpecificSummary
-
- // The description of the insight which includes alert criteria, remediation
- // recommendation, and additional resources (contains Markdown).
- Description *string
-
- // The ID of the insight.
- Id *string
-
- // An object containing more detail on the status of the insight resource.
- InsightStatus *InsightStatus
-
- // The Kubernetes minor version associated with an insight if applicable.
- KubernetesVersion *string
-
- // The time Amazon EKS last successfully completed a refresh of this insight check
- // on the cluster.
- LastRefreshTime *time.Time
-
- // The time the status of the insight last changed.
- LastTransitionTime *time.Time
-
- // The name of the insight.
- Name *string
-
- // A summary of how to remediate the finding of this insight if applicable.
- Recommendation *string
-
- // The details about each resource listed in the insight check result.
- Resources []InsightResourceDetail
-
- noSmithyDocumentSerde
-}
-
-// Summary information that relates to the category of the insight. Currently only
-// returned with certain insights having category UPGRADE_READINESS .
-type InsightCategorySpecificSummary struct {
-
- // A list of AddonCompatibilityDetail objects for Amazon EKS add-ons.
- AddonCompatibilityDetails []AddonCompatibilityDetail
-
- // The summary information about deprecated resource usage for an insight check in
- // the UPGRADE_READINESS category.
- DeprecationDetails []DeprecationDetail
-
- noSmithyDocumentSerde
-}
-
-// Returns information about the resource being evaluated.
-type InsightResourceDetail struct {
-
- // The Amazon Resource Name (ARN) if applicable.
- Arn *string
-
- // An object containing more detail on the status of the insight resource.
- InsightStatus *InsightStatus
-
- // The Kubernetes resource URI if applicable.
- KubernetesResourceUri *string
-
- noSmithyDocumentSerde
-}
-
-// The criteria to use for the insights.
-type InsightsFilter struct {
-
- // The categories to use to filter insights. The following lists the available
- // categories:
- //
- // - UPGRADE_READINESS : Amazon EKS identifies issues that could impact your
- // ability to upgrade to new versions of Kubernetes. These are called upgrade
- // insights.
- //
- // - MISCONFIGURATION : Amazon EKS identifies misconfiguration in your EKS Hybrid
- // Nodes setup that could impair functionality of your cluster or workloads. These
- // are called configuration insights.
- Categories []Category
-
- // The Kubernetes versions to use to filter the insights.
- KubernetesVersions []string
-
- // The statuses to use to filter the insights.
- Statuses []InsightStatusValue
-
- noSmithyDocumentSerde
-}
-
-// The status of the insight.
-type InsightStatus struct {
-
- // Explanation on the reasoning for the status of the resource.
- Reason *string
-
- // The status of the resource.
- Status InsightStatusValue
-
- noSmithyDocumentSerde
-}
-
-// The summarized description of the insight.
-type InsightSummary struct {
-
- // The category of the insight.
- Category Category
-
- // The description of the insight which includes alert criteria, remediation
- // recommendation, and additional resources (contains Markdown).
- Description *string
-
- // The ID of the insight.
- Id *string
-
- // An object containing more detail on the status of the insight.
- InsightStatus *InsightStatus
-
- // The Kubernetes minor version associated with an insight if applicable.
- KubernetesVersion *string
-
- // The time Amazon EKS last successfully completed a refresh of this insight check
- // on the cluster.
- LastRefreshTime *time.Time
-
- // The time the status of the insight last changed.
- LastTransitionTime *time.Time
-
- // The name of the insight.
- Name *string
-
- noSmithyDocumentSerde
-}
-
-// An object representing an issue with an Amazon EKS resource.
-type Issue struct {
-
- // A brief description of the error.
- //
- // - AccessDenied: Amazon EKS or one or more of your managed nodes is failing to
- // authenticate or authorize with your Kubernetes cluster API server.
- //
- // - AsgInstanceLaunchFailures: Your Auto Scaling group is experiencing failures
- // while attempting to launch instances.
- //
- // - AutoScalingGroupNotFound: We couldn't find the Auto Scaling group
- // associated with the managed node group. You may be able to recreate an Auto
- // Scaling group with the same settings to recover.
- //
- // - ClusterUnreachable: Amazon EKS or one or more of your managed nodes is
- // unable to to communicate with your Kubernetes cluster API server. This can
- // happen if there are network disruptions or if API servers are timing out
- // processing requests.
- //
- // - Ec2InstanceTypeDoesNotExist: One or more of the supplied Amazon EC2
- // instance types do not exist. Amazon EKS checked for the instance types that you
- // provided in this Amazon Web Services Region, and one or more aren't available.
- //
- // - Ec2LaunchTemplateNotFound: We couldn't find the Amazon EC2 launch template
- // for your managed node group. You may be able to recreate a launch template with
- // the same settings to recover.
- //
- // - Ec2LaunchTemplateVersionMismatch: The Amazon EC2 launch template version
- // for your managed node group does not match the version that Amazon EKS created.
- // You may be able to revert to the version that Amazon EKS created to recover.
- //
- // - Ec2SecurityGroupDeletionFailure: We could not delete the remote access
- // security group for your managed node group. Remove any dependencies from the
- // security group.
- //
- // - Ec2SecurityGroupNotFound: We couldn't find the cluster security group for
- // the cluster. You must recreate your cluster.
- //
- // - Ec2SubnetInvalidConfiguration: One or more Amazon EC2 subnets specified for
- // a node group do not automatically assign public IP addresses to instances
- // launched into it. If you want your instances to be assigned a public IP address,
- // then you need to enable the auto-assign public IP address setting for the
- // subnet. See [Modifying the public IPv4 addressing attribute for your subnet]IPv4 in the Amazon VPC User Guide.
- //
- // - IamInstanceProfileNotFound: We couldn't find the IAM instance profile for
- // your managed node group. You may be able to recreate an instance profile with
- // the same settings to recover.
- //
- // - IamNodeRoleNotFound: We couldn't find the IAM role for your managed node
- // group. You may be able to recreate an IAM role with the same settings to
- // recover.
- //
- // - InstanceLimitExceeded: Your Amazon Web Services account is unable to launch
- // any more instances of the specified instance type. You may be able to request an
- // Amazon EC2 instance limit increase to recover.
- //
- // - InsufficientFreeAddresses: One or more of the subnets associated with your
- // managed node group does not have enough available IP addresses for new nodes.
- //
- // - InternalFailure: These errors are usually caused by an Amazon EKS
- // server-side issue.
- //
- // - NodeCreationFailure: Your launched instances are unable to register with
- // your Amazon EKS cluster. Common causes of this failure are insufficient [node IAM role]
- // permissions or lack of outbound internet access for the nodes.
- //
- // [Modifying the public IPv4 addressing attribute for your subnet]: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-ip-addressing.html#subnet-public-ip
- // [node IAM role]: https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html
- Code NodegroupIssueCode
-
- // The error message associated with the issue.
- Message *string
-
- // The Amazon Web Services resources that are afflicted by this issue.
- ResourceIds []string
-
- noSmithyDocumentSerde
-}
-
-// The Kubernetes network configuration for the cluster.
-type KubernetesNetworkConfigRequest struct {
-
- // Request to enable or disable the load balancing capability on your EKS Auto
- // Mode cluster. For more information, see EKS Auto Mode load balancing capability
- // in the Amazon EKS User Guide.
- ElasticLoadBalancing *ElasticLoadBalancing
-
- // Specify which IP family is used to assign Kubernetes pod and service IP
- // addresses. If you don't specify a value, ipv4 is used by default. You can only
- // specify an IP family when you create a cluster and can't change this value once
- // the cluster is created. If you specify ipv6 , the VPC and subnets that you
- // specify for cluster creation must have both IPv4 and IPv6 CIDR blocks assigned
- // to them. You can't specify ipv6 for clusters in China Regions.
- //
- // You can only specify ipv6 for 1.21 and later clusters that use version 1.10.1
- // or later of the Amazon VPC CNI add-on. If you specify ipv6 , then ensure that
- // your VPC meets the requirements listed in the considerations listed in [Assigning IPv6 addresses to pods and services]in the
- // Amazon EKS User Guide. Kubernetes assigns services IPv6 addresses from the
- // unique local address range (fc00::/7) . You can't specify a custom IPv6 CIDR
- // block. Pod addresses are assigned from the subnet's IPv6 CIDR.
- //
- // [Assigning IPv6 addresses to pods and services]: https://docs.aws.amazon.com/eks/latest/userguide/cni-ipv6.html
- IpFamily IpFamily
-
- // Don't specify a value if you select ipv6 for ipFamily. The CIDR block to assign
- // Kubernetes service IP addresses from. If you don't specify a block, Kubernetes
- // assigns addresses from either the 10.100.0.0/16 or 172.20.0.0/16 CIDR blocks.
- // We recommend that you specify a block that does not overlap with resources in
- // other networks that are peered or connected to your VPC. The block must meet the
- // following requirements:
- //
- // - Within one of the following private IP address blocks: 10.0.0.0/8 ,
- // 172.16.0.0/12 , or 192.168.0.0/16 .
- //
- // - Doesn't overlap with any CIDR block assigned to the VPC that you selected
- // for VPC.
- //
- // - Between /24 and /12 .
- //
- // You can only specify a custom CIDR block when you create a cluster. You can't
- // change this value after the cluster is created.
- ServiceIpv4Cidr *string
-
- noSmithyDocumentSerde
-}
-
-// The Kubernetes network configuration for the cluster. The response contains a
-// value for serviceIpv6Cidr or serviceIpv4Cidr, but not both.
-type KubernetesNetworkConfigResponse struct {
-
- // Indicates the current configuration of the load balancing capability on your
- // EKS Auto Mode cluster. For example, if the capability is enabled or disabled.
- ElasticLoadBalancing *ElasticLoadBalancing
-
- // The IP family used to assign Kubernetes Pod and Service objects IP addresses.
- // The IP family is always ipv4 , unless you have a 1.21 or later cluster running
- // version 1.10.1 or later of the Amazon VPC CNI plugin for Kubernetes and
- // specified ipv6 when you created the cluster.
- IpFamily IpFamily
-
- // The CIDR block that Kubernetes Pod and Service object IP addresses are assigned
- // from. Kubernetes assigns addresses from an IPv4 CIDR block assigned to a subnet
- // that the node is in. If you didn't specify a CIDR block when you created the
- // cluster, then Kubernetes assigns addresses from either the 10.100.0.0/16 or
- // 172.20.0.0/16 CIDR blocks. If this was specified, then it was specified when the
- // cluster was created and it can't be changed.
- ServiceIpv4Cidr *string
-
- // The CIDR block that Kubernetes pod and service IP addresses are assigned from
- // if you created a 1.21 or later cluster with version 1.10.1 or later of the
- // Amazon VPC CNI add-on and specified ipv6 for ipFamily when you created the
- // cluster. Kubernetes assigns service addresses from the unique local address
- // range ( fc00::/7 ) because you can't specify a custom IPv6 CIDR block when you
- // create the cluster.
- ServiceIpv6Cidr *string
-
- noSmithyDocumentSerde
-}
-
-// An object representing a node group launch template specification. The launch
-// template can't include [SubnetId]SubnetId , [IamInstanceProfile]IamInstanceProfile , [RequestSpotInstances]RequestSpotInstances , [HibernationOptions]
-// HibernationOptions , or [TerminateInstances]TerminateInstances , or the node group deployment or
-// update will fail. For more information about launch templates, see [CreateLaunchTemplate]
-// CreateLaunchTemplate in the Amazon EC2 API Reference. For more information about
-// using launch templates with Amazon EKS, see [Customizing managed nodes with launch templates]in the Amazon EKS User Guide.
-//
-// You must specify either the launch template ID or the launch template name in
-// the request, but not both.
-//
-// [HibernationOptions]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_HibernationOptionsRequest.html
-// [Customizing managed nodes with launch templates]: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html
-// [CreateLaunchTemplate]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplate.html
-// [RequestSpotInstances]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html
-// [IamInstanceProfile]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IamInstanceProfile.html
-// [SubnetId]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html
-// [TerminateInstances]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_TerminateInstances.html
-type LaunchTemplateSpecification struct {
-
- // The ID of the launch template.
- //
- // You must specify either the launch template ID or the launch template name in
- // the request, but not both. After node group creation, you cannot use a different
- // ID.
- Id *string
-
- // The name of the launch template.
- //
- // You must specify either the launch template name or the launch template ID in
- // the request, but not both. After node group creation, you cannot use a different
- // name.
- Name *string
-
- // The version number of the launch template to use. If no version is specified,
- // then the template's default version is used. You can use a different version for
- // node group updates.
- Version *string
-
- noSmithyDocumentSerde
-}
-
-// An EKS Anywhere license associated with a subscription.
-type License struct {
-
- // An id associated with an EKS Anywhere subscription license.
- Id *string
-
- // An optional license token that can be used for extended support verification.
- Token *string
-
- noSmithyDocumentSerde
-}
-
-// An object representing the logging configuration for resources in your cluster.
-type Logging struct {
-
- // The cluster control plane logging configuration for your cluster.
- ClusterLogging []LogSetup
-
- noSmithyDocumentSerde
-}
-
-// An object representing the enabled or disabled Kubernetes control plane logs
-// for your cluster.
-type LogSetup struct {
-
- // If a log type is enabled, that log type exports its control plane logs to
- // CloudWatch Logs . If a log type isn't enabled, that log type doesn't export its
- // control plane logs. Each individual log type can be enabled or disabled
- // independently.
- Enabled *bool
-
- // The available cluster control plane log types.
- Types []LogType
-
- noSmithyDocumentSerde
-}
-
-// Information about an Amazon EKS add-on from the Amazon Web Services Marketplace.
-type MarketplaceInformation struct {
-
- // The product ID from the Amazon Web Services Marketplace.
- ProductId *string
-
- // The product URL from the Amazon Web Services Marketplace.
- ProductUrl *string
-
- noSmithyDocumentSerde
-}
-
-// An object representing an Amazon EKS managed node group.
-type Nodegroup struct {
-
- // If the node group was deployed using a launch template with a custom AMI, then
- // this is CUSTOM . For node groups that weren't deployed using a launch template,
- // this is the AMI type that was specified in the node group configuration.
- AmiType AMITypes
-
- // The capacity type of your managed node group.
- CapacityType CapacityTypes
-
- // The name of your cluster.
- ClusterName *string
-
- // The Unix epoch timestamp at object creation.
- CreatedAt *time.Time
-
- // If the node group wasn't deployed with a launch template, then this is the disk
- // size in the node group configuration. If the node group was deployed with a
- // launch template, then this is null .
- DiskSize *int32
-
- // The health status of the node group. If there are issues with your node group's
- // health, they are listed here.
- Health *NodegroupHealth
-
- // If the node group wasn't deployed with a launch template, then this is the
- // instance type that is associated with the node group. If the node group was
- // deployed with a launch template, then this is null .
- InstanceTypes []string
-
- // The Kubernetes labels applied to the nodes in the node group.
- //
- // Only labels that are applied with the Amazon EKS API are shown here. There may
- // be other Kubernetes labels applied to the nodes in this group.
- Labels map[string]string
-
- // If a launch template was used to create the node group, then this is the launch
- // template that was used.
- LaunchTemplate *LaunchTemplateSpecification
-
- // The Unix epoch timestamp for the last modification to the object.
- ModifiedAt *time.Time
-
- // The node auto repair configuration for the node group.
- NodeRepairConfig *NodeRepairConfig
-
- // The IAM role associated with your node group. The Amazon EKS node kubelet
- // daemon makes calls to Amazon Web Services APIs on your behalf. Nodes receive
- // permissions for these API calls through an IAM instance profile and associated
- // policies.
- NodeRole *string
-
- // The Amazon Resource Name (ARN) associated with the managed node group.
- NodegroupArn *string
-
- // The name associated with an Amazon EKS managed node group.
- NodegroupName *string
-
- // If the node group was deployed using a launch template with a custom AMI, then
- // this is the AMI ID that was specified in the launch template. For node groups
- // that weren't deployed using a launch template, this is the version of the Amazon
- // EKS optimized AMI that the node group was deployed with.
- ReleaseVersion *string
-
- // If the node group wasn't deployed with a launch template, then this is the
- // remote access configuration that is associated with the node group. If the node
- // group was deployed with a launch template, then this is null .
- RemoteAccess *RemoteAccessConfig
-
- // The resources associated with the node group, such as Auto Scaling groups and
- // security groups for remote access.
- Resources *NodegroupResources
-
- // The scaling configuration details for the Auto Scaling group that is associated
- // with your node group.
- ScalingConfig *NodegroupScalingConfig
-
- // The current status of the managed node group.
- Status NodegroupStatus
-
- // The subnets that were specified for the Auto Scaling group that is associated
- // with your node group.
- Subnets []string
-
- // Metadata that assists with categorization and organization. Each tag consists
- // of a key and an optional value. You define both. Tags don't propagate to any
- // other cluster or Amazon Web Services resources.
- Tags map[string]string
-
- // The Kubernetes taints to be applied to the nodes in the node group when they
- // are created. Effect is one of No_Schedule , Prefer_No_Schedule , or No_Execute .
- // Kubernetes taints can be used together with tolerations to control how workloads
- // are scheduled to your nodes. For more information, see [Node taints on managed node groups].
- //
- // [Node taints on managed node groups]: https://docs.aws.amazon.com/eks/latest/userguide/node-taints-managed-node-groups.html
- Taints []Taint
-
- // The node group update configuration.
- UpdateConfig *NodegroupUpdateConfig
-
- // The Kubernetes version of the managed node group.
- Version *string
-
- noSmithyDocumentSerde
-}
-
-// An object representing the health status of the node group.
-type NodegroupHealth struct {
-
- // Any issues that are associated with the node group.
- Issues []Issue
-
- noSmithyDocumentSerde
-}
-
-// An object representing the resources associated with the node group, such as
-// Auto Scaling groups and security groups for remote access.
-type NodegroupResources struct {
-
- // The Auto Scaling groups associated with the node group.
- AutoScalingGroups []AutoScalingGroup
-
- // The remote access security group associated with the node group. This security
- // group controls SSH access to the nodes.
- RemoteAccessSecurityGroup *string
-
- noSmithyDocumentSerde
-}
-
-// An object representing the scaling configuration details for the Auto Scaling
-// group that is associated with your node group. When creating a node group, you
-// must specify all or none of the properties. When updating a node group, you can
-// specify any or none of the properties.
-type NodegroupScalingConfig struct {
-
- // The current number of nodes that the managed node group should maintain.
- //
- // If you use the Kubernetes [Cluster Autoscaler], you shouldn't change the desiredSize value
- // directly, as this can cause the Cluster Autoscaler to suddenly scale up or scale
- // down.
- //
- // Whenever this parameter changes, the number of worker nodes in the node group
- // is updated to the specified size. If this parameter is given a value that is
- // smaller than the current number of running worker nodes, the necessary number of
- // worker nodes are terminated to match the given value.
- //
- // When using CloudFormation, no action occurs if you remove this parameter from
- // your CFN template.
- //
- // This parameter can be different from minSize in some cases, such as when
- // starting with extra hosts for testing. This parameter can also be different when
- // you want to start with an estimated number of needed hosts, but let the Cluster
- // Autoscaler reduce the number if there are too many. When the Cluster Autoscaler
- // is used, the desiredSize parameter is altered by the Cluster Autoscaler (but
- // can be out-of-date for short periods of time). the Cluster Autoscaler doesn't
- // scale a managed node group lower than minSize or higher than maxSize .
- //
- // [Cluster Autoscaler]: https://github.com/kubernetes/autoscaler#kubernetes-autoscaler
- DesiredSize *int32
-
- // The maximum number of nodes that the managed node group can scale out to. For
- // information about the maximum number that you can specify, see [Amazon EKS service quotas]in the Amazon
- // EKS User Guide.
- //
- // [Amazon EKS service quotas]: https://docs.aws.amazon.com/eks/latest/userguide/service-quotas.html
- MaxSize *int32
-
- // The minimum number of nodes that the managed node group can scale in to.
- MinSize *int32
-
- noSmithyDocumentSerde
-}
-
-// The node group update configuration. An Amazon EKS managed node group updates
-// by replacing nodes with new nodes of newer AMI versions in parallel. You choose
-// the maximum unavailable and the update strategy.
-type NodegroupUpdateConfig struct {
-
- // The maximum number of nodes unavailable at once during a version update. Nodes
- // are updated in parallel. This value or maxUnavailablePercentage is required to
- // have a value.The maximum number is 100.
- MaxUnavailable *int32
-
- // The maximum percentage of nodes unavailable during a version update. This
- // percentage of nodes are updated in parallel, up to 100 nodes at once. This value
- // or maxUnavailable is required to have a value.
- MaxUnavailablePercentage *int32
-
- // The configuration for the behavior to follow during a node group version update
- // of this managed node group. You choose between two possible strategies for
- // replacing nodes during an [UpdateNodegroupVersion]UpdateNodegroupVersion action.
- //
- // An Amazon EKS managed node group updates by replacing nodes with new nodes of
- // newer AMI versions in parallel. The update strategy changes the managed node
- // update behavior of the managed node group for each quantity. The default
- // strategy has guardrails to protect you from misconfiguration and launches the
- // new instances first, before terminating the old instances. The minimal strategy
- // removes the guardrails and terminates the old instances before launching the new
- // instances. This minimal strategy is useful in scenarios where you are
- // constrained to resources or costs (for example, with hardware accelerators such
- // as GPUs).
- //
- // [UpdateNodegroupVersion]: https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateNodegroupVersion.html
- UpdateStrategy NodegroupUpdateStrategies
-
- noSmithyDocumentSerde
-}
-
-// The node auto repair configuration for the node group.
-type NodeRepairConfig struct {
-
- // Specifies whether to enable node auto repair for the node group. Node auto
- // repair is disabled by default.
- Enabled *bool
-
- // Specify the maximum number of nodes that can be repaired concurrently or in
- // parallel, expressed as a count of unhealthy nodes. This gives you finer-grained
- // control over the pace of node replacements. When using this, you cannot also set
- // maxParallelNodesRepairedPercentage at the same time.
- MaxParallelNodesRepairedCount *int32
-
- // Specify the maximum number of nodes that can be repaired concurrently or in
- // parallel, expressed as a percentage of unhealthy nodes. This gives you
- // finer-grained control over the pace of node replacements. When using this, you
- // cannot also set maxParallelNodesRepairedCount at the same time.
- MaxParallelNodesRepairedPercentage *int32
-
- // Specify a count threshold of unhealthy nodes, above which node auto repair
- // actions will stop. When using this, you cannot also set
- // maxUnhealthyNodeThresholdPercentage at the same time.
- MaxUnhealthyNodeThresholdCount *int32
-
- // Specify a percentage threshold of unhealthy nodes, above which node auto repair
- // actions will stop. When using this, you cannot also set
- // maxUnhealthyNodeThresholdCount at the same time.
- MaxUnhealthyNodeThresholdPercentage *int32
-
- // Specify granular overrides for specific repair actions. These overrides control
- // the repair action and the repair delay time before a node is considered eligible
- // for repair. If you use this, you must specify all the values.
- NodeRepairConfigOverrides []NodeRepairConfigOverrides
-
- noSmithyDocumentSerde
-}
-
-// Specify granular overrides for specific repair actions. These overrides control
-// the repair action and the repair delay time before a node is considered eligible
-// for repair. If you use this, you must specify all the values.
-type NodeRepairConfigOverrides struct {
-
- // Specify the minimum time in minutes to wait before attempting to repair a node
- // with this specific nodeMonitoringCondition and nodeUnhealthyReason .
- MinRepairWaitTimeMins *int32
-
- // Specify an unhealthy condition reported by the node monitoring agent that this
- // override would apply to.
- NodeMonitoringCondition *string
-
- // Specify a reason reported by the node monitoring agent that this override would
- // apply to.
- NodeUnhealthyReason *string
-
- // Specify the repair action to take for nodes when all of the specified
- // conditions are met.
- RepairAction RepairAction
-
- noSmithyDocumentSerde
-}
-
-// An object representing the [OpenID Connect] (OIDC) identity provider information for the
-// cluster.
-//
-// [OpenID Connect]: https://openid.net/connect/
-type OIDC struct {
-
- // The issuer URL for the OIDC identity provider.
- Issuer *string
-
- noSmithyDocumentSerde
-}
-
-// An object representing the configuration for an OpenID Connect (OIDC) identity
-// provider.
-type OidcIdentityProviderConfig struct {
-
- // This is also known as audience. The ID of the client application that makes
- // authentication requests to the OIDC identity provider.
- ClientId *string
-
- // The name of your cluster.
- ClusterName *string
-
- // The JSON web token (JWT) claim that the provider uses to return your groups.
- GroupsClaim *string
-
- // The prefix that is prepended to group claims to prevent clashes with existing
- // names (such as system: groups). For example, the value oidc: creates group
- // names like oidc:engineering and oidc:infra . The prefix can't contain system:
- GroupsPrefix *string
-
- // The ARN of the configuration.
- IdentityProviderConfigArn *string
-
- // The name of the configuration.
- IdentityProviderConfigName *string
-
- // The URL of the OIDC identity provider that allows the API server to discover
- // public signing keys for verifying tokens.
- IssuerUrl *string
-
- // The key-value pairs that describe required claims in the identity token. If
- // set, each claim is verified to be present in the token with a matching value.
- RequiredClaims map[string]string
-
- // The status of the OIDC identity provider.
- Status ConfigStatus
-
- // Metadata that assists with categorization and organization. Each tag consists
- // of a key and an optional value. You define both. Tags don't propagate to any
- // other cluster or Amazon Web Services resources.
- Tags map[string]string
-
- // The JSON Web token (JWT) claim that is used as the username.
- UsernameClaim *string
-
- // The prefix that is prepended to username claims to prevent clashes with
- // existing names. The prefix can't contain system:
- UsernamePrefix *string
-
- noSmithyDocumentSerde
-}
-
-// An object representing an OpenID Connect (OIDC) configuration. Before
-// associating an OIDC identity provider to your cluster, review the considerations
-// in [Authenticating users for your cluster from an OIDC identity provider]in the Amazon EKS User Guide.
-//
-// [Authenticating users for your cluster from an OIDC identity provider]: https://docs.aws.amazon.com/eks/latest/userguide/authenticate-oidc-identity-provider.html
-type OidcIdentityProviderConfigRequest struct {
-
- // This is also known as audience. The ID for the client application that makes
- // authentication requests to the OIDC identity provider.
- //
- // This member is required.
- ClientId *string
-
- // The name of the OIDC provider configuration.
- //
- // This member is required.
- IdentityProviderConfigName *string
-
- // The URL of the OIDC identity provider that allows the API server to discover
- // public signing keys for verifying tokens. The URL must begin with https:// and
- // should correspond to the iss claim in the provider's OIDC ID tokens. Based on
- // the OIDC standard, path components are allowed but query parameters are not.
- // Typically the URL consists of only a hostname, like https://server.example.org
- // or https://example.com . This URL should point to the level below
- // .well-known/openid-configuration and must be publicly accessible over the
- // internet.
- //
- // This member is required.
- IssuerUrl *string
-
- // The JWT claim that the provider uses to return your groups.
- GroupsClaim *string
-
- // The prefix that is prepended to group claims to prevent clashes with existing
- // names (such as system: groups). For example, the value oidc: will create group
- // names like oidc:engineering and oidc:infra .
- GroupsPrefix *string
-
- // The key value pairs that describe required claims in the identity token. If
- // set, each claim is verified to be present in the token with a matching value.
- // For the maximum number of claims that you can require, see [Amazon EKS service quotas]in the Amazon EKS
- // User Guide.
- //
- // [Amazon EKS service quotas]: https://docs.aws.amazon.com/eks/latest/userguide/service-quotas.html
- RequiredClaims map[string]string
-
- // The JSON Web Token (JWT) claim to use as the username. The default is sub ,
- // which is expected to be a unique identifier of the end user. You can choose
- // other claims, such as email or name , depending on the OIDC identity provider.
- // Claims other than email are prefixed with the issuer URL to prevent naming
- // clashes with other plug-ins.
- UsernameClaim *string
-
- // The prefix that is prepended to username claims to prevent clashes with
- // existing names. If you do not provide this field, and username is a value other
- // than email , the prefix defaults to issuerurl# . You can use the value - to
- // disable all prefixing.
- UsernamePrefix *string
-
- noSmithyDocumentSerde
-}
-
-// The configuration of your local Amazon EKS cluster on an Amazon Web Services
-// Outpost. Before creating a cluster on an Outpost, review [Creating a local cluster on an Outpost]in the Amazon EKS User
-// Guide. This API isn't available for Amazon EKS clusters on the Amazon Web
-// Services cloud.
-//
-// [Creating a local cluster on an Outpost]: https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-local-cluster-create.html
-type OutpostConfigRequest struct {
-
- // The Amazon EC2 instance type that you want to use for your local Amazon EKS
- // cluster on Outposts. Choose an instance type based on the number of nodes that
- // your cluster will have. For more information, see [Capacity considerations]in the Amazon EKS User Guide.
- //
- // The instance type that you specify is used for all Kubernetes control plane
- // instances. The instance type can't be changed after cluster creation. The
- // control plane is not automatically scaled by Amazon EKS.
- //
- // [Capacity considerations]: https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-capacity-considerations.html
- //
- // This member is required.
- ControlPlaneInstanceType *string
-
- // The ARN of the Outpost that you want to use for your local Amazon EKS cluster
- // on Outposts. Only a single Outpost ARN is supported.
- //
- // This member is required.
- OutpostArns []string
-
- // An object representing the placement configuration for all the control plane
- // instances of your local Amazon EKS cluster on an Amazon Web Services Outpost.
- // For more information, see [Capacity considerations]in the Amazon EKS User Guide.
- //
- // [Capacity considerations]: https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-capacity-considerations.html
- ControlPlanePlacement *ControlPlanePlacementRequest
-
- noSmithyDocumentSerde
-}
-
-// An object representing the configuration of your local Amazon EKS cluster on an
-// Amazon Web Services Outpost. This API isn't available for Amazon EKS clusters on
-// the Amazon Web Services cloud.
-type OutpostConfigResponse struct {
-
- // The Amazon EC2 instance type used for the control plane. The instance type is
- // the same for all control plane instances.
- //
- // This member is required.
- ControlPlaneInstanceType *string
-
- // The ARN of the Outpost that you specified for use with your local Amazon EKS
- // cluster on Outposts.
- //
- // This member is required.
- OutpostArns []string
-
- // An object representing the placement configuration for all the control plane
- // instances of your local Amazon EKS cluster on an Amazon Web Services Outpost.
- // For more information, see [Capacity considerations]in the Amazon EKS User Guide.
- //
- // [Capacity considerations]: https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts-capacity-considerations.html
- ControlPlanePlacement *ControlPlanePlacementResponse
-
- noSmithyDocumentSerde
-}
-
-// Amazon EKS Pod Identity associations provide the ability to manage credentials
-// for your applications, similar to the way that Amazon EC2 instance profiles
-// provide credentials to Amazon EC2 instances.
-type PodIdentityAssociation struct {
-
- // The Amazon Resource Name (ARN) of the association.
- AssociationArn *string
-
- // The ID of the association.
- AssociationId *string
-
- // The name of the cluster that the association is in.
- ClusterName *string
-
- // The timestamp that the association was created at.
- CreatedAt *time.Time
-
- // The state of the automatic sessions tags. The value of true disables these tags.
- //
- // EKS Pod Identity adds a pre-defined set of session tags when it assumes the
- // role. You can use these tags to author a single role that can work across
- // resources by allowing access to Amazon Web Services resources based on matching
- // tags. By default, EKS Pod Identity attaches six tags, including tags for cluster
- // name, namespace, and service account name. For the list of tags added by EKS Pod
- // Identity, see [List of session tags added by EKS Pod Identity]in the Amazon EKS User Guide.
- //
- // [List of session tags added by EKS Pod Identity]: https://docs.aws.amazon.com/eks/latest/userguide/pod-id-abac.html#pod-id-abac-tags
- DisableSessionTags *bool
-
- // The unique identifier for this EKS Pod Identity association for a target IAM
- // role. You put this value in the trust policy of the target role, in a Condition
- // to match the sts.ExternalId . This ensures that the target role can only be
- // assumed by this association. This prevents the confused deputy problem. For more
- // information about the confused deputy problem, see [The confused deputy problem]in the IAM User Guide.
- //
- // If you want to use the same target role with multiple associations or other
- // roles, use independent statements in the trust policy to allow sts:AssumeRole
- // access from each role.
- //
- // [The confused deputy problem]: https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html
- ExternalId *string
-
- // The most recent timestamp that the association was modified at.
- ModifiedAt *time.Time
-
- // The name of the Kubernetes namespace inside the cluster to create the
- // association in. The service account and the Pods that use the service account
- // must be in this namespace.
- Namespace *string
-
- // If defined, the EKS Pod Identity association is owned by an Amazon EKS add-on.
- OwnerArn *string
-
- // The Amazon Resource Name (ARN) of the IAM role to associate with the service
- // account. The EKS Pod Identity agent manages credentials to assume this role for
- // applications in the containers in the Pods that use this service account.
- RoleArn *string
-
- // The name of the Kubernetes service account inside the cluster to associate the
- // IAM credentials with.
- ServiceAccount *string
-
- // Metadata that assists with categorization and organization. Each tag consists
- // of a key and an optional value. You define both. Tags don't propagate to any
- // other cluster or Amazon Web Services resources.
- //
- // The following basic restrictions apply to tags:
- //
- // - Maximum number of tags per resource – 50
- //
- // - For each resource, each tag key must be unique, and each tag key can have
- // only one value.
- //
- // - Maximum key length – 128 Unicode characters in UTF-8
- //
- // - Maximum value length – 256 Unicode characters in UTF-8
- //
- // - If your tagging schema is used across multiple services and resources,
- // remember that other services may have restrictions on allowed characters.
- // Generally allowed characters are: letters, numbers, and spaces representable in
- // UTF-8, and the following characters: + - = . _ : / @.
- //
- // - Tag keys and values are case-sensitive.
- //
- // - Do not use aws: , AWS: , or any upper or lowercase combination of such as a
- // prefix for either keys or values as it is reserved for Amazon Web Services use.
- // You cannot edit or delete tag keys or values with this prefix. Tags with this
- // prefix do not count against your tags per resource limit.
- Tags map[string]string
-
- // The Amazon Resource Name (ARN) of the target IAM role to associate with the
- // service account. This role is assumed by using the EKS Pod Identity association
- // role, then the credentials for this role are injected into the Pod.
- TargetRoleArn *string
-
- noSmithyDocumentSerde
-}
-
-// The summarized description of the association.
-//
-// Each summary is simplified by removing these fields compared to the full [PodIdentityAssociation]
-// PodIdentityAssociation :
-//
-// - The IAM role: roleArn
-//
-// - The timestamp that the association was created at: createdAt
-//
-// - The most recent timestamp that the association was modified at:. modifiedAt
-//
-// - The tags on the association: tags
-//
-// [PodIdentityAssociation]: https://docs.aws.amazon.com/eks/latest/APIReference/API_PodIdentityAssociation.html
-type PodIdentityAssociationSummary struct {
-
- // The Amazon Resource Name (ARN) of the association.
- AssociationArn *string
-
- // The ID of the association.
- AssociationId *string
-
- // The name of the cluster that the association is in.
- ClusterName *string
-
- // The name of the Kubernetes namespace inside the cluster to create the
- // association in. The service account and the Pods that use the service account
- // must be in this namespace.
- Namespace *string
-
- // If defined, the association is owned by an Amazon EKS add-on.
- OwnerArn *string
-
- // The name of the Kubernetes service account inside the cluster to associate the
- // IAM credentials with.
- ServiceAccount *string
-
- noSmithyDocumentSerde
-}
-
-// Identifies the Key Management Service (KMS) key used to encrypt the secrets.
-type Provider struct {
-
- // Amazon Resource Name (ARN) or alias of the KMS key. The KMS key must be
- // symmetric and created in the same Amazon Web Services Region as the cluster. If
- // the KMS key was created in a different account, the [IAM principal]must have access to the KMS
- // key. For more information, see [Allowing users in other accounts to use a KMS key]in the Key Management Service Developer Guide.
- //
- // [IAM principal]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html
- // [Allowing users in other accounts to use a KMS key]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-modifying-external-accounts.html
- KeyArn *string
-
- noSmithyDocumentSerde
-}
-
-// An object representing the remote access configuration for the managed node
-// group.
-type RemoteAccessConfig struct {
-
- // The Amazon EC2 SSH key name that provides access for SSH communication with the
- // nodes in the managed node group. For more information, see [Amazon EC2 key pairs and Linux instances]in the Amazon
- // Elastic Compute Cloud User Guide for Linux Instances. For Windows, an Amazon EC2
- // SSH key is used to obtain the RDP password. For more information, see [Amazon EC2 key pairs and Windows instances]in the
- // Amazon Elastic Compute Cloud User Guide for Windows Instances.
- //
- // [Amazon EC2 key pairs and Windows instances]: https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-key-pairs.html
- // [Amazon EC2 key pairs and Linux instances]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html
- Ec2SshKey *string
-
- // The security group IDs that are allowed SSH access (port 22) to the nodes. For
- // Windows, the port is 3389. If you specify an Amazon EC2 SSH key but don't
- // specify a source security group when you create a managed node group, then the
- // port on the nodes is opened to the internet ( 0.0.0.0/0 ). For more information,
- // see [Security Groups for Your VPC]in the Amazon Virtual Private Cloud User Guide.
- //
- // [Security Groups for Your VPC]: https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html
- SourceSecurityGroups []string
-
- noSmithyDocumentSerde
-}
-
-// The configuration in the cluster for EKS Hybrid Nodes. You can add, change, or
-// remove this configuration after the cluster is created.
-type RemoteNetworkConfigRequest struct {
-
- // The list of network CIDRs that can contain hybrid nodes.
- //
- // These CIDR blocks define the expected IP address range of the hybrid nodes that
- // join the cluster. These blocks are typically determined by your network
- // administrator.
- //
- // Enter one or more IPv4 CIDR blocks in decimal dotted-quad notation (for
- // example, 10.2.0.0/16 ).
- //
- // It must satisfy the following requirements:
- //
- // - Each block must be within an IPv4 RFC-1918 network range. Minimum allowed
- // size is /32, maximum allowed size is /8. Publicly-routable addresses aren't
- // supported.
- //
- // - Each block cannot overlap with the range of the VPC CIDR blocks for your
- // EKS resources, or the block of the Kubernetes service IP range.
- //
- // - Each block must have a route to the VPC that uses the VPC CIDR blocks, not
- // public IPs or Elastic IPs. There are many options including Transit Gateway,
- // Site-to-Site VPN, or Direct Connect.
- //
- // - Each host must allow outbound connection to the EKS cluster control plane
- // on TCP ports 443 and 10250 .
- //
- // - Each host must allow inbound connection from the EKS cluster control plane
- // on TCP port 10250 for logs, exec and port-forward operations.
- //
- // - Each host must allow TCP and UDP network connectivity to and from other
- // hosts that are running CoreDNS on UDP port 53 for service and pod DNS names.
- RemoteNodeNetworks []RemoteNodeNetwork
-
- // The list of network CIDRs that can contain pods that run Kubernetes webhooks on
- // hybrid nodes.
- //
- // These CIDR blocks are determined by configuring your Container Network
- // Interface (CNI) plugin. We recommend the Calico CNI or Cilium CNI. Note that the
- // Amazon VPC CNI plugin for Kubernetes isn't available for on-premises and edge
- // locations.
- //
- // Enter one or more IPv4 CIDR blocks in decimal dotted-quad notation (for
- // example, 10.2.0.0/16 ).
- //
- // It must satisfy the following requirements:
- //
- // - Each block must be within an IPv4 RFC-1918 network range. Minimum allowed
- // size is /32, maximum allowed size is /8. Publicly-routable addresses aren't
- // supported.
- //
- // - Each block cannot overlap with the range of the VPC CIDR blocks for your
- // EKS resources, or the block of the Kubernetes service IP range.
- RemotePodNetworks []RemotePodNetwork
-
- noSmithyDocumentSerde
-}
-
-// The configuration in the cluster for EKS Hybrid Nodes. You can add, change, or
-// remove this configuration after the cluster is created.
-type RemoteNetworkConfigResponse struct {
-
- // The list of network CIDRs that can contain hybrid nodes.
- RemoteNodeNetworks []RemoteNodeNetwork
-
- // The list of network CIDRs that can contain pods that run Kubernetes webhooks on
- // hybrid nodes.
- RemotePodNetworks []RemotePodNetwork
-
- noSmithyDocumentSerde
-}
-
-// A network CIDR that can contain hybrid nodes.
-//
-// These CIDR blocks define the expected IP address range of the hybrid nodes that
-// join the cluster. These blocks are typically determined by your network
-// administrator.
-//
-// Enter one or more IPv4 CIDR blocks in decimal dotted-quad notation (for
-// example, 10.2.0.0/16 ).
-//
-// It must satisfy the following requirements:
-//
-// - Each block must be within an IPv4 RFC-1918 network range. Minimum allowed
-// size is /32, maximum allowed size is /8. Publicly-routable addresses aren't
-// supported.
-//
-// - Each block cannot overlap with the range of the VPC CIDR blocks for your
-// EKS resources, or the block of the Kubernetes service IP range.
-//
-// - Each block must have a route to the VPC that uses the VPC CIDR blocks, not
-// public IPs or Elastic IPs. There are many options including Transit Gateway,
-// Site-to-Site VPN, or Direct Connect.
-//
-// - Each host must allow outbound connection to the EKS cluster control plane
-// on TCP ports 443 and 10250 .
-//
-// - Each host must allow inbound connection from the EKS cluster control plane
-// on TCP port 10250 for logs, exec and port-forward operations.
-//
-// - Each host must allow TCP and UDP network connectivity to and from other
-// hosts that are running CoreDNS on UDP port 53 for service and pod DNS names.
-type RemoteNodeNetwork struct {
-
- // A network CIDR that can contain hybrid nodes.
- //
- // These CIDR blocks define the expected IP address range of the hybrid nodes that
- // join the cluster. These blocks are typically determined by your network
- // administrator.
- //
- // Enter one or more IPv4 CIDR blocks in decimal dotted-quad notation (for
- // example, 10.2.0.0/16 ).
- //
- // It must satisfy the following requirements:
- //
- // - Each block must be within an IPv4 RFC-1918 network range. Minimum allowed
- // size is /32, maximum allowed size is /8. Publicly-routable addresses aren't
- // supported.
- //
- // - Each block cannot overlap with the range of the VPC CIDR blocks for your
- // EKS resources, or the block of the Kubernetes service IP range.
- //
- // - Each block must have a route to the VPC that uses the VPC CIDR blocks, not
- // public IPs or Elastic IPs. There are many options including Transit Gateway,
- // Site-to-Site VPN, or Direct Connect.
- //
- // - Each host must allow outbound connection to the EKS cluster control plane
- // on TCP ports 443 and 10250 .
- //
- // - Each host must allow inbound connection from the EKS cluster control plane
- // on TCP port 10250 for logs, exec and port-forward operations.
- //
- // - Each host must allow TCP and UDP network connectivity to and from other
- // hosts that are running CoreDNS on UDP port 53 for service and pod DNS names.
- Cidrs []string
-
- noSmithyDocumentSerde
-}
-
-// A network CIDR that can contain pods that run Kubernetes webhooks on hybrid
-// nodes.
-//
-// These CIDR blocks are determined by configuring your Container Network
-// Interface (CNI) plugin. We recommend the Calico CNI or Cilium CNI. Note that the
-// Amazon VPC CNI plugin for Kubernetes isn't available for on-premises and edge
-// locations.
-//
-// Enter one or more IPv4 CIDR blocks in decimal dotted-quad notation (for
-// example, 10.2.0.0/16 ).
-//
-// It must satisfy the following requirements:
-//
-// - Each block must be within an IPv4 RFC-1918 network range. Minimum allowed
-// size is /32, maximum allowed size is /8. Publicly-routable addresses aren't
-// supported.
-//
-// - Each block cannot overlap with the range of the VPC CIDR blocks for your
-// EKS resources, or the block of the Kubernetes service IP range.
-type RemotePodNetwork struct {
-
- // A network CIDR that can contain pods that run Kubernetes webhooks on hybrid
- // nodes.
- //
- // These CIDR blocks are determined by configuring your Container Network
- // Interface (CNI) plugin. We recommend the Calico CNI or Cilium CNI. Note that the
- // Amazon VPC CNI plugin for Kubernetes isn't available for on-premises and edge
- // locations.
- //
- // Enter one or more IPv4 CIDR blocks in decimal dotted-quad notation (for
- // example, 10.2.0.0/16 ).
- //
- // It must satisfy the following requirements:
- //
- // - Each block must be within an IPv4 RFC-1918 network range. Minimum allowed
- // size is /32, maximum allowed size is /8. Publicly-routable addresses aren't
- // supported.
- //
- // - Each block cannot overlap with the range of the VPC CIDR blocks for your
- // EKS resources, or the block of the Kubernetes service IP range.
- Cidrs []string
-
- noSmithyDocumentSerde
-}
-
-// An IAM Identity CenterIAM; Identity Center identity (user or group) that can be
-// assigned permissions in a capability.
-type SsoIdentity struct {
-
- // The unique identifier of the IAM Identity CenterIAM; Identity Center user or
- // group.
- //
- // This member is required.
- Id *string
-
- // The type of identity. Valid values are SSO_USER or SSO_GROUP .
- //
- // This member is required.
- Type SsoIdentityType
-
- noSmithyDocumentSerde
-}
-
-// Request to update the configuration of the storage capability of your EKS Auto
-// Mode cluster. For example, enable the capability. For more information, see EKS
-// Auto Mode block storage capability in the Amazon EKS User Guide.
-type StorageConfigRequest struct {
-
- // Request to configure EBS Block Storage settings for your EKS Auto Mode cluster.
- BlockStorage *BlockStorage
-
- noSmithyDocumentSerde
-}
-
-// Indicates the status of the request to update the block storage capability of
-// your EKS Auto Mode cluster.
-type StorageConfigResponse struct {
-
- // Indicates the current configuration of the block storage capability on your EKS
- // Auto Mode cluster. For example, if the capability is enabled or disabled.
- BlockStorage *BlockStorage
-
- noSmithyDocumentSerde
-}
-
-// A property that allows a node to repel a Pod . For more information, see [Node taints on managed node groups] in
-// the Amazon EKS User Guide.
-//
-// [Node taints on managed node groups]: https://docs.aws.amazon.com/eks/latest/userguide/node-taints-managed-node-groups.html
-type Taint struct {
-
- // The effect of the taint.
- Effect TaintEffect
-
- // The key of the taint.
- Key *string
-
- // The value of the taint.
- Value *string
-
- noSmithyDocumentSerde
-}
-
-// An object representing an asynchronous update.
-type Update struct {
-
- // The Unix epoch timestamp at object creation.
- CreatedAt *time.Time
-
- // Any errors associated with a Failed update.
- Errors []ErrorDetail
-
- // A UUID that is used to track the update.
- Id *string
-
- // A key-value map that contains the parameters associated with the update.
- Params []UpdateParam
-
- // The current status of the update.
- Status UpdateStatus
-
- // The type of the update.
- Type UpdateType
-
- noSmithyDocumentSerde
-}
-
-// The access configuration information for the cluster.
-type UpdateAccessConfigRequest struct {
-
- // The desired authentication mode for the cluster.
- AuthenticationMode AuthenticationMode
-
- noSmithyDocumentSerde
-}
-
-// Configuration updates for an Argo CD capability. You only need to specify the
-// fields you want to update.
-type UpdateArgoCdConfig struct {
-
- // Updated network access configuration for the Argo CD capability's managed API
- // server endpoint. You can add or remove VPC endpoint associations to control
- // which VPCs have private access to the Argo CD server.
- NetworkAccess *ArgoCdNetworkAccessConfigRequest
-
- // Updated RBAC role mappings for the Argo CD capability. You can add, update, or
- // remove role mappings.
- RbacRoleMappings *UpdateRoleMappings
-
- noSmithyDocumentSerde
-}
-
-// Configuration updates for a capability. The structure varies depending on the
-// capability type.
-type UpdateCapabilityConfiguration struct {
-
- // Configuration updates specific to Argo CD capabilities.
- ArgoCd *UpdateArgoCdConfig
-
- noSmithyDocumentSerde
-}
-
-// An object representing a Kubernetes label change for a managed node group.
-type UpdateLabelsPayload struct {
-
- // The Kubernetes labels to add or update.
- AddOrUpdateLabels map[string]string
-
- // The Kubernetes labels to remove.
- RemoveLabels []string
-
- noSmithyDocumentSerde
-}
-
-// An object representing the details of an update request.
-type UpdateParam struct {
-
- // The keys associated with an update request.
- Type UpdateParamType
-
- // The value of the keys submitted as part of an update request.
- Value *string
-
- noSmithyDocumentSerde
-}
-
-// Updates to RBAC role mappings for an Argo CD capability. You can add, update,
-// or remove role mappings in a single operation.
-type UpdateRoleMappings struct {
-
- // A list of role mappings to add or update. If a mapping for the specified role
- // already exists, it will be updated with the new identities. If it doesn't exist,
- // a new mapping will be created.
- AddOrUpdateRoleMappings []ArgoCdRoleMapping
-
- // A list of role mappings to remove from the RBAC configuration. Each mapping
- // specifies an Argo CD role ( ADMIN , EDITOR , or VIEWER ) and the identities to
- // remove from that role.
- RemoveRoleMappings []ArgoCdRoleMapping
-
- noSmithyDocumentSerde
-}
-
-// An object representing the details of an update to a taints payload. For more
-// information, see [Node taints on managed node groups]in the Amazon EKS User Guide.
-//
-// [Node taints on managed node groups]: https://docs.aws.amazon.com/eks/latest/userguide/node-taints-managed-node-groups.html
-type UpdateTaintsPayload struct {
-
- // Kubernetes taints to be added or updated.
- AddOrUpdateTaints []Taint
-
- // Kubernetes taints to remove.
- RemoveTaints []Taint
-
- noSmithyDocumentSerde
-}
-
-// The support policy to use for the cluster. Extended support allows you to
-// remain on specific Kubernetes versions for longer. Clusters in extended support
-// have higher costs. The default value is EXTENDED . Use STANDARD to disable
-// extended support.
-//
-// [Learn more about EKS Extended Support in the Amazon EKS User Guide.]
-//
-// [Learn more about EKS Extended Support in the Amazon EKS User Guide.]: https://docs.aws.amazon.com/eks/latest/userguide/extended-support-control.html
-type UpgradePolicyRequest struct {
-
- // If the cluster is set to EXTENDED , it will enter extended support at the end of
- // standard support. If the cluster is set to STANDARD , it will be automatically
- // upgraded at the end of standard support.
- //
- // [Learn more about EKS Extended Support in the Amazon EKS User Guide.]
- //
- // [Learn more about EKS Extended Support in the Amazon EKS User Guide.]: https://docs.aws.amazon.com/eks/latest/userguide/extended-support-control.html
- SupportType SupportType
-
- noSmithyDocumentSerde
-}
-
-// This value indicates if extended support is enabled or disabled for the cluster.
-//
-// [Learn more about EKS Extended Support in the Amazon EKS User Guide.]
-//
-// [Learn more about EKS Extended Support in the Amazon EKS User Guide.]: https://docs.aws.amazon.com/eks/latest/userguide/extended-support-control.html
-type UpgradePolicyResponse struct {
-
- // If the cluster is set to EXTENDED , it will enter extended support at the end of
- // standard support. If the cluster is set to STANDARD , it will be automatically
- // upgraded at the end of standard support.
- //
- // [Learn more about EKS Extended Support in the Amazon EKS User Guide.]
- //
- // [Learn more about EKS Extended Support in the Amazon EKS User Guide.]: https://docs.aws.amazon.com/eks/latest/userguide/extended-support-control.html
- SupportType SupportType
-
- noSmithyDocumentSerde
-}
-
-// An object representing the VPC configuration to use for an Amazon EKS cluster.
-type VpcConfigRequest struct {
-
- // Set this value to true to enable private access for your cluster's Kubernetes
- // API server endpoint. If you enable private access, Kubernetes API requests from
- // within your cluster's VPC use the private VPC endpoint. The default value for
- // this parameter is false , which disables private access for your Kubernetes API
- // server. If you disable private access and you have nodes or Fargate pods in the
- // cluster, then ensure that publicAccessCidrs includes the necessary CIDR blocks
- // for communication with the nodes or Fargate pods. For more information, see [Cluster API server endpoint]in
- // the Amazon EKS User Guide .
- //
- // [Cluster API server endpoint]: https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html
- EndpointPrivateAccess *bool
-
- // Set this value to false to disable public access to your cluster's Kubernetes
- // API server endpoint. If you disable public access, your cluster's Kubernetes API
- // server can only receive requests from within the cluster VPC. The default value
- // for this parameter is true , which enables public access for your Kubernetes API
- // server. The endpoint domain name and IP address family depends on the value of
- // the ipFamily for the cluster. For more information, see [Cluster API server endpoint] in the Amazon EKS User
- // Guide .
- //
- // [Cluster API server endpoint]: https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html
- EndpointPublicAccess *bool
-
- // The CIDR blocks that are allowed access to your cluster's public Kubernetes API
- // server endpoint. Communication to the endpoint from addresses outside of the
- // CIDR blocks that you specify is denied. The default value is 0.0.0.0/0 and
- // additionally ::/0 for dual-stack `IPv6` clusters. If you've disabled private
- // endpoint access, make sure that you specify the necessary CIDR blocks for every
- // node and Fargate Pod in the cluster. For more information, see [Cluster API server endpoint] in the Amazon
- // EKS User Guide .
- //
- // Note that the public endpoints are dual-stack for only IPv6 clusters that are
- // made after October 2024. You can't add IPv6 CIDR blocks to IPv4 clusters or IPv6
- // clusters that were made before October 2024.
- //
- // [Cluster API server endpoint]: https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html
- PublicAccessCidrs []string
-
- // Specify one or more security groups for the cross-account elastic network
- // interfaces that Amazon EKS creates to use that allow communication between your
- // nodes and the Kubernetes control plane. If you don't specify any security
- // groups, then familiarize yourself with the difference between Amazon EKS
- // defaults for clusters deployed with Kubernetes. For more information, see [Amazon EKS security group considerations]in
- // the Amazon EKS User Guide .
- //
- // [Amazon EKS security group considerations]: https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html
- SecurityGroupIds []string
-
- // Specify subnets for your Amazon EKS nodes. Amazon EKS creates cross-account
- // elastic network interfaces in these subnets to allow communication between your
- // nodes and the Kubernetes control plane.
- SubnetIds []string
-
- noSmithyDocumentSerde
-}
-
-// An object representing an Amazon EKS cluster VPC configuration response.
-type VpcConfigResponse struct {
-
- // The cluster security group that was created by Amazon EKS for the cluster.
- // Managed node groups use this security group for control-plane-to-data-plane
- // communication.
- ClusterSecurityGroupId *string
-
- // This parameter indicates whether the Amazon EKS private API server endpoint is
- // enabled. If the Amazon EKS private API server endpoint is enabled, Kubernetes
- // API requests that originate from within your cluster's VPC use the private VPC
- // endpoint instead of traversing the internet. If this value is disabled and you
- // have nodes or Fargate pods in the cluster, then ensure that publicAccessCidrs
- // includes the necessary CIDR blocks for communication with the nodes or Fargate
- // pods. For more information, see [Cluster API server endpoint]in the Amazon EKS User Guide .
- //
- // [Cluster API server endpoint]: https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html
- EndpointPrivateAccess bool
-
- // Whether the public API server endpoint is enabled.
- EndpointPublicAccess bool
-
- // The CIDR blocks that are allowed access to your cluster's public Kubernetes API
- // server endpoint. Communication to the endpoint from addresses outside of the
- // CIDR blocks that you specify is denied. The default value is 0.0.0.0/0 and
- // additionally ::/0 for dual-stack `IPv6` clusters. If you've disabled private
- // endpoint access, make sure that you specify the necessary CIDR blocks for every
- // node and Fargate Pod in the cluster. For more information, see [Cluster API server endpoint] in the Amazon
- // EKS User Guide .
- //
- // Note that the public endpoints are dual-stack for only IPv6 clusters that are
- // made after October 2024. You can't add IPv6 CIDR blocks to IPv4 clusters or IPv6
- // clusters that were made before October 2024.
- //
- // [Cluster API server endpoint]: https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html
- PublicAccessCidrs []string
-
- // The security groups associated with the cross-account elastic network
- // interfaces that are used to allow communication between your nodes and the
- // Kubernetes control plane.
- SecurityGroupIds []string
-
- // The subnets associated with your cluster.
- SubnetIds []string
-
- // The VPC associated with your cluster.
- VpcId *string
-
- noSmithyDocumentSerde
-}
-
-// The configuration for zonal shift for the cluster.
-type ZonalShiftConfigRequest struct {
-
- // If zonal shift is enabled, Amazon Web Services configures zonal autoshift for
- // the cluster.
- Enabled *bool
-
- noSmithyDocumentSerde
-}
-
-// The status of zonal shift configuration for the cluster
-type ZonalShiftConfigResponse struct {
-
- // Whether the zonal shift is enabled.
- Enabled *bool
-
- noSmithyDocumentSerde
-}
-
-type noSmithyDocumentSerde = smithydocument.NoSerde
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/eks/validators.go
deleted file mode 100644
index 697a2e326c6e..000000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/eks/validators.go
+++ /dev/null
@@ -1,2805 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package eks
-
-import (
- "context"
- "fmt"
- "github.com/aws/aws-sdk-go-v2/service/eks/types"
- smithy "github.com/aws/smithy-go"
- "github.com/aws/smithy-go/middleware"
-)
-
-type validateOpAssociateAccessPolicy struct {
-}
-
-func (*validateOpAssociateAccessPolicy) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpAssociateAccessPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*AssociateAccessPolicyInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpAssociateAccessPolicyInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpAssociateEncryptionConfig struct {
-}
-
-func (*validateOpAssociateEncryptionConfig) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpAssociateEncryptionConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*AssociateEncryptionConfigInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpAssociateEncryptionConfigInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpAssociateIdentityProviderConfig struct {
-}
-
-func (*validateOpAssociateIdentityProviderConfig) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpAssociateIdentityProviderConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*AssociateIdentityProviderConfigInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpAssociateIdentityProviderConfigInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpCreateAccessEntry struct {
-}
-
-func (*validateOpCreateAccessEntry) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpCreateAccessEntry) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*CreateAccessEntryInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpCreateAccessEntryInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpCreateAddon struct {
-}
-
-func (*validateOpCreateAddon) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpCreateAddon) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*CreateAddonInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpCreateAddonInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpCreateCapability struct {
-}
-
-func (*validateOpCreateCapability) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpCreateCapability) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*CreateCapabilityInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpCreateCapabilityInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpCreateCluster struct {
-}
-
-func (*validateOpCreateCluster) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpCreateCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*CreateClusterInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpCreateClusterInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpCreateEksAnywhereSubscription struct {
-}
-
-func (*validateOpCreateEksAnywhereSubscription) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpCreateEksAnywhereSubscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*CreateEksAnywhereSubscriptionInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpCreateEksAnywhereSubscriptionInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpCreateFargateProfile struct {
-}
-
-func (*validateOpCreateFargateProfile) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpCreateFargateProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*CreateFargateProfileInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpCreateFargateProfileInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpCreateNodegroup struct {
-}
-
-func (*validateOpCreateNodegroup) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpCreateNodegroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*CreateNodegroupInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpCreateNodegroupInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpCreatePodIdentityAssociation struct {
-}
-
-func (*validateOpCreatePodIdentityAssociation) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpCreatePodIdentityAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*CreatePodIdentityAssociationInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpCreatePodIdentityAssociationInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDeleteAccessEntry struct {
-}
-
-func (*validateOpDeleteAccessEntry) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDeleteAccessEntry) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DeleteAccessEntryInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDeleteAccessEntryInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDeleteAddon struct {
-}
-
-func (*validateOpDeleteAddon) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDeleteAddon) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DeleteAddonInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDeleteAddonInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDeleteCapability struct {
-}
-
-func (*validateOpDeleteCapability) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDeleteCapability) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DeleteCapabilityInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDeleteCapabilityInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDeleteCluster struct {
-}
-
-func (*validateOpDeleteCluster) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDeleteCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DeleteClusterInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDeleteClusterInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDeleteEksAnywhereSubscription struct {
-}
-
-func (*validateOpDeleteEksAnywhereSubscription) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDeleteEksAnywhereSubscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DeleteEksAnywhereSubscriptionInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDeleteEksAnywhereSubscriptionInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDeleteFargateProfile struct {
-}
-
-func (*validateOpDeleteFargateProfile) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDeleteFargateProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DeleteFargateProfileInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDeleteFargateProfileInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDeleteNodegroup struct {
-}
-
-func (*validateOpDeleteNodegroup) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDeleteNodegroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DeleteNodegroupInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDeleteNodegroupInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDeletePodIdentityAssociation struct {
-}
-
-func (*validateOpDeletePodIdentityAssociation) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDeletePodIdentityAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DeletePodIdentityAssociationInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDeletePodIdentityAssociationInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDeregisterCluster struct {
-}
-
-func (*validateOpDeregisterCluster) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDeregisterCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DeregisterClusterInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDeregisterClusterInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDescribeAccessEntry struct {
-}
-
-func (*validateOpDescribeAccessEntry) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDescribeAccessEntry) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DescribeAccessEntryInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDescribeAccessEntryInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDescribeAddonConfiguration struct {
-}
-
-func (*validateOpDescribeAddonConfiguration) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDescribeAddonConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DescribeAddonConfigurationInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDescribeAddonConfigurationInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDescribeAddon struct {
-}
-
-func (*validateOpDescribeAddon) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDescribeAddon) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DescribeAddonInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDescribeAddonInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDescribeCapability struct {
-}
-
-func (*validateOpDescribeCapability) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDescribeCapability) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DescribeCapabilityInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDescribeCapabilityInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDescribeCluster struct {
-}
-
-func (*validateOpDescribeCluster) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDescribeCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DescribeClusterInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDescribeClusterInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDescribeEksAnywhereSubscription struct {
-}
-
-func (*validateOpDescribeEksAnywhereSubscription) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDescribeEksAnywhereSubscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DescribeEksAnywhereSubscriptionInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDescribeEksAnywhereSubscriptionInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDescribeFargateProfile struct {
-}
-
-func (*validateOpDescribeFargateProfile) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDescribeFargateProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DescribeFargateProfileInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDescribeFargateProfileInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDescribeIdentityProviderConfig struct {
-}
-
-func (*validateOpDescribeIdentityProviderConfig) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDescribeIdentityProviderConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DescribeIdentityProviderConfigInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDescribeIdentityProviderConfigInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDescribeInsight struct {
-}
-
-func (*validateOpDescribeInsight) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDescribeInsight) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DescribeInsightInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDescribeInsightInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDescribeInsightsRefresh struct {
-}
-
-func (*validateOpDescribeInsightsRefresh) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDescribeInsightsRefresh) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DescribeInsightsRefreshInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDescribeInsightsRefreshInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDescribeNodegroup struct {
-}
-
-func (*validateOpDescribeNodegroup) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDescribeNodegroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DescribeNodegroupInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDescribeNodegroupInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDescribePodIdentityAssociation struct {
-}
-
-func (*validateOpDescribePodIdentityAssociation) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDescribePodIdentityAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DescribePodIdentityAssociationInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDescribePodIdentityAssociationInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDescribeUpdate struct {
-}
-
-func (*validateOpDescribeUpdate) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDescribeUpdate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DescribeUpdateInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDescribeUpdateInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDisassociateAccessPolicy struct {
-}
-
-func (*validateOpDisassociateAccessPolicy) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDisassociateAccessPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DisassociateAccessPolicyInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDisassociateAccessPolicyInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDisassociateIdentityProviderConfig struct {
-}
-
-func (*validateOpDisassociateIdentityProviderConfig) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDisassociateIdentityProviderConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DisassociateIdentityProviderConfigInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDisassociateIdentityProviderConfigInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListAccessEntries struct {
-}
-
-func (*validateOpListAccessEntries) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListAccessEntries) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListAccessEntriesInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListAccessEntriesInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListAddons struct {
-}
-
-func (*validateOpListAddons) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListAddons) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListAddonsInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListAddonsInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListAssociatedAccessPolicies struct {
-}
-
-func (*validateOpListAssociatedAccessPolicies) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListAssociatedAccessPolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListAssociatedAccessPoliciesInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListAssociatedAccessPoliciesInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListCapabilities struct {
-}
-
-func (*validateOpListCapabilities) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListCapabilities) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListCapabilitiesInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListCapabilitiesInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListFargateProfiles struct {
-}
-
-func (*validateOpListFargateProfiles) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListFargateProfiles) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListFargateProfilesInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListFargateProfilesInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListIdentityProviderConfigs struct {
-}
-
-func (*validateOpListIdentityProviderConfigs) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListIdentityProviderConfigs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListIdentityProviderConfigsInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListIdentityProviderConfigsInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListInsights struct {
-}
-
-func (*validateOpListInsights) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListInsights) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListInsightsInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListInsightsInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListNodegroups struct {
-}
-
-func (*validateOpListNodegroups) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListNodegroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListNodegroupsInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListNodegroupsInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListPodIdentityAssociations struct {
-}
-
-func (*validateOpListPodIdentityAssociations) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListPodIdentityAssociations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListPodIdentityAssociationsInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListPodIdentityAssociationsInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListTagsForResource struct {
-}
-
-func (*validateOpListTagsForResource) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListTagsForResourceInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListTagsForResourceInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListUpdates struct {
-}
-
-func (*validateOpListUpdates) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListUpdates) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListUpdatesInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListUpdatesInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpRegisterCluster struct {
-}
-
-func (*validateOpRegisterCluster) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpRegisterCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*RegisterClusterInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpRegisterClusterInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpStartInsightsRefresh struct {
-}
-
-func (*validateOpStartInsightsRefresh) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpStartInsightsRefresh) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*StartInsightsRefreshInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpStartInsightsRefreshInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpTagResource struct {
-}
-
-func (*validateOpTagResource) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*TagResourceInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpTagResourceInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpUntagResource struct {
-}
-
-func (*validateOpUntagResource) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*UntagResourceInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpUntagResourceInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpUpdateAccessEntry struct {
-}
-
-func (*validateOpUpdateAccessEntry) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpUpdateAccessEntry) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*UpdateAccessEntryInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpUpdateAccessEntryInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpUpdateAddon struct {
-}
-
-func (*validateOpUpdateAddon) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpUpdateAddon) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*UpdateAddonInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpUpdateAddonInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpUpdateCapability struct {
-}
-
-func (*validateOpUpdateCapability) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpUpdateCapability) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*UpdateCapabilityInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpUpdateCapabilityInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpUpdateClusterConfig struct {
-}
-
-func (*validateOpUpdateClusterConfig) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpUpdateClusterConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*UpdateClusterConfigInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpUpdateClusterConfigInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpUpdateClusterVersion struct {
-}
-
-func (*validateOpUpdateClusterVersion) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpUpdateClusterVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*UpdateClusterVersionInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpUpdateClusterVersionInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpUpdateEksAnywhereSubscription struct {
-}
-
-func (*validateOpUpdateEksAnywhereSubscription) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpUpdateEksAnywhereSubscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*UpdateEksAnywhereSubscriptionInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpUpdateEksAnywhereSubscriptionInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpUpdateNodegroupConfig struct {
-}
-
-func (*validateOpUpdateNodegroupConfig) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpUpdateNodegroupConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*UpdateNodegroupConfigInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpUpdateNodegroupConfigInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpUpdateNodegroupVersion struct {
-}
-
-func (*validateOpUpdateNodegroupVersion) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpUpdateNodegroupVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*UpdateNodegroupVersionInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpUpdateNodegroupVersionInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpUpdatePodIdentityAssociation struct {
-}
-
-func (*validateOpUpdatePodIdentityAssociation) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpUpdatePodIdentityAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*UpdatePodIdentityAssociationInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpUpdatePodIdentityAssociationInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-func addOpAssociateAccessPolicyValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpAssociateAccessPolicy{}, middleware.After)
-}
-
-func addOpAssociateEncryptionConfigValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpAssociateEncryptionConfig{}, middleware.After)
-}
-
-func addOpAssociateIdentityProviderConfigValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpAssociateIdentityProviderConfig{}, middleware.After)
-}
-
-func addOpCreateAccessEntryValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpCreateAccessEntry{}, middleware.After)
-}
-
-func addOpCreateAddonValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpCreateAddon{}, middleware.After)
-}
-
-func addOpCreateCapabilityValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpCreateCapability{}, middleware.After)
-}
-
-func addOpCreateClusterValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpCreateCluster{}, middleware.After)
-}
-
-func addOpCreateEksAnywhereSubscriptionValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpCreateEksAnywhereSubscription{}, middleware.After)
-}
-
-func addOpCreateFargateProfileValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpCreateFargateProfile{}, middleware.After)
-}
-
-func addOpCreateNodegroupValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpCreateNodegroup{}, middleware.After)
-}
-
-func addOpCreatePodIdentityAssociationValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpCreatePodIdentityAssociation{}, middleware.After)
-}
-
-func addOpDeleteAccessEntryValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDeleteAccessEntry{}, middleware.After)
-}
-
-func addOpDeleteAddonValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDeleteAddon{}, middleware.After)
-}
-
-func addOpDeleteCapabilityValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDeleteCapability{}, middleware.After)
-}
-
-func addOpDeleteClusterValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDeleteCluster{}, middleware.After)
-}
-
-func addOpDeleteEksAnywhereSubscriptionValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDeleteEksAnywhereSubscription{}, middleware.After)
-}
-
-func addOpDeleteFargateProfileValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDeleteFargateProfile{}, middleware.After)
-}
-
-func addOpDeleteNodegroupValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDeleteNodegroup{}, middleware.After)
-}
-
-func addOpDeletePodIdentityAssociationValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDeletePodIdentityAssociation{}, middleware.After)
-}
-
-func addOpDeregisterClusterValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDeregisterCluster{}, middleware.After)
-}
-
-func addOpDescribeAccessEntryValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDescribeAccessEntry{}, middleware.After)
-}
-
-func addOpDescribeAddonConfigurationValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDescribeAddonConfiguration{}, middleware.After)
-}
-
-func addOpDescribeAddonValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDescribeAddon{}, middleware.After)
-}
-
-func addOpDescribeCapabilityValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDescribeCapability{}, middleware.After)
-}
-
-func addOpDescribeClusterValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDescribeCluster{}, middleware.After)
-}
-
-func addOpDescribeEksAnywhereSubscriptionValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDescribeEksAnywhereSubscription{}, middleware.After)
-}
-
-func addOpDescribeFargateProfileValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDescribeFargateProfile{}, middleware.After)
-}
-
-func addOpDescribeIdentityProviderConfigValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDescribeIdentityProviderConfig{}, middleware.After)
-}
-
-func addOpDescribeInsightValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDescribeInsight{}, middleware.After)
-}
-
-func addOpDescribeInsightsRefreshValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDescribeInsightsRefresh{}, middleware.After)
-}
-
-func addOpDescribeNodegroupValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDescribeNodegroup{}, middleware.After)
-}
-
-func addOpDescribePodIdentityAssociationValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDescribePodIdentityAssociation{}, middleware.After)
-}
-
-func addOpDescribeUpdateValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDescribeUpdate{}, middleware.After)
-}
-
-func addOpDisassociateAccessPolicyValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDisassociateAccessPolicy{}, middleware.After)
-}
-
-func addOpDisassociateIdentityProviderConfigValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDisassociateIdentityProviderConfig{}, middleware.After)
-}
-
-func addOpListAccessEntriesValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListAccessEntries{}, middleware.After)
-}
-
-func addOpListAddonsValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListAddons{}, middleware.After)
-}
-
-func addOpListAssociatedAccessPoliciesValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListAssociatedAccessPolicies{}, middleware.After)
-}
-
-func addOpListCapabilitiesValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListCapabilities{}, middleware.After)
-}
-
-func addOpListFargateProfilesValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListFargateProfiles{}, middleware.After)
-}
-
-func addOpListIdentityProviderConfigsValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListIdentityProviderConfigs{}, middleware.After)
-}
-
-func addOpListInsightsValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListInsights{}, middleware.After)
-}
-
-func addOpListNodegroupsValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListNodegroups{}, middleware.After)
-}
-
-func addOpListPodIdentityAssociationsValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListPodIdentityAssociations{}, middleware.After)
-}
-
-func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After)
-}
-
-func addOpListUpdatesValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListUpdates{}, middleware.After)
-}
-
-func addOpRegisterClusterValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpRegisterCluster{}, middleware.After)
-}
-
-func addOpStartInsightsRefreshValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpStartInsightsRefresh{}, middleware.After)
-}
-
-func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpTagResource{}, middleware.After)
-}
-
-func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After)
-}
-
-func addOpUpdateAccessEntryValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpUpdateAccessEntry{}, middleware.After)
-}
-
-func addOpUpdateAddonValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpUpdateAddon{}, middleware.After)
-}
-
-func addOpUpdateCapabilityValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpUpdateCapability{}, middleware.After)
-}
-
-func addOpUpdateClusterConfigValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpUpdateClusterConfig{}, middleware.After)
-}
-
-func addOpUpdateClusterVersionValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpUpdateClusterVersion{}, middleware.After)
-}
-
-func addOpUpdateEksAnywhereSubscriptionValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpUpdateEksAnywhereSubscription{}, middleware.After)
-}
-
-func addOpUpdateNodegroupConfigValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpUpdateNodegroupConfig{}, middleware.After)
-}
-
-func addOpUpdateNodegroupVersionValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpUpdateNodegroupVersion{}, middleware.After)
-}
-
-func addOpUpdatePodIdentityAssociationValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpUpdatePodIdentityAssociation{}, middleware.After)
-}
-
-func validateAddonPodIdentityAssociations(v *types.AddonPodIdentityAssociations) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "AddonPodIdentityAssociations"}
- if v.ServiceAccount == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ServiceAccount"))
- }
- if v.RoleArn == nil {
- invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateAddonPodIdentityAssociationsList(v []types.AddonPodIdentityAssociations) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "AddonPodIdentityAssociationsList"}
- for i := range v {
- if err := validateAddonPodIdentityAssociations(&v[i]); err != nil {
- invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateArgoCdAwsIdcConfigRequest(v *types.ArgoCdAwsIdcConfigRequest) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ArgoCdAwsIdcConfigRequest"}
- if v.IdcInstanceArn == nil {
- invalidParams.Add(smithy.NewErrParamRequired("IdcInstanceArn"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateArgoCdConfigRequest(v *types.ArgoCdConfigRequest) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ArgoCdConfigRequest"}
- if v.AwsIdc == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AwsIdc"))
- } else if v.AwsIdc != nil {
- if err := validateArgoCdAwsIdcConfigRequest(v.AwsIdc); err != nil {
- invalidParams.AddNested("AwsIdc", err.(smithy.InvalidParamsError))
- }
- }
- if v.RbacRoleMappings != nil {
- if err := validateArgoCdRoleMappingList(v.RbacRoleMappings); err != nil {
- invalidParams.AddNested("RbacRoleMappings", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateArgoCdRoleMapping(v *types.ArgoCdRoleMapping) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ArgoCdRoleMapping"}
- if len(v.Role) == 0 {
- invalidParams.Add(smithy.NewErrParamRequired("Role"))
- }
- if v.Identities == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Identities"))
- } else if v.Identities != nil {
- if err := validateSsoIdentityList(v.Identities); err != nil {
- invalidParams.AddNested("Identities", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateArgoCdRoleMappingList(v []types.ArgoCdRoleMapping) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ArgoCdRoleMappingList"}
- for i := range v {
- if err := validateArgoCdRoleMapping(&v[i]); err != nil {
- invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateCapabilityConfigurationRequest(v *types.CapabilityConfigurationRequest) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "CapabilityConfigurationRequest"}
- if v.ArgoCd != nil {
- if err := validateArgoCdConfigRequest(v.ArgoCd); err != nil {
- invalidParams.AddNested("ArgoCd", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateConnectorConfigRequest(v *types.ConnectorConfigRequest) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ConnectorConfigRequest"}
- if v.RoleArn == nil {
- invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
- }
- if len(v.Provider) == 0 {
- invalidParams.Add(smithy.NewErrParamRequired("Provider"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateIdentityProviderConfig(v *types.IdentityProviderConfig) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "IdentityProviderConfig"}
- if v.Type == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Type"))
- }
- if v.Name == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Name"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOidcIdentityProviderConfigRequest(v *types.OidcIdentityProviderConfigRequest) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "OidcIdentityProviderConfigRequest"}
- if v.IdentityProviderConfigName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("IdentityProviderConfigName"))
- }
- if v.IssuerUrl == nil {
- invalidParams.Add(smithy.NewErrParamRequired("IssuerUrl"))
- }
- if v.ClientId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClientId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOutpostConfigRequest(v *types.OutpostConfigRequest) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "OutpostConfigRequest"}
- if v.OutpostArns == nil {
- invalidParams.Add(smithy.NewErrParamRequired("OutpostArns"))
- }
- if v.ControlPlaneInstanceType == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ControlPlaneInstanceType"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateSsoIdentity(v *types.SsoIdentity) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "SsoIdentity"}
- if v.Id == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Id"))
- }
- if len(v.Type) == 0 {
- invalidParams.Add(smithy.NewErrParamRequired("Type"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateSsoIdentityList(v []types.SsoIdentity) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "SsoIdentityList"}
- for i := range v {
- if err := validateSsoIdentity(&v[i]); err != nil {
- invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateUpdateArgoCdConfig(v *types.UpdateArgoCdConfig) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "UpdateArgoCdConfig"}
- if v.RbacRoleMappings != nil {
- if err := validateUpdateRoleMappings(v.RbacRoleMappings); err != nil {
- invalidParams.AddNested("RbacRoleMappings", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateUpdateCapabilityConfiguration(v *types.UpdateCapabilityConfiguration) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "UpdateCapabilityConfiguration"}
- if v.ArgoCd != nil {
- if err := validateUpdateArgoCdConfig(v.ArgoCd); err != nil {
- invalidParams.AddNested("ArgoCd", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateUpdateRoleMappings(v *types.UpdateRoleMappings) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "UpdateRoleMappings"}
- if v.AddOrUpdateRoleMappings != nil {
- if err := validateArgoCdRoleMappingList(v.AddOrUpdateRoleMappings); err != nil {
- invalidParams.AddNested("AddOrUpdateRoleMappings", err.(smithy.InvalidParamsError))
- }
- }
- if v.RemoveRoleMappings != nil {
- if err := validateArgoCdRoleMappingList(v.RemoveRoleMappings); err != nil {
- invalidParams.AddNested("RemoveRoleMappings", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpAssociateAccessPolicyInput(v *AssociateAccessPolicyInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "AssociateAccessPolicyInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.PrincipalArn == nil {
- invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn"))
- }
- if v.PolicyArn == nil {
- invalidParams.Add(smithy.NewErrParamRequired("PolicyArn"))
- }
- if v.AccessScope == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AccessScope"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpAssociateEncryptionConfigInput(v *AssociateEncryptionConfigInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "AssociateEncryptionConfigInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.EncryptionConfig == nil {
- invalidParams.Add(smithy.NewErrParamRequired("EncryptionConfig"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpAssociateIdentityProviderConfigInput(v *AssociateIdentityProviderConfigInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "AssociateIdentityProviderConfigInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.Oidc == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Oidc"))
- } else if v.Oidc != nil {
- if err := validateOidcIdentityProviderConfigRequest(v.Oidc); err != nil {
- invalidParams.AddNested("Oidc", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpCreateAccessEntryInput(v *CreateAccessEntryInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "CreateAccessEntryInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.PrincipalArn == nil {
- invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpCreateAddonInput(v *CreateAddonInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "CreateAddonInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.AddonName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AddonName"))
- }
- if v.PodIdentityAssociations != nil {
- if err := validateAddonPodIdentityAssociationsList(v.PodIdentityAssociations); err != nil {
- invalidParams.AddNested("PodIdentityAssociations", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpCreateCapabilityInput(v *CreateCapabilityInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "CreateCapabilityInput"}
- if v.CapabilityName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("CapabilityName"))
- }
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if len(v.Type) == 0 {
- invalidParams.Add(smithy.NewErrParamRequired("Type"))
- }
- if v.RoleArn == nil {
- invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
- }
- if v.Configuration != nil {
- if err := validateCapabilityConfigurationRequest(v.Configuration); err != nil {
- invalidParams.AddNested("Configuration", err.(smithy.InvalidParamsError))
- }
- }
- if len(v.DeletePropagationPolicy) == 0 {
- invalidParams.Add(smithy.NewErrParamRequired("DeletePropagationPolicy"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpCreateClusterInput(v *CreateClusterInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "CreateClusterInput"}
- if v.Name == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Name"))
- }
- if v.RoleArn == nil {
- invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
- }
- if v.ResourcesVpcConfig == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ResourcesVpcConfig"))
- }
- if v.OutpostConfig != nil {
- if err := validateOutpostConfigRequest(v.OutpostConfig); err != nil {
- invalidParams.AddNested("OutpostConfig", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpCreateEksAnywhereSubscriptionInput(v *CreateEksAnywhereSubscriptionInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "CreateEksAnywhereSubscriptionInput"}
- if v.Name == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Name"))
- }
- if v.Term == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Term"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpCreateFargateProfileInput(v *CreateFargateProfileInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "CreateFargateProfileInput"}
- if v.FargateProfileName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("FargateProfileName"))
- }
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.PodExecutionRoleArn == nil {
- invalidParams.Add(smithy.NewErrParamRequired("PodExecutionRoleArn"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpCreateNodegroupInput(v *CreateNodegroupInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "CreateNodegroupInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.NodegroupName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("NodegroupName"))
- }
- if v.Subnets == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Subnets"))
- }
- if v.NodeRole == nil {
- invalidParams.Add(smithy.NewErrParamRequired("NodeRole"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpCreatePodIdentityAssociationInput(v *CreatePodIdentityAssociationInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "CreatePodIdentityAssociationInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.Namespace == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Namespace"))
- }
- if v.ServiceAccount == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ServiceAccount"))
- }
- if v.RoleArn == nil {
- invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDeleteAccessEntryInput(v *DeleteAccessEntryInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DeleteAccessEntryInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.PrincipalArn == nil {
- invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDeleteAddonInput(v *DeleteAddonInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DeleteAddonInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.AddonName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AddonName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDeleteCapabilityInput(v *DeleteCapabilityInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DeleteCapabilityInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.CapabilityName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("CapabilityName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDeleteClusterInput(v *DeleteClusterInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DeleteClusterInput"}
- if v.Name == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Name"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDeleteEksAnywhereSubscriptionInput(v *DeleteEksAnywhereSubscriptionInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DeleteEksAnywhereSubscriptionInput"}
- if v.Id == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Id"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDeleteFargateProfileInput(v *DeleteFargateProfileInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DeleteFargateProfileInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.FargateProfileName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("FargateProfileName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDeleteNodegroupInput(v *DeleteNodegroupInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DeleteNodegroupInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.NodegroupName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("NodegroupName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDeletePodIdentityAssociationInput(v *DeletePodIdentityAssociationInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DeletePodIdentityAssociationInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.AssociationId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AssociationId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDeregisterClusterInput(v *DeregisterClusterInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DeregisterClusterInput"}
- if v.Name == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Name"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDescribeAccessEntryInput(v *DescribeAccessEntryInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DescribeAccessEntryInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.PrincipalArn == nil {
- invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDescribeAddonConfigurationInput(v *DescribeAddonConfigurationInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DescribeAddonConfigurationInput"}
- if v.AddonName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AddonName"))
- }
- if v.AddonVersion == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AddonVersion"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDescribeAddonInput(v *DescribeAddonInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DescribeAddonInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.AddonName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AddonName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDescribeCapabilityInput(v *DescribeCapabilityInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DescribeCapabilityInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.CapabilityName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("CapabilityName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDescribeClusterInput(v *DescribeClusterInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DescribeClusterInput"}
- if v.Name == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Name"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDescribeEksAnywhereSubscriptionInput(v *DescribeEksAnywhereSubscriptionInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DescribeEksAnywhereSubscriptionInput"}
- if v.Id == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Id"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDescribeFargateProfileInput(v *DescribeFargateProfileInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DescribeFargateProfileInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.FargateProfileName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("FargateProfileName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDescribeIdentityProviderConfigInput(v *DescribeIdentityProviderConfigInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DescribeIdentityProviderConfigInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.IdentityProviderConfig == nil {
- invalidParams.Add(smithy.NewErrParamRequired("IdentityProviderConfig"))
- } else if v.IdentityProviderConfig != nil {
- if err := validateIdentityProviderConfig(v.IdentityProviderConfig); err != nil {
- invalidParams.AddNested("IdentityProviderConfig", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDescribeInsightInput(v *DescribeInsightInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DescribeInsightInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.Id == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Id"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDescribeInsightsRefreshInput(v *DescribeInsightsRefreshInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DescribeInsightsRefreshInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDescribeNodegroupInput(v *DescribeNodegroupInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DescribeNodegroupInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.NodegroupName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("NodegroupName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDescribePodIdentityAssociationInput(v *DescribePodIdentityAssociationInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DescribePodIdentityAssociationInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.AssociationId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AssociationId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDescribeUpdateInput(v *DescribeUpdateInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DescribeUpdateInput"}
- if v.Name == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Name"))
- }
- if v.UpdateId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("UpdateId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDisassociateAccessPolicyInput(v *DisassociateAccessPolicyInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DisassociateAccessPolicyInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.PrincipalArn == nil {
- invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn"))
- }
- if v.PolicyArn == nil {
- invalidParams.Add(smithy.NewErrParamRequired("PolicyArn"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDisassociateIdentityProviderConfigInput(v *DisassociateIdentityProviderConfigInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DisassociateIdentityProviderConfigInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.IdentityProviderConfig == nil {
- invalidParams.Add(smithy.NewErrParamRequired("IdentityProviderConfig"))
- } else if v.IdentityProviderConfig != nil {
- if err := validateIdentityProviderConfig(v.IdentityProviderConfig); err != nil {
- invalidParams.AddNested("IdentityProviderConfig", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListAccessEntriesInput(v *ListAccessEntriesInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListAccessEntriesInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListAddonsInput(v *ListAddonsInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListAddonsInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListAssociatedAccessPoliciesInput(v *ListAssociatedAccessPoliciesInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListAssociatedAccessPoliciesInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.PrincipalArn == nil {
- invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListCapabilitiesInput(v *ListCapabilitiesInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListCapabilitiesInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListFargateProfilesInput(v *ListFargateProfilesInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListFargateProfilesInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListIdentityProviderConfigsInput(v *ListIdentityProviderConfigsInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListIdentityProviderConfigsInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListInsightsInput(v *ListInsightsInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListInsightsInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListNodegroupsInput(v *ListNodegroupsInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListNodegroupsInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListPodIdentityAssociationsInput(v *ListPodIdentityAssociationsInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListPodIdentityAssociationsInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"}
- if v.ResourceArn == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ResourceArn"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListUpdatesInput(v *ListUpdatesInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListUpdatesInput"}
- if v.Name == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Name"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpRegisterClusterInput(v *RegisterClusterInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "RegisterClusterInput"}
- if v.Name == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Name"))
- }
- if v.ConnectorConfig == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ConnectorConfig"))
- } else if v.ConnectorConfig != nil {
- if err := validateConnectorConfigRequest(v.ConnectorConfig); err != nil {
- invalidParams.AddNested("ConnectorConfig", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpStartInsightsRefreshInput(v *StartInsightsRefreshInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "StartInsightsRefreshInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpTagResourceInput(v *TagResourceInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"}
- if v.ResourceArn == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ResourceArn"))
- }
- if v.Tags == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Tags"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpUntagResourceInput(v *UntagResourceInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"}
- if v.ResourceArn == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ResourceArn"))
- }
- if v.TagKeys == nil {
- invalidParams.Add(smithy.NewErrParamRequired("TagKeys"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpUpdateAccessEntryInput(v *UpdateAccessEntryInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "UpdateAccessEntryInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.PrincipalArn == nil {
- invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpUpdateAddonInput(v *UpdateAddonInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "UpdateAddonInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.AddonName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AddonName"))
- }
- if v.PodIdentityAssociations != nil {
- if err := validateAddonPodIdentityAssociationsList(v.PodIdentityAssociations); err != nil {
- invalidParams.AddNested("PodIdentityAssociations", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpUpdateCapabilityInput(v *UpdateCapabilityInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "UpdateCapabilityInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.CapabilityName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("CapabilityName"))
- }
- if v.Configuration != nil {
- if err := validateUpdateCapabilityConfiguration(v.Configuration); err != nil {
- invalidParams.AddNested("Configuration", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpUpdateClusterConfigInput(v *UpdateClusterConfigInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "UpdateClusterConfigInput"}
- if v.Name == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Name"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpUpdateClusterVersionInput(v *UpdateClusterVersionInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "UpdateClusterVersionInput"}
- if v.Name == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Name"))
- }
- if v.Version == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Version"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpUpdateEksAnywhereSubscriptionInput(v *UpdateEksAnywhereSubscriptionInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "UpdateEksAnywhereSubscriptionInput"}
- if v.Id == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Id"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpUpdateNodegroupConfigInput(v *UpdateNodegroupConfigInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "UpdateNodegroupConfigInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.NodegroupName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("NodegroupName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpUpdateNodegroupVersionInput(v *UpdateNodegroupVersionInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "UpdateNodegroupVersionInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.NodegroupName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("NodegroupName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpUpdatePodIdentityAssociationInput(v *UpdatePodIdentityAssociationInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "UpdatePodIdentityAssociationInput"}
- if v.ClusterName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ClusterName"))
- }
- if v.AssociationId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AssociationId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/BUILD.bazel b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/BUILD.bazel
index d71991e6e8db..58bdc765703e 100644
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/BUILD.bazel
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/BUILD.bazel
@@ -1,6 +1,6 @@
+load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
-load("@rules_proto//proto:defs.bzl", "proto_library")
package(default_visibility = ["//visibility:public"])
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/handler.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/handler.go
index 2f0b9e9e0f86..4c9083d790f0 100644
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/handler.go
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/handler.go
@@ -28,7 +28,9 @@ func ForwardResponseStream(ctx context.Context, mux *ServeMux, marshaler Marshal
}
handleForwardResponseServerMetadata(w, mux, md)
- w.Header().Set("Transfer-Encoding", "chunked")
+ if !mux.disableChunkedEncoding {
+ w.Header().Set("Transfer-Encoding", "chunked")
+ }
if err := handleForwardResponseOptions(ctx, w, nil, opts); err != nil {
HTTPError(ctx, mux, marshaler, w, req, err)
return
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.go
index 3eb161671732..69edf5eff8da 100644
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.go
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.go
@@ -71,8 +71,10 @@ type ServeMux struct {
streamErrorHandler StreamErrorHandlerFunc
routingErrorHandler RoutingErrorHandlerFunc
disablePathLengthFallback bool
+ disableHTTPMethodOverride bool
unescapingMode UnescapingMode
writeContentLength bool
+ disableChunkedEncoding bool
}
// ServeMuxOption is an option that can be given to a ServeMux on construction.
@@ -125,6 +127,16 @@ func WithMiddlewares(middlewares ...Middleware) ServeMuxOption {
}
}
+// WithDisableChunkedEncoding disables the Transfer-Encoding: chunked header
+// for streaming responses. This is useful for streaming implementations that use
+// Content-Length, which is mutually exclusive with Transfer-Encoding:chunked.
+// Note that this option will not automatically add Content-Length headers, so it should be used with caution.
+func WithDisableChunkedEncoding() ServeMuxOption {
+ return func(mux *ServeMux) {
+ mux.disableChunkedEncoding = true
+ }
+}
+
// SetQueryParameterParser sets the query parameter parser, used to populate message from query parameters.
// Configuring this will mean the generated OpenAPI output is no longer correct, and it should be
// done with careful consideration.
@@ -260,6 +272,19 @@ func WithDisablePathLengthFallback() ServeMuxOption {
}
}
+// WithDisableHTTPMethodOverride returns a ServeMuxOption that disables the
+// X-HTTP-Method-Override header handling.
+//
+// When this option is used, the mux will no longer allow POST requests with
+// the X-HTTP-Method-Override header to override the HTTP method. The path
+// length fallback (POST with application/x-www-form-urlencoded falling back
+// to a matching GET handler) is not affected by this option.
+func WithDisableHTTPMethodOverride() ServeMuxOption {
+ return func(serveMux *ServeMux) {
+ serveMux.disableHTTPMethodOverride = true
+ }
+}
+
// WithWriteContentLength returns a ServeMuxOption to enable writing content length on non-streaming responses
func WithWriteContentLength() ServeMuxOption {
return func(serveMux *ServeMux) {
@@ -394,7 +419,7 @@ func (s *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request) {
path = r.URL.RawPath
}
- if override := r.Header.Get("X-HTTP-Method-Override"); override != "" && s.isPathLengthFallback(r) {
+ if override := r.Header.Get("X-HTTP-Method-Override"); override != "" && !s.disableHTTPMethodOverride && s.isPathLengthFallback(r) {
if err := r.ParseForm(); err != nil {
_, outboundMarshaler := MarshalerForRequest(s, r)
sterr := status.Error(codes.InvalidArgument, err.Error())
@@ -456,6 +481,7 @@ func (s *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request) {
HTTPStatus: http.StatusBadRequest,
Err: mse,
})
+ return
}
continue
}
@@ -498,6 +524,7 @@ func (s *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request) {
HTTPStatus: http.StatusBadRequest,
Err: mse,
})
+ return
}
continue
}
diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/resource/validations/kms_arn_regex_validation.go b/vendor/github.com/openshift-online/ocm-common/pkg/resource/validations/kms_arn_regex_validation.go
deleted file mode 100644
index 8830dda6d54e..000000000000
--- a/vendor/github.com/openshift-online/ocm-common/pkg/resource/validations/kms_arn_regex_validation.go
+++ /dev/null
@@ -1,21 +0,0 @@
-package validations
-
-import (
- "fmt"
- "regexp"
-)
-
-var KmsArnRE = regexp.MustCompile(
- `^arn:aws[\w-]*:kms:[\w-]+:\d{12}:key\/(mrk-[0-9a-f]{32}$|[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$)`,
-)
-
-func ValidateKMSKeyARN(kmsKeyARN *string) error {
- if kmsKeyARN == nil || *kmsKeyARN == "" {
- return nil
- }
-
- if !KmsArnRE.MatchString(*kmsKeyARN) {
- return fmt.Errorf("expected the kms-key-arn: %s to match %s", *kmsKeyARN, KmsArnRE)
- }
- return nil
-}
diff --git a/vendor/github.com/prometheus/procfs/.golangci.yml b/vendor/github.com/prometheus/procfs/.golangci.yml
index 23ecd4505b2a..eac920ba804e 100644
--- a/vendor/github.com/prometheus/procfs/.golangci.yml
+++ b/vendor/github.com/prometheus/procfs/.golangci.yml
@@ -34,6 +34,14 @@ linters:
capital: true
misspell:
locale: US
+ revive:
+ rules:
+ - name: var-naming
+ # TODO(SuperQ): See: https://github.com/prometheus/prometheus/issues/17766
+ arguments:
+ - []
+ - []
+ - - skip-package-name-checks: true
exclusions:
presets:
- comments
diff --git a/vendor/github.com/prometheus/procfs/Makefile.common b/vendor/github.com/prometheus/procfs/Makefile.common
index 6f61bec48fdb..cce3ef1d165b 100644
--- a/vendor/github.com/prometheus/procfs/Makefile.common
+++ b/vendor/github.com/prometheus/procfs/Makefile.common
@@ -1,4 +1,4 @@
-# Copyright 2018 The Prometheus Authors
+# Copyright The Prometheus Authors
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -55,13 +55,13 @@ ifneq ($(shell command -v gotestsum 2> /dev/null),)
endif
endif
-PROMU_VERSION ?= 0.17.0
+PROMU_VERSION ?= 0.18.0
PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz
SKIP_GOLANGCI_LINT :=
GOLANGCI_LINT :=
GOLANGCI_LINT_OPTS ?=
-GOLANGCI_LINT_VERSION ?= v2.1.5
+GOLANGCI_LINT_VERSION ?= v2.10.1
GOLANGCI_FMT_OPTS ?=
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64.
# windows isn't included here because of the path separator being different.
@@ -82,11 +82,50 @@ endif
PREFIX ?= $(shell pwd)
BIN_DIR ?= $(shell pwd)
DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD))
-DOCKERFILE_PATH ?= ./Dockerfile
DOCKERBUILD_CONTEXT ?= ./
DOCKER_REPO ?= prom
+# Check if deprecated DOCKERFILE_PATH is set
+ifdef DOCKERFILE_PATH
+$(error DOCKERFILE_PATH is deprecated. Use DOCKERFILE_VARIANTS ?= $(DOCKERFILE_PATH) in the Makefile)
+endif
+
DOCKER_ARCHS ?= amd64
+DOCKERFILE_VARIANTS ?= Dockerfile $(wildcard Dockerfile.*)
+
+# Function to extract variant from Dockerfile label.
+# Returns the variant name from io.prometheus.image.variant label, or "default" if not found.
+define dockerfile_variant
+$(strip $(or $(shell sed -n 's/.*io\.prometheus\.image\.variant="\([^"]*\)".*/\1/p' $(1)),default))
+endef
+
+# Check for duplicate variant names (including default for Dockerfiles without labels).
+DOCKERFILE_VARIANT_NAMES := $(foreach df,$(DOCKERFILE_VARIANTS),$(call dockerfile_variant,$(df)))
+DOCKERFILE_VARIANT_NAMES_SORTED := $(sort $(DOCKERFILE_VARIANT_NAMES))
+ifneq ($(words $(DOCKERFILE_VARIANT_NAMES)),$(words $(DOCKERFILE_VARIANT_NAMES_SORTED)))
+$(error Duplicate variant names found. Each Dockerfile must have a unique io.prometheus.image.variant label, and only one can be without a label (default))
+endif
+
+# Build variant:dockerfile pairs for shell iteration.
+DOCKERFILE_VARIANTS_WITH_NAMES := $(foreach df,$(DOCKERFILE_VARIANTS),$(call dockerfile_variant,$(df)):$(df))
+
+# Shell helper to check whether a dockerfile/arch pair is excluded.
+define dockerfile_arch_is_excluded
+case " $(DOCKERFILE_ARCH_EXCLUSIONS) " in \
+ *" $$dockerfile:$(1) "*) true ;; \
+ *) false ;; \
+esac
+endef
+
+# Shell helper to check whether a registry/arch pair is excluded.
+# Extracts registry from DOCKER_REPO (e.g., quay.io/prometheus -> quay.io)
+define registry_arch_is_excluded
+registry=$$(echo "$(DOCKER_REPO)" | cut -d'/' -f1); \
+case " $(DOCKER_REGISTRY_ARCH_EXCLUSIONS) " in \
+ *" $$registry:$(1) "*) true ;; \
+ *) false ;; \
+esac
+endef
BUILD_DOCKER_ARCHS = $(addprefix common-docker-,$(DOCKER_ARCHS))
PUBLISH_DOCKER_ARCHS = $(addprefix common-docker-publish-,$(DOCKER_ARCHS))
@@ -112,7 +151,7 @@ common-all: precheck style check_license lint yamllint unused build test
.PHONY: common-style
common-style:
@echo ">> checking code style"
- @fmtRes=$$($(GOFMT) -d $$(find . -path ./vendor -prune -o -name '*.go' -print)); \
+ @fmtRes=$$($(GOFMT) -d $$(git ls-files '*.go' ':!:vendor/*' || find . -path ./vendor -prune -o -name '*.go' -print)); \
if [ -n "$${fmtRes}" ]; then \
echo "gofmt checking failed!"; echo "$${fmtRes}"; echo; \
echo "Please ensure you are using $$($(GO) version) for formatting code."; \
@@ -122,13 +161,19 @@ common-style:
.PHONY: common-check_license
common-check_license:
@echo ">> checking license header"
- @licRes=$$(for file in $$(find . -type f -iname '*.go' ! -path './vendor/*') ; do \
+ @licRes=$$(for file in $$(git ls-files '*.go' ':!:vendor/*' || find . -path ./vendor -prune -o -type f -iname '*.go' -print) ; do \
awk 'NR<=3' $$file | grep -Eq "(Copyright|generated|GENERATED)" || echo $$file; \
done); \
if [ -n "$${licRes}" ]; then \
echo "license header checking failed:"; echo "$${licRes}"; \
exit 1; \
fi
+ @echo ">> checking for copyright years 2026 or later"
+ @futureYearRes=$$(git grep -E 'Copyright (202[6-9]|20[3-9][0-9])' -- '*.go' ':!:vendor/*' || true); \
+ if [ -n "$${futureYearRes}" ]; then \
+ echo "Files with copyright year 2026 or later found (should use 'Copyright The Prometheus Authors'):"; echo "$${futureYearRes}"; \
+ exit 1; \
+ fi
.PHONY: common-deps
common-deps:
@@ -220,28 +265,194 @@ common-docker-repo-name:
.PHONY: common-docker $(BUILD_DOCKER_ARCHS)
common-docker: $(BUILD_DOCKER_ARCHS)
$(BUILD_DOCKER_ARCHS): common-docker-%:
- docker build -t "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)" \
- -f $(DOCKERFILE_PATH) \
- --build-arg ARCH="$*" \
- --build-arg OS="linux" \
- $(DOCKERBUILD_CONTEXT)
+ @for variant in $(DOCKERFILE_VARIANTS_WITH_NAMES); do \
+ dockerfile=$${variant#*:}; \
+ variant_name=$${variant%%:*}; \
+ if $(call dockerfile_arch_is_excluded,$*); then \
+ echo "Skipping $$variant_name variant for linux-$* (excluded by DOCKERFILE_ARCH_EXCLUSIONS)"; \
+ continue; \
+ fi; \
+ distroless_arch="$*"; \
+ if [ "$*" = "armv7" ]; then \
+ distroless_arch="arm"; \
+ fi; \
+ if [ "$$dockerfile" = "Dockerfile" ]; then \
+ echo "Building default variant ($$variant_name) for linux-$* using $$dockerfile"; \
+ docker build -t "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)" \
+ -f $$dockerfile \
+ --build-arg ARCH="$*" \
+ --build-arg OS="linux" \
+ --build-arg DISTROLESS_ARCH="$$distroless_arch" \
+ $(DOCKERBUILD_CONTEXT); \
+ if [ "$$variant_name" != "default" ]; then \
+ echo "Tagging default variant with $$variant_name suffix"; \
+ docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)" \
+ "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name"; \
+ fi; \
+ else \
+ echo "Building $$variant_name variant for linux-$* using $$dockerfile"; \
+ docker build -t "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name" \
+ -f $$dockerfile \
+ --build-arg ARCH="$*" \
+ --build-arg OS="linux" \
+ --build-arg DISTROLESS_ARCH="$$distroless_arch" \
+ $(DOCKERBUILD_CONTEXT); \
+ fi; \
+ done
.PHONY: common-docker-publish $(PUBLISH_DOCKER_ARCHS)
common-docker-publish: $(PUBLISH_DOCKER_ARCHS)
$(PUBLISH_DOCKER_ARCHS): common-docker-publish-%:
- docker push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)"
+ @for variant in $(DOCKERFILE_VARIANTS_WITH_NAMES); do \
+ dockerfile=$${variant#*:}; \
+ variant_name=$${variant%%:*}; \
+ if $(call dockerfile_arch_is_excluded,$*); then \
+ echo "Skipping push for $$variant_name variant on linux-$* (excluded by DOCKERFILE_ARCH_EXCLUSIONS)"; \
+ continue; \
+ fi; \
+ if $(call registry_arch_is_excluded,$*); then \
+ echo "Skipping push for $$variant_name variant on linux-$* to $(DOCKER_REPO) (excluded by DOCKER_REGISTRY_ARCH_EXCLUSIONS)"; \
+ continue; \
+ fi; \
+ if [ "$$dockerfile" != "Dockerfile" ] || [ "$$variant_name" != "default" ]; then \
+ echo "Pushing $$variant_name variant for linux-$*"; \
+ docker push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name"; \
+ fi; \
+ if [ "$$dockerfile" = "Dockerfile" ]; then \
+ echo "Pushing default variant ($$variant_name) for linux-$*"; \
+ docker push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)"; \
+ fi; \
+ if [ "$(DOCKER_IMAGE_TAG)" = "latest" ]; then \
+ if [ "$$dockerfile" != "Dockerfile" ] || [ "$$variant_name" != "default" ]; then \
+ echo "Pushing $$variant_name variant version tags for linux-$*"; \
+ docker push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:v$(DOCKER_MAJOR_VERSION_TAG)-$$variant_name"; \
+ fi; \
+ if [ "$$dockerfile" = "Dockerfile" ]; then \
+ echo "Pushing default variant version tag for linux-$*"; \
+ docker push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:v$(DOCKER_MAJOR_VERSION_TAG)"; \
+ fi; \
+ fi; \
+ done
DOCKER_MAJOR_VERSION_TAG = $(firstword $(subst ., ,$(shell cat VERSION)))
.PHONY: common-docker-tag-latest $(TAG_DOCKER_ARCHS)
common-docker-tag-latest: $(TAG_DOCKER_ARCHS)
$(TAG_DOCKER_ARCHS): common-docker-tag-latest-%:
- docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:latest"
- docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:v$(DOCKER_MAJOR_VERSION_TAG)"
+ @for variant in $(DOCKERFILE_VARIANTS_WITH_NAMES); do \
+ dockerfile=$${variant#*:}; \
+ variant_name=$${variant%%:*}; \
+ if $(call dockerfile_arch_is_excluded,$*); then \
+ echo "Skipping tag for $$variant_name variant on linux-$* (excluded by DOCKERFILE_ARCH_EXCLUSIONS)"; \
+ continue; \
+ fi; \
+ if $(call registry_arch_is_excluded,$*); then \
+ echo "Skipping tag for $$variant_name variant on linux-$* for $(DOCKER_REPO) (excluded by DOCKER_REGISTRY_ARCH_EXCLUSIONS)"; \
+ continue; \
+ fi; \
+ if [ "$$dockerfile" != "Dockerfile" ] || [ "$$variant_name" != "default" ]; then \
+ echo "Tagging $$variant_name variant for linux-$* as latest"; \
+ docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:latest-$$variant_name"; \
+ docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:v$(DOCKER_MAJOR_VERSION_TAG)-$$variant_name"; \
+ fi; \
+ if [ "$$dockerfile" = "Dockerfile" ]; then \
+ echo "Tagging default variant ($$variant_name) for linux-$* as latest"; \
+ docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:latest"; \
+ docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:v$(DOCKER_MAJOR_VERSION_TAG)"; \
+ fi; \
+ done
.PHONY: common-docker-manifest
common-docker-manifest:
- DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create -a "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(SANITIZED_DOCKER_IMAGE_TAG)" $(foreach ARCH,$(DOCKER_ARCHS),$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$(ARCH):$(SANITIZED_DOCKER_IMAGE_TAG))
- DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(SANITIZED_DOCKER_IMAGE_TAG)"
+ @for variant in $(DOCKERFILE_VARIANTS_WITH_NAMES); do \
+ dockerfile=$${variant#*:}; \
+ variant_name=$${variant%%:*}; \
+ if [ "$$dockerfile" != "Dockerfile" ] || [ "$$variant_name" != "default" ]; then \
+ echo "Creating manifest for $$variant_name variant"; \
+ refs=""; \
+ for arch in $(DOCKER_ARCHS); do \
+ if $(call dockerfile_arch_is_excluded,$$arch); then \
+ echo " Skipping $$arch for $$variant_name (excluded by DOCKERFILE_ARCH_EXCLUSIONS)"; \
+ continue; \
+ fi; \
+ if $(call registry_arch_is_excluded,$$arch); then \
+ echo " Skipping $$arch for $$variant_name on $(DOCKER_REPO) (excluded by DOCKER_REGISTRY_ARCH_EXCLUSIONS)"; \
+ continue; \
+ fi; \
+ refs="$$refs $(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$$arch:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name"; \
+ done; \
+ if [ -z "$$refs" ]; then \
+ echo "Skipping manifest for $$variant_name variant (no supported architectures)"; \
+ continue; \
+ fi; \
+ DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create -a "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name" $$refs; \
+ DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name"; \
+ fi; \
+ if [ "$$dockerfile" = "Dockerfile" ]; then \
+ echo "Creating default variant ($$variant_name) manifest"; \
+ refs=""; \
+ for arch in $(DOCKER_ARCHS); do \
+ if $(call dockerfile_arch_is_excluded,$$arch); then \
+ echo " Skipping $$arch for default variant (excluded by DOCKERFILE_ARCH_EXCLUSIONS)"; \
+ continue; \
+ fi; \
+ if $(call registry_arch_is_excluded,$$arch); then \
+ echo " Skipping $$arch for default variant on $(DOCKER_REPO) (excluded by DOCKER_REGISTRY_ARCH_EXCLUSIONS)"; \
+ continue; \
+ fi; \
+ refs="$$refs $(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$$arch:$(SANITIZED_DOCKER_IMAGE_TAG)"; \
+ done; \
+ if [ -z "$$refs" ]; then \
+ echo "Skipping default variant manifest (no supported architectures)"; \
+ continue; \
+ fi; \
+ DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create -a "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(SANITIZED_DOCKER_IMAGE_TAG)" $$refs; \
+ DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(SANITIZED_DOCKER_IMAGE_TAG)"; \
+ fi; \
+ if [ "$(DOCKER_IMAGE_TAG)" = "latest" ]; then \
+ if [ "$$dockerfile" != "Dockerfile" ] || [ "$$variant_name" != "default" ]; then \
+ echo "Creating manifest for $$variant_name variant version tag"; \
+ refs=""; \
+ for arch in $(DOCKER_ARCHS); do \
+ if $(call dockerfile_arch_is_excluded,$$arch); then \
+ echo " Skipping $$arch for $$variant_name version tag (excluded by DOCKERFILE_ARCH_EXCLUSIONS)"; \
+ continue; \
+ fi; \
+ if $(call registry_arch_is_excluded,$$arch); then \
+ echo " Skipping $$arch for $$variant_name version tag on $(DOCKER_REPO) (excluded by DOCKER_REGISTRY_ARCH_EXCLUSIONS)"; \
+ continue; \
+ fi; \
+ refs="$$refs $(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$$arch:v$(DOCKER_MAJOR_VERSION_TAG)-$$variant_name"; \
+ done; \
+ if [ -z "$$refs" ]; then \
+ echo "Skipping version-tag manifest for $$variant_name variant (no supported architectures)"; \
+ continue; \
+ fi; \
+ DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create -a "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):v$(DOCKER_MAJOR_VERSION_TAG)-$$variant_name" $$refs; \
+ DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):v$(DOCKER_MAJOR_VERSION_TAG)-$$variant_name"; \
+ fi; \
+ if [ "$$dockerfile" = "Dockerfile" ]; then \
+ echo "Creating default variant version tag manifest"; \
+ refs=""; \
+ for arch in $(DOCKER_ARCHS); do \
+ if $(call dockerfile_arch_is_excluded,$$arch); then \
+ echo " Skipping $$arch for default variant version tag (excluded by DOCKERFILE_ARCH_EXCLUSIONS)"; \
+ continue; \
+ fi; \
+ if $(call registry_arch_is_excluded,$$arch); then \
+ echo " Skipping $$arch for default variant version tag on $(DOCKER_REPO) (excluded by DOCKER_REGISTRY_ARCH_EXCLUSIONS)"; \
+ continue; \
+ fi; \
+ refs="$$refs $(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$$arch:v$(DOCKER_MAJOR_VERSION_TAG)"; \
+ done; \
+ if [ -z "$$refs" ]; then \
+ echo "Skipping default variant version-tag manifest (no supported architectures)"; \
+ continue; \
+ fi; \
+ DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create -a "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):v$(DOCKER_MAJOR_VERSION_TAG)" $$refs; \
+ DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):v$(DOCKER_MAJOR_VERSION_TAG)"; \
+ fi; \
+ fi; \
+ done
.PHONY: promu
promu: $(PROMU)
@@ -266,6 +477,10 @@ $(GOLANGCI_LINT):
| sh -s -- -b $(FIRST_GOPATH)/bin $(GOLANGCI_LINT_VERSION)
endif
+.PHONY: common-print-golangci-lint-version
+common-print-golangci-lint-version:
+ @echo $(GOLANGCI_LINT_VERSION)
+
.PHONY: precheck
precheck::
diff --git a/vendor/github.com/prometheus/procfs/cpuinfo.go b/vendor/github.com/prometheus/procfs/cpuinfo.go
index 5fe6cecd3dd5..4b23d8d6b5bc 100644
--- a/vendor/github.com/prometheus/procfs/cpuinfo.go
+++ b/vendor/github.com/prometheus/procfs/cpuinfo.go
@@ -12,7 +12,6 @@
// limitations under the License.
//go:build linux
-// +build linux
package procfs
@@ -502,7 +501,7 @@ func parseCPUInfoRISCV(info []byte) ([]CPUInfo, error) {
return cpuinfo, nil
}
-func parseCPUInfoDummy(_ []byte) ([]CPUInfo, error) { // nolint:unused,deadcode
+func parseCPUInfoDummy(_ []byte) ([]CPUInfo, error) { //nolint:unused
return nil, errors.New("not implemented")
}
diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_armx.go b/vendor/github.com/prometheus/procfs/cpuinfo_armx.go
index 8f155551e527..b09035ff38be 100644
--- a/vendor/github.com/prometheus/procfs/cpuinfo_armx.go
+++ b/vendor/github.com/prometheus/procfs/cpuinfo_armx.go
@@ -12,8 +12,6 @@
// limitations under the License.
//go:build linux && (arm || arm64)
-// +build linux
-// +build arm arm64
package procfs
diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_loong64.go b/vendor/github.com/prometheus/procfs/cpuinfo_loong64.go
index e81a5db94905..7bb20211f993 100644
--- a/vendor/github.com/prometheus/procfs/cpuinfo_loong64.go
+++ b/vendor/github.com/prometheus/procfs/cpuinfo_loong64.go
@@ -12,7 +12,6 @@
// limitations under the License.
//go:build linux
-// +build linux
package procfs
diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_mipsx.go b/vendor/github.com/prometheus/procfs/cpuinfo_mipsx.go
index 4be2b1cc549d..fd75d0f79d04 100644
--- a/vendor/github.com/prometheus/procfs/cpuinfo_mipsx.go
+++ b/vendor/github.com/prometheus/procfs/cpuinfo_mipsx.go
@@ -12,8 +12,6 @@
// limitations under the License.
//go:build linux && (mips || mipsle || mips64 || mips64le)
-// +build linux
-// +build mips mipsle mips64 mips64le
package procfs
diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_others.go b/vendor/github.com/prometheus/procfs/cpuinfo_others.go
index e713bae8dfe6..3d36ba0e6bf2 100644
--- a/vendor/github.com/prometheus/procfs/cpuinfo_others.go
+++ b/vendor/github.com/prometheus/procfs/cpuinfo_others.go
@@ -12,7 +12,6 @@
// limitations under the License.
//go:build linux && !386 && !amd64 && !arm && !arm64 && !loong64 && !mips && !mips64 && !mips64le && !mipsle && !ppc64 && !ppc64le && !riscv64 && !s390x
-// +build linux,!386,!amd64,!arm,!arm64,!loong64,!mips,!mips64,!mips64le,!mipsle,!ppc64,!ppc64le,!riscv64,!s390x
package procfs
diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_ppcx.go b/vendor/github.com/prometheus/procfs/cpuinfo_ppcx.go
index 0825aa1a8308..b3425051ef98 100644
--- a/vendor/github.com/prometheus/procfs/cpuinfo_ppcx.go
+++ b/vendor/github.com/prometheus/procfs/cpuinfo_ppcx.go
@@ -12,8 +12,6 @@
// limitations under the License.
//go:build linux && (ppc64 || ppc64le)
-// +build linux
-// +build ppc64 ppc64le
package procfs
diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go b/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go
index 496770b05f6e..72598230c367 100644
--- a/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go
+++ b/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go
@@ -12,8 +12,6 @@
// limitations under the License.
//go:build linux && (riscv || riscv64)
-// +build linux
-// +build riscv riscv64
package procfs
diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_s390x.go b/vendor/github.com/prometheus/procfs/cpuinfo_s390x.go
index b3228ce3d861..50a8239cbcba 100644
--- a/vendor/github.com/prometheus/procfs/cpuinfo_s390x.go
+++ b/vendor/github.com/prometheus/procfs/cpuinfo_s390x.go
@@ -12,7 +12,6 @@
// limitations under the License.
//go:build linux
-// +build linux
package procfs
diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_x86.go b/vendor/github.com/prometheus/procfs/cpuinfo_x86.go
index 575eb022eb0a..00edb30a5c5c 100644
--- a/vendor/github.com/prometheus/procfs/cpuinfo_x86.go
+++ b/vendor/github.com/prometheus/procfs/cpuinfo_x86.go
@@ -12,8 +12,6 @@
// limitations under the License.
//go:build linux && (386 || amd64)
-// +build linux
-// +build 386 amd64
package procfs
diff --git a/vendor/github.com/prometheus/procfs/fs_statfs_notype.go b/vendor/github.com/prometheus/procfs/fs_statfs_notype.go
index 3c53023c5440..0bef25bdd929 100644
--- a/vendor/github.com/prometheus/procfs/fs_statfs_notype.go
+++ b/vendor/github.com/prometheus/procfs/fs_statfs_notype.go
@@ -12,7 +12,6 @@
// limitations under the License.
//go:build !freebsd && !linux
-// +build !freebsd,!linux
package procfs
diff --git a/vendor/github.com/prometheus/procfs/fs_statfs_type.go b/vendor/github.com/prometheus/procfs/fs_statfs_type.go
index 80fce484789e..d1833303900e 100644
--- a/vendor/github.com/prometheus/procfs/fs_statfs_type.go
+++ b/vendor/github.com/prometheus/procfs/fs_statfs_type.go
@@ -12,7 +12,6 @@
// limitations under the License.
//go:build freebsd || linux
-// +build freebsd linux
package procfs
diff --git a/vendor/github.com/prometheus/procfs/internal/util/sysreadfile.go b/vendor/github.com/prometheus/procfs/internal/util/sysreadfile.go
index 8318d8dfd519..f6a4a4de6270 100644
--- a/vendor/github.com/prometheus/procfs/internal/util/sysreadfile.go
+++ b/vendor/github.com/prometheus/procfs/internal/util/sysreadfile.go
@@ -12,8 +12,6 @@
// limitations under the License.
//go:build (linux || darwin) && !appengine
-// +build linux darwin
-// +build !appengine
package util
diff --git a/vendor/github.com/prometheus/procfs/internal/util/sysreadfile_compat.go b/vendor/github.com/prometheus/procfs/internal/util/sysreadfile_compat.go
index 15bb096ee20f..c80e082cb9fc 100644
--- a/vendor/github.com/prometheus/procfs/internal/util/sysreadfile_compat.go
+++ b/vendor/github.com/prometheus/procfs/internal/util/sysreadfile_compat.go
@@ -12,7 +12,6 @@
// limitations under the License.
//go:build (linux && appengine) || (!linux && !darwin)
-// +build linux,appengine !linux,!darwin
package util
diff --git a/vendor/github.com/prometheus/procfs/kernel_hung.go b/vendor/github.com/prometheus/procfs/kernel_hung.go
index 539c11151420..0c7a69f99f3d 100644
--- a/vendor/github.com/prometheus/procfs/kernel_hung.go
+++ b/vendor/github.com/prometheus/procfs/kernel_hung.go
@@ -12,7 +12,6 @@
// limitations under the License.
//go:build !windows
-// +build !windows
package procfs
diff --git a/vendor/github.com/prometheus/procfs/kernel_random.go b/vendor/github.com/prometheus/procfs/kernel_random.go
index b66565a1043d..e7c5b8cf2be9 100644
--- a/vendor/github.com/prometheus/procfs/kernel_random.go
+++ b/vendor/github.com/prometheus/procfs/kernel_random.go
@@ -12,7 +12,6 @@
// limitations under the License.
//go:build !windows
-// +build !windows
package procfs
diff --git a/vendor/github.com/prometheus/procfs/net_tcp.go b/vendor/github.com/prometheus/procfs/net_tcp.go
index 610ea78e5648..2c7f9bc7c315 100644
--- a/vendor/github.com/prometheus/procfs/net_tcp.go
+++ b/vendor/github.com/prometheus/procfs/net_tcp.go
@@ -25,6 +25,7 @@ type (
// NetTCP returns the IPv4 kernel/networking statistics for TCP datagrams
// read from /proc/net/tcp.
+//
// Deprecated: Use github.com/mdlayher/netlink#Conn (with syscall.AF_INET) instead.
func (fs FS) NetTCP() (NetTCP, error) {
return newNetTCP(fs.proc.Path("net/tcp"))
@@ -32,6 +33,7 @@ func (fs FS) NetTCP() (NetTCP, error) {
// NetTCP6 returns the IPv6 kernel/networking statistics for TCP datagrams
// read from /proc/net/tcp6.
+//
// Deprecated: Use github.com/mdlayher/netlink#Conn (with syscall.AF_INET6) instead.
func (fs FS) NetTCP6() (NetTCP, error) {
return newNetTCP(fs.proc.Path("net/tcp6"))
@@ -39,6 +41,7 @@ func (fs FS) NetTCP6() (NetTCP, error) {
// NetTCPSummary returns already computed statistics like the total queue lengths
// for TCP datagrams read from /proc/net/tcp.
+//
// Deprecated: Use github.com/mdlayher/netlink#Conn (with syscall.AF_INET) instead.
func (fs FS) NetTCPSummary() (*NetTCPSummary, error) {
return newNetTCPSummary(fs.proc.Path("net/tcp"))
@@ -46,6 +49,7 @@ func (fs FS) NetTCPSummary() (*NetTCPSummary, error) {
// NetTCP6Summary returns already computed statistics like the total queue lengths
// for TCP datagrams read from /proc/net/tcp6.
+//
// Deprecated: Use github.com/mdlayher/netlink#Conn (with syscall.AF_INET6) instead.
func (fs FS) NetTCP6Summary() (*NetTCPSummary, error) {
return newNetTCPSummary(fs.proc.Path("net/tcp6"))
diff --git a/vendor/github.com/prometheus/procfs/proc_interrupts.go b/vendor/github.com/prometheus/procfs/proc_interrupts.go
index b942c50723ca..643b500d5d93 100644
--- a/vendor/github.com/prometheus/procfs/proc_interrupts.go
+++ b/vendor/github.com/prometheus/procfs/proc_interrupts.go
@@ -42,7 +42,7 @@ type Interrupts map[string]Interrupt
// Interrupts creates a new instance from a given Proc instance.
func (p Proc) Interrupts() (Interrupts, error) {
- data, err := util.ReadFileNoStat(p.path("interrupts"))
+ data, err := util.ReadFileNoStat(p.fs.proc.Path("interrupts"))
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/prometheus/procfs/proc_maps.go b/vendor/github.com/prometheus/procfs/proc_maps.go
index cc519f92f9af..08b89a6eb9e3 100644
--- a/vendor/github.com/prometheus/procfs/proc_maps.go
+++ b/vendor/github.com/prometheus/procfs/proc_maps.go
@@ -12,8 +12,6 @@
// limitations under the License.
//go:build (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris) && !js
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
-// +build !js
package procfs
diff --git a/vendor/github.com/prometheus/procfs/proc_smaps.go b/vendor/github.com/prometheus/procfs/proc_smaps.go
index 3e48afd1d39c..f637309b3d18 100644
--- a/vendor/github.com/prometheus/procfs/proc_smaps.go
+++ b/vendor/github.com/prometheus/procfs/proc_smaps.go
@@ -12,7 +12,6 @@
// limitations under the License.
//go:build !windows
-// +build !windows
package procfs
diff --git a/vendor/github.com/prometheus/procfs/proc_statm.go b/vendor/github.com/prometheus/procfs/proc_statm.go
index b0a936016774..6bcc97ec9c22 100644
--- a/vendor/github.com/prometheus/procfs/proc_statm.go
+++ b/vendor/github.com/prometheus/procfs/proc_statm.go
@@ -45,6 +45,7 @@ type ProcStatm struct {
}
// NewStatm returns the current status information of the process.
+//
// Deprecated: Use p.Statm() instead.
func (p Proc) NewStatm() (ProcStatm, error) {
return p.Statm()
diff --git a/vendor/github.com/prometheus/procfs/proc_status.go b/vendor/github.com/prometheus/procfs/proc_status.go
index 1ed2bced4174..12d65581c82b 100644
--- a/vendor/github.com/prometheus/procfs/proc_status.go
+++ b/vendor/github.com/prometheus/procfs/proc_status.go
@@ -83,6 +83,19 @@ type ProcStatus struct {
// CpusAllowedList: List of cpu cores processes are allowed to run on.
CpusAllowedList []uint64
+
+ // CapInh is the bitmap of inheritable capabilities
+ //
+ // See: https://www.kernel.org/doc/man-pages/online/pages/man7/capabilities.7.html
+ CapInh uint64
+ // CapPrm is the bitmap of permitted capabilities
+ CapPrm uint64
+ // CapEff is the bitmap of effective capabilities
+ CapEff uint64
+ // CapBnd is the bitmap of bounding capabilities
+ CapBnd uint64
+ // CapAmb is the bitmap of ambient capabilities
+ CapAmb uint64
}
// NewStatus returns the current status information of the process.
@@ -190,6 +203,36 @@ func (s *ProcStatus) fillStatus(k string, vString string, vUint uint64, vUintByt
s.NonVoluntaryCtxtSwitches = vUint
case "Cpus_allowed_list":
s.CpusAllowedList = calcCpusAllowedList(vString)
+ case "CapInh":
+ var err error
+ s.CapInh, err = strconv.ParseUint(vString, 16, 64)
+ if err != nil {
+ return err
+ }
+ case "CapPrm":
+ var err error
+ s.CapPrm, err = strconv.ParseUint(vString, 16, 64)
+ if err != nil {
+ return err
+ }
+ case "CapEff":
+ var err error
+ s.CapEff, err = strconv.ParseUint(vString, 16, 64)
+ if err != nil {
+ return err
+ }
+ case "CapBnd":
+ var err error
+ s.CapBnd, err = strconv.ParseUint(vString, 16, 64)
+ if err != nil {
+ return err
+ }
+ case "CapAmb":
+ var err error
+ s.CapAmb, err = strconv.ParseUint(vString, 16, 64)
+ if err != nil {
+ return err
+ }
}
return nil
diff --git a/vendor/github.com/prometheus/procfs/vm.go b/vendor/github.com/prometheus/procfs/vm.go
index 2a8d76390973..52180c03e260 100644
--- a/vendor/github.com/prometheus/procfs/vm.go
+++ b/vendor/github.com/prometheus/procfs/vm.go
@@ -12,7 +12,6 @@
// limitations under the License.
//go:build !windows
-// +build !windows
package procfs
diff --git a/vendor/github.com/prometheus/procfs/zoneinfo.go b/vendor/github.com/prometheus/procfs/zoneinfo.go
index 806e171147d0..63d1898bc830 100644
--- a/vendor/github.com/prometheus/procfs/zoneinfo.go
+++ b/vendor/github.com/prometheus/procfs/zoneinfo.go
@@ -12,7 +12,6 @@
// limitations under the License.
//go:build !windows
-// +build !windows
package procfs
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/config.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/config.go
index 2a64fd330cc5..e8ce5978a72c 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/config.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/config.go
@@ -5,6 +5,8 @@ package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.g
import (
"context"
+ "os"
+ "strings"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
@@ -29,6 +31,14 @@ type InterceptorFilter func(*InterceptorInfo) bool
// A Filter must return true if the request should be instrumented.
type Filter func(*stats.RPCTagInfo) bool
+type semconvMode int
+
+const (
+ semconvModeNew semconvMode = iota // Default
+ semconvModeOld
+ semconvModeDup
+)
+
// config is a group of options for this instrumentation.
type config struct {
Filter Filter
@@ -37,7 +47,6 @@ type config struct {
TracerProvider trace.TracerProvider
MeterProvider metric.MeterProvider
SpanKind trace.SpanKind
- SpanStartOptions []trace.SpanStartOption
SpanAttributes []attribute.KeyValue
MetricAttributes []attribute.KeyValue
MetricAttributesFn func(ctx context.Context) []attribute.KeyValue
@@ -47,6 +56,8 @@ type config struct {
ReceivedEvent bool
SentEvent bool
+
+ semconvMode semconvMode
}
// Option applies an option value for a config.
@@ -66,13 +77,33 @@ func newConfig(opts []Option) *config {
Propagators: otel.GetTextMapPropagator(),
TracerProvider: otel.GetTracerProvider(),
MeterProvider: otel.GetMeterProvider(),
+ semconvMode: parseSemconvMode(),
}
for _, o := range opts {
o.apply(c)
}
+
return c
}
+func parseSemconvMode() semconvMode {
+ val := os.Getenv("OTEL_SEMCONV_STABILITY_OPT_IN")
+ if val == "" {
+ return semconvModeNew
+ }
+ parts := strings.SplitSeq(val, ",")
+ for p := range parts {
+ p = strings.TrimSpace(p)
+ if p == "rpc/dup" {
+ return semconvModeDup
+ }
+ if p == "rpc/old" {
+ return semconvModeOld
+ }
+ }
+ return semconvModeNew
+}
+
// WithPublicEndpoint configures the Handler to link the span with an incoming
// span context. If this option is not provided, then the association is a child
// association instead of a link.
@@ -172,16 +203,6 @@ func WithMessageEvents(events ...Event) Option {
})
}
-// WithSpanOptions configures an additional set of
-// trace.SpanOptions, which are applied to each new span.
-//
-// Deprecated: It is only used by the deprecated interceptor, and is unused by [NewClientHandler] and [NewServerHandler].
-func WithSpanOptions(opts ...trace.SpanStartOption) Option {
- return optionFunc(func(c *config) {
- c.SpanStartOptions = append(c.SpanStartOptions, opts...)
- })
-}
-
// WithSpanKind returns an Option to set the span kind for spans created by
// the handler.
//
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go
index 69e8506ffd25..7bab8da8fa78 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go
@@ -11,7 +11,7 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
- semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
grpc_codes "google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go
index 7d7f172e0a48..97616c5359b1 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go
@@ -8,7 +8,8 @@ import (
"strings"
"go.opentelemetry.io/otel/attribute"
- semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
+ oldsemconv "go.opentelemetry.io/otel/semconv/v1.37.0" //nolint:depguard // Use of v1.37.0 is required for backward compatibility stability opt-in.
+ semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
)
// ParseFullMethod returns a span name following the OpenTelemetry semantic
@@ -25,3 +26,28 @@ func ParseFullMethod(fullMethod string) (string, []attribute.KeyValue) {
name := fullMethod[1:]
return name, []attribute.KeyValue{semconv.RPCMethod(name)}
}
+
+// ParseFullMethodOld returns a span name following the old OpenTelemetry semantic
+// conventions as well as all applicable span attribute.KeyValue attributes based
+// on a gRPC's FullMethod.
+// Based on the implementation in:
+// https://github.com/open-telemetry/opentelemetry-go-contrib/blob/072dcf8ad7e5e48b506e05720b29d8b078759606/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go#L20
+func ParseFullMethodOld(fullMethod string) (string, []attribute.KeyValue) {
+ if !strings.HasPrefix(fullMethod, "/") {
+ return fullMethod, nil
+ }
+ name := fullMethod[1:]
+ parts := strings.Split(name, "/")
+ if len(parts) < 2 {
+ return name, []attribute.KeyValue{
+ attribute.String("rpc.system", "grpc"),
+ }
+ }
+ service := parts[0]
+ method := parts[1]
+ return name, []attribute.KeyValue{
+ oldsemconv.RPCSystemKey.String("grpc"),
+ oldsemconv.RPCServiceKey.String(service),
+ oldsemconv.RPCMethodKey.String(method),
+ }
+}
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go
index be9282f29f63..f8d254df3237 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go
@@ -12,11 +12,12 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/metric"
- semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
- "go.opentelemetry.io/otel/semconv/v1.40.0/rpcconv"
+ oldrpcconv "go.opentelemetry.io/otel/semconv/v1.37.0/rpcconv" //nolint:depguard // Use of v1.37.0 is required for backward compatibility stability opt-in.
+ semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
+ "go.opentelemetry.io/otel/semconv/v1.41.0/rpcconv"
"go.opentelemetry.io/otel/trace"
+
grpc_codes "google.golang.org/grpc/codes"
- "google.golang.org/grpc/peer"
"google.golang.org/grpc/stats"
"google.golang.org/grpc/status"
@@ -35,7 +36,8 @@ type serverHandler struct {
tracer trace.Tracer
- duration rpcconv.ServerCallDuration
+ duration rpcconv.ServerCallDuration
+ oldDuration oldrpcconv.ServerDuration
}
// NewServerHandler creates a stats.Handler for a gRPC server.
@@ -59,15 +61,26 @@ func NewServerHandler(opts ...Option) stats.Handler {
)
var err error
- h.duration, err = rpcconv.NewServerCallDuration(
- meter,
- metric.WithExplicitBucketBoundaries(
- 0.005, 0.01, 0.025, 0.05, 0.075, 0.1,
- 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10,
- ),
- )
- if err != nil {
- otel.Handle(err)
+ if c.semconvMode == semconvModeOld || c.semconvMode == semconvModeDup {
+ oldDur, err := oldrpcconv.NewServerDuration(meter)
+ if err != nil {
+ otel.Handle(err)
+ } else {
+ h.oldDuration = oldDur
+ }
+ }
+
+ if c.semconvMode == semconvModeNew || c.semconvMode == semconvModeDup {
+ h.duration, err = rpcconv.NewServerCallDuration(
+ meter,
+ metric.WithExplicitBucketBoundaries(
+ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1,
+ 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10,
+ ),
+ )
+ if err != nil {
+ otel.Handle(err)
+ }
}
return h
@@ -86,8 +99,23 @@ func (*serverHandler) HandleConn(context.Context, stats.ConnStats) {
func (h *serverHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context {
ctx = extract(ctx, h.Propagators)
- name, attrs := internal.ParseFullMethod(info.FullMethodName)
- attrs = append(attrs, semconv.RPCSystemNameGRPC)
+ var name string
+ var attrs []attribute.KeyValue
+
+ switch h.semconvMode {
+ case semconvModeOld:
+ name, attrs = internal.ParseFullMethodOld(info.FullMethodName)
+ case semconvModeDup:
+ var attrsNew, attrsOld []attribute.KeyValue
+ name, attrsNew = internal.ParseFullMethod(info.FullMethodName)
+ _, attrsOld = internal.ParseFullMethodOld(info.FullMethodName)
+ // Combine both. We append New last so its rpc.method (fully qualified) wins when deduplicated.
+ attrs = append(append([]attribute.KeyValue{}, attrsOld...), attrsNew...)
+ attrs = append(attrs, semconv.RPCSystemNameGRPC) // New convention
+ default: // semconvModeNew
+ name, attrs = internal.ParseFullMethod(info.FullMethodName)
+ attrs = append(attrs, semconv.RPCSystemNameGRPC)
+ }
record := true
if h.Filter != nil {
@@ -131,10 +159,19 @@ func (h *serverHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) cont
// HandleRPC processes the RPC stats.
func (h *serverHandler) HandleRPC(ctx context.Context, rs stats.RPCStats) {
+ var dur metric.Float64Histogram
+ if h.semconvMode == semconvModeNew || h.semconvMode == semconvModeDup {
+ dur = h.duration.Inst()
+ }
+ var oldDur metric.Float64Histogram
+ if h.semconvMode == semconvModeOld || h.semconvMode == semconvModeDup {
+ oldDur = h.oldDuration.Inst()
+ }
h.handleRPC(
ctx,
rs,
- h.duration.Inst(),
+ dur,
+ oldDur,
serverStatus,
)
}
@@ -144,7 +181,8 @@ type clientHandler struct {
tracer trace.Tracer
- duration rpcconv.ClientCallDuration
+ duration rpcconv.ClientCallDuration
+ oldDuration oldrpcconv.ClientDuration
}
// NewClientHandler creates a stats.Handler for a gRPC client.
@@ -168,15 +206,26 @@ func NewClientHandler(opts ...Option) stats.Handler {
)
var err error
- h.duration, err = rpcconv.NewClientCallDuration(
- meter,
- metric.WithExplicitBucketBoundaries(
- 0.005, 0.01, 0.025, 0.05, 0.075, 0.1,
- 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10,
- ),
- )
- if err != nil {
- otel.Handle(err)
+ if c.semconvMode == semconvModeOld || c.semconvMode == semconvModeDup {
+ oldDur, err := oldrpcconv.NewClientDuration(meter)
+ if err != nil {
+ otel.Handle(err)
+ } else {
+ h.oldDuration = oldDur
+ }
+ }
+
+ if c.semconvMode == semconvModeNew || c.semconvMode == semconvModeDup {
+ h.duration, err = rpcconv.NewClientCallDuration(
+ meter,
+ metric.WithExplicitBucketBoundaries(
+ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1,
+ 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10,
+ ),
+ )
+ if err != nil {
+ otel.Handle(err)
+ }
}
return h
@@ -184,8 +233,23 @@ func NewClientHandler(opts ...Option) stats.Handler {
// TagRPC can attach some information to the given context.
func (h *clientHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context {
- name, attrs := internal.ParseFullMethod(info.FullMethodName)
- attrs = append(attrs, semconv.RPCSystemNameGRPC)
+ var name string
+ var attrs []attribute.KeyValue
+
+ switch h.semconvMode {
+ case semconvModeOld:
+ name, attrs = internal.ParseFullMethodOld(info.FullMethodName)
+ case semconvModeDup:
+ var attrsNew, attrsOld []attribute.KeyValue
+ name, attrsNew = internal.ParseFullMethod(info.FullMethodName)
+ _, attrsOld = internal.ParseFullMethodOld(info.FullMethodName)
+ // Combine both. We append New last so its rpc.method (fully qualified) wins when deduplicated.
+ attrs = append(append([]attribute.KeyValue{}, attrsOld...), attrsNew...)
+ attrs = append(attrs, semconv.RPCSystemNameGRPC) // New convention
+ default: // semconvModeNew
+ name, attrs = internal.ParseFullMethod(info.FullMethodName)
+ attrs = append(attrs, semconv.RPCSystemNameGRPC)
+ }
record := true
if h.Filter != nil {
@@ -219,10 +283,19 @@ func (h *clientHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) cont
// HandleRPC processes the RPC stats.
func (h *clientHandler) HandleRPC(ctx context.Context, rs stats.RPCStats) {
+ var dur metric.Float64Histogram
+ if h.semconvMode == semconvModeNew || h.semconvMode == semconvModeDup {
+ dur = h.duration.Inst()
+ }
+ var oldDur metric.Float64Histogram
+ if h.semconvMode == semconvModeOld || h.semconvMode == semconvModeDup {
+ oldDur = h.oldDuration.Inst()
+ }
h.handleRPC(
ctx,
rs,
- h.duration.Inst(),
+ dur,
+ oldDur,
func(s *status.Status) (codes.Code, string) {
return codes.Error, s.Message()
},
@@ -243,6 +316,7 @@ func (*config) handleRPC(
ctx context.Context,
rs stats.RPCStats,
duration metric.Float64Histogram,
+ oldDuration metric.Float64Histogram,
recordStatus func(*status.Status) (codes.Code, string),
) {
gctx, _ := ctx.Value(gRPCContextKey{}).(*gRPCContext)
@@ -255,12 +329,23 @@ func (*config) handleRPC(
switch rs := rs.(type) {
case *stats.Begin:
case *stats.InPayload:
+ case *stats.InHeader:
+ if !rs.Client && rs.LocalAddr != nil {
+ if span.IsRecording() {
+ span.SetAttributes(serverAddrAttrs(rs.LocalAddr.String())...)
+ }
+ // TODO: add server.address and server.port to metrics once the API supports opt-in attributes.
+ }
case *stats.OutPayload:
case *stats.OutTrailer:
case *stats.OutHeader:
- if span.IsRecording() {
- if p, ok := peer.FromContext(ctx); ok {
- span.SetAttributes(serverAddrAttrs(p.Addr.String())...)
+ if rs.Client && rs.RemoteAddr != nil && (span.IsRecording() || gctx != nil) {
+ attrs := serverAddrAttrs(rs.RemoteAddr.String())
+ if span.IsRecording() {
+ span.SetAttributes(attrs...)
+ }
+ if gctx != nil {
+ gctx.metricAttrs = append(gctx.metricAttrs, attrs...)
}
}
case *stats.End:
@@ -282,23 +367,41 @@ func (*config) handleRPC(
span.End()
}
- var metricAttrs []attribute.KeyValue
- if gctx != nil {
- // Don't use gctx.metricAttrSet here, because it requires passing
- // multiple RecordOptions, which would call metric.mergeSets and
- // allocate a new set for each Record call.
- metricAttrs = make([]attribute.KeyValue, 0, len(gctx.metricAttrs)+1)
- metricAttrs = append(metricAttrs, gctx.metricAttrs...)
+ var durationEnabled bool
+ var oldDurationEnabled bool
+
+ if duration != nil {
+ durationEnabled = duration.Enabled(ctx)
+ }
+ if oldDuration != nil {
+ oldDurationEnabled = oldDuration.Enabled(ctx)
}
- metricAttrs = append(metricAttrs, rpcStatusAttr)
- // Allocate vararg slice once.
- recordOpts := []metric.RecordOption{metric.WithAttributeSet(attribute.NewSet(metricAttrs...))}
- // Use floating point division here for higher precision (instead of Millisecond method).
- // Measure right before calling Record() to capture as much elapsed time as possible.
- elapsedTime := float64(rs.EndTime.Sub(rs.BeginTime)) / float64(time.Second)
+ if durationEnabled || oldDurationEnabled {
+ var metricAttrs []attribute.KeyValue
+ if gctx != nil {
+ // Don't use gctx.metricAttrSet here, because it requires passing
+ // multiple RecordOptions, which would call metric.mergeSets and
+ // allocate a new set for each Record call.
+ metricAttrs = make([]attribute.KeyValue, 0, len(gctx.metricAttrs)+1)
+ metricAttrs = append(metricAttrs, gctx.metricAttrs...)
+ }
+ metricAttrs = append(metricAttrs, rpcStatusAttr)
+ // Allocate vararg slice once.
+ recordOpts := []metric.RecordOption{metric.WithAttributeSet(attribute.NewSet(metricAttrs...))}
+
+ // Use floating point division here for higher precision (instead of Millisecond method).
+ // Measure right before calling Record() to capture as much elapsed time as possible.
+ elapsedTime := float64(rs.EndTime.Sub(rs.BeginTime)) / float64(time.Second)
+
+ if durationEnabled {
+ duration.Record(ctx, elapsedTime, recordOpts...)
+ }
+ if oldDurationEnabled {
+ oldDuration.Record(ctx, elapsedTime*1000.0, recordOpts...)
+ }
+ }
- duration.Record(ctx, elapsedTime, recordOpts...)
default:
return
}
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/version.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/version.go
index 535e63a07b36..1f5996cc06fa 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/version.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/version.go
@@ -4,4 +4,4 @@
package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
// Version is the current release version of the gRPC instrumentation.
-const Version = "0.67.0"
+const Version = "0.69.0"
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go
index a269fce0f7a1..204588b849a3 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go
@@ -35,10 +35,6 @@ type middleware struct {
semconv semconv.HTTPServer
}
-func defaultHandlerFormatter(operation string, _ *http.Request) string {
- return operation
-}
-
// NewHandler wraps the passed handler in a span named after the operation and
// enriches it with metrics.
func NewHandler(handler http.Handler, operation string, opts ...Option) http.Handler {
@@ -55,12 +51,17 @@ func NewMiddleware(operation string, opts ...Option) func(http.Handler) http.Han
defaultOpts := []Option{
WithSpanOptions(trace.WithSpanKind(trace.SpanKindServer)),
- WithSpanNameFormatter(defaultHandlerFormatter),
}
c := newConfig(append(defaultOpts, opts...)...)
h.configure(c)
+ if h.spanNameFormatter == nil {
+ h.spanNameFormatter = func(_ string, r *http.Request) string {
+ return h.semconv.SpanName(r)
+ }
+ }
+
return func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
h.serveHTTP(w, r, next)
@@ -138,7 +139,13 @@ func (h *middleware) serveHTTP(w http.ResponseWriter, r *http.Request, next http
// ReadCloser fulfills a certain interface and it is indeed nil or NoBody.
bw := request.NewBodyWrapper(r.Body, readRecordFunc)
if r.Body != nil && r.Body != http.NoBody {
+ origReq := r
+ prevBody := r.Body
r.Body = bw
+
+ // Restore the original body after the request is processed to avoid issues
+ // with extra wrapper since `http/server.go` later checks type of `r.Body`.
+ defer func() { origReq.Body = prevBody }()
}
writeRecordFunc := func(int64) {}
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/client.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/client.go
index 1398d85c2e9f..0241b08e8566 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/client.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/client.go
@@ -12,6 +12,7 @@ import (
"context"
"fmt"
"net/http"
+ "reflect"
"slices"
"strconv"
"strings"
@@ -19,8 +20,8 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/metric"
- "go.opentelemetry.io/otel/semconv/v1.40.0"
- "go.opentelemetry.io/otel/semconv/v1.40.0/httpconv"
+ "go.opentelemetry.io/otel/semconv/v1.41.0"
+ "go.opentelemetry.io/otel/semconv/v1.41.0/httpconv"
)
type HTTPClient struct {
@@ -166,7 +167,7 @@ func (n HTTPClient) ResponseTraceAttrs(resp *http.Response) []attribute.KeyValue
func (n HTTPClient) method(method string) (attribute.KeyValue, attribute.KeyValue) {
if method == "" {
- return semconv.HTTPRequestMethodGet, attribute.KeyValue{}
+ return semconv.HTTPRequestMethodOther, attribute.KeyValue{}
}
if attr, ok := methodLookup[method]; ok {
return attr, attribute.KeyValue{}
@@ -176,7 +177,7 @@ func (n HTTPClient) method(method string) (attribute.KeyValue, attribute.KeyValu
if attr, ok := methodLookup[strings.ToUpper(method)]; ok {
return attr, orig
}
- return semconv.HTTPRequestMethodGet, orig
+ return semconv.HTTPRequestMethodOther, orig
}
func (n HTTPClient) MetricAttributes(req *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue {
@@ -249,6 +250,9 @@ func (o MetricOpts) AddOptions() metric.AddOption {
func (n HTTPClient) MetricOptions(ma MetricAttributes) MetricOpts {
attributes := n.MetricAttributes(ma.Req, ma.StatusCode, ma.AdditionalAttributes)
+ if ma.StatusCode == 0 && ma.Err != nil {
+ attributes = append(attributes, n.ErrorType(ma.Err))
+ }
set := metric.WithAttributeSet(attribute.NewSet(attributes...))
return MetricOpts{
@@ -257,6 +261,39 @@ func (n HTTPClient) MetricOptions(ma MetricAttributes) MetricOpts {
}
}
+// ErrorType returns an error.type attribute for the given error. The otelhttp
+// Transport calls the underlying RoundTripper directly, so transport failures
+// arrive as *net.OpError (connection refused, timeout, etc.) rather than
+// *url.Error (which http.Client.Do adds above the Transport layer). This
+// function intentionally does not unwrap further: reporting a single concrete
+// type per failure keeps attribute cardinality bounded, as required by the
+// OTel spec (error.type SHOULD have low cardinality). Callers that need
+// finer-grained error distinctions should inspect the error themselves.
+func (n HTTPClient) ErrorType(err error) attribute.KeyValue {
+ t := reflect.TypeOf(err)
+ if t == nil {
+ return semconv.ErrorTypeOther
+ }
+ if t.Kind() == reflect.Ptr {
+ t = t.Elem()
+ }
+ var value string
+ if t.PkgPath() == "" || t.Name() == "" {
+ // t.PkgPath() == "" covers builtin and unnamed types.
+ // t.Name() == "" covers anonymous struct types that implement error,
+ // which are uncommon but possible. Fall back to t.String() for both.
+ value = t.String()
+ } else {
+ value = fmt.Sprintf("%s.%s", t.PkgPath(), t.Name())
+ }
+
+ if value == "" {
+ return semconv.ErrorTypeOther
+ }
+
+ return semconv.ErrorTypeKey.String(value)
+}
+
func (n HTTPClient) RecordMetrics(ctx context.Context, md MetricData, opts MetricOpts) {
recordOpts := metricRecordOptionPool.Get().(*[]metric.RecordOption)
defer func() {
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/server.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/server.go
index 6dcf1b5b52b9..8e0430863d92 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/server.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/server.go
@@ -20,8 +20,8 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/metric"
- "go.opentelemetry.io/otel/semconv/v1.40.0"
- "go.opentelemetry.io/otel/semconv/v1.40.0/httpconv"
+ "go.opentelemetry.io/otel/semconv/v1.41.0"
+ "go.opentelemetry.io/otel/semconv/v1.41.0/httpconv"
)
type RequestTraceAttrsOpts struct {
@@ -243,6 +243,7 @@ type MetricAttributes struct {
StatusCode int
Route string
AdditionalAttributes []attribute.KeyValue
+ Err error
}
type MetricData struct {
@@ -250,13 +251,11 @@ type MetricData struct {
RequestDuration time.Duration
}
-var (
- metricRecordOptionPool = &sync.Pool{
- New: func() any {
- return &[]metric.RecordOption{}
- },
- }
-)
+var metricRecordOptionPool = &sync.Pool{
+ New: func() any {
+ return &[]metric.RecordOption{}
+ },
+}
func (n HTTPServer) RecordMetrics(ctx context.Context, md ServerMetricData) {
attributes := n.MetricAttributes(md.ServerName, md.Req, md.StatusCode, md.Route, md.AdditionalAttributes)
@@ -270,9 +269,27 @@ func (n HTTPServer) RecordMetrics(ctx context.Context, md ServerMetricData) {
metricRecordOptionPool.Put(recordOpts)
}
+// SpanName returns the span name for an HTTP request following the
+// OpenTelemetry HTTP semantic conventions.
+// It returns "{method} {route}" when the request has a pattern,
+// or just "{method}" when no route is available.
+// Non-standard HTTP methods are replaced by "HTTP".
+func (n HTTPServer) SpanName(r *http.Request) string {
+ method := strings.ToUpper(r.Method)
+ if _, ok := methodLookup[method]; !ok {
+ method = "HTTP"
+ }
+
+ route := httpRoute(r.Pattern)
+ if route != "" {
+ return method + " " + route
+ }
+ return method
+}
+
func (n HTTPServer) method(method string) (attribute.KeyValue, attribute.KeyValue) {
if method == "" {
- return semconv.HTTPRequestMethodGet, attribute.KeyValue{}
+ return semconv.HTTPRequestMethodOther, attribute.KeyValue{}
}
if attr, ok := methodLookup[method]; ok {
return attr, attribute.KeyValue{}
@@ -282,7 +299,7 @@ func (n HTTPServer) method(method string) (attribute.KeyValue, attribute.KeyValu
if attr, ok := methodLookup[strings.ToUpper(method)]; ok {
return attr, orig
}
- return semconv.HTTPRequestMethodGet, orig
+ return semconv.HTTPRequestMethodOther, orig
}
func (n HTTPServer) scheme(https bool) attribute.KeyValue { //nolint:revive // ignore linter
@@ -364,7 +381,9 @@ func (n HTTPServer) MetricAttributes(server string, req *http.Request, statusCod
if statusCode > 0 {
num++
}
-
+ if route == "" && req.Pattern != "" {
+ route = httpRoute(req.Pattern)
+ }
if route != "" {
num++
}
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go
index 2eab2ecabde4..d6842ed2ab5c 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go
@@ -15,7 +15,7 @@ import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
- semconvNew "go.opentelemetry.io/otel/semconv/v1.40.0"
+ semconvNew "go.opentelemetry.io/otel/semconv/v1.41.0"
)
// SplitHostPort splits a network address hostport of the form "host",
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go
index d8d204d1f8a0..b15895cee22f 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go
@@ -15,7 +15,7 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/propagation"
- otelsemconv "go.opentelemetry.io/otel/semconv/v1.40.0"
+ otelsemconv "go.opentelemetry.io/otel/semconv/v1.41.0"
"go.opentelemetry.io/otel/trace"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request"
@@ -161,6 +161,7 @@ func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) {
t.semconv.MetricOptions(semconv.MetricAttributes{
Req: r,
StatusCode: statusCode,
+ Err: err,
AdditionalAttributes: append(labeler.Get(), t.metricAttributesFromRequest(r)...),
}),
)
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go
index 1d90fc264d41..2feb885000fb 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go
@@ -4,4 +4,4 @@
package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
// Version is the current release version of the otelhttp instrumentation.
-const Version = "0.67.0"
+const Version = "0.69.0"
diff --git a/vendor/go.opentelemetry.io/otel/.golangci.yml b/vendor/go.opentelemetry.io/otel/.golangci.yml
index db1f55101cee..645c7e6af1d0 100644
--- a/vendor/go.opentelemetry.io/otel/.golangci.yml
+++ b/vendor/go.opentelemetry.io/otel/.golangci.yml
@@ -96,9 +96,9 @@ linters:
- "!**/exporters/zipkin/**"
deny:
- pkg: go.opentelemetry.io/otel/semconv
- desc: "Use go.opentelemetry.io/otel/semconv/v1.40.0 instead. If a newer semconv version has been released, update the depguard rule."
+ desc: "Use go.opentelemetry.io/otel/semconv/v1.41.0 instead. If a newer semconv version has been released, update the depguard rule."
allow:
- - go.opentelemetry.io/otel/semconv/v1.40.0
+ - go.opentelemetry.io/otel/semconv/v1.41.0
gocritic:
disabled-checks:
- appendAssign
@@ -134,13 +134,16 @@ linters:
strconcat: true
revive:
confidence: 0.01
+ enable-all-rules: false
+ enable-default-rules: true
+ max-open-files: 2048
rules:
- name: blank-imports
- name: bool-literal-in-expr
- name: constant-logical-expr
- name: context-as-argument
arguments:
- - allowTypesBefore: '*testing.T'
+ - allow-types-before: '*testing.T'
disabled: true
- name: context-keys-type
- name: deep-exit
@@ -152,7 +155,7 @@ linters:
- name: duplicated-imports
- name: early-return
arguments:
- - preserveScope
+ - preserve-scope
- name: empty-block
- name: empty-lines
- name: error-naming
@@ -161,7 +164,7 @@ linters:
- name: errorf
- name: exported
arguments:
- - sayRepetitiveInsteadOfStutters
+ - say-repetitive-instead-of-stutters
- name: flag-parameter
- name: identical-branches
- name: if-return
@@ -169,11 +172,12 @@ linters:
- name: increment-decrement
- name: indent-error-flow
arguments:
- - preserveScope
+ - preserve-scope
- name: package-comments
- name: range
- name: range-val-in-closure
- name: range-val-address
+ - name: receiver-naming
- name: redefines-builtin-id
- name: string-format
arguments:
@@ -183,7 +187,7 @@ linters:
- name: struct-tag
- name: superfluous-else
arguments:
- - preserveScope
+ - preserve-scope
- name: time-equal
- name: unconditional-recursion
- name: unexported-return
diff --git a/vendor/go.opentelemetry.io/otel/AGENTS.md b/vendor/go.opentelemetry.io/otel/AGENTS.md
new file mode 100644
index 000000000000..26c0fc4ddb84
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/AGENTS.md
@@ -0,0 +1,109 @@
+# Agent Guide for opentelemetry-go
+
+This file contains active, task-oriented instructions for autonomous and semi-autonomous coding agents working in this repository.
+
+Before starting any task, read `.github/copilot-instructions.md`, `CONTRIBUTING.md`, and this file.
+Treat `.github/copilot-instructions.md` as global passive guidance for every task, including docs-only and review-only work.
+
+## Core expectations
+
+- Preserve OpenTelemetry specification compliance, API stability, and idiomatic Go.
+- Prefer minimal, surgical changes over broad refactors or speculative cleanup.
+- Read the package you are editing and match its existing naming, option types, error handling, comments, tests, and concurrency patterns.
+- Keep public APIs backward compatible unless the task explicitly requires a breaking change.
+- Keep telemetry resilient and loosely coupled. Do not introduce behavior that can unexpectedly interfere with host applications.
+- Inspect boundaries carefully: input validation, resource limits, cancellation, shutdown, error propagation, concurrency, and memory growth.
+- Prefer fail-safe behavior and explicit invariants over implicit assumptions.
+- Keep dependencies minimal and justified.
+- Preserve host-application safety: telemetry should not panic, block indefinitely, or amplify attacker-controlled input.
+- Be conservative on hot paths. Avoid unnecessary allocations, reflection, interface churn, blocking, global state, and high-cardinality telemetry.
+- Write comments only for intent, invariants, and non-obvious constraints. Do not add comments that restate the code.
+
+## Default workflow
+
+For new features and behavior changes, use this order unless the task explicitly says otherwise:
+
+1. Read the relevant package, its tests, and any package docs or `README.md`.
+2. Add or update a failing unit test that captures the required behavior or regression.
+3. Implement the smallest change that makes the test pass.
+4. Refactor only after the behavior is locked in, and only if the refactor keeps the diff focused.
+5. If the changed code is on a hot path or performance-sensitive, inspect existing benchmarks and run them. Add a benchmark if coverage is missing.
+6. Update documentation artifacts as needed while the context is fresh. Follow the documentation and changelog conventions below for the specific updates required.
+7. Run `make precommit` each time before considering the work complete.
+
+For docs-only, test-only, or review-only tasks, still start with the required repository guidance above, then skip the workflow steps that do not apply while keeping the same discipline around scope, verification, and repository conventions.
+
+## Verification
+
+- Use `make` as the canonical repository verification command. The default target is `precommit`.
+- `make precommit` is the expected final verification step for linting, generation, README checks, module checks, and tests.
+- During iteration, targeted commands are fine for fast feedback, but do not stop there if the task changes code.
+- If you touch performance-sensitive code, run focused benchmarks and compare the results using `benchstat` in addition to `make`.
+
+## Documentation and changelog
+
+- Non-internal, non-test packages should have Go doc comments, usually in `doc.go`.
+- Non-internal, non-test, non-documentation packages should also have a `README.md` with at least a title and a `pkg.go.dev` badge.
+- Prefer examples over long code snippets in GoDoc when practical.
+- Keep docs aligned with actual behavior. Do not leave stale comments, stale examples, or stale package documentation behind.
+- For user-visible changes, update `CHANGELOG.md` under the appropriate `Added`, `Changed`, `Deprecated`, `Fixed`, or `Removed` section within `## [Unreleased]`.
+
+## Repository habits
+
+- Prefer focused diffs. Avoid drive-by cleanup.
+- Follow existing option patterns and exported API conventions instead of inventing new abstractions.
+- Generated files are checked in. If your change affects generation, keep generated output up to date.
+- Prefer fast local search tools such as `rg` when exploring the repository.
+- When changing behavior, make the invariants explicit in tests.
+
+## Personas
+
+### Feature Agent
+
+Use this persona for new behavior, new API surface, or spec-driven feature work.
+
+- Start with a failing unit test.
+- Confirm the expected behavior against the spec, existing package behavior, and public API compatibility.
+- Implement the smallest viable change.
+- Update GoDoc, examples, `README.md`, and `CHANGELOG.md` when the change is user-visible.
+- If the feature touches a hot path, check benchmarks and add one if the coverage is missing.
+
+### Refactoring Agent
+
+Use this persona when improving structure without intentionally changing behavior.
+
+- Treat behavior preservation as the default contract.
+- Add or tighten tests before moving code if current behavior is not already pinned down.
+- Avoid broad rewrites, clever abstractions, or package-wide cleanup unless explicitly requested.
+- If a refactor touches a hot path, benchmark before and after.
+- Keep API shape, semantics, concurrency guarantees, and failure modes unchanged unless the task says otherwise.
+
+### Test Agent
+
+Use this persona when adding missing coverage, reproducing bugs, or hardening regressions.
+
+- Reproduce the bug or missing behavior with the smallest failing test you can.
+- Prefer testing public behavior and externally visible invariants.
+- Add targeted regression tests before changing production code.
+- Only change production code when it is required to make the tested behavior correct or testable.
+- Keep tests deterministic, readable, and aligned with package patterns.
+
+### Performance Agent
+
+Use this persona for hot-path work, allocation reduction, or throughput and latency improvements.
+
+- Benchmark first to establish a baseline.
+- Prefer changes that reduce allocations, copying, interface churn, and unnecessary synchronization.
+- Do not trade away correctness, spec compliance, or API stability for micro-optimizations.
+- Add or update benchmarks when performance-sensitive coverage is missing.
+- If you materially change a hot path, capture before-and-after results, preferably with `benchstat`.
+
+### Review Agent
+
+Use this persona when asked to review code, patches, or pull requests.
+
+- Lead with findings, not summaries.
+- Order findings by severity and include precise file and line references when available.
+- Focus on correctness, spec compliance, API compatibility, concurrency safety, resilience, performance regressions, missing tests, missing benchmarks, documentation gaps, and changelog gaps.
+- Call out when a diff is broader than necessary.
+- If you find no issues, say that explicitly and note any residual risks or verification gaps.
diff --git a/vendor/go.opentelemetry.io/otel/CHANGELOG.md b/vendor/go.opentelemetry.io/otel/CHANGELOG.md
index 20edda4418c0..6a90451f5266 100644
--- a/vendor/go.opentelemetry.io/otel/CHANGELOG.md
+++ b/vendor/go.opentelemetry.io/otel/CHANGELOG.md
@@ -11,6 +11,100 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
+## [1.44.0/0.66.0/0.20.0/0.0.17] 2026-05-27
+
+### Added
+
+- Add `ByteSlice` and `ByteSliceValue` functions for new `BYTESLICE` attribute type in `go.opentelemetry.io/otel/attribute`. (#7948)
+- Apply attribute value limit to the `KindBytes` attribute type in `go.opentelemetry.io/otel/sdk/log`. (#7990)
+- Apply attribute value limit to the `BYTESLICE` attribute type in `go.opentelemetry.io/otel/sdk/trace`. (#7990)
+- Support `BYTESLICE` attributes in `go.opentelemetry.io/otel/trace`. (#8153)
+- Support `BYTESLICE` attributes in `go.opentelemetry.io/otel/exporters/otlp/otlptrace`. (#8153)
+- Support `BYTESLICE` attributes in `go.opentelemetry.io/otel/exporters/otlp/otlplog`. (#8153)
+- Support `BYTESLICE` attributes in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#8153)
+- Support `BYTESLICE` attributes in `go.opentelemetry.io/otel/exporters/zipkin`. (#8153)
+- Add `String` method for `Value` type in `go.opentelemetry.io/otel/attribute`. (#8142)
+- Add `Slice` and `SliceValue` functions for new `SLICE` attribute type in `go.opentelemetry.io/otel/attribute`. (#8166)
+- Support `SLICE` attributes in `go.opentelemetry.io/otel/exporters/otlp/otlptrace`. (#8216)
+- Support `SLICE` attributes in `go.opentelemetry.io/otel/exporters/otlp/otlplog`. (#8216)
+- Support `SLICE` attributes in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#8216)
+- Support `SLICE` attributes in `go.opentelemetry.io/otel/exporters/zipkin`. (#8216)
+- Apply `AttributeValueLengthLimit` to `attribute.SLICE` type attribute values in `go.opentelemetry.io/otel/sdk/trace`, recursively truncating contained string values. (#8217)
+- Add `Error` field on `Record` type in `go.opentelemetry.io/otel/log/logtest`. (#8148)
+- Add `WithMaxRequestSize` option in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#8157)
+- Add `WithMaxRequestSize` option in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#8157)
+- Add `WithMaxRequestSize` option in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#8157)
+- Add `WithMaxRequestSize` option in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#8157)
+- Add `WithMaxRequestSize` option in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#8157)
+- Add `WithMaxRequestSize` option in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#8157)
+- Add `Settable` to `go.opentelemetry.io/otel/metric/x` to allow reusing attribute options. (#8178)
+- Add experimental support for splitting metric data across multiple batches in `go.opentelemetry.io/otel/sdk/metric`.
+ Set `OTEL_GO_X_METRIC_EXPORT_BATCH_SIZE=` to enable for all periodic readers.
+ See `go.opentelemetry.io/otel/sdk/metric/internal/x` for feature documentation. (#8071)
+- Add experimental self-observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`.
+ Enable with `OTEL_GO_X_SELF_OBSERVABILITY=true` environment variable.
+ See `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/x` for feature documentation. (#8192)
+- Add experimental self-observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`.
+ Enable with `OTEL_GO_X_SELF_OBSERVABILITY=true` environment variable.
+ See `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/x` for feature documentation. (#8194)
+- Add experimental self-observability metrics in `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`.
+ Enable with `OTEL_GO_X_SELF_OBSERVABILITY=true` environment variable.
+ See `go.opentelemetry.io/otel/stdout/stdoutlog/internal/x` for feature documentation. (#8263)
+- Add `WithDefaultAttributes` to `go.opentelemetry.io/otel/metric/x` to support setting default attributes on instruments. (#8135)
+- Add `go.opentelemetry.io/otel/semconv/v1.41.0` package.
+ The package contains semantic conventions from the `v1.41.0` version of the OpenTelemetry Semantic Conventions.
+ See the [migration documentation](./semconv/v1.41.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.40.0`. (#8324)
+- Add Observable variants of instruments to `go.opentelemetry.io/otel/semconv/v1.41.0` package. (#8350)
+- Generate explicit histogram bucket boundaries from weaver configuration for HTTP and RPC duration instruments in `go.opentelemetry.io/otel/semconv/v1.41.0`. (#8002)
+
+### Changed
+
+- ⚠️ **Breaking Change:** `go.opentelemetry.io/otel/sdk/metric` now applies a default cardinality limit of 2000 to comply with the Metrics SDK specification recommendation.
+ New attribute sets are dropped when the cardinality limit is reached. The measurement of these sets are aggregated into a special attribute set containing `attribute.Bool("otel.metric.overflow", true)`.
+ This can break users who relied on the previous unlimited default.
+ Set `WithCardinalityLimit(0)` or the deprecated `OTEL_GO_X_CARDINALITY_LIMIT=0` environment variable to preserve unlimited cardinality.
+ Note that support for `OTEL_GO_X_CARDINALITY_LIMIT` may be removed in a future release. (#8247)
+- `ErrorType` in `go.opentelemetry.io/otel/semconv` now unwraps errors created with `fmt.Errorf` when deriving the `error.type` attribute. (#8133)
+- `go.opentelemetry.io/otel/sdk/log` now unwraps error chains created with `fmt.Errorf` when deriving the `error.type` attribute from errors on log records. (#8133)
+- `Set.MarshalLog` method in `go.opentelemetry.io/otel/attribute` now uses `Value.String` formatting following the [OpenTelemetry AnyValue representation for non-OTLP protocols](https://opentelemetry.io/docs/specs/otel/common/#anyvalue). (#8169)
+- Optimize `go.opentelemetry.io/otel/sdk/metric` to return a drop reservoir and short-circuit `Offer` calls to the exemplar reservoir when `exemplar.AlwaysOffFilter` is configured. (#8211) (#8267)
+- Optimize `go.opentelemetry.io/otel/sdk/metric` to return a drop reservoir for asynchronous instruments when `exemplar.TraceBasedFilter` is configured. (#8286)
+
+### Deprecated
+
+- Deprecate `Value.Emit` method in `go.opentelemetry.io/otel/attribute`.
+ Use `Value.String` instead. (#8176)
+
+### Fixed
+
+- Limit OTLP request size to 64 MiB by default in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`.
+ The limit applies before compression, oversized requests are treated as non-retryable errors, and the limit can be configured with the new `WithMaxRequestSize` option. (#8157, #8365)
+- Limit OTLP request size to 64 MiB by default in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`.
+ The limit applies before compression, oversized requests are treated as non-retryable errors, and the limit can be configured with the new `WithMaxRequestSize` option. (#8157, #8365)
+- Limit OTLP request size to 64 MiB by default in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`.
+ The limit applies before compression, oversized requests are treated as non-retryable errors, and the limit can be configured with the new `WithMaxRequestSize` option. (#8157, #8365)
+- Limit OTLP request size to 64 MiB by default in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`.
+ The limit applies before compression, oversized requests are treated as non-retryable errors, and the limit can be configured with the new `WithMaxRequestSize` option. (#8157, #8365)
+- Limit OTLP request size to 64 MiB by default in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`.
+ The limit applies before compression, oversized requests are treated as non-retryable errors, and the limit can be configured with the new `WithMaxRequestSize` option. (#8157, #8365)
+- Limit OTLP request size to 64 MiB by default in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`.
+ The limit applies before compression, oversized requests are treated as non-retryable errors, and the limit can be configured with the new `WithMaxRequestSize` option. (#8157, #8365)
+- Fix gzipped request body replay on redirect in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#8135)
+- Fix gzipped request body replay on redirect in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#8152)
+- `go.opentelemetry.io/otel/exporters/prometheus` now uses `Value.String` formatting for label values following the [OpenTelemetry AnyValue representation for non-OTLP protocols](https://opentelemetry.io/docs/specs/otel/common/#anyvalue). (#8170)
+- Propagate errors from the exporter when calling `Shutdown` on `BatchSpanProcessor` in `go.opentelemetry.io/otel/sdk/trace`. (#8197)
+- Fix stale status code reporting on self-observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` and `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#8226)
+- Fix a concurrent `Collect` data race and potential panic in `go.opentelemetry.io/otel/exporters/prometheus` when `WithResourceAsConstantLabels` option is used. (#8227)
+- Fix race condition in `FixedSizeReservoir` in `go.opentelemetry.io/otel/sdk/metric/exemplar` by reverting #7447. (#8249)
+- Fix `FixedSizeReservoir` in `go.opentelemetry.io/otel/sdk/metric/exemplar` to safely handle zero size.
+ A capacity check in the constructor initializes the reservoir safely and skips initialization for zero-cap; early returns in `Offer()` and `Collect()` ensure no-op behavior. (#8295)
+- Fix counting of spans and logs in self-observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`, `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`, `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`, and `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#8254)
+- Drop conflicting scope attributes named `name`, `version`, or `schema_url` from metric labels in `go.opentelemetry.io/otel/exporters/prometheus`, preserving the dedicated `otel_scope_name`, `otel_scope_version`, and `otel_scope_schema_url` labels. (#8264)
+- Close schema files opened by `ParseFile` in `go.opentelemetry.io/otel/schema/v1.0` and `go.opentelemetry.io/otel/schema/v1.1`. ([GHSA-995v-fvrw-c78m](https://github.com/open-telemetry/opentelemetry-go/security/advisories/GHSA-995v-fvrw-c78m))
+- Enforce the 8192-byte baggage size limit during extraction/parsing, changing behavior when the limit is exceeded in `go.opentelemetry.io/otel/baggage` and `go.opentelemetry.io/otel/propagation`. (#8222)
+- Fix `go.opentelemetry.io/otel/semconv/v1.41.0` to include `Attr*` helper methods for required attributes on observable instruments. (#8361)
+- Limit baggage extraction error reporting in `go.opentelemetry.io/otel/propagation` to prevent malformed or oversized baggage headers from flooding logs. ([GHSA-5wrp-cwcj-q835](https://github.com/open-telemetry/opentelemetry-go/security/advisories/GHSA-5wrp-cwcj-q835))
+
## [1.43.0/0.65.0/0.19.0] 2026-04-02
### Added
@@ -3619,7 +3713,8 @@ It contains api and sdk for trace and meter.
- CircleCI build CI manifest files.
- CODEOWNERS file to track owners of this project.
-[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.43.0...HEAD
+[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.44.0...HEAD
+[1.44.0/0.66.0/0.20.0/0.0.17]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.44.0
[1.43.0/0.65.0/0.19.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.43.0
[1.42.0/0.64.0/0.18.0/0.0.16]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.42.0
[1.41.0/0.63.0/0.17.0/0.0.15]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.41.0
diff --git a/vendor/go.opentelemetry.io/otel/CLAUDE.md b/vendor/go.opentelemetry.io/otel/CLAUDE.md
new file mode 100644
index 000000000000..dd3c4594fc15
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/CLAUDE.md
@@ -0,0 +1,3 @@
+# Instructions for Claude Code
+
+@AGENTS.md
diff --git a/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md b/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md
index 12de3607a342..3ec17d6832bd 100644
--- a/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md
+++ b/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md
@@ -11,6 +11,12 @@ for a summary description of past meetings. To request edit access,
join the meeting or get in touch on
[Slack](https://cloud-native.slack.com/archives/C01NPAXACKT).
+The meeting is open for all to join. We invite everyone to join our
+meeting, regardless of your experience level. Whether you're a
+seasoned OpenTelemetry developer, just starting your journey, or
+simply curious about the work we do, you're more than welcome to
+participate!
+
## Development
You can view and edit the source code by cloning this repository:
@@ -746,8 +752,8 @@ Encapsulate setup in constructor functions, ensuring clear ownership and scope:
import (
"errors"
- semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
- "go.opentelemetry.io/otel/semconv/v1.40.0/otelconv"
+ semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
+ "go.opentelemetry.io/otel/semconv/v1.41.0/otelconv"
)
type SDKComponent struct {
@@ -808,11 +814,11 @@ func (c *Component) initObservability() {
#### Performance
-When observability is disabled there should be little to no overhead.
+When observability is disabled or the instrument is not `Enabled`, there should be little to no overhead.
```go
func (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) error {
- if e.inst != nil {
+ if e.inst != nil && e.inst.Enabled(ctx) {
attrs := expensiveOperation()
e.inst.recordSpanInflight(ctx, int64(len(spans)), attrs...)
}
@@ -829,7 +835,7 @@ func (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan)
}
func (i *instrumentation) recordSpanInflight(ctx context.Context, count int64, attrs ...attribute.KeyValue) {
- if i == nil || i.inflight == nil {
+ if i == nil || i.inflight == nil || !i.inflight.Enabled(ctx) {
return
}
i.inflight.Add(ctx, count, metric.WithAttributes(attrs...))
@@ -865,8 +871,12 @@ var (
)
func (i *instrumentation) record(ctx context.Context, value int64, baseAttrs ...attribute.KeyValue) {
+ if !i.counter.Enabled(ctx) {
+ return
+ }
attrs := attrPool.Get().(*[]attribute.KeyValue)
defer func() {
+ clear(*attrs) // Clear references to strings/etc to let GC collect them.
*attrs = (*attrs)[:0] // Reset.
attrPool.Put(attrs)
}()
@@ -877,6 +887,7 @@ func (i *instrumentation) record(ctx context.Context, value int64, baseAttrs ...
addOpt := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*addOpt)
*addOpt = (*addOpt)[:0]
addOptPool.Put(addOpt)
}()
@@ -1007,16 +1018,20 @@ Ensure observability measurements receive the correct context, especially for tr
```go
func (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) error {
// Use the provided context for observability measurements
- e.inst.recordSpanExportStarted(ctx, len(spans))
+ if e.inst.Enabled(ctx) {
+ e.inst.recordSpanExportStarted(ctx, len(spans))
+ }
err := e.doExport(ctx, spans)
- if err != nil {
- e.inst.recordSpanExportFailed(ctx, len(spans), err)
- } else {
- e.inst.recordSpanExportSucceeded(ctx, len(spans))
+ if e.inst.Enabled(ctx) {
+ if err != nil {
+ e.inst.recordSpanExportFailed(ctx, len(spans), err)
+ } else {
+ e.inst.recordSpanExportSucceeded(ctx, len(spans))
+ }
}
-
+
return err
}
```
@@ -1039,7 +1054,7 @@ func (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan)
All observability metrics should follow the [OpenTelemetry Semantic Conventions for SDK metrics](https://github.com/open-telemetry/semantic-conventions/blob/1cf2476ae5e518225a766990a28a6d5602bd5a30/docs/otel/sdk-metrics.md).
-Use the metric semantic conventions convenience package [otelconv](./semconv/v1.40.0/otelconv/metric.go).
+Use the metric semantic conventions convenience package [otelconv](./semconv/v1.41.0/otelconv/metric.go).
##### Component Identification
@@ -1109,6 +1124,68 @@ func TestObservability(t *testing.T) {
Test order should not affect results.
Ensure that any global state (e.g. component ID counters) is reset between tests.
+### Experimental Features
+
+To support the development of new features in the specification, we use the following patterns to implement in-development features without adding new public artifacts in stable modules.
+
+#### Experimental behavior with no API artifacts
+
+Features that change behavior without changing the API (e.g., exemplar collection, auto-generation of identifiers) are implemented behind a feature gate.
+The implementation resides in an `/internal/x` package and is activated through environment variables with the `OTEL_GO_X_` prefix (e.g., `OTEL_GO_X_OBSERVABILITY`).
+The feature must be documented in a `README.md` file in the `/internal/x` package.
+
+#### Experimental methods on SDK-only interfaces
+
+Features that require new methods on SDK interfaces are defined as a new interface in an experimental module (e.g., `go.opentelemetry.io/otel/sdk/x`).
+The SDK uses type assertions (without importing the unstable package) to check if passing types implement these experimental interfaces.
+The SDK must not depend on the experimental module.
+
+#### Experimental structs, functions, or interfaces
+
+Features that don't need any changes to the existing stable package are implemented in an experimental module (e.g., `go.opentelemetry.io/otel/sdk/x`).
+
+#### Experimental signals and components
+
+New telemetry signals (e.g., Logs before stabilization) and components (e.g. bridges) are hosted in new, unstable modules (e.g., `go.opentelemetry.io/otel/log` before 1.0.0).
+The package should have the final name it will use once stabilized (i.e. not `/x`), and is released at a v0.x.y version to indicate it is not stable.
+Most new components are hosted in [opentelemetry-go-contrib](https://github.com/open-telemetry/opentelemetry-go-contrib).
+
+#### Experimental options for API or SDK functions
+
+Experimental Options functions are implemented in an experimental module (e.g., `go.opentelemetry.io/otel/sdk/x`).
+The return type of the Option function must embed the option's type (e.g. `metric.InstrumentOption`), and have an `Experimental()` method to prevent the API from panicking when the option is used.
+The SDK uses type assertions (without importing the unstable package) to check if passing types implement these experimental interfaces.
+The SDK must not depend on the experimental module.
+
+For example:
+
+```go
+type myOption struct {
+ // Embed the stable option type.
+ metric.InstrumentOption
+ value string
+}
+
+// Experimental prevents the API from panicking when the option is used.
+func (o myOption) Experimental() {}
+
+// The SDK can use type assertions to use this function.
+func (o myOption) Value() string { return o.value }
+
+func WithMyOption(value string) metric.InstrumentOption {
+ return myOption{value: value}
+}
+```
+
+#### Not Supported
+
+The following kinds of experimental features are **not currently supported** on stable interfaces:
+
+- Experimental methods on API interfaces
+- Experimental fields for API or SDK exported structs
+
+In some cases forks or long-lived branches may be used for prototyping these features.
+
## Approvers and Maintainers
### Maintainers
diff --git a/vendor/go.opentelemetry.io/otel/Makefile b/vendor/go.opentelemetry.io/otel/Makefile
index 42466f2d6a1e..de63a5e9bc94 100644
--- a/vendor/go.opentelemetry.io/otel/Makefile
+++ b/vendor/go.opentelemetry.io/otel/Makefile
@@ -191,8 +191,16 @@ benchmark: $(OTEL_GO_MOD_DIRS:%=benchmark/%)
benchmark/%:
cd $* && $(GO) test -run='^$$' -bench=. $(ARGS) ./...
+# sdk/metric is split into two shards to work around CodSpeed limitations.
+# See https://github.com/CodSpeedHQ/codspeed-go/issues/56
+BENCHMARK_SHARDS := $(filter-out ./sdk/metric,$(OTEL_GO_MOD_DIRS)) ./sdk/metric/root ./sdk/metric/internal
+benchmark/./sdk/metric/root:
+ cd ./sdk/metric && $(GO) test -run='^$$' -bench=. $(ARGS) . ./exemplar/...
+benchmark/./sdk/metric/internal:
+ cd ./sdk/metric && $(GO) test -run='^$$' -bench=. $(ARGS) ./internal/...
+
print-sharded-benchmarks:
- @echo $(OTEL_GO_MOD_DIRS) | jq -cR 'split(" ")'
+ @echo $(BENCHMARK_SHARDS) | jq -cR 'split(" ")'
.PHONY: golangci-lint golangci-lint-fix
golangci-lint-fix: ARGS=--fix
diff --git a/vendor/go.opentelemetry.io/otel/attribute/encoder.go b/vendor/go.opentelemetry.io/otel/attribute/encoder.go
index 771dd69c55e0..ca186d8ac2f0 100644
--- a/vendor/go.opentelemetry.io/otel/attribute/encoder.go
+++ b/vendor/go.opentelemetry.io/otel/attribute/encoder.go
@@ -105,7 +105,9 @@ func (d *defaultAttrEncoder) Encode(iter Iterator) string {
if keyValue.Value.Type() == STRING {
copyAndEscape(buf, keyValue.Value.AsString())
} else {
- _, _ = buf.WriteString(keyValue.Value.Emit())
+ _, _ = buf.WriteString(
+ keyValue.Value.Emit(),
+ ) //nolint:staticcheck // Preserve the existing default encoder output.
}
}
return buf.String()
diff --git a/vendor/go.opentelemetry.io/otel/attribute/hash.go b/vendor/go.opentelemetry.io/otel/attribute/hash.go
index b09caaa6d7ce..92f39ffe7b19 100644
--- a/vendor/go.opentelemetry.io/otel/attribute/hash.go
+++ b/vendor/go.opentelemetry.io/otel/attribute/hash.go
@@ -27,6 +27,8 @@ const (
int64SliceID uint64 = 3762322556277578591 // "_[]int64" (little endian)
float64SliceID uint64 = 7308324551835016539 // "[]double" (little endian)
stringSliceID uint64 = 7453010373645655387 // "[]string" (little endian)
+ byteSliceID uint64 = 6874028470941080415 // "_[]byte_" (little endian)
+ sliceID uint64 = 7883494272577650031 // "__slice_" (little endian)
emptyID uint64 = 7305809155345288421 // "__empty_" (little endian)
)
@@ -42,53 +44,87 @@ func hashKVs(kvs []KeyValue) uint64 {
// hashKV returns the xxHash64 hash of kv with h as the base.
func hashKV(h xxhash.Hash, kv KeyValue) xxhash.Hash {
h = h.String(string(kv.Key))
+ return hashValue(h, kv.Value)
+}
- switch kv.Value.Type() {
+func hashValue(h xxhash.Hash, v Value) xxhash.Hash {
+ switch v.Type() {
case BOOL:
h = h.Uint64(boolID)
- h = h.Uint64(kv.Value.numeric)
+ h = h.Uint64(v.numeric)
case INT64:
h = h.Uint64(int64ID)
- h = h.Uint64(kv.Value.numeric)
+ h = h.Uint64(v.numeric)
case FLOAT64:
h = h.Uint64(float64ID)
// Assumes numeric stored with math.Float64bits.
- h = h.Uint64(kv.Value.numeric)
+ h = h.Uint64(v.numeric)
case STRING:
h = h.Uint64(stringID)
- h = h.String(kv.Value.stringly)
+ h = h.String(v.stringly)
case BOOLSLICE:
h = h.Uint64(boolSliceID)
- rv := reflect.ValueOf(kv.Value.slice)
+ rv := reflect.ValueOf(v.slice)
for i := 0; i < rv.Len(); i++ {
h = h.Bool(rv.Index(i).Bool())
}
case INT64SLICE:
h = h.Uint64(int64SliceID)
- rv := reflect.ValueOf(kv.Value.slice)
+ rv := reflect.ValueOf(v.slice)
for i := 0; i < rv.Len(); i++ {
h = h.Int64(rv.Index(i).Int())
}
case FLOAT64SLICE:
h = h.Uint64(float64SliceID)
- rv := reflect.ValueOf(kv.Value.slice)
+ rv := reflect.ValueOf(v.slice)
for i := 0; i < rv.Len(); i++ {
h = h.Float64(rv.Index(i).Float())
}
case STRINGSLICE:
h = h.Uint64(stringSliceID)
- rv := reflect.ValueOf(kv.Value.slice)
+ rv := reflect.ValueOf(v.slice)
for i := 0; i < rv.Len(); i++ {
h = h.String(rv.Index(i).String())
}
+ case BYTESLICE:
+ h = h.Uint64(byteSliceID)
+ h = h.String(v.stringly)
+ case SLICE:
+ h = h.Uint64(sliceID)
+ switch vals := v.slice.(type) {
+ case [0]Value:
+ // No values to hash, but the type identifier is still hashed above.
+ case [1]Value:
+ h = hashValueSlice(h, vals[:])
+ case [2]Value:
+ h = hashValueSlice(h, vals[:])
+ case [3]Value:
+ h = hashValueSlice(h, vals[:])
+ case [4]Value:
+ h = hashValueSlice(h, vals[:])
+ case [5]Value:
+ h = hashValueSlice(h, vals[:])
+ default:
+ rv := reflect.ValueOf(v.slice)
+ for i := 0; i < rv.Len(); i++ {
+ h = hashValue(h, rv.Index(i).Interface().(Value))
+ }
+ }
case EMPTY:
h = h.Uint64(emptyID)
default:
// Logging is an alternative, but using the internal logger here
// causes an import cycle so it is not done.
- v := kv.Value.AsInterface()
- msg := fmt.Sprintf("unknown value type: %[1]v (%[1]T)", v)
+ val := v.AsInterface()
+ msg := fmt.Sprintf("unknown value type: %[1]v (%[1]T)", val)
panic(msg)
}
return h
}
+
+func hashValueSlice(h xxhash.Hash, vals []Value) xxhash.Hash {
+ for _, v := range vals {
+ h = hashValue(h, v)
+ }
+ return h
+}
diff --git a/vendor/go.opentelemetry.io/otel/attribute/key.go b/vendor/go.opentelemetry.io/otel/attribute/key.go
index 80a9e5643f6a..cdc7089e8273 100644
--- a/vendor/go.opentelemetry.io/otel/attribute/key.go
+++ b/vendor/go.opentelemetry.io/otel/attribute/key.go
@@ -117,6 +117,28 @@ func (k Key) StringSlice(v []string) KeyValue {
}
}
+// ByteSlice creates a KeyValue instance with a BYTESLICE Value.
+//
+// If creating both a key and value at the same time, use the provided
+// convenience function instead -- ByteSlice(name, value).
+func (k Key) ByteSlice(v []byte) KeyValue {
+ return KeyValue{
+ Key: k,
+ Value: ByteSliceValue(v),
+ }
+}
+
+// Slice creates a KeyValue instance with a SLICE Value.
+//
+// If creating both a key and value at the same time, use the provided
+// convenience function instead -- Slice(name, values...).
+func (k Key) Slice(v ...Value) KeyValue {
+ return KeyValue{
+ Key: k,
+ Value: SliceValue(v...),
+ }
+}
+
// Defined reports whether the key is not empty.
func (k Key) Defined() bool {
return len(k) != 0
diff --git a/vendor/go.opentelemetry.io/otel/attribute/kv.go b/vendor/go.opentelemetry.io/otel/attribute/kv.go
index 0cc368018be1..eeb76a1348f1 100644
--- a/vendor/go.opentelemetry.io/otel/attribute/kv.go
+++ b/vendor/go.opentelemetry.io/otel/attribute/kv.go
@@ -68,6 +68,16 @@ func StringSlice(k string, v []string) KeyValue {
return Key(k).StringSlice(v)
}
+// ByteSlice creates a KeyValue with a BYTESLICE Value type.
+func ByteSlice(k string, v []byte) KeyValue {
+ return Key(k).ByteSlice(v)
+}
+
+// Slice creates a KeyValue with a SLICE Value type.
+func Slice(k string, v ...Value) KeyValue {
+ return Key(k).Slice(v...)
+}
+
// Stringer creates a new key-value pair with a passed name and a string
// value generated by the passed Stringer interface.
func Stringer(k string, v fmt.Stringer) KeyValue {
diff --git a/vendor/go.opentelemetry.io/otel/attribute/set.go b/vendor/go.opentelemetry.io/otel/attribute/set.go
index 6572c98b12dc..a4b6ce81dec1 100644
--- a/vendor/go.opentelemetry.io/otel/attribute/set.go
+++ b/vendor/go.opentelemetry.io/otel/attribute/set.go
@@ -401,7 +401,7 @@ func computeDataFixed(kvs []KeyValue) any {
func computeDataReflect(kvs []KeyValue) any {
at := reflect.New(reflect.ArrayOf(len(kvs), keyValueType)).Elem()
for i, keyValue := range kvs {
- *(at.Index(i).Addr().Interface().(*KeyValue)) = keyValue
+ *at.Index(i).Addr().Interface().(*KeyValue) = keyValue
}
return at.Interface()
}
@@ -415,7 +415,7 @@ func (l *Set) MarshalJSON() ([]byte, error) {
func (l Set) MarshalLog() any {
kvs := make(map[string]string)
for _, kv := range l.ToSlice() {
- kvs[string(kv.Key)] = kv.Value.Emit()
+ kvs[string(kv.Key)] = kv.Value.String()
}
return kvs
}
diff --git a/vendor/go.opentelemetry.io/otel/attribute/type_string.go b/vendor/go.opentelemetry.io/otel/attribute/type_string.go
index 6c04448d6f0d..dbc01d3247ef 100644
--- a/vendor/go.opentelemetry.io/otel/attribute/type_string.go
+++ b/vendor/go.opentelemetry.io/otel/attribute/type_string.go
@@ -17,11 +17,13 @@ func _() {
_ = x[INT64SLICE-6]
_ = x[FLOAT64SLICE-7]
_ = x[STRINGSLICE-8]
+ _ = x[BYTESLICE-9]
+ _ = x[SLICE-10]
}
-const _Type_name = "EMPTYBOOLINT64FLOAT64STRINGBOOLSLICEINT64SLICEFLOAT64SLICESTRINGSLICE"
+const _Type_name = "EMPTYBOOLINT64FLOAT64STRINGBOOLSLICEINT64SLICEFLOAT64SLICESTRINGSLICEBYTESLICESLICE"
-var _Type_index = [...]uint8{0, 5, 9, 14, 21, 27, 36, 46, 58, 69}
+var _Type_index = [...]uint8{0, 5, 9, 14, 21, 27, 36, 46, 58, 69, 78, 83}
func (i Type) String() string {
idx := int(i) - 0
diff --git a/vendor/go.opentelemetry.io/otel/attribute/value.go b/vendor/go.opentelemetry.io/otel/attribute/value.go
index db04b1326c3e..0529fefae237 100644
--- a/vendor/go.opentelemetry.io/otel/attribute/value.go
+++ b/vendor/go.opentelemetry.io/otel/attribute/value.go
@@ -4,9 +4,14 @@
package attribute // import "go.opentelemetry.io/otel/attribute"
import (
+ "encoding/base64"
"encoding/json"
"fmt"
+ "math"
+ "reflect"
"strconv"
+ "strings"
+ "unicode/utf8"
attribute "go.opentelemetry.io/otel/attribute/internal"
)
@@ -45,6 +50,10 @@ const (
FLOAT64SLICE
// STRINGSLICE is a slice of strings Type Value.
STRINGSLICE
+ // BYTESLICE is a slice of bytes Type Value.
+ BYTESLICE
+ // SLICE is a slice of Value Type values.
+ SLICE
// INVALID is used for a Value with no value set.
//
// Deprecated: Use EMPTY instead as an empty value is a valid value.
@@ -134,6 +143,19 @@ func StringSliceValue(v []string) Value {
return Value{vtype: STRINGSLICE, slice: attribute.SliceValue(v)}
}
+// ByteSliceValue creates a BYTESLICE Value.
+func ByteSliceValue(v []byte) Value {
+ return Value{
+ vtype: BYTESLICE,
+ stringly: string(v),
+ }
+}
+
+// SliceValue creates a SLICE Value.
+func SliceValue(v ...Value) Value {
+ return Value{vtype: SLICE, slice: sliceValue(v)}
+}
+
// Type returns a type of the Value.
func (v Value) Type() Type {
return v.vtype
@@ -215,6 +237,59 @@ func (v Value) asStringSlice() []string {
return attribute.AsSlice[string](v.slice)
}
+// AsSlice returns the []Value value. Make sure that the Value's type is
+// SLICE.
+func (v Value) AsSlice() []Value {
+ if v.vtype != SLICE {
+ return nil
+ }
+ return v.asSlice()
+}
+
+func (v Value) asSlice() []Value {
+ switch vals := v.slice.(type) {
+ case [0]Value:
+ return []Value{}
+ case [1]Value:
+ return []Value{vals[0]}
+ case [2]Value:
+ return []Value{vals[0], vals[1]}
+ case [3]Value:
+ return []Value{vals[0], vals[1], vals[2]}
+ case [4]Value:
+ return []Value{vals[0], vals[1], vals[2], vals[3]}
+ case [5]Value:
+ return []Value{vals[0], vals[1], vals[2], vals[3], vals[4]}
+ default:
+ return asValueSliceReflect(v.slice)
+ }
+}
+
+func asValueSliceReflect(v any) []Value {
+ rv := reflect.ValueOf(v)
+ if !rv.IsValid() || rv.Kind() != reflect.Array || rv.Type().Elem() != reflect.TypeFor[Value]() {
+ return nil
+ }
+ cpy := make([]Value, rv.Len())
+ if len(cpy) > 0 {
+ _ = reflect.Copy(reflect.ValueOf(cpy), rv)
+ }
+ return cpy
+}
+
+// AsByteSlice returns the bytes value. Make sure that the Value's type
+// is BYTESLICE.
+func (v Value) AsByteSlice() []byte {
+ if v.vtype != BYTESLICE {
+ return nil
+ }
+ return v.asByteSlice()
+}
+
+func (v Value) asByteSlice() []byte {
+ return []byte(v.stringly)
+}
+
type unknownValueType struct{}
// AsInterface returns Value's data as any.
@@ -236,13 +311,60 @@ func (v Value) AsInterface() any {
return v.stringly
case STRINGSLICE:
return v.asStringSlice()
+ case BYTESLICE:
+ return v.asByteSlice()
+ case SLICE:
+ return v.asSlice()
case EMPTY:
return nil
}
return unknownValueType{}
}
+// String returns a string representation of Value using the
+// [OpenTelemetry AnyValue representation for non-OTLP protocols] rules.
+//
+// Strings are returned as-is without JSON quoting, booleans and integers use
+// JSON literals, floating-point values use JSON numbers except that NaN and
+// ±Inf are rendered as NaN, Infinity, and -Infinity, byte slices are
+// base64-encoded, empty values are the empty string, and slices are encoded as
+// JSON arrays. String, byte, and special floating-point values inside arrays
+// are encoded as JSON strings, and empty values inside arrays are encoded as
+// null.
+//
+// [OpenTelemetry AnyValue representation for non-OTLP protocols]: https://opentelemetry.io/docs/specs/otel/common/#anyvalue-representation-for-non-otlp-protocols
+func (v Value) String() string {
+ switch v.Type() {
+ case BOOL:
+ return strconv.FormatBool(v.AsBool())
+ case BOOLSLICE:
+ return formatBoolSliceValue(v.slice)
+ case INT64:
+ return strconv.FormatInt(v.AsInt64(), 10)
+ case INT64SLICE:
+ return formatInt64SliceValue(v.slice)
+ case FLOAT64:
+ return formatFloat64(v.AsFloat64())
+ case FLOAT64SLICE:
+ return formatFloat64SliceValue(v.slice)
+ case STRING:
+ return v.stringly
+ case STRINGSLICE:
+ return formatStringSliceValue(v.slice)
+ case BYTESLICE:
+ return formatByteSlice(v.stringly)
+ case SLICE:
+ return formatValueSliceValue(v.slice)
+ case EMPTY:
+ return ""
+ default:
+ return "unknown"
+ }
+}
+
// Emit returns a string representation of Value's data.
+//
+// Deprecated: Use [Value.String] instead.
func (v Value) Emit() string {
switch v.Type() {
case BOOLSLICE:
@@ -273,6 +395,10 @@ func (v Value) Emit() string {
return string(j)
case STRING:
return v.stringly
+ case BYTESLICE:
+ return formatByteSlice(v.stringly)
+ case SLICE:
+ return formatValueSliceValue(v.slice)
case EMPTY:
return ""
default:
@@ -280,6 +406,622 @@ func (v Value) Emit() string {
}
}
+const (
+ jsonArrayBracketsLen = len("[]")
+ boolArrayElemMaxLen = len("false")
+ int64ArrayElemMaxLen = len("-9223372036854775808")
+ float64ArrayElemMaxLen = len("-1.7976931348623157e+308")
+ commaLen = len(",")
+)
+
+func sliceValue(v []Value) any {
+ switch len(v) {
+ case 0:
+ return [0]Value{}
+ case 1:
+ return [1]Value{v[0]}
+ case 2:
+ return [2]Value{v[0], v[1]}
+ case 3:
+ return [3]Value{v[0], v[1], v[2]}
+ case 4:
+ return [4]Value{v[0], v[1], v[2], v[3]}
+ case 5:
+ return [5]Value{v[0], v[1], v[2], v[3], v[4]}
+ default:
+ return sliceValueReflect(v)
+ }
+}
+
+func sliceValueReflect(v []Value) any {
+ cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeFor[Value]())).Elem()
+ reflect.Copy(cp, reflect.ValueOf(v))
+ return cp.Interface()
+}
+
+func formatBoolSliceValue(v any) string {
+ switch vals := v.(type) {
+ case [0]bool:
+ return "[]"
+ case [1]bool:
+ return formatBoolSlice(vals[:])
+ case [2]bool:
+ return formatBoolSlice(vals[:])
+ case [3]bool:
+ return formatBoolSlice(vals[:])
+ default:
+ return formatBoolSliceReflect(v)
+ }
+}
+
+func formatBoolSlice(vals []bool) string {
+ var b strings.Builder
+ appendBoolSlice(&b, vals)
+ return b.String()
+}
+
+func formatBoolSliceReflect(v any) string {
+ var b strings.Builder
+ appendBoolSliceReflect(&b, reflect.ValueOf(v))
+ return b.String()
+}
+
+func appendBoolSliceValue(dst *strings.Builder, v any) {
+ switch vals := v.(type) {
+ case [0]bool:
+ _, _ = dst.WriteString("[]")
+ case [1]bool:
+ appendBoolSlice(dst, vals[:])
+ case [2]bool:
+ appendBoolSlice(dst, vals[:])
+ case [3]bool:
+ appendBoolSlice(dst, vals[:])
+ default:
+ appendBoolSliceReflect(dst, reflect.ValueOf(v))
+ }
+}
+
+func appendBoolSlice(dst *strings.Builder, vals []bool) {
+ dst.Grow(jsonArrayBracketsLen + len(vals)*(boolArrayElemMaxLen+commaLen))
+ _ = dst.WriteByte('[')
+ for i, val := range vals {
+ if i > 0 {
+ _ = dst.WriteByte(',')
+ }
+ if val {
+ _, _ = dst.WriteString("true")
+ } else {
+ _, _ = dst.WriteString("false")
+ }
+ }
+ _ = dst.WriteByte(']')
+}
+
+func appendBoolSliceReflect(dst *strings.Builder, rv reflect.Value) {
+ dst.Grow(jsonArrayBracketsLen + rv.Len()*(boolArrayElemMaxLen+commaLen))
+ _ = dst.WriteByte('[')
+ for i := 0; i < rv.Len(); i++ {
+ if i > 0 {
+ _ = dst.WriteByte(',')
+ }
+ if rv.Index(i).Bool() {
+ _, _ = dst.WriteString("true")
+ } else {
+ _, _ = dst.WriteString("false")
+ }
+ }
+ _ = dst.WriteByte(']')
+}
+
+func formatInt64SliceValue(v any) string {
+ switch vals := v.(type) {
+ case [0]int64:
+ return "[]"
+ case [1]int64:
+ return formatInt64Slice(vals[:])
+ case [2]int64:
+ return formatInt64Slice(vals[:])
+ case [3]int64:
+ return formatInt64Slice(vals[:])
+ default:
+ return formatInt64SliceReflect(v)
+ }
+}
+
+func formatInt64Slice(vals []int64) string {
+ var b strings.Builder
+ appendInt64Slice(&b, vals)
+ return b.String()
+}
+
+func formatInt64SliceReflect(v any) string {
+ var b strings.Builder
+ appendInt64SliceReflect(&b, reflect.ValueOf(v))
+ return b.String()
+}
+
+func appendInt64SliceValue(dst *strings.Builder, v any) {
+ switch vals := v.(type) {
+ case [0]int64:
+ _, _ = dst.WriteString("[]")
+ case [1]int64:
+ appendInt64Slice(dst, vals[:])
+ case [2]int64:
+ appendInt64Slice(dst, vals[:])
+ case [3]int64:
+ appendInt64Slice(dst, vals[:])
+ default:
+ appendInt64SliceReflect(dst, reflect.ValueOf(v))
+ }
+}
+
+func appendInt64Slice(dst *strings.Builder, vals []int64) {
+ dst.Grow(jsonArrayBracketsLen + len(vals)*(int64ArrayElemMaxLen+commaLen))
+ _ = dst.WriteByte('[')
+
+ var buf [int64ArrayElemMaxLen]byte
+ for i, val := range vals {
+ if i > 0 {
+ _ = dst.WriteByte(',')
+ }
+ out := strconv.AppendInt(buf[:0], val, 10)
+ _, _ = dst.Write(out)
+ }
+
+ _ = dst.WriteByte(']')
+}
+
+func appendInt64SliceReflect(dst *strings.Builder, rv reflect.Value) {
+ dst.Grow(jsonArrayBracketsLen + rv.Len()*(int64ArrayElemMaxLen+commaLen))
+ _ = dst.WriteByte('[')
+
+ var scratch [int64ArrayElemMaxLen]byte
+ for i := 0; i < rv.Len(); i++ {
+ if i > 0 {
+ _ = dst.WriteByte(',')
+ }
+ out := strconv.AppendInt(scratch[:0], rv.Index(i).Int(), 10)
+ _, _ = dst.Write(out)
+ }
+
+ _ = dst.WriteByte(']')
+}
+
+func formatFloat64(v float64) string {
+ switch {
+ case math.IsNaN(v):
+ return "NaN"
+ case math.IsInf(v, 1):
+ return "Infinity"
+ case math.IsInf(v, -1):
+ return "-Infinity"
+ default:
+ return strconv.FormatFloat(v, 'g', -1, 64)
+ }
+}
+
+func formatFloat64SliceValue(v any) string {
+ switch vals := v.(type) {
+ case [0]float64:
+ return "[]"
+ case [1]float64:
+ return formatFloat64Slice(vals[:])
+ case [2]float64:
+ return formatFloat64Slice(vals[:])
+ case [3]float64:
+ return formatFloat64Slice(vals[:])
+ default:
+ return formatFloat64SliceReflect(v)
+ }
+}
+
+func formatFloat64Slice(vals []float64) string {
+ var b strings.Builder
+ appendFloat64Slice(&b, vals)
+ return b.String()
+}
+
+func formatFloat64SliceReflect(v any) string {
+ var b strings.Builder
+ appendFloat64SliceReflect(&b, reflect.ValueOf(v))
+ return b.String()
+}
+
+func appendFloat64SliceValue(dst *strings.Builder, v any) {
+ switch vals := v.(type) {
+ case [0]float64:
+ _, _ = dst.WriteString("[]")
+ case [1]float64:
+ appendFloat64Slice(dst, vals[:])
+ case [2]float64:
+ appendFloat64Slice(dst, vals[:])
+ case [3]float64:
+ appendFloat64Slice(dst, vals[:])
+ default:
+ appendFloat64SliceReflect(dst, reflect.ValueOf(v))
+ }
+}
+
+func appendFloat64Slice(dst *strings.Builder, vals []float64) {
+ dst.Grow(jsonArrayBracketsLen + len(vals)*(float64ArrayElemMaxLen+commaLen))
+ _ = dst.WriteByte('[')
+
+ var buf [float64ArrayElemMaxLen]byte
+ for i, val := range vals {
+ if i > 0 {
+ _ = dst.WriteByte(',')
+ }
+
+ switch {
+ case math.IsNaN(val):
+ _, _ = dst.WriteString(`"NaN"`)
+ case math.IsInf(val, 1):
+ _, _ = dst.WriteString(`"Infinity"`)
+ case math.IsInf(val, -1):
+ _, _ = dst.WriteString(`"-Infinity"`)
+ default:
+ out := strconv.AppendFloat(buf[:0], val, 'g', -1, 64)
+ _, _ = dst.Write(out)
+ }
+ }
+
+ _ = dst.WriteByte(']')
+}
+
+func appendFloat64SliceReflect(dst *strings.Builder, rv reflect.Value) {
+ dst.Grow(jsonArrayBracketsLen + rv.Len()*(float64ArrayElemMaxLen+commaLen))
+ _ = dst.WriteByte('[')
+
+ var scratch [float64ArrayElemMaxLen]byte
+ for i := 0; i < rv.Len(); i++ {
+ if i > 0 {
+ _ = dst.WriteByte(',')
+ }
+ val := rv.Index(i).Float()
+ switch {
+ case math.IsNaN(val):
+ _, _ = dst.WriteString(`"NaN"`)
+ case math.IsInf(val, 1):
+ _, _ = dst.WriteString(`"Infinity"`)
+ case math.IsInf(val, -1):
+ _, _ = dst.WriteString(`"-Infinity"`)
+ default:
+ out := strconv.AppendFloat(scratch[:0], val, 'g', -1, 64)
+ _, _ = dst.Write(out)
+ }
+ }
+
+ _ = dst.WriteByte(']')
+}
+
+func formatStringSliceValue(v any) string {
+ switch vals := v.(type) {
+ case [0]string:
+ return "[]"
+ case [1]string:
+ return formatStringSlice(vals[:])
+ case [2]string:
+ return formatStringSlice(vals[:])
+ case [3]string:
+ return formatStringSlice(vals[:])
+ default:
+ return formatStringSliceReflect(v)
+ }
+}
+
+func formatStringSlice(vals []string) string {
+ var b strings.Builder
+ appendStringSlice(&b, vals)
+ return b.String()
+}
+
+func formatStringSliceReflect(v any) string {
+ var b strings.Builder
+ appendStringSliceReflect(&b, reflect.ValueOf(v))
+ return b.String()
+}
+
+func appendStringSliceValue(dst *strings.Builder, v any) {
+ switch vals := v.(type) {
+ case [0]string:
+ _, _ = dst.WriteString("[]")
+ case [1]string:
+ appendStringSlice(dst, vals[:])
+ case [2]string:
+ appendStringSlice(dst, vals[:])
+ case [3]string:
+ appendStringSlice(dst, vals[:])
+ default:
+ appendStringSliceReflect(dst, reflect.ValueOf(v))
+ }
+}
+
+func appendStringSlice(dst *strings.Builder, vals []string) {
+ size := jsonArrayBracketsLen
+ for _, val := range vals {
+ size += len(val) + commaLen + 2 // Account for JSON string quotes and comma.
+ }
+
+ dst.Grow(size)
+ _ = dst.WriteByte('[')
+ for i, val := range vals {
+ if i > 0 {
+ _ = dst.WriteByte(',')
+ }
+ appendJSONString(dst, val)
+ }
+ _ = dst.WriteByte(']')
+}
+
+func appendStringSliceReflect(dst *strings.Builder, rv reflect.Value) {
+ size := jsonArrayBracketsLen
+ for i := 0; i < rv.Len(); i++ {
+ size += len(rv.Index(i).String()) + commaLen + 2 // Account for JSON string quotes and comma.
+ }
+
+ dst.Grow(size)
+ _ = dst.WriteByte('[')
+ for i := 0; i < rv.Len(); i++ {
+ if i > 0 {
+ _ = dst.WriteByte(',')
+ }
+ appendJSONString(dst, rv.Index(i).String())
+ }
+ _ = dst.WriteByte(']')
+}
+
+func formatByteSlice(v string) string {
+ var b strings.Builder
+ appendBase64(&b, v)
+ return b.String()
+}
+
+func formatValueSliceValue(v any) string {
+ switch vals := v.(type) {
+ case [0]Value:
+ return "[]"
+ case [1]Value:
+ return formatValueSlice(vals[:])
+ case [2]Value:
+ return formatValueSlice(vals[:])
+ case [3]Value:
+ return formatValueSlice(vals[:])
+ case [4]Value:
+ return formatValueSlice(vals[:])
+ case [5]Value:
+ return formatValueSlice(vals[:])
+ default:
+ return formatValueSliceReflect(v)
+ }
+}
+
+func formatValueSlice(vals []Value) string {
+ var b strings.Builder
+ appendValueSlice(&b, vals)
+ return b.String()
+}
+
+func formatValueSliceReflect(v any) string {
+ var b strings.Builder
+ appendValueSliceReflect(&b, reflect.ValueOf(v))
+ return b.String()
+}
+
+func appendValueSliceValue(dst *strings.Builder, v any) {
+ switch vals := v.(type) {
+ case [0]Value:
+ _, _ = dst.WriteString("[]")
+ case [1]Value:
+ appendValueSlice(dst, vals[:])
+ case [2]Value:
+ appendValueSlice(dst, vals[:])
+ case [3]Value:
+ appendValueSlice(dst, vals[:])
+ case [4]Value:
+ appendValueSlice(dst, vals[:])
+ case [5]Value:
+ appendValueSlice(dst, vals[:])
+ default:
+ appendValueSliceReflect(dst, reflect.ValueOf(v))
+ }
+}
+
+func appendValueSlice(dst *strings.Builder, vals []Value) {
+ // Estimate 10 bytes per value for small values and commas.
+ dst.Grow(jsonArrayBracketsLen + len(vals)*commaLen + len(vals)*10)
+ _ = dst.WriteByte('[')
+ for i, val := range vals {
+ if i > 0 {
+ _ = dst.WriteByte(',')
+ }
+ appendJSONValue(dst, val)
+ }
+ _ = dst.WriteByte(']')
+}
+
+func appendValueSliceReflect(dst *strings.Builder, rv reflect.Value) {
+ // Estimate 10 bytes per value for small values and commas.
+ dst.Grow(jsonArrayBracketsLen + rv.Len()*commaLen + rv.Len()*10)
+ _ = dst.WriteByte('[')
+ for i := 0; i < rv.Len(); i++ {
+ if i > 0 {
+ _ = dst.WriteByte(',')
+ }
+ appendJSONValue(dst, rv.Index(i).Interface().(Value))
+ }
+ _ = dst.WriteByte(']')
+}
+
+func appendJSONValue(dst *strings.Builder, v Value) {
+ switch v.Type() {
+ case BOOL:
+ if v.AsBool() {
+ _, _ = dst.WriteString("true")
+ } else {
+ _, _ = dst.WriteString("false")
+ }
+ case BOOLSLICE:
+ appendBoolSliceValue(dst, v.slice)
+ case INT64:
+ var buf [int64ArrayElemMaxLen]byte
+ out := strconv.AppendInt(buf[:0], v.AsInt64(), 10)
+ _, _ = dst.Write(out)
+ case INT64SLICE:
+ appendInt64SliceValue(dst, v.slice)
+ case FLOAT64:
+ val := v.AsFloat64()
+ switch {
+ case math.IsNaN(val):
+ appendJSONString(dst, "NaN")
+ case math.IsInf(val, 1):
+ appendJSONString(dst, "Infinity")
+ case math.IsInf(val, -1):
+ appendJSONString(dst, "-Infinity")
+ default:
+ var buf [float64ArrayElemMaxLen]byte
+ out := strconv.AppendFloat(buf[:0], val, 'g', -1, 64)
+ _, _ = dst.Write(out)
+ }
+ case FLOAT64SLICE:
+ appendFloat64SliceValue(dst, v.slice)
+ case STRING:
+ appendJSONString(dst, v.stringly)
+ case STRINGSLICE:
+ appendStringSliceValue(dst, v.slice)
+ case BYTESLICE:
+ _ = dst.WriteByte('"')
+ appendBase64(dst, v.stringly)
+ _ = dst.WriteByte('"')
+ case SLICE:
+ appendValueSliceValue(dst, v.slice)
+ case EMPTY:
+ _, _ = dst.WriteString("null")
+ default:
+ appendJSONString(dst, "unknown")
+ }
+}
+
+// appendJSONString appends s to dst as a JSON string literal.
+//
+// This is adapted from the Go standard library's encoding/json
+// [appendString implementation]. It keeps the same escaping behavior we need
+// here, but writes directly into a strings.Builder and intentionally does not
+// apply HTML escaping because the OpenTelemetry non-OTLP AnyValue representation
+// only requires JSON array string encoding. We inline this instead of using
+// encoding/json so slice formatting avoids allocations and reflection.
+//
+// [appendString implementation]: https://github.com/golang/go/blob/3b5954c6349d31465dca409b45ab6597e0942d9f/src/encoding/json/encode.go#L998-L1064
+func appendJSONString(dst *strings.Builder, s string) {
+ const hex = "0123456789abcdef" // For escaping bytes to hex.
+
+ _ = dst.WriteByte('"')
+ start := 0
+
+ for i := 0; i < len(s); {
+ if c := s[i]; c < utf8.RuneSelf {
+ if c >= 0x20 && c != '\\' && c != '"' {
+ i++
+ continue
+ }
+
+ if start < i {
+ _, _ = dst.WriteString(s[start:i])
+ }
+
+ switch c {
+ case '\\', '"':
+ _ = dst.WriteByte('\\')
+ _ = dst.WriteByte(c)
+ case '\b':
+ _, _ = dst.WriteString(`\b`)
+ case '\f':
+ _, _ = dst.WriteString(`\f`)
+ case '\n':
+ _, _ = dst.WriteString(`\n`)
+ case '\r':
+ _, _ = dst.WriteString(`\r`)
+ case '\t':
+ _, _ = dst.WriteString(`\t`)
+ default:
+ _, _ = dst.WriteString(`\u00`)
+ _ = dst.WriteByte(hex[c>>4])
+ _ = dst.WriteByte(hex[c&0x0f])
+ }
+
+ i++
+ start = i
+ continue
+ }
+
+ r, size := utf8.DecodeRuneInString(s[i:])
+ if r == utf8.RuneError && size == 1 {
+ if start < i {
+ _, _ = dst.WriteString(s[start:i])
+ }
+ // Match encoding/json by replacing invalid UTF-8 with U+FFFD.
+ _, _ = dst.WriteString(`\ufffd`)
+ i++
+ start = i
+ continue
+ }
+
+ if r == '\u2028' || r == '\u2029' {
+ if start < i {
+ _, _ = dst.WriteString(s[start:i])
+ }
+ // Escape JSONP-sensitive separators unconditionally, like encoding/json.
+ _, _ = dst.WriteString(`\u202`)
+ _ = dst.WriteByte(hex[r&0x0f])
+ i += size
+ start = i
+ continue
+ }
+
+ i += size
+ }
+
+ if start < len(s) {
+ _, _ = dst.WriteString(s[start:])
+ }
+ _ = dst.WriteByte('"')
+}
+
+// This is adapted from the Go standard library's encoding/base64
+// [Encoding.Encode implementation]. It keeps the same encoding behavior we need
+// here, but writes directly into a strings.Builder. We inline this instead of using
+// encoding/base64 to avoid allocations.
+//
+// [Encoding.Encode implementation]: https://github.com/golang/go/blob/3b5954c6349d31465dca409b45ab6597e0942d9f/src/encoding/base64/base64.go#L139-L189
+func appendBase64(dst *strings.Builder, s string) {
+ const encode = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
+
+ dst.Grow(base64.StdEncoding.EncodedLen(len(s)))
+
+ i := 0
+ for ; i+2 < len(s); i += 3 {
+ n := uint32(s[i])<<16 | uint32(s[i+1])<<8 | uint32(s[i+2])
+ _ = dst.WriteByte(encode[n>>18&0x3f])
+ _ = dst.WriteByte(encode[n>>12&0x3f])
+ _ = dst.WriteByte(encode[n>>6&0x3f])
+ _ = dst.WriteByte(encode[n&0x3f])
+ }
+
+ switch len(s) - i {
+ case 1:
+ n := uint32(s[i]) << 16
+ _ = dst.WriteByte(encode[n>>18&0x3f])
+ _ = dst.WriteByte(encode[n>>12&0x3f])
+ _ = dst.WriteByte('=')
+ _ = dst.WriteByte('=')
+ case 2:
+ n := uint32(s[i])<<16 | uint32(s[i+1])<<8
+ _ = dst.WriteByte(encode[n>>18&0x3f])
+ _ = dst.WriteByte(encode[n>>12&0x3f])
+ _ = dst.WriteByte(encode[n>>6&0x3f])
+ _ = dst.WriteByte('=')
+ }
+}
+
// MarshalJSON returns the JSON encoding of the Value.
func (v Value) MarshalJSON() ([]byte, error) {
var jsonVal struct {
diff --git a/vendor/go.opentelemetry.io/otel/baggage/baggage.go b/vendor/go.opentelemetry.io/otel/baggage/baggage.go
index 878ffbe43a52..b290c6d6cc86 100644
--- a/vendor/go.opentelemetry.io/otel/baggage/baggage.go
+++ b/vendor/go.opentelemetry.io/otel/baggage/baggage.go
@@ -14,6 +14,10 @@ import (
)
const (
+ maxParseErrors = 5
+
+ // W3C Baggage specification limits.
+ // https://www.w3.org/TR/baggage/#limits
maxMembers = 64
maxBytesPerBaggageString = 8192
@@ -493,9 +497,15 @@ func New(members ...Member) (Baggage, error) {
// from the W3C Baggage specification which allows duplicate list-members, but
// conforms to the OpenTelemetry Baggage specification.
//
-// If the baggage-string exceeds the maximum allowed members (64) or bytes
-// (8192), members are dropped until the limits are satisfied and an error is
-// returned along with the partial result.
+// If the raw baggage-string exceeds the maximum allowed bytes (8192), an
+// empty Baggage and an error are returned.
+//
+// Otherwise, members are parsed left-to-right and accumulated until one of
+// the following conditions is reached, at which point parsing stops and an
+// error is returned alongside the partial result:
+// - accepting the next member would cause the encoded baggage to exceed
+// 8192 bytes, or
+// - the baggage already contains 64 distinct keys.
//
// Invalid members are skipped and the error is returned along with the
// partial result containing the valid members.
@@ -504,9 +514,14 @@ func Parse(bStr string) (Baggage, error) {
return Baggage{}, nil
}
+ if n := len(bStr); n > maxBytesPerBaggageString {
+ return Baggage{}, fmt.Errorf("%w: %d", errBaggageBytes, n)
+ }
+
b := make(baggage.List)
sizes := make(map[string]int) // Track per-key byte sizes
var totalBytes int
+ var parseErrors int
var truncateErr error
for memberStr := range strings.SplitSeq(bStr, listDelimiter) {
// Check member count limit.
@@ -517,7 +532,10 @@ func Parse(bStr string) (Baggage, error) {
m, err := parseMember(memberStr)
if err != nil {
- truncateErr = errors.Join(truncateErr, err)
+ parseErrors++
+ if parseErrors <= maxParseErrors {
+ truncateErr = errors.Join(truncateErr, err)
+ }
continue // skip invalid member, keep processing
}
@@ -553,6 +571,10 @@ func Parse(bStr string) (Baggage, error) {
totalBytes = newTotalBytes
}
+ if dropped := parseErrors - maxParseErrors; dropped > 0 {
+ truncateErr = errors.Join(truncateErr, fmt.Errorf("and %d more invalid member(s)", dropped))
+ }
+
if len(b) == 0 {
return Baggage{}, truncateErr
}
diff --git a/vendor/go.opentelemetry.io/otel/dependencies.Dockerfile b/vendor/go.opentelemetry.io/otel/dependencies.Dockerfile
index 7a9b3c055905..74fa510bc84f 100644
--- a/vendor/go.opentelemetry.io/otel/dependencies.Dockerfile
+++ b/vendor/go.opentelemetry.io/otel/dependencies.Dockerfile
@@ -1,4 +1,4 @@
# This is a renovate-friendly source of Docker images.
FROM python:3.13.6-slim-bullseye@sha256:e98b521460ee75bca92175c16247bdf7275637a8faaeb2bcfa19d879ae5c4b9a AS python
-FROM otel/weaver:v0.22.1@sha256:33ae522ae4b71c1c562563c1d81f46aa0f79f088a0873199143a1f11ac30e5c9 AS weaver
+FROM otel/weaver:v0.23.0@sha256:7984ecb55b859eb3034ae9d836c4eeda137e2bdd0873b7ba2bb6c3d24d6ff457 AS weaver
FROM avtodev/markdown-lint:v1@sha256:6aeedc2f49138ce7a1cd0adffc1b1c0321b841dc2102408967d9301c031949ee AS markdown
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/attribute.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/attribute.go
index d9bfd6e1765b..0d43a5dc5b7f 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/attribute.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/attribute.go
@@ -87,12 +87,23 @@ func Value(v attribute.Value) *commonpb.AnyValue {
av.Value = &commonpb.AnyValue_StringValue{
StringValue: v.AsString(),
}
+ case attribute.BYTESLICE:
+ av.Value = &commonpb.AnyValue_BytesValue{
+ BytesValue: v.AsByteSlice(),
+ }
+ case attribute.SLICE:
+ av.Value = &commonpb.AnyValue_ArrayValue{
+ ArrayValue: &commonpb.ArrayValue{
+ Values: values(v.AsSlice()),
+ },
+ }
case attribute.STRINGSLICE:
av.Value = &commonpb.AnyValue_ArrayValue{
ArrayValue: &commonpb.ArrayValue{
Values: stringSliceValues(v.AsStringSlice()),
},
}
+ case attribute.EMPTY:
default:
av.Value = &commonpb.AnyValue_StringValue{
StringValue: "INVALID",
@@ -148,3 +159,11 @@ func stringSliceValues(vals []string) []*commonpb.AnyValue {
}
return converted
}
+
+func values(vals []attribute.Value) []*commonpb.AnyValue {
+ converted := make([]*commonpb.AnyValue, len(vals))
+ for i, v := range vals {
+ converted[i] = Value(v)
+ }
+ return converted
+}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/client.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/client.go
index 76b7cd461bf9..e8b33d3fa553 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/client.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/client.go
@@ -6,6 +6,7 @@ package otlptracegrpc // import "go.opentelemetry.io/otel/exporters/otlp/otlptra
import (
"context"
"errors"
+ "fmt"
"sync"
"time"
@@ -16,6 +17,7 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
+ "google.golang.org/protobuf/proto"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal"
@@ -26,11 +28,12 @@ import (
)
type client struct {
- endpoint string
- dialOpts []grpc.DialOption
- metadata metadata.MD
- exportTimeout time.Duration
- requestFunc retry.RequestFunc
+ endpoint string
+ dialOpts []grpc.DialOption
+ metadata metadata.MD
+ exportTimeout time.Duration
+ maxRequestSize int
+ requestFunc retry.RequestFunc
// stopCtx is used as a parent context for all exports. Therefore, when it
// is canceled with the stopFunc all exports are canceled.
@@ -62,17 +65,18 @@ func NewClient(opts ...Option) otlptrace.Client {
func newClient(opts ...Option) *client {
cfg := otlpconfig.NewGRPCConfig(asGRPCOptions(opts)...)
- ctx, cancel := context.WithCancel(context.Background())
+ ctx, cancel := context.WithCancel(context.Background()) //nolint:gosec // cancel called in client shutdown.
c := &client{
- endpoint: cfg.Traces.Endpoint,
- exportTimeout: cfg.Traces.Timeout,
- requestFunc: cfg.RetryConfig.RequestFunc(retryable),
- dialOpts: cfg.DialOptions,
- stopCtx: ctx,
- stopFunc: cancel,
- conn: cfg.GRPCConn,
- instID: counter.NextExporterID(),
+ endpoint: cfg.Traces.Endpoint,
+ exportTimeout: cfg.Traces.Timeout,
+ maxRequestSize: cfg.Traces.MaxRequestSize,
+ requestFunc: cfg.RetryConfig.RequestFunc(retryable),
+ dialOpts: cfg.DialOptions,
+ stopCtx: ctx,
+ stopFunc: cancel,
+ conn: cfg.GRPCConn,
+ instID: counter.NextExporterID(),
}
if len(cfg.Traces.Headers) > 0 {
@@ -205,16 +209,28 @@ func (c *client) UploadTraces(ctx context.Context, protoSpans []*tracepb.Resourc
ctx, cancel := c.exportContext(ctx)
defer cancel()
- var code codes.Code
+ pbRequest := &coltracepb.ExportTraceServiceRequest{
+ ResourceSpans: protoSpans,
+ }
+
+ code := codes.Unknown
if c.inst != nil {
- op := c.inst.ExportSpans(ctx, len(protoSpans))
+ var spanCount int
+ for _, rs := range protoSpans {
+ for _, ss := range rs.ScopeSpans {
+ spanCount += len(ss.Spans)
+ }
+ }
+ op := c.inst.ExportSpans(ctx, spanCount)
defer func() { op.End(uploadErr, code) }()
}
+ if maxSize := c.maxRequestSize; maxSize > 0 && proto.Size(pbRequest) > maxSize {
+ return fmt.Errorf("request message too large: exceeded %d bytes", maxSize)
+ }
+
return c.requestFunc(ctx, func(iCtx context.Context) error {
- resp, err := c.tsc.Export(iCtx, &coltracepb.ExportTraceServiceRequest{
- ResourceSpans: protoSpans,
- })
+ resp, err := c.tsc.Export(iCtx, pbRequest)
if resp != nil && resp.PartialSuccess != nil {
msg := resp.PartialSuccess.GetErrorMessage()
n := resp.PartialSuccess.GetRejectedSpans()
@@ -248,7 +264,7 @@ func (c *client) exportContext(parent context.Context) (context.Context, context
if c.exportTimeout > 0 {
ctx, cancel = context.WithTimeoutCause(parent, c.exportTimeout, errors.New("exporter export timeout"))
} else {
- ctx, cancel = context.WithCancel(parent)
+ ctx, cancel = context.WithCancel(parent) //nolint:gosec // cancel called by caller when export is complete.
}
if c.metadata.Len() > 0 {
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/instrumentation.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/instrumentation.go
index d4a69f4d7c07..676a93514bd7 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/instrumentation.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/instrumentation.go
@@ -18,8 +18,8 @@ import (
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x"
"go.opentelemetry.io/otel/internal/global"
"go.opentelemetry.io/otel/metric"
- semconv "go.opentelemetry.io/otel/semconv/v1.39.0"
- "go.opentelemetry.io/otel/semconv/v1.39.0/otelconv"
+ semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
+ "go.opentelemetry.io/otel/semconv/v1.41.0/otelconv"
)
const (
@@ -72,6 +72,7 @@ var (
func get[T any](p *sync.Pool) *[]T { return p.Get().(*[]T) }
func put[T any](p *sync.Pool, s *[]T) {
+ clear(*s) // erase elements to allow GC to collect what they refer to.
*s = (*s)[:0] // Reset.
p.Put(s)
}
@@ -208,10 +209,12 @@ func BaseAttrs(id int64, target string) []attribute.KeyValue {
func (i *Instrumentation) ExportSpans(ctx context.Context, nSpans int) ExportOp {
start := time.Now()
- addOpt := get[metric.AddOption](addOptPool)
- defer put(addOptPool, addOpt)
- *addOpt = append(*addOpt, i.addOpt)
- i.inflightSpans.Add(ctx, int64(nSpans), *addOpt...)
+ if i.inflightSpans.Enabled(ctx) {
+ addOpt := get[metric.AddOption](addOptPool)
+ defer put(addOptPool, addOpt)
+ *addOpt = append(*addOpt, i.addOpt)
+ i.inflightSpans.Add(ctx, int64(nSpans), *addOpt...)
+ }
return ExportOp{
ctx: ctx,
@@ -244,14 +247,18 @@ func (e ExportOp) End(err error, code codes.Code) {
defer put(addOptPool, addOpt)
*addOpt = append(*addOpt, e.inst.addOpt)
- e.inst.inflightSpans.Add(e.ctx, -e.nSpans, *addOpt...)
+ if e.inst.inflightSpans.Enabled(e.ctx) {
+ e.inst.inflightSpans.Add(e.ctx, -e.nSpans, *addOpt...)
+ }
success := successful(e.nSpans, err)
// Record successfully exported spans, even if the value is 0 which are
// meaningful to distribution aggregations.
- e.inst.exportedSpans.Add(e.ctx, success, *addOpt...)
+ if e.inst.exportedSpans.Enabled(e.ctx) {
+ e.inst.exportedSpans.Add(e.ctx, success, *addOpt...)
+ }
- if err != nil {
+ if err != nil && e.inst.exportedSpans.Enabled(e.ctx) {
attrs := get[attribute.KeyValue](measureAttrsPool)
defer put(measureAttrsPool, attrs)
*attrs = append(*attrs, e.inst.attrs...)
@@ -266,12 +273,14 @@ func (e ExportOp) End(err error, code codes.Code) {
e.inst.exportedSpans.Add(e.ctx, e.nSpans-success, *addOpt...)
}
- recOpt := get[metric.RecordOption](recordOptPool)
- defer put(recordOptPool, recOpt)
- *recOpt = append(*recOpt, e.inst.recordOption(err, code))
+ if e.inst.opDuration.Enabled(e.ctx) {
+ recOpt := get[metric.RecordOption](recordOptPool)
+ defer put(recordOptPool, recOpt)
+ *recOpt = append(*recOpt, e.inst.recordOption(err, code))
- d := time.Since(e.start).Seconds()
- e.inst.opDuration.Record(e.ctx, d, *recOpt...)
+ d := time.Since(e.start).Seconds()
+ e.inst.opDuration.Record(e.ctx, d, *recOpt...)
+ }
}
// recordOption returns a RecordOption with attributes representing the
@@ -331,7 +340,10 @@ var errPartialPool = &sync.Pool{
// the provided non-nil err.
func rejected(n int64, err error) int64 {
ps := errPartialPool.Get().(*internal.PartialSuccess)
- defer errPartialPool.Put(ps)
+ defer func() {
+ *ps = internal.PartialSuccess{} // erase fields to allow GC to collect them.
+ errPartialPool.Put(ps)
+ }()
// Check for partial success.
if errors.As(err, ps) {
// Bound RejectedItems to [0, n]. This should not be needed,
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/options.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/options.go
index 4f47117a58a4..d940b67625fa 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/options.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/options.go
@@ -31,6 +31,9 @@ const (
// DefaultTracesPath is a default URL path for endpoint that
// receives spans.
DefaultTracesPath string = "/v1/traces"
+ // DefaultMaxRequestSize is the default maximum size of a serialized export
+ // request, before compression.
+ DefaultMaxRequestSize int = 64 * 1024 * 1024
// DefaultTimeout is a default max waiting time for the backend to process
// each span batch.
DefaultTimeout time.Duration = 10 * time.Second
@@ -42,13 +45,14 @@ type (
HTTPTransportProxyFunc func(*http.Request) (*url.URL, error)
SignalConfig struct {
- Endpoint string
- Insecure bool
- TLSCfg *tls.Config
- Headers map[string]string
- Compression Compression
- Timeout time.Duration
- URLPath string
+ Endpoint string
+ Insecure bool
+ TLSCfg *tls.Config
+ Headers map[string]string
+ Compression Compression
+ MaxRequestSize int
+ Timeout time.Duration
+ URLPath string
// gRPC configurations
GRPCCredentials credentials.TransportCredentials
@@ -77,10 +81,11 @@ type (
func NewHTTPConfig(opts ...HTTPOption) Config {
cfg := Config{
Traces: SignalConfig{
- Endpoint: fmt.Sprintf("%s:%d", DefaultCollectorHost, DefaultCollectorHTTPPort),
- URLPath: DefaultTracesPath,
- Compression: NoCompression,
- Timeout: DefaultTimeout,
+ Endpoint: fmt.Sprintf("%s:%d", DefaultCollectorHost, DefaultCollectorHTTPPort),
+ URLPath: DefaultTracesPath,
+ Compression: NoCompression,
+ MaxRequestSize: DefaultMaxRequestSize,
+ Timeout: DefaultTimeout,
},
RetryConfig: retry.DefaultConfig,
}
@@ -111,10 +116,11 @@ func NewGRPCConfig(opts ...GRPCOption) Config {
userAgent := "OTel OTLP Exporter Go/" + otlptrace.Version()
cfg := Config{
Traces: SignalConfig{
- Endpoint: fmt.Sprintf("%s:%d", DefaultCollectorHost, DefaultCollectorGRPCPort),
- URLPath: DefaultTracesPath,
- Compression: NoCompression,
- Timeout: DefaultTimeout,
+ Endpoint: fmt.Sprintf("%s:%d", DefaultCollectorHost, DefaultCollectorGRPCPort),
+ URLPath: DefaultTracesPath,
+ Compression: NoCompression,
+ MaxRequestSize: DefaultMaxRequestSize,
+ Timeout: DefaultTimeout,
},
RetryConfig: retry.DefaultConfig,
DialOptions: []grpc.DialOption{grpc.WithUserAgent(userAgent)},
@@ -345,6 +351,13 @@ func WithTimeout(duration time.Duration) GenericOption {
})
}
+func WithMaxRequestSize(size int) GenericOption {
+ return newGenericOption(func(cfg Config) Config {
+ cfg.Traces.MaxRequestSize = size
+ return cfg
+ })
+}
+
func WithProxy(pf HTTPTransportProxyFunc) GenericOption {
return newGenericOption(func(cfg Config) Config {
cfg.Traces.Proxy = pf
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/version.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/version.go
index 19fac1b725da..28e51e443fca 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/version.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/version.go
@@ -5,4 +5,4 @@ package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/ot
// Version is the current release version of the OpenTelemetry OTLP gRPC trace
// exporter in use.
-const Version = "1.40.0"
+const Version = "1.44.0"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go
index 2da2298701b2..b320060525ec 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go
@@ -192,6 +192,16 @@ func WithTimeout(duration time.Duration) Option {
return wrappedOption{otlpconfig.WithTimeout(duration)}
}
+// WithMaxRequestSize sets the maximum size, in bytes, of a serialized export
+// request, before compression, that the exporter will send.
+//
+// If size is less than or equal to zero, no request-size limit is applied.
+// Disabling the limit is not recommended because it can lead to excessive
+// resource consumption or abuse.
+func WithMaxRequestSize(size int) Option {
+ return wrappedOption{otlpconfig.WithMaxRequestSize(size)}
+}
+
// WithRetry sets the retry policy for transient retryable errors that may be
// returned by the target endpoint when exporting a batch of spans.
//
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go
index 370cd2a6f8f4..d847210dbaf4 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go
@@ -5,5 +5,5 @@ package otlptrace // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace"
// Version is the current release version of the OpenTelemetry OTLP trace exporter in use.
func Version() string {
- return "1.40.0"
+ return "1.44.0"
}
diff --git a/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go b/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go
index 466812d34358..1d21e2eb7520 100644
--- a/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go
+++ b/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go
@@ -51,6 +51,9 @@ type Float64ObservableCounterConfig struct {
func NewFloat64ObservableCounterConfig(opts ...Float64ObservableCounterOption) Float64ObservableCounterConfig {
var config Float64ObservableCounterConfig
for _, o := range opts {
+ if _, ok := o.(experimentalOption); ok {
+ continue
+ }
config = o.applyFloat64ObservableCounter(config)
}
return config
@@ -111,6 +114,9 @@ func NewFloat64ObservableUpDownCounterConfig(
) Float64ObservableUpDownCounterConfig {
var config Float64ObservableUpDownCounterConfig
for _, o := range opts {
+ if _, ok := o.(experimentalOption); ok {
+ continue
+ }
config = o.applyFloat64ObservableUpDownCounter(config)
}
return config
@@ -168,6 +174,9 @@ type Float64ObservableGaugeConfig struct {
func NewFloat64ObservableGaugeConfig(opts ...Float64ObservableGaugeOption) Float64ObservableGaugeConfig {
var config Float64ObservableGaugeConfig
for _, o := range opts {
+ if _, ok := o.(experimentalOption); ok {
+ continue
+ }
config = o.applyFloat64ObservableGauge(config)
}
return config
diff --git a/vendor/go.opentelemetry.io/otel/metric/asyncint64.go b/vendor/go.opentelemetry.io/otel/metric/asyncint64.go
index 66c971bd8a94..9d45a4d416b0 100644
--- a/vendor/go.opentelemetry.io/otel/metric/asyncint64.go
+++ b/vendor/go.opentelemetry.io/otel/metric/asyncint64.go
@@ -50,6 +50,9 @@ type Int64ObservableCounterConfig struct {
func NewInt64ObservableCounterConfig(opts ...Int64ObservableCounterOption) Int64ObservableCounterConfig {
var config Int64ObservableCounterConfig
for _, o := range opts {
+ if _, ok := o.(experimentalOption); ok {
+ continue
+ }
config = o.applyInt64ObservableCounter(config)
}
return config
@@ -110,6 +113,9 @@ func NewInt64ObservableUpDownCounterConfig(
) Int64ObservableUpDownCounterConfig {
var config Int64ObservableUpDownCounterConfig
for _, o := range opts {
+ if _, ok := o.(experimentalOption); ok {
+ continue
+ }
config = o.applyInt64ObservableUpDownCounter(config)
}
return config
@@ -167,6 +173,9 @@ type Int64ObservableGaugeConfig struct {
func NewInt64ObservableGaugeConfig(opts ...Int64ObservableGaugeOption) Int64ObservableGaugeConfig {
var config Int64ObservableGaugeConfig
for _, o := range opts {
+ if _, ok := o.(experimentalOption); ok {
+ continue
+ }
config = o.applyInt64ObservableGauge(config)
}
return config
diff --git a/vendor/go.opentelemetry.io/otel/metric/config.go b/vendor/go.opentelemetry.io/otel/metric/config.go
index e42dd6e70ab3..889545e235d1 100644
--- a/vendor/go.opentelemetry.io/otel/metric/config.go
+++ b/vendor/go.opentelemetry.io/otel/metric/config.go
@@ -42,11 +42,18 @@ type MeterOption interface {
applyMeter(MeterConfig) MeterConfig
}
+type experimentalOption interface {
+ Experimental()
+}
+
// NewMeterConfig creates a new MeterConfig and applies
// all the given options.
func NewMeterConfig(opts ...MeterOption) MeterConfig {
var config MeterConfig
for _, o := range opts {
+ if _, ok := o.(experimentalOption); ok {
+ continue
+ }
config = o.applyMeter(config)
}
return config
diff --git a/vendor/go.opentelemetry.io/otel/metric/doc.go b/vendor/go.opentelemetry.io/otel/metric/doc.go
index f153745b005f..794e1a8baea7 100644
--- a/vendor/go.opentelemetry.io/otel/metric/doc.go
+++ b/vendor/go.opentelemetry.io/otel/metric/doc.go
@@ -24,10 +24,10 @@ all instruments fall into two overlapping logical categories: asynchronous or
synchronous, and int64 or float64.
All synchronous instruments ([Int64Counter], [Int64UpDownCounter],
-[Int64Histogram], [Float64Counter], [Float64UpDownCounter], and
-[Float64Histogram]) are used to measure the operation and performance of source
-code during the source code execution. These instruments only make measurements
-when the source code they instrument is run.
+[Int64Histogram], [Int64Gauge], [Float64Counter], [Float64UpDownCounter],
+[Float64Histogram], and [Float64Gauge]) are used to measure the operation and
+performance of source code during the source code execution. These instruments
+only make measurements when the source code they instrument is run.
All asynchronous instruments ([Int64ObservableCounter],
[Int64ObservableUpDownCounter], [Int64ObservableGauge],
@@ -50,9 +50,11 @@ incrementally increase in value. UpDownCounters ([Int64UpDownCounter],
values that can increase and decrease. When more information needs to be
conveyed about all the synchronous measurements made during a collection cycle,
a Histogram ([Int64Histogram] and [Float64Histogram]) should be used. Finally,
-when just the most recent measurement needs to be conveyed about an
-asynchronous measurement, a Gauge ([Int64ObservableGauge] and
-[Float64ObservableGauge]) should be used.
+when just the most recent measurement needs to be conveyed, a Gauge
+([Int64Gauge], [Float64Gauge], [Int64ObservableGauge], and
+[Float64ObservableGauge]) should be used: the synchronous variants record an
+instantaneous value at a specific point in code, while the observable variants
+sample the value via a callback once per collection cycle.
See the [OpenTelemetry documentation] for more information about instruments
and their intended use.
@@ -80,11 +82,11 @@ Measurements are made by recording values and information about the values with
an instrument. How these measurements are recorded depends on the instrument.
Measurements for synchronous instruments ([Int64Counter], [Int64UpDownCounter],
-[Int64Histogram], [Float64Counter], [Float64UpDownCounter], and
-[Float64Histogram]) are recorded using the instrument methods directly. All
-counter instruments have an Add method that is used to measure an increment
-value, and all histogram instruments have a Record method to measure a data
-point.
+[Int64Histogram], [Int64Gauge], [Float64Counter], [Float64UpDownCounter],
+[Float64Histogram], and [Float64Gauge]) are recorded using the instrument
+methods directly. All counter instruments have an Add method that is used to
+measure an increment value, and all histogram and synchronous gauge
+instruments have a Record method to measure a data point.
Asynchronous instruments ([Int64ObservableCounter],
[Int64ObservableUpDownCounter], [Int64ObservableGauge],
@@ -107,6 +109,31 @@ respectively):
If the criteria are not met, use the RegisterCallback method of the [Meter] that
created the instrument to register a [Callback].
+# Avoiding Expensive Computations
+
+All synchronous instruments provide an Enabled method that reports whether the
+instrument will process measurements for the given context. When no SDK is
+registered or the instrument is otherwise disabled, Enabled returns false. This
+can be used to avoid expensive measurement work when a measurement will not be
+recorded:
+
+ if counter.Enabled(ctx) {
+ counter.Add(ctx, 1, metric.WithAttributes(expensiveAttributes()...))
+ }
+
+This is especially valuable when computing attributes is expensive.
+[WithAttributes] performs non-trivial work on every call to build an
+[attribute.Set] from the provided attributes, and that work is wasted if the
+measurement is not recorded.
+
+For performance sensitive code where the same attribute set is used repeatedly,
+prefer [WithAttributeSet]. It accepts a pre-built [attribute.Set], letting you
+pay the construction cost once and reuse it across many measurements:
+
+ attrs := attribute.NewSet(attribute.String("key", "val"))
+ // ... later, on each call:
+ counter.Add(ctx, 1, metric.WithAttributeSet(attrs))
+
# API Implementations
This package does not conform to the standard Go versioning policy, all of its
diff --git a/vendor/go.opentelemetry.io/otel/metric/instrument.go b/vendor/go.opentelemetry.io/otel/metric/instrument.go
index 9f48d5f117c4..2e79ab56832d 100644
--- a/vendor/go.opentelemetry.io/otel/metric/instrument.go
+++ b/vendor/go.opentelemetry.io/otel/metric/instrument.go
@@ -3,7 +3,9 @@
package metric // import "go.opentelemetry.io/otel/metric"
-import "go.opentelemetry.io/otel/attribute"
+import (
+ "go.opentelemetry.io/otel/attribute"
+)
// Observable is used as a grouping mechanism for all instruments that are
// updated within a Callback.
@@ -228,6 +230,9 @@ type AddConfig struct {
func NewAddConfig(opts []AddOption) AddConfig {
config := AddConfig{attrs: *attribute.EmptySet()}
for _, o := range opts {
+ if _, ok := o.(experimentalOption); ok {
+ continue
+ }
config = o.applyAdd(config)
}
return config
@@ -253,6 +258,9 @@ type RecordConfig struct {
func NewRecordConfig(opts []RecordOption) RecordConfig {
config := RecordConfig{attrs: *attribute.EmptySet()}
for _, o := range opts {
+ if _, ok := o.(experimentalOption); ok {
+ continue
+ }
config = o.applyRecord(config)
}
return config
@@ -278,6 +286,9 @@ type ObserveConfig struct {
func NewObserveConfig(opts []ObserveOption) ObserveConfig {
config := ObserveConfig{attrs: *attribute.EmptySet()}
for _, o := range opts {
+ if _, ok := o.(experimentalOption); ok {
+ continue
+ }
config = o.applyObserve(config)
}
return config
@@ -299,6 +310,10 @@ type attrOpt struct {
set attribute.Set
}
+func (o *attrOpt) Set(set attribute.Set) {
+ o.set = set
+}
+
// mergeSets returns the union of keys between a and b. Any duplicate keys will
// use the value associated with b.
func mergeSets(a, b attribute.Set) attribute.Set {
@@ -311,7 +326,7 @@ func mergeSets(a, b attribute.Set) attribute.Set {
return attribute.NewSet(merged...)
}
-func (o attrOpt) applyAdd(c AddConfig) AddConfig {
+func (o *attrOpt) applyAdd(c AddConfig) AddConfig {
switch {
case o.set.Len() == 0:
case c.attrs.Len() == 0:
@@ -322,7 +337,7 @@ func (o attrOpt) applyAdd(c AddConfig) AddConfig {
return c
}
-func (o attrOpt) applyRecord(c RecordConfig) RecordConfig {
+func (o *attrOpt) applyRecord(c RecordConfig) RecordConfig {
switch {
case o.set.Len() == 0:
case c.attrs.Len() == 0:
@@ -333,7 +348,7 @@ func (o attrOpt) applyRecord(c RecordConfig) RecordConfig {
return c
}
-func (o attrOpt) applyObserve(c ObserveConfig) ObserveConfig {
+func (o *attrOpt) applyObserve(c ObserveConfig) ObserveConfig {
switch {
case o.set.Len() == 0:
case c.attrs.Len() == 0:
@@ -350,8 +365,14 @@ func (o attrOpt) applyObserve(c ObserveConfig) ObserveConfig {
// If multiple WithAttributeSet or WithAttributes options are passed the
// attributes will be merged together in the order they are passed. Attributes
// with duplicate keys will use the last value passed.
+//
+// Experimental: The returned option may implement
+// [go.opentelemetry.io/otel/metric/x.Settable][attribute.Set], which can be
+// used to replace the option's attribute set and reuse the option without
+// additional allocations. This behavior is experimental and may be changed or
+// removed in a future release without notice.
func WithAttributeSet(attributes attribute.Set) MeasurementOption {
- return attrOpt{set: attributes}
+ return &attrOpt{set: attributes}
}
// WithAttributes converts attributes into an attribute Set and sets the Set to
@@ -369,8 +390,14 @@ func WithAttributeSet(attributes attribute.Set) MeasurementOption {
//
// See [WithAttributeSet] for information about how multiple WithAttributes are
// merged.
+//
+// Experimental: The returned option may implement
+// [go.opentelemetry.io/otel/metric/x.Settable][[]attribute.KeyValue], which can be
+// used to replace the option's attributes and reuse the option without
+// additional allocations. This behavior is experimental and may be changed or
+// removed in a future release without notice.
func WithAttributes(attributes ...attribute.KeyValue) MeasurementOption {
cp := make([]attribute.KeyValue, len(attributes))
copy(cp, attributes)
- return attrOpt{set: attribute.NewSet(cp...)}
+ return &attrOpt{set: attribute.NewSet(cp...)}
}
diff --git a/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go b/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go
index abb3051d7fc8..2101f686aef2 100644
--- a/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go
+++ b/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go
@@ -51,6 +51,9 @@ type Float64CounterConfig struct {
func NewFloat64CounterConfig(opts ...Float64CounterOption) Float64CounterConfig {
var config Float64CounterConfig
for _, o := range opts {
+ if _, ok := o.(experimentalOption); ok {
+ continue
+ }
config = o.applyFloat64Counter(config)
}
return config
@@ -116,6 +119,9 @@ type Float64UpDownCounterConfig struct {
func NewFloat64UpDownCounterConfig(opts ...Float64UpDownCounterOption) Float64UpDownCounterConfig {
var config Float64UpDownCounterConfig
for _, o := range opts {
+ if _, ok := o.(experimentalOption); ok {
+ continue
+ }
config = o.applyFloat64UpDownCounter(config)
}
return config
@@ -182,6 +188,9 @@ type Float64HistogramConfig struct {
func NewFloat64HistogramConfig(opts ...Float64HistogramOption) Float64HistogramConfig {
var config Float64HistogramConfig
for _, o := range opts {
+ if _, ok := o.(experimentalOption); ok {
+ continue
+ }
config = o.applyFloat64Histogram(config)
}
return config
@@ -251,6 +260,9 @@ type Float64GaugeConfig struct {
func NewFloat64GaugeConfig(opts ...Float64GaugeOption) Float64GaugeConfig {
var config Float64GaugeConfig
for _, o := range opts {
+ if _, ok := o.(experimentalOption); ok {
+ continue
+ }
config = o.applyFloat64Gauge(config)
}
return config
diff --git a/vendor/go.opentelemetry.io/otel/metric/syncint64.go b/vendor/go.opentelemetry.io/otel/metric/syncint64.go
index 5bbfaf0397e3..425c1a0d5137 100644
--- a/vendor/go.opentelemetry.io/otel/metric/syncint64.go
+++ b/vendor/go.opentelemetry.io/otel/metric/syncint64.go
@@ -51,6 +51,9 @@ type Int64CounterConfig struct {
func NewInt64CounterConfig(opts ...Int64CounterOption) Int64CounterConfig {
var config Int64CounterConfig
for _, o := range opts {
+ if _, ok := o.(experimentalOption); ok {
+ continue
+ }
config = o.applyInt64Counter(config)
}
return config
@@ -116,6 +119,9 @@ type Int64UpDownCounterConfig struct {
func NewInt64UpDownCounterConfig(opts ...Int64UpDownCounterOption) Int64UpDownCounterConfig {
var config Int64UpDownCounterConfig
for _, o := range opts {
+ if _, ok := o.(experimentalOption); ok {
+ continue
+ }
config = o.applyInt64UpDownCounter(config)
}
return config
@@ -182,6 +188,9 @@ type Int64HistogramConfig struct {
func NewInt64HistogramConfig(opts ...Int64HistogramOption) Int64HistogramConfig {
var config Int64HistogramConfig
for _, o := range opts {
+ if _, ok := o.(experimentalOption); ok {
+ continue
+ }
config = o.applyInt64Histogram(config)
}
return config
@@ -251,6 +260,9 @@ type Int64GaugeConfig struct {
func NewInt64GaugeConfig(opts ...Int64GaugeOption) Int64GaugeConfig {
var config Int64GaugeConfig
for _, o := range opts {
+ if _, ok := o.(experimentalOption); ok {
+ continue
+ }
config = o.applyInt64Gauge(config)
}
return config
diff --git a/vendor/go.opentelemetry.io/otel/propagation/baggage.go b/vendor/go.opentelemetry.io/otel/propagation/baggage.go
index 2ecca3fed1ec..d81b709a2c15 100644
--- a/vendor/go.opentelemetry.io/otel/propagation/baggage.go
+++ b/vendor/go.opentelemetry.io/otel/propagation/baggage.go
@@ -5,6 +5,9 @@ package propagation // import "go.opentelemetry.io/otel/propagation"
import (
"context"
+ "errors"
+ "fmt"
+ "sync"
"go.opentelemetry.io/otel/baggage"
"go.opentelemetry.io/otel/internal/errorhandler"
@@ -13,11 +16,18 @@ import (
const (
baggageHeader = "baggage"
+ maxParseErrors = 5
+
// W3C Baggage specification limits.
// https://www.w3.org/TR/baggage/#limits
- maxMembers = 64
+ maxMembers = 64
+ maxBytesPerBaggageString = 8192
)
+// handleExtractErrOnce limits error reporting for attacker-controlled baggage headers
+// to one process-wide emission, preventing repeated extraction from flooding logs.
+var handleExtractErrOnce sync.Once
+
// Baggage is a propagator that supports the W3C Baggage format.
//
// This propagates user-defined baggage associated with a trace. The complete
@@ -57,7 +67,9 @@ func extractSingleBaggage(parent context.Context, carrier TextMapCarrier) contex
bag, err := baggage.Parse(bStr)
if err != nil {
- errorhandler.GetErrorHandler().Handle(err)
+ handleExtractErrOnce.Do(func() {
+ errorhandler.GetErrorHandler().Handle(err)
+ })
}
if bag.Len() == 0 {
return parent
@@ -72,24 +84,60 @@ func extractMultiBaggage(parent context.Context, carrier ValuesGetter) context.C
}
var members []baggage.Member
- for _, bStr := range bVals {
- currBag, err := baggage.Parse(bStr)
- if err != nil {
- errorhandler.GetErrorHandler().Handle(err)
+ var totalBytes int
+ var parseErrors int
+ var truncateErr error
+ for i, bStr := range bVals {
+ if i > 0 {
+ totalBytes++ // comma separator between combined header values
}
- if currBag.Len() == 0 {
- continue
+ totalBytes += len(bStr)
+ if totalBytes > maxBytesPerBaggageString {
+ // Per the W3C Baggage spec, the byte limit applies to the
+ // combination of all baggage headers, not each header
+ // individually. Mirror the single-header behavior of
+ // reporting the error and returning the parent context
+ // with no baggage attached.
+ handleExtractErrOnce.Do(func() {
+ errorhandler.GetErrorHandler().Handle(fmt.Errorf(
+ "baggage: aggregate header size %d exceeds %d byte limit",
+ totalBytes,
+ maxBytesPerBaggageString,
+ ))
+ })
+ return parent
}
- members = append(members, currBag.Members()...)
- if len(members) >= maxMembers {
- break
+
+ // If members exceed the limit, stop parsing baggage.
+ if len(members) <= maxMembers {
+ currBag, err := baggage.Parse(bStr)
+ if err != nil {
+ parseErrors++
+ if parseErrors <= maxParseErrors {
+ truncateErr = errors.Join(truncateErr, err)
+ }
+ }
+ if currBag.Len() == 0 {
+ continue
+ }
+ members = append(members, currBag.Members()...)
}
}
+ if dropped := parseErrors - maxParseErrors; dropped > 0 {
+ truncateErr = errors.Join(truncateErr, fmt.Errorf("and %d more error(s)", dropped))
+ }
+
b, err := baggage.New(members...)
if err != nil {
- errorhandler.GetErrorHandler().Handle(err)
+ truncateErr = errors.Join(truncateErr, err)
}
+ if truncateErr != nil {
+ handleExtractErrOnce.Do(func() {
+ errorhandler.GetErrorHandler().Handle(truncateErr)
+ })
+ }
+
if b.Len() == 0 {
return parent
}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go b/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go
index 04f15fcd21fd..28823edd53d2 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go
@@ -13,7 +13,7 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk"
- semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
)
type (
@@ -79,7 +79,7 @@ func (sd stringDetector) Detect(context.Context) (*Resource, error) {
}
a := sd.K.String(value)
if !a.Valid() {
- return nil, fmt.Errorf("invalid attribute: %q -> %q", a.Key, a.Value.Emit())
+ return nil, fmt.Errorf("invalid attribute: %q -> %q", a.Key, a.Value.String())
}
return NewWithAttributes(sd.schemaURL, sd.K.String(value)), nil
}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/container.go b/vendor/go.opentelemetry.io/otel/sdk/resource/container.go
index e977ff1c48a9..ce03e24c4199 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/container.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/container.go
@@ -11,7 +11,7 @@ import (
"os"
"regexp"
- semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
)
type containerIDProvider func() (string, error)
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/env.go b/vendor/go.opentelemetry.io/otel/sdk/resource/env.go
index bc0e5c19e384..ac5691c08d99 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/env.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/env.go
@@ -12,7 +12,7 @@ import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
- semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
)
const (
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go
index 755c08242748..cb38fa1a8b02 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go
@@ -8,7 +8,7 @@ import (
"errors"
"strings"
- semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
)
type hostIDProvider func() (string, error)
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_exec.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_exec.go
index d9e5d1a8fff6..e239ead02879 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_exec.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_exec.go
@@ -5,10 +5,13 @@
package resource // import "go.opentelemetry.io/otel/sdk/resource"
-import "os/exec"
+import (
+ "context"
+ "os/exec"
+)
func execCommand(name string, arg ...string) (string, error) {
- cmd := exec.Command(name, arg...)
+ cmd := exec.CommandContext(context.Background(), name, arg...)
b, err := cmd.Output()
if err != nil {
return "", err
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os.go
index f5682cad414b..4c0def414835 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/os.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os.go
@@ -8,7 +8,7 @@ import (
"strings"
"go.opentelemetry.io/otel/attribute"
- semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
)
type osDescriptionProvider func() (string, error)
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_unix.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_unix.go
index 6c50ab68677c..1cd87c398343 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/os_unix.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os_unix.go
@@ -55,7 +55,8 @@ func uname() (string, error) {
return "", err
}
- return fmt.Sprintf("%s %s %s %s %s",
+ return fmt.Sprintf(
+ "%s %s %s %s %s",
unix.ByteSliceToString(utsName.Sysname[:]),
unix.ByteSliceToString(utsName.Nodename[:]),
unix.ByteSliceToString(utsName.Release[:]),
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_windows.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_windows.go
index a6a5a53c0ea7..ebd50826d6ee 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/os_windows.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os_windows.go
@@ -16,7 +16,8 @@ import (
// resembles the one displayed by the Version Reporter Applet (winver.exe).
func platformOSDescription() (string, error) {
k, err := registry.OpenKey(
- registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Windows NT\CurrentVersion`, registry.QUERY_VALUE)
+ registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Windows NT\CurrentVersion`, registry.QUERY_VALUE,
+ )
if err != nil {
return "", err
}
@@ -37,7 +38,8 @@ func platformOSDescription() (string, error) {
displayVersion += " "
}
- return fmt.Sprintf("%s %s(%s) [Version %s.%s.%s.%s]",
+ return fmt.Sprintf(
+ "%s %s(%s) [Version %s.%s.%s.%s]",
productName,
displayVersion,
releaseID,
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/process.go b/vendor/go.opentelemetry.io/otel/sdk/resource/process.go
index 99dce64f6d39..b015f8233c68 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/process.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/process.go
@@ -11,7 +11,7 @@ import (
"path/filepath"
"runtime"
- semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
)
type (
@@ -164,7 +164,8 @@ func (processRuntimeVersionDetector) Detect(context.Context) (*Resource, error)
// Detect returns a *Resource that describes the runtime of this process.
func (processRuntimeDescriptionDetector) Detect(context.Context) (*Resource, error) {
runtimeDescription := fmt.Sprintf(
- "go version %s %s/%s", runtimeVersion(), runtimeOS(), runtimeArch())
+ "go version %s %s/%s", runtimeVersion(), runtimeOS(), runtimeArch(),
+ )
return NewWithAttributes(
semconv.SchemaURL,
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go b/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go
index 32854b14a35c..f9f2a6c2c857 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go
@@ -163,19 +163,21 @@ func (bsp *batchSpanProcessor) Shutdown(ctx context.Context) error {
bsp.stopOnce.Do(func() {
bsp.stopped.Store(true)
wait := make(chan struct{})
+ // exportErr is written by the goroutine before closing wait.
+ // It is only read in the <-wait case, so there is no race.
+ var exportErr error
go func() {
close(bsp.stopCh)
bsp.stopWait.Wait()
if bsp.e != nil {
- if err := bsp.e.Shutdown(ctx); err != nil {
- otel.Handle(err)
- }
+ exportErr = bsp.e.Shutdown(ctx)
}
close(wait)
}()
- // Wait until the wait group is done or the context is cancelled
+ // Wait until the channel is ready or the context is canceled.
select {
case <-wait:
+ err = exportErr
case <-ctx.Done():
err = ctx.Err()
}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/batch_span_processor.go b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/batch_span_processor.go
index c31e03aa0a99..c725ebf372df 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/batch_span_processor.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/batch_span_processor.go
@@ -13,8 +13,8 @@ import (
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/sdk"
"go.opentelemetry.io/otel/sdk/internal/x"
- semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
- "go.opentelemetry.io/otel/semconv/v1.40.0/otelconv"
+ semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
+ "go.opentelemetry.io/otel/semconv/v1.41.0/otelconv"
)
const (
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/simple_span_processor.go b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/simple_span_processor.go
index 0e77cd95375e..cf4b5d481fcf 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/simple_span_processor.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/simple_span_processor.go
@@ -13,8 +13,8 @@ import (
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/sdk"
"go.opentelemetry.io/otel/sdk/internal/x"
- semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
- "go.opentelemetry.io/otel/semconv/v1.40.0/otelconv"
+ semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
+ "go.opentelemetry.io/otel/semconv/v1.41.0/otelconv"
)
var measureAttrsPool = sync.Pool{
@@ -86,6 +86,7 @@ func (ssp *SSP) addOption(err error) []metric.AddOption {
}
attrs := measureAttrsPool.Get().(*[]attribute.KeyValue)
defer func() {
+ clear(*attrs)
*attrs = (*attrs)[:0] // reset the slice for reuse
measureAttrsPool.Put(attrs)
}()
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/tracer.go b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/tracer.go
index 560d316f2f7f..5aae89e883c4 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/tracer.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/tracer.go
@@ -13,7 +13,7 @@ import (
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/sdk"
"go.opentelemetry.io/otel/sdk/internal/x"
- "go.opentelemetry.io/otel/semconv/v1.40.0/otelconv"
+ "go.opentelemetry.io/otel/semconv/v1.41.0/otelconv"
"go.opentelemetry.io/otel/trace"
)
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go b/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go
index cd40d299d6ce..9d90c2eda5a4 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go
@@ -82,6 +82,10 @@ type TracerProvider struct {
var _ trace.TracerProvider = &TracerProvider{}
+type experimentalOption interface {
+ Experimental()
+}
+
// NewTracerProvider returns a new and configured TracerProvider.
//
// By default the returned TracerProvider is configured with:
@@ -99,6 +103,9 @@ func NewTracerProvider(opts ...TracerProviderOption) *TracerProvider {
o = applyTracerProviderEnvConfigs(o)
for _, opt := range opts {
+ if _, ok := opt.(experimentalOption); ok {
+ continue
+ }
o = opt.apply(o)
}
@@ -310,7 +317,7 @@ func (p *TracerProvider) Shutdown(ctx context.Context) error {
}
func (p *TracerProvider) getSpanProcessors() spanProcessorStates {
- return *(p.spanProcessors.Load())
+ return *p.spanProcessors.Load()
}
// TracerProviderOption configures a TracerProvider.
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go b/vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go
index 845e292c2bbc..5a4c74318b86 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go
@@ -297,8 +297,9 @@ func (pb parentBased) ShouldSample(p SamplingParameters) SamplingResult {
}
func (pb parentBased) Description() string {
- return fmt.Sprintf("ParentBased{root:%s,remoteParentSampled:%s,"+
- "remoteParentNotSampled:%s,localParentSampled:%s,localParentNotSampled:%s}",
+ return fmt.Sprintf(
+ "ParentBased{root:%s,remoteParentSampled:%s,"+
+ "remoteParentNotSampled:%s,localParentSampled:%s,localParentNotSampled:%s}",
pb.root.Description(),
pb.config.remoteParentSampled.Description(),
pb.config.remoteParentNotSampled.Description(),
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/span.go b/vendor/go.opentelemetry.io/otel/sdk/trace/span.go
index 7d55ce1dc2e0..d1d9af29d792 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/span.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/span.go
@@ -20,7 +20,7 @@ import (
"go.opentelemetry.io/otel/internal/global"
"go.opentelemetry.io/otel/sdk/instrumentation"
"go.opentelemetry.io/otel/sdk/resource"
- semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
"go.opentelemetry.io/otel/trace"
"go.opentelemetry.io/otel/trace/embedded"
)
@@ -346,10 +346,12 @@ func (s *recordingSpan) addOverCapAttrs(limit int, attrs []attribute.KeyValue) {
}
}
-// truncateAttr returns a truncated version of attr. Only string and string
-// slice attribute values are truncated. String values are truncated to at
-// most a length of limit. Each string slice value is truncated in this fashion
-// (the slice length itself is unaffected).
+// truncateAttr returns a truncated version of attr. Only string, string
+// slice, byte slice, and slice attribute values are truncated. String values are truncated
+// to at most a length of limit. Each string slice value is truncated in this
+// fashion (the slice length itself is unaffected), and byte slice values are truncated to at most
+// limit bytes. For slice attribute values, the limit is applied to each
+// element recursively.
//
// No truncation is performed for a negative limit.
func truncateAttr(limit int, attr attribute.KeyValue) attribute.KeyValue {
@@ -366,10 +368,95 @@ func truncateAttr(limit int, attr attribute.KeyValue) attribute.KeyValue {
v[i] = truncate(limit, v[i])
}
return attr.Key.StringSlice(v)
+ case attribute.BYTESLICE:
+ v := attr.Value.AsString()
+ if len(v) > limit {
+ return attr.Key.ByteSlice([]byte(v[:limit]))
+ }
+ return attr
+ case attribute.SLICE:
+ v := attr.Value.AsSlice()
+ if !slices.ContainsFunc(v, func(e attribute.Value) bool { return needsTruncation(limit, e) }) {
+ return attr
+ }
+ newV := make([]attribute.Value, len(v))
+ for i, elem := range v {
+ newV[i] = truncateValue(limit, elem)
+ }
+ return attr.Key.Slice(newV...)
}
return attr
}
+// truncateValue returns a truncated version of v. Only string, string slice,
+// byte slice, and (recursively) slice values are modified.
+//
+// No truncation is performed for a negative limit.
+func truncateValue(limit int, v attribute.Value) attribute.Value {
+ switch v.Type() {
+ case attribute.STRING:
+ return attribute.StringValue(truncate(limit, v.AsString()))
+ case attribute.STRINGSLICE:
+ ss := v.AsStringSlice()
+ for i := range ss {
+ ss[i] = truncate(limit, ss[i])
+ }
+ return attribute.StringSliceValue(ss)
+
+ case attribute.BYTESLICE:
+ // len(v.AsString()) is identical to len(v.AsByteSlice()) but
+ // avoids allocating the full slice before truncation.
+ s := v.AsString()
+ if limit >= 0 && len(s) > limit {
+ return attribute.ByteSliceValue([]byte(s[:limit]))
+ }
+ case attribute.SLICE:
+ sl := v.AsSlice()
+ if !slices.ContainsFunc(sl, func(e attribute.Value) bool { return needsTruncation(limit, e) }) {
+ return v
+ }
+ newSl := make([]attribute.Value, len(sl))
+ for i, elem := range sl {
+ newSl[i] = truncateValue(limit, elem)
+ }
+ return attribute.SliceValue(newSl...)
+ }
+ return v
+}
+
+// stringNeedsTruncation reports whether s would be modified by truncate for the
+// given limit.
+func stringNeedsTruncation(limit int, s string) bool {
+ if limit < 0 || len(s) <= limit {
+ return false
+ }
+ return utf8.RuneCountInString(s) > limit || !utf8.ValidString(s)
+}
+
+// needsTruncation reports whether v would be modified by truncateValue for the
+// given limit.
+func needsTruncation(limit int, v attribute.Value) bool {
+ switch v.Type() {
+ case attribute.STRING:
+ return stringNeedsTruncation(limit, v.AsString())
+ case attribute.BYTESLICE:
+ // len(v.AsString()) is identical to len(v.AsByteSlice()) but
+ // avoids memory allocation.
+ if limit >= 0 && len(v.AsString()) > limit {
+ return true
+ }
+ case attribute.STRINGSLICE:
+ for _, s := range v.AsStringSlice() {
+ if stringNeedsTruncation(limit, s) {
+ return true
+ }
+ }
+ case attribute.SLICE:
+ return slices.ContainsFunc(v.AsSlice(), func(e attribute.Value) bool { return needsTruncation(limit, e) })
+ }
+ return false
+}
+
// truncate returns a truncated version of s such that it contains less than
// the limit number of characters. Truncation is applied by returning the limit
// number of valid characters contained in s.
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go b/vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go
index 321d97430583..348ee0e808b3 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go
@@ -35,8 +35,10 @@ const (
type SpanLimits struct {
// AttributeValueLengthLimit is the maximum allowed attribute value length.
//
- // This limit only applies to string and string slice attribute values.
- // Any string longer than this value will be truncated to this length.
+ // This limit only applies to string, string slice, byte slice, and slice attribute
+ // values. Any string and byte slice longer than this value will be truncated to this
+ // length. For slice attribute values, the limit is applied to each string and byte slice
+ // element recursively.
//
// Setting this to a negative value means no limit is applied.
AttributeValueLengthLimit int
diff --git a/vendor/go.opentelemetry.io/otel/sdk/version.go b/vendor/go.opentelemetry.io/otel/sdk/version.go
index 766731dd25d2..218dce1f562a 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/version.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/version.go
@@ -6,5 +6,5 @@ package sdk // import "go.opentelemetry.io/otel/sdk"
// Version is the current release version of the OpenTelemetry SDK in use.
func Version() string {
- return "1.43.0"
+ return "1.44.0"
}
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/attribute_group.go b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/attribute_group.go
index b6b27498f2b4..2fcab24352ef 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/attribute_group.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/attribute_group.go
@@ -1447,9 +1447,11 @@ func AWSExtendedRequestID(val string) attribute.KeyValue {
// AWSKinesisStreamName returns an attribute KeyValue conforming to the
// "aws.kinesis.stream_name" semantic conventions. It represents the name of the
// AWS Kinesis [stream] the request refers to. Corresponds to the `--stream-name`
-// parameter of the Kinesis [describe-stream] operation.
+//
+// parameter of the Kinesis [describe-stream] operation.
//
// [stream]: https://docs.aws.amazon.com/streams/latest/dev/introduction.html
+//
// [describe-stream]: https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html
func AWSKinesisStreamName(val string) attribute.KeyValue {
return AWSKinesisStreamNameKey.String(val)
@@ -1459,7 +1461,8 @@ func AWSKinesisStreamName(val string) attribute.KeyValue {
// "aws.lambda.invoked_arn" semantic conventions. It represents the full invoked
// ARN as provided on the `Context` passed to the function (
// `Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next`
-// applicable).
+//
+// applicable).
func AWSLambdaInvokedARN(val string) attribute.KeyValue {
return AWSLambdaInvokedARNKey.String(val)
}
@@ -2635,7 +2638,8 @@ func CloudRegion(val string) attribute.KeyValue {
// "cloud.resource_id" semantic conventions. It represents the cloud
// provider-specific native identifier of the monitored cloud resource (e.g. an
// [ARN] on AWS, a [fully qualified resource ID] on Azure, a [full resource name]
-// on GCP).
+//
+// on GCP).
//
// [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
// [fully qualified resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id
@@ -15190,4 +15194,4 @@ func ZOSSmfID(val string) attribute.KeyValue {
// to which the z/OS system belongs too.
func ZOSSysplexName(val string) attribute.KeyValue {
return ZOSSysplexNameKey.String(val)
-}
\ No newline at end of file
+}
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/rpcconv/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/rpcconv/metric.go
new file mode 100644
index 000000000000..089b0c457fca
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/rpcconv/metric.go
@@ -0,0 +1,1010 @@
+// Code generated from semantic convention specification. DO NOT EDIT.
+
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Package rpcconv provides types and functionality for OpenTelemetry semantic
+// conventions in the "rpc" namespace.
+package rpcconv
+
+import (
+ "context"
+ "sync"
+
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/metric"
+ "go.opentelemetry.io/otel/metric/noop"
+)
+
+var (
+ addOptPool = &sync.Pool{New: func() any { return &[]metric.AddOption{} }}
+ recOptPool = &sync.Pool{New: func() any { return &[]metric.RecordOption{} }}
+)
+
+// ClientDuration is an instrument used to record metric values conforming to the
+// "rpc.client.duration" semantic conventions. It represents the measures the
+// duration of outbound RPC.
+type ClientDuration struct {
+ metric.Float64Histogram
+}
+
+var newClientDurationOpts = []metric.Float64HistogramOption{
+ metric.WithDescription("Measures the duration of outbound RPC."),
+ metric.WithUnit("ms"),
+}
+
+// NewClientDuration returns a new ClientDuration instrument.
+func NewClientDuration(
+ m metric.Meter,
+ opt ...metric.Float64HistogramOption,
+) (ClientDuration, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return ClientDuration{noop.Float64Histogram{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newClientDurationOpts
+ } else {
+ opt = append(opt, newClientDurationOpts...)
+ }
+
+ i, err := m.Float64Histogram(
+ "rpc.client.duration",
+ opt...,
+ )
+ if err != nil {
+ return ClientDuration{noop.Float64Histogram{}}, err
+ }
+ return ClientDuration{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m ClientDuration) Inst() metric.Float64Histogram {
+ return m.Float64Histogram
+}
+
+// Name returns the semantic convention name of the instrument.
+func (ClientDuration) Name() string {
+ return "rpc.client.duration"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (ClientDuration) Unit() string {
+ return "ms"
+}
+
+// Description returns the semantic convention description of the instrument
+func (ClientDuration) Description() string {
+ return "Measures the duration of outbound RPC."
+}
+
+// Record records val to the current distribution for attrs.
+//
+// While streaming RPCs may record this metric as start-of-batch
+// to end-of-batch, it's hard to interpret in practice.
+//
+// **Streaming**: N/A.
+func (m ClientDuration) Record(ctx context.Context, val float64, attrs ...attribute.KeyValue) {
+ if len(attrs) == 0 {
+ m.Float64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := recOptPool.Get().(*[]metric.RecordOption)
+ defer func() {
+ *o = (*o)[:0]
+ recOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributes(attrs...))
+ m.Float64Histogram.Record(ctx, val, *o...)
+}
+
+// RecordSet records val to the current distribution for set.
+//
+// While streaming RPCs may record this metric as start-of-batch
+// to end-of-batch, it's hard to interpret in practice.
+//
+// **Streaming**: N/A.
+func (m ClientDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) {
+ if set.Len() == 0 {
+ m.Float64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := recOptPool.Get().(*[]metric.RecordOption)
+ defer func() {
+ *o = (*o)[:0]
+ recOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Float64Histogram.Record(ctx, val, *o...)
+}
+
+// ClientRequestSize is an instrument used to record metric values conforming to
+// the "rpc.client.request.size" semantic conventions. It represents the measures
+// the size of RPC request messages (uncompressed).
+type ClientRequestSize struct {
+ metric.Int64Histogram
+}
+
+var newClientRequestSizeOpts = []metric.Int64HistogramOption{
+ metric.WithDescription("Measures the size of RPC request messages (uncompressed)."),
+ metric.WithUnit("By"),
+}
+
+// NewClientRequestSize returns a new ClientRequestSize instrument.
+func NewClientRequestSize(
+ m metric.Meter,
+ opt ...metric.Int64HistogramOption,
+) (ClientRequestSize, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return ClientRequestSize{noop.Int64Histogram{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newClientRequestSizeOpts
+ } else {
+ opt = append(opt, newClientRequestSizeOpts...)
+ }
+
+ i, err := m.Int64Histogram(
+ "rpc.client.request.size",
+ opt...,
+ )
+ if err != nil {
+ return ClientRequestSize{noop.Int64Histogram{}}, err
+ }
+ return ClientRequestSize{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m ClientRequestSize) Inst() metric.Int64Histogram {
+ return m.Int64Histogram
+}
+
+// Name returns the semantic convention name of the instrument.
+func (ClientRequestSize) Name() string {
+ return "rpc.client.request.size"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (ClientRequestSize) Unit() string {
+ return "By"
+}
+
+// Description returns the semantic convention description of the instrument
+func (ClientRequestSize) Description() string {
+ return "Measures the size of RPC request messages (uncompressed)."
+}
+
+// Record records val to the current distribution for attrs.
+//
+// **Streaming**: Recorded per message in a streaming batch
+func (m ClientRequestSize) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue) {
+ if len(attrs) == 0 {
+ m.Int64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := recOptPool.Get().(*[]metric.RecordOption)
+ defer func() {
+ *o = (*o)[:0]
+ recOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributes(attrs...))
+ m.Int64Histogram.Record(ctx, val, *o...)
+}
+
+// RecordSet records val to the current distribution for set.
+//
+// **Streaming**: Recorded per message in a streaming batch
+func (m ClientRequestSize) RecordSet(ctx context.Context, val int64, set attribute.Set) {
+ if set.Len() == 0 {
+ m.Int64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := recOptPool.Get().(*[]metric.RecordOption)
+ defer func() {
+ *o = (*o)[:0]
+ recOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Int64Histogram.Record(ctx, val, *o...)
+}
+
+// ClientRequestsPerRPC is an instrument used to record metric values conforming
+// to the "rpc.client.requests_per_rpc" semantic conventions. It represents the
+// measures the number of messages received per RPC.
+type ClientRequestsPerRPC struct {
+ metric.Int64Histogram
+}
+
+var newClientRequestsPerRPCOpts = []metric.Int64HistogramOption{
+ metric.WithDescription("Measures the number of messages received per RPC."),
+ metric.WithUnit("{count}"),
+}
+
+// NewClientRequestsPerRPC returns a new ClientRequestsPerRPC instrument.
+func NewClientRequestsPerRPC(
+ m metric.Meter,
+ opt ...metric.Int64HistogramOption,
+) (ClientRequestsPerRPC, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return ClientRequestsPerRPC{noop.Int64Histogram{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newClientRequestsPerRPCOpts
+ } else {
+ opt = append(opt, newClientRequestsPerRPCOpts...)
+ }
+
+ i, err := m.Int64Histogram(
+ "rpc.client.requests_per_rpc",
+ opt...,
+ )
+ if err != nil {
+ return ClientRequestsPerRPC{noop.Int64Histogram{}}, err
+ }
+ return ClientRequestsPerRPC{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m ClientRequestsPerRPC) Inst() metric.Int64Histogram {
+ return m.Int64Histogram
+}
+
+// Name returns the semantic convention name of the instrument.
+func (ClientRequestsPerRPC) Name() string {
+ return "rpc.client.requests_per_rpc"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (ClientRequestsPerRPC) Unit() string {
+ return "{count}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (ClientRequestsPerRPC) Description() string {
+ return "Measures the number of messages received per RPC."
+}
+
+// Record records val to the current distribution for attrs.
+//
+// Should be 1 for all non-streaming RPCs.
+//
+// **Streaming**: This metric is required for server and client streaming RPCs
+func (m ClientRequestsPerRPC) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue) {
+ if len(attrs) == 0 {
+ m.Int64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := recOptPool.Get().(*[]metric.RecordOption)
+ defer func() {
+ *o = (*o)[:0]
+ recOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributes(attrs...))
+ m.Int64Histogram.Record(ctx, val, *o...)
+}
+
+// RecordSet records val to the current distribution for set.
+//
+// Should be 1 for all non-streaming RPCs.
+//
+// **Streaming**: This metric is required for server and client streaming RPCs
+func (m ClientRequestsPerRPC) RecordSet(ctx context.Context, val int64, set attribute.Set) {
+ if set.Len() == 0 {
+ m.Int64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := recOptPool.Get().(*[]metric.RecordOption)
+ defer func() {
+ *o = (*o)[:0]
+ recOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Int64Histogram.Record(ctx, val, *o...)
+}
+
+// ClientResponseSize is an instrument used to record metric values conforming to
+// the "rpc.client.response.size" semantic conventions. It represents the
+// measures the size of RPC response messages (uncompressed).
+type ClientResponseSize struct {
+ metric.Int64Histogram
+}
+
+var newClientResponseSizeOpts = []metric.Int64HistogramOption{
+ metric.WithDescription("Measures the size of RPC response messages (uncompressed)."),
+ metric.WithUnit("By"),
+}
+
+// NewClientResponseSize returns a new ClientResponseSize instrument.
+func NewClientResponseSize(
+ m metric.Meter,
+ opt ...metric.Int64HistogramOption,
+) (ClientResponseSize, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return ClientResponseSize{noop.Int64Histogram{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newClientResponseSizeOpts
+ } else {
+ opt = append(opt, newClientResponseSizeOpts...)
+ }
+
+ i, err := m.Int64Histogram(
+ "rpc.client.response.size",
+ opt...,
+ )
+ if err != nil {
+ return ClientResponseSize{noop.Int64Histogram{}}, err
+ }
+ return ClientResponseSize{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m ClientResponseSize) Inst() metric.Int64Histogram {
+ return m.Int64Histogram
+}
+
+// Name returns the semantic convention name of the instrument.
+func (ClientResponseSize) Name() string {
+ return "rpc.client.response.size"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (ClientResponseSize) Unit() string {
+ return "By"
+}
+
+// Description returns the semantic convention description of the instrument
+func (ClientResponseSize) Description() string {
+ return "Measures the size of RPC response messages (uncompressed)."
+}
+
+// Record records val to the current distribution for attrs.
+//
+// **Streaming**: Recorded per response in a streaming batch
+func (m ClientResponseSize) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue) {
+ if len(attrs) == 0 {
+ m.Int64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := recOptPool.Get().(*[]metric.RecordOption)
+ defer func() {
+ *o = (*o)[:0]
+ recOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributes(attrs...))
+ m.Int64Histogram.Record(ctx, val, *o...)
+}
+
+// RecordSet records val to the current distribution for set.
+//
+// **Streaming**: Recorded per response in a streaming batch
+func (m ClientResponseSize) RecordSet(ctx context.Context, val int64, set attribute.Set) {
+ if set.Len() == 0 {
+ m.Int64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := recOptPool.Get().(*[]metric.RecordOption)
+ defer func() {
+ *o = (*o)[:0]
+ recOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Int64Histogram.Record(ctx, val, *o...)
+}
+
+// ClientResponsesPerRPC is an instrument used to record metric values conforming
+// to the "rpc.client.responses_per_rpc" semantic conventions. It represents the
+// measures the number of messages sent per RPC.
+type ClientResponsesPerRPC struct {
+ metric.Int64Histogram
+}
+
+var newClientResponsesPerRPCOpts = []metric.Int64HistogramOption{
+ metric.WithDescription("Measures the number of messages sent per RPC."),
+ metric.WithUnit("{count}"),
+}
+
+// NewClientResponsesPerRPC returns a new ClientResponsesPerRPC instrument.
+func NewClientResponsesPerRPC(
+ m metric.Meter,
+ opt ...metric.Int64HistogramOption,
+) (ClientResponsesPerRPC, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return ClientResponsesPerRPC{noop.Int64Histogram{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newClientResponsesPerRPCOpts
+ } else {
+ opt = append(opt, newClientResponsesPerRPCOpts...)
+ }
+
+ i, err := m.Int64Histogram(
+ "rpc.client.responses_per_rpc",
+ opt...,
+ )
+ if err != nil {
+ return ClientResponsesPerRPC{noop.Int64Histogram{}}, err
+ }
+ return ClientResponsesPerRPC{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m ClientResponsesPerRPC) Inst() metric.Int64Histogram {
+ return m.Int64Histogram
+}
+
+// Name returns the semantic convention name of the instrument.
+func (ClientResponsesPerRPC) Name() string {
+ return "rpc.client.responses_per_rpc"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (ClientResponsesPerRPC) Unit() string {
+ return "{count}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (ClientResponsesPerRPC) Description() string {
+ return "Measures the number of messages sent per RPC."
+}
+
+// Record records val to the current distribution for attrs.
+//
+// Should be 1 for all non-streaming RPCs.
+//
+// **Streaming**: This metric is required for server and client streaming RPCs
+func (m ClientResponsesPerRPC) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue) {
+ if len(attrs) == 0 {
+ m.Int64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := recOptPool.Get().(*[]metric.RecordOption)
+ defer func() {
+ *o = (*o)[:0]
+ recOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributes(attrs...))
+ m.Int64Histogram.Record(ctx, val, *o...)
+}
+
+// RecordSet records val to the current distribution for set.
+//
+// Should be 1 for all non-streaming RPCs.
+//
+// **Streaming**: This metric is required for server and client streaming RPCs
+func (m ClientResponsesPerRPC) RecordSet(ctx context.Context, val int64, set attribute.Set) {
+ if set.Len() == 0 {
+ m.Int64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := recOptPool.Get().(*[]metric.RecordOption)
+ defer func() {
+ *o = (*o)[:0]
+ recOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Int64Histogram.Record(ctx, val, *o...)
+}
+
+// ServerDuration is an instrument used to record metric values conforming to the
+// "rpc.server.duration" semantic conventions. It represents the measures the
+// duration of inbound RPC.
+type ServerDuration struct {
+ metric.Float64Histogram
+}
+
+var newServerDurationOpts = []metric.Float64HistogramOption{
+ metric.WithDescription("Measures the duration of inbound RPC."),
+ metric.WithUnit("ms"),
+}
+
+// NewServerDuration returns a new ServerDuration instrument.
+func NewServerDuration(
+ m metric.Meter,
+ opt ...metric.Float64HistogramOption,
+) (ServerDuration, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return ServerDuration{noop.Float64Histogram{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newServerDurationOpts
+ } else {
+ opt = append(opt, newServerDurationOpts...)
+ }
+
+ i, err := m.Float64Histogram(
+ "rpc.server.duration",
+ opt...,
+ )
+ if err != nil {
+ return ServerDuration{noop.Float64Histogram{}}, err
+ }
+ return ServerDuration{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m ServerDuration) Inst() metric.Float64Histogram {
+ return m.Float64Histogram
+}
+
+// Name returns the semantic convention name of the instrument.
+func (ServerDuration) Name() string {
+ return "rpc.server.duration"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (ServerDuration) Unit() string {
+ return "ms"
+}
+
+// Description returns the semantic convention description of the instrument
+func (ServerDuration) Description() string {
+ return "Measures the duration of inbound RPC."
+}
+
+// Record records val to the current distribution for attrs.
+//
+// While streaming RPCs may record this metric as start-of-batch
+// to end-of-batch, it's hard to interpret in practice.
+//
+// **Streaming**: N/A.
+func (m ServerDuration) Record(ctx context.Context, val float64, attrs ...attribute.KeyValue) {
+ if len(attrs) == 0 {
+ m.Float64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := recOptPool.Get().(*[]metric.RecordOption)
+ defer func() {
+ *o = (*o)[:0]
+ recOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributes(attrs...))
+ m.Float64Histogram.Record(ctx, val, *o...)
+}
+
+// RecordSet records val to the current distribution for set.
+//
+// While streaming RPCs may record this metric as start-of-batch
+// to end-of-batch, it's hard to interpret in practice.
+//
+// **Streaming**: N/A.
+func (m ServerDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) {
+ if set.Len() == 0 {
+ m.Float64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := recOptPool.Get().(*[]metric.RecordOption)
+ defer func() {
+ *o = (*o)[:0]
+ recOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Float64Histogram.Record(ctx, val, *o...)
+}
+
+// ServerRequestSize is an instrument used to record metric values conforming to
+// the "rpc.server.request.size" semantic conventions. It represents the measures
+// the size of RPC request messages (uncompressed).
+type ServerRequestSize struct {
+ metric.Int64Histogram
+}
+
+var newServerRequestSizeOpts = []metric.Int64HistogramOption{
+ metric.WithDescription("Measures the size of RPC request messages (uncompressed)."),
+ metric.WithUnit("By"),
+}
+
+// NewServerRequestSize returns a new ServerRequestSize instrument.
+func NewServerRequestSize(
+ m metric.Meter,
+ opt ...metric.Int64HistogramOption,
+) (ServerRequestSize, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return ServerRequestSize{noop.Int64Histogram{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newServerRequestSizeOpts
+ } else {
+ opt = append(opt, newServerRequestSizeOpts...)
+ }
+
+ i, err := m.Int64Histogram(
+ "rpc.server.request.size",
+ opt...,
+ )
+ if err != nil {
+ return ServerRequestSize{noop.Int64Histogram{}}, err
+ }
+ return ServerRequestSize{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m ServerRequestSize) Inst() metric.Int64Histogram {
+ return m.Int64Histogram
+}
+
+// Name returns the semantic convention name of the instrument.
+func (ServerRequestSize) Name() string {
+ return "rpc.server.request.size"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (ServerRequestSize) Unit() string {
+ return "By"
+}
+
+// Description returns the semantic convention description of the instrument
+func (ServerRequestSize) Description() string {
+ return "Measures the size of RPC request messages (uncompressed)."
+}
+
+// Record records val to the current distribution for attrs.
+//
+// **Streaming**: Recorded per message in a streaming batch
+func (m ServerRequestSize) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue) {
+ if len(attrs) == 0 {
+ m.Int64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := recOptPool.Get().(*[]metric.RecordOption)
+ defer func() {
+ *o = (*o)[:0]
+ recOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributes(attrs...))
+ m.Int64Histogram.Record(ctx, val, *o...)
+}
+
+// RecordSet records val to the current distribution for set.
+//
+// **Streaming**: Recorded per message in a streaming batch
+func (m ServerRequestSize) RecordSet(ctx context.Context, val int64, set attribute.Set) {
+ if set.Len() == 0 {
+ m.Int64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := recOptPool.Get().(*[]metric.RecordOption)
+ defer func() {
+ *o = (*o)[:0]
+ recOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Int64Histogram.Record(ctx, val, *o...)
+}
+
+// ServerRequestsPerRPC is an instrument used to record metric values conforming
+// to the "rpc.server.requests_per_rpc" semantic conventions. It represents the
+// measures the number of messages received per RPC.
+type ServerRequestsPerRPC struct {
+ metric.Int64Histogram
+}
+
+var newServerRequestsPerRPCOpts = []metric.Int64HistogramOption{
+ metric.WithDescription("Measures the number of messages received per RPC."),
+ metric.WithUnit("{count}"),
+}
+
+// NewServerRequestsPerRPC returns a new ServerRequestsPerRPC instrument.
+func NewServerRequestsPerRPC(
+ m metric.Meter,
+ opt ...metric.Int64HistogramOption,
+) (ServerRequestsPerRPC, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return ServerRequestsPerRPC{noop.Int64Histogram{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newServerRequestsPerRPCOpts
+ } else {
+ opt = append(opt, newServerRequestsPerRPCOpts...)
+ }
+
+ i, err := m.Int64Histogram(
+ "rpc.server.requests_per_rpc",
+ opt...,
+ )
+ if err != nil {
+ return ServerRequestsPerRPC{noop.Int64Histogram{}}, err
+ }
+ return ServerRequestsPerRPC{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m ServerRequestsPerRPC) Inst() metric.Int64Histogram {
+ return m.Int64Histogram
+}
+
+// Name returns the semantic convention name of the instrument.
+func (ServerRequestsPerRPC) Name() string {
+ return "rpc.server.requests_per_rpc"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (ServerRequestsPerRPC) Unit() string {
+ return "{count}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (ServerRequestsPerRPC) Description() string {
+ return "Measures the number of messages received per RPC."
+}
+
+// Record records val to the current distribution for attrs.
+//
+// Should be 1 for all non-streaming RPCs.
+//
+// **Streaming** : This metric is required for server and client streaming RPCs
+func (m ServerRequestsPerRPC) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue) {
+ if len(attrs) == 0 {
+ m.Int64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := recOptPool.Get().(*[]metric.RecordOption)
+ defer func() {
+ *o = (*o)[:0]
+ recOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributes(attrs...))
+ m.Int64Histogram.Record(ctx, val, *o...)
+}
+
+// RecordSet records val to the current distribution for set.
+//
+// Should be 1 for all non-streaming RPCs.
+//
+// **Streaming** : This metric is required for server and client streaming RPCs
+func (m ServerRequestsPerRPC) RecordSet(ctx context.Context, val int64, set attribute.Set) {
+ if set.Len() == 0 {
+ m.Int64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := recOptPool.Get().(*[]metric.RecordOption)
+ defer func() {
+ *o = (*o)[:0]
+ recOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Int64Histogram.Record(ctx, val, *o...)
+}
+
+// ServerResponseSize is an instrument used to record metric values conforming to
+// the "rpc.server.response.size" semantic conventions. It represents the
+// measures the size of RPC response messages (uncompressed).
+type ServerResponseSize struct {
+ metric.Int64Histogram
+}
+
+var newServerResponseSizeOpts = []metric.Int64HistogramOption{
+ metric.WithDescription("Measures the size of RPC response messages (uncompressed)."),
+ metric.WithUnit("By"),
+}
+
+// NewServerResponseSize returns a new ServerResponseSize instrument.
+func NewServerResponseSize(
+ m metric.Meter,
+ opt ...metric.Int64HistogramOption,
+) (ServerResponseSize, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return ServerResponseSize{noop.Int64Histogram{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newServerResponseSizeOpts
+ } else {
+ opt = append(opt, newServerResponseSizeOpts...)
+ }
+
+ i, err := m.Int64Histogram(
+ "rpc.server.response.size",
+ opt...,
+ )
+ if err != nil {
+ return ServerResponseSize{noop.Int64Histogram{}}, err
+ }
+ return ServerResponseSize{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m ServerResponseSize) Inst() metric.Int64Histogram {
+ return m.Int64Histogram
+}
+
+// Name returns the semantic convention name of the instrument.
+func (ServerResponseSize) Name() string {
+ return "rpc.server.response.size"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (ServerResponseSize) Unit() string {
+ return "By"
+}
+
+// Description returns the semantic convention description of the instrument
+func (ServerResponseSize) Description() string {
+ return "Measures the size of RPC response messages (uncompressed)."
+}
+
+// Record records val to the current distribution for attrs.
+//
+// **Streaming**: Recorded per response in a streaming batch
+func (m ServerResponseSize) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue) {
+ if len(attrs) == 0 {
+ m.Int64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := recOptPool.Get().(*[]metric.RecordOption)
+ defer func() {
+ *o = (*o)[:0]
+ recOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributes(attrs...))
+ m.Int64Histogram.Record(ctx, val, *o...)
+}
+
+// RecordSet records val to the current distribution for set.
+//
+// **Streaming**: Recorded per response in a streaming batch
+func (m ServerResponseSize) RecordSet(ctx context.Context, val int64, set attribute.Set) {
+ if set.Len() == 0 {
+ m.Int64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := recOptPool.Get().(*[]metric.RecordOption)
+ defer func() {
+ *o = (*o)[:0]
+ recOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Int64Histogram.Record(ctx, val, *o...)
+}
+
+// ServerResponsesPerRPC is an instrument used to record metric values conforming
+// to the "rpc.server.responses_per_rpc" semantic conventions. It represents the
+// measures the number of messages sent per RPC.
+type ServerResponsesPerRPC struct {
+ metric.Int64Histogram
+}
+
+var newServerResponsesPerRPCOpts = []metric.Int64HistogramOption{
+ metric.WithDescription("Measures the number of messages sent per RPC."),
+ metric.WithUnit("{count}"),
+}
+
+// NewServerResponsesPerRPC returns a new ServerResponsesPerRPC instrument.
+func NewServerResponsesPerRPC(
+ m metric.Meter,
+ opt ...metric.Int64HistogramOption,
+) (ServerResponsesPerRPC, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return ServerResponsesPerRPC{noop.Int64Histogram{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newServerResponsesPerRPCOpts
+ } else {
+ opt = append(opt, newServerResponsesPerRPCOpts...)
+ }
+
+ i, err := m.Int64Histogram(
+ "rpc.server.responses_per_rpc",
+ opt...,
+ )
+ if err != nil {
+ return ServerResponsesPerRPC{noop.Int64Histogram{}}, err
+ }
+ return ServerResponsesPerRPC{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m ServerResponsesPerRPC) Inst() metric.Int64Histogram {
+ return m.Int64Histogram
+}
+
+// Name returns the semantic convention name of the instrument.
+func (ServerResponsesPerRPC) Name() string {
+ return "rpc.server.responses_per_rpc"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (ServerResponsesPerRPC) Unit() string {
+ return "{count}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (ServerResponsesPerRPC) Description() string {
+ return "Measures the number of messages sent per RPC."
+}
+
+// Record records val to the current distribution for attrs.
+//
+// Should be 1 for all non-streaming RPCs.
+//
+// **Streaming**: This metric is required for server and client streaming RPCs
+func (m ServerResponsesPerRPC) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue) {
+ if len(attrs) == 0 {
+ m.Int64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := recOptPool.Get().(*[]metric.RecordOption)
+ defer func() {
+ *o = (*o)[:0]
+ recOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributes(attrs...))
+ m.Int64Histogram.Record(ctx, val, *o...)
+}
+
+// RecordSet records val to the current distribution for set.
+//
+// Should be 1 for all non-streaming RPCs.
+//
+// **Streaming**: This metric is required for server and client streaming RPCs
+func (m ServerResponsesPerRPC) RecordSet(ctx context.Context, val int64, set attribute.Set) {
+ if set.Len() == 0 {
+ m.Int64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := recOptPool.Get().(*[]metric.RecordOption)
+ defer func() {
+ *o = (*o)[:0]
+ recOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Int64Histogram.Record(ctx, val, *o...)
+}
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/MIGRATION.md b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/MIGRATION.md
deleted file mode 100644
index fed7013e6ff1..000000000000
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/MIGRATION.md
+++ /dev/null
@@ -1,78 +0,0 @@
-
-# Migration from v1.38.0 to v1.39.0
-
-The `go.opentelemetry.io/otel/semconv/v1.39.0` package should be a drop-in replacement for `go.opentelemetry.io/otel/semconv/v1.38.0` with the following exceptions.
-
-## Removed
-
-The following declarations have been removed.
-Refer to the [OpenTelemetry Semantic Conventions documentation] for deprecation instructions.
-
-If the type is not listed in the documentation as deprecated, it has been removed in this version due to lack of applicability or use.
-If you use any of these non-deprecated declarations in your Go application, please [open an issue] describing your use-case.
-
-- `LinuxMemorySlabStateKey`
-- `LinuxMemorySlabStateReclaimable`
-- `LinuxMemorySlabStateUnreclaimable`
-- `PeerService`
-- `PeerServiceKey`
-- `RPCConnectRPCErrorCodeAborted`
-- `RPCConnectRPCErrorCodeAlreadyExists`
-- `RPCConnectRPCErrorCodeCancelled`
-- `RPCConnectRPCErrorCodeDataLoss`
-- `RPCConnectRPCErrorCodeDeadlineExceeded`
-- `RPCConnectRPCErrorCodeFailedPrecondition`
-- `RPCConnectRPCErrorCodeInternal`
-- `RPCConnectRPCErrorCodeInvalidArgument`
-- `RPCConnectRPCErrorCodeKey`
-- `RPCConnectRPCErrorCodeNotFound`
-- `RPCConnectRPCErrorCodeOutOfRange`
-- `RPCConnectRPCErrorCodePermissionDenied`
-- `RPCConnectRPCErrorCodeResourceExhausted`
-- `RPCConnectRPCErrorCodeUnauthenticated`
-- `RPCConnectRPCErrorCodeUnavailable`
-- `RPCConnectRPCErrorCodeUnimplemented`
-- `RPCConnectRPCErrorCodeUnknown`
-- `RPCConnectRPCRequestMetadata`
-- `RPCConnectRPCResponseMetadata`
-- `RPCGRPCRequestMetadata`
-- `RPCGRPCResponseMetadata`
-- `RPCGRPCStatusCodeAborted`
-- `RPCGRPCStatusCodeAlreadyExists`
-- `RPCGRPCStatusCodeCancelled`
-- `RPCGRPCStatusCodeDataLoss`
-- `RPCGRPCStatusCodeDeadlineExceeded`
-- `RPCGRPCStatusCodeFailedPrecondition`
-- `RPCGRPCStatusCodeInternal`
-- `RPCGRPCStatusCodeInvalidArgument`
-- `RPCGRPCStatusCodeKey`
-- `RPCGRPCStatusCodeNotFound`
-- `RPCGRPCStatusCodeOk`
-- `RPCGRPCStatusCodeOutOfRange`
-- `RPCGRPCStatusCodePermissionDenied`
-- `RPCGRPCStatusCodeResourceExhausted`
-- `RPCGRPCStatusCodeUnauthenticated`
-- `RPCGRPCStatusCodeUnavailable`
-- `RPCGRPCStatusCodeUnimplemented`
-- `RPCGRPCStatusCodeUnknown`
-- `RPCJSONRPCErrorCode`
-- `RPCJSONRPCErrorCodeKey`
-- `RPCJSONRPCErrorMessage`
-- `RPCJSONRPCErrorMessageKey`
-- `RPCJSONRPCRequestID`
-- `RPCJSONRPCRequestIDKey`
-- `RPCJSONRPCVersion`
-- `RPCJSONRPCVersionKey`
-- `RPCService`
-- `RPCServiceKey`
-- `RPCSystemApacheDubbo`
-- `RPCSystemConnectRPC`
-- `RPCSystemDotnetWcf`
-- `RPCSystemGRPC`
-- `RPCSystemJSONRPC`
-- `RPCSystemJavaRmi`
-- `RPCSystemKey`
-- `RPCSystemOncRPC`
-
-[OpenTelemetry Semantic Conventions documentation]: https://github.com/open-telemetry/semantic-conventions
-[open an issue]: https://github.com/open-telemetry/opentelemetry-go/issues/new?template=Blank+issue
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/README.md b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/README.md
deleted file mode 100644
index 4b0e6f7f3eb0..000000000000
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Semconv v1.39.0
-
-[](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.39.0)
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/attribute_group.go b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/attribute_group.go
deleted file mode 100644
index 080365fc1969..000000000000
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/attribute_group.go
+++ /dev/null
@@ -1,16239 +0,0 @@
-// Copyright The OpenTelemetry Authors
-// SPDX-License-Identifier: Apache-2.0
-
-// Code generated from semantic convention specification. DO NOT EDIT.
-
-package semconv // import "go.opentelemetry.io/otel/semconv/v1.39.0"
-
-import "go.opentelemetry.io/otel/attribute"
-
-// Namespace: android
-const (
- // AndroidAppStateKey is the attribute Key conforming to the "android.app.state"
- // semantic conventions. It represents the this attribute represents the state
- // of the application.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "created"
- // Note: The Android lifecycle states are defined in
- // [Activity lifecycle callbacks], and from which the `OS identifiers` are
- // derived.
- //
- // [Activity lifecycle callbacks]: https://developer.android.com/guide/components/activities/activity-lifecycle#lc
- AndroidAppStateKey = attribute.Key("android.app.state")
-
- // AndroidOSAPILevelKey is the attribute Key conforming to the
- // "android.os.api_level" semantic conventions. It represents the uniquely
- // identifies the framework API revision offered by a version (`os.version`) of
- // the android operating system. More information can be found in the
- // [Android API levels documentation].
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "33", "32"
- //
- // [Android API levels documentation]: https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels
- AndroidOSAPILevelKey = attribute.Key("android.os.api_level")
-)
-
-// AndroidOSAPILevel returns an attribute KeyValue conforming to the
-// "android.os.api_level" semantic conventions. It represents the uniquely
-// identifies the framework API revision offered by a version (`os.version`) of
-// the android operating system. More information can be found in the
-// [Android API levels documentation].
-//
-// [Android API levels documentation]: https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels
-func AndroidOSAPILevel(val string) attribute.KeyValue {
- return AndroidOSAPILevelKey.String(val)
-}
-
-// Enum values for android.app.state
-var (
- // Any time before Activity.onResume() or, if the app has no Activity,
- // Context.startService() has been called in the app for the first time.
- //
- // Stability: development
- AndroidAppStateCreated = AndroidAppStateKey.String("created")
- // Any time after Activity.onPause() or, if the app has no Activity,
- // Context.stopService() has been called when the app was in the foreground
- // state.
- //
- // Stability: development
- AndroidAppStateBackground = AndroidAppStateKey.String("background")
- // Any time after Activity.onResume() or, if the app has no Activity,
- // Context.startService() has been called when the app was in either the created
- // or background states.
- //
- // Stability: development
- AndroidAppStateForeground = AndroidAppStateKey.String("foreground")
-)
-
-// Namespace: app
-const (
- // AppBuildIDKey is the attribute Key conforming to the "app.build_id" semantic
- // conventions. It represents the unique identifier for a particular build or
- // compilation of the application.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "6cff0a7e-cefc-4668-96f5-1273d8b334d0",
- // "9f2b833506aa6973a92fde9733e6271f", "my-app-1.0.0-code-123"
- AppBuildIDKey = attribute.Key("app.build_id")
-
- // AppInstallationIDKey is the attribute Key conforming to the
- // "app.installation.id" semantic conventions. It represents a unique identifier
- // representing the installation of an application on a specific device.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "2ab2916d-a51f-4ac8-80ee-45ac31a28092"
- // Note: Its value SHOULD persist across launches of the same application
- // installation, including through application upgrades.
- // It SHOULD change if the application is uninstalled or if all applications of
- // the vendor are uninstalled.
- // Additionally, users might be able to reset this value (e.g. by clearing
- // application data).
- // If an app is installed multiple times on the same device (e.g. in different
- // accounts on Android), each `app.installation.id` SHOULD have a different
- // value.
- // If multiple OpenTelemetry SDKs are used within the same application, they
- // SHOULD use the same value for `app.installation.id`.
- // Hardware IDs (e.g. serial number, IMEI, MAC address) MUST NOT be used as the
- // `app.installation.id`.
- //
- // For iOS, this value SHOULD be equal to the [vendor identifier].
- //
- // For Android, examples of `app.installation.id` implementations include:
- //
- // - [Firebase Installation ID].
- // - A globally unique UUID which is persisted across sessions in your
- // application.
- // - [App set ID].
- // - [`Settings.getString(Settings.Secure.ANDROID_ID)`].
- //
- // More information about Android identifier best practices can be found in the
- // [Android user data IDs guide].
- //
- // [vendor identifier]: https://developer.apple.com/documentation/uikit/uidevice/identifierforvendor
- // [Firebase Installation ID]: https://firebase.google.com/docs/projects/manage-installations
- // [App set ID]: https://developer.android.com/identity/app-set-id
- // [`Settings.getString(Settings.Secure.ANDROID_ID)`]: https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID
- // [Android user data IDs guide]: https://developer.android.com/training/articles/user-data-ids
- AppInstallationIDKey = attribute.Key("app.installation.id")
-
- // AppJankFrameCountKey is the attribute Key conforming to the
- // "app.jank.frame_count" semantic conventions. It represents a number of frame
- // renders that experienced jank.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 9, 42
- // Note: Depending on platform limitations, the value provided MAY be
- // approximation.
- AppJankFrameCountKey = attribute.Key("app.jank.frame_count")
-
- // AppJankPeriodKey is the attribute Key conforming to the "app.jank.period"
- // semantic conventions. It represents the time period, in seconds, for which
- // this jank is being reported.
- //
- // Type: double
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 1.0, 5.0, 10.24
- AppJankPeriodKey = attribute.Key("app.jank.period")
-
- // AppJankThresholdKey is the attribute Key conforming to the
- // "app.jank.threshold" semantic conventions. It represents the minimum
- // rendering threshold for this jank, in seconds.
- //
- // Type: double
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 0.016, 0.7, 1.024
- AppJankThresholdKey = attribute.Key("app.jank.threshold")
-
- // AppScreenCoordinateXKey is the attribute Key conforming to the
- // "app.screen.coordinate.x" semantic conventions. It represents the x
- // (horizontal) coordinate of a screen coordinate, in screen pixels.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 0, 131
- AppScreenCoordinateXKey = attribute.Key("app.screen.coordinate.x")
-
- // AppScreenCoordinateYKey is the attribute Key conforming to the
- // "app.screen.coordinate.y" semantic conventions. It represents the y
- // (vertical) component of a screen coordinate, in screen pixels.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 12, 99
- AppScreenCoordinateYKey = attribute.Key("app.screen.coordinate.y")
-
- // AppScreenIDKey is the attribute Key conforming to the "app.screen.id"
- // semantic conventions. It represents an identifier that uniquely
- // differentiates this screen from other screens in the same application.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "f9bc787d-ff05-48ad-90e1-fca1d46130b3",
- // "com.example.app.MainActivity", "com.example.shop.ProductDetailFragment",
- // "MyApp.ProfileView", "MyApp.ProfileViewController"
- // Note: A screen represents only the part of the device display drawn by the
- // app. It typically contains multiple widgets or UI components and is larger in
- // scope than individual widgets. Multiple screens can coexist on the same
- // display simultaneously (e.g., split view on tablets).
- AppScreenIDKey = attribute.Key("app.screen.id")
-
- // AppScreenNameKey is the attribute Key conforming to the "app.screen.name"
- // semantic conventions. It represents the name of an application screen.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "MainActivity", "ProductDetailFragment", "ProfileView",
- // "ProfileViewController"
- // Note: A screen represents only the part of the device display drawn by the
- // app. It typically contains multiple widgets or UI components and is larger in
- // scope than individual widgets. Multiple screens can coexist on the same
- // display simultaneously (e.g., split view on tablets).
- AppScreenNameKey = attribute.Key("app.screen.name")
-
- // AppWidgetIDKey is the attribute Key conforming to the "app.widget.id"
- // semantic conventions. It represents an identifier that uniquely
- // differentiates this widget from other widgets in the same application.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "f9bc787d-ff05-48ad-90e1-fca1d46130b3", "submit_order_1829"
- // Note: A widget is an application component, typically an on-screen visual GUI
- // element.
- AppWidgetIDKey = attribute.Key("app.widget.id")
-
- // AppWidgetNameKey is the attribute Key conforming to the "app.widget.name"
- // semantic conventions. It represents the name of an application widget.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "submit", "attack", "Clear Cart"
- // Note: A widget is an application component, typically an on-screen visual GUI
- // element.
- AppWidgetNameKey = attribute.Key("app.widget.name")
-)
-
-// AppBuildID returns an attribute KeyValue conforming to the "app.build_id"
-// semantic conventions. It represents the unique identifier for a particular
-// build or compilation of the application.
-func AppBuildID(val string) attribute.KeyValue {
- return AppBuildIDKey.String(val)
-}
-
-// AppInstallationID returns an attribute KeyValue conforming to the
-// "app.installation.id" semantic conventions. It represents a unique identifier
-// representing the installation of an application on a specific device.
-func AppInstallationID(val string) attribute.KeyValue {
- return AppInstallationIDKey.String(val)
-}
-
-// AppJankFrameCount returns an attribute KeyValue conforming to the
-// "app.jank.frame_count" semantic conventions. It represents a number of frame
-// renders that experienced jank.
-func AppJankFrameCount(val int) attribute.KeyValue {
- return AppJankFrameCountKey.Int(val)
-}
-
-// AppJankPeriod returns an attribute KeyValue conforming to the
-// "app.jank.period" semantic conventions. It represents the time period, in
-// seconds, for which this jank is being reported.
-func AppJankPeriod(val float64) attribute.KeyValue {
- return AppJankPeriodKey.Float64(val)
-}
-
-// AppJankThreshold returns an attribute KeyValue conforming to the
-// "app.jank.threshold" semantic conventions. It represents the minimum rendering
-// threshold for this jank, in seconds.
-func AppJankThreshold(val float64) attribute.KeyValue {
- return AppJankThresholdKey.Float64(val)
-}
-
-// AppScreenCoordinateX returns an attribute KeyValue conforming to the
-// "app.screen.coordinate.x" semantic conventions. It represents the x
-// (horizontal) coordinate of a screen coordinate, in screen pixels.
-func AppScreenCoordinateX(val int) attribute.KeyValue {
- return AppScreenCoordinateXKey.Int(val)
-}
-
-// AppScreenCoordinateY returns an attribute KeyValue conforming to the
-// "app.screen.coordinate.y" semantic conventions. It represents the y (vertical)
-// component of a screen coordinate, in screen pixels.
-func AppScreenCoordinateY(val int) attribute.KeyValue {
- return AppScreenCoordinateYKey.Int(val)
-}
-
-// AppScreenID returns an attribute KeyValue conforming to the "app.screen.id"
-// semantic conventions. It represents an identifier that uniquely differentiates
-// this screen from other screens in the same application.
-func AppScreenID(val string) attribute.KeyValue {
- return AppScreenIDKey.String(val)
-}
-
-// AppScreenName returns an attribute KeyValue conforming to the
-// "app.screen.name" semantic conventions. It represents the name of an
-// application screen.
-func AppScreenName(val string) attribute.KeyValue {
- return AppScreenNameKey.String(val)
-}
-
-// AppWidgetID returns an attribute KeyValue conforming to the "app.widget.id"
-// semantic conventions. It represents an identifier that uniquely differentiates
-// this widget from other widgets in the same application.
-func AppWidgetID(val string) attribute.KeyValue {
- return AppWidgetIDKey.String(val)
-}
-
-// AppWidgetName returns an attribute KeyValue conforming to the
-// "app.widget.name" semantic conventions. It represents the name of an
-// application widget.
-func AppWidgetName(val string) attribute.KeyValue {
- return AppWidgetNameKey.String(val)
-}
-
-// Namespace: artifact
-const (
- // ArtifactAttestationFilenameKey is the attribute Key conforming to the
- // "artifact.attestation.filename" semantic conventions. It represents the
- // provenance filename of the built attestation which directly relates to the
- // build artifact filename. This filename SHOULD accompany the artifact at
- // publish time. See the [SLSA Relationship] specification for more information.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "golang-binary-amd64-v0.1.0.attestation",
- // "docker-image-amd64-v0.1.0.intoto.json1", "release-1.tar.gz.attestation",
- // "file-name-package.tar.gz.intoto.json1"
- //
- // [SLSA Relationship]: https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations
- ArtifactAttestationFilenameKey = attribute.Key("artifact.attestation.filename")
-
- // ArtifactAttestationHashKey is the attribute Key conforming to the
- // "artifact.attestation.hash" semantic conventions. It represents the full
- // [hash value (see glossary)], of the built attestation. Some envelopes in the
- // [software attestation space] also refer to this as the **digest**.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "1b31dfcd5b7f9267bf2ff47651df1cfb9147b9e4df1f335accf65b4cda498408"
- //
- // [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
- // [software attestation space]: https://github.com/in-toto/attestation/tree/main/spec
- ArtifactAttestationHashKey = attribute.Key("artifact.attestation.hash")
-
- // ArtifactAttestationIDKey is the attribute Key conforming to the
- // "artifact.attestation.id" semantic conventions. It represents the id of the
- // build [software attestation].
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "123"
- //
- // [software attestation]: https://slsa.dev/attestation-model
- ArtifactAttestationIDKey = attribute.Key("artifact.attestation.id")
-
- // ArtifactFilenameKey is the attribute Key conforming to the
- // "artifact.filename" semantic conventions. It represents the human readable
- // file name of the artifact, typically generated during build and release
- // processes. Often includes the package name and version in the file name.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "golang-binary-amd64-v0.1.0", "docker-image-amd64-v0.1.0",
- // "release-1.tar.gz", "file-name-package.tar.gz"
- // Note: This file name can also act as the [Package Name]
- // in cases where the package ecosystem maps accordingly.
- // Additionally, the artifact [can be published]
- // for others, but that is not a guarantee.
- //
- // [Package Name]: https://slsa.dev/spec/v1.0/terminology#package-model
- // [can be published]: https://slsa.dev/spec/v1.0/terminology#software-supply-chain
- ArtifactFilenameKey = attribute.Key("artifact.filename")
-
- // ArtifactHashKey is the attribute Key conforming to the "artifact.hash"
- // semantic conventions. It represents the full [hash value (see glossary)],
- // often found in checksum.txt on a release of the artifact and used to verify
- // package integrity.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "9ff4c52759e2c4ac70b7d517bc7fcdc1cda631ca0045271ddd1b192544f8a3e9"
- // Note: The specific algorithm used to create the cryptographic hash value is
- // not defined. In situations where an artifact has multiple
- // cryptographic hashes, it is up to the implementer to choose which
- // hash value to set here; this should be the most secure hash algorithm
- // that is suitable for the situation and consistent with the
- // corresponding attestation. The implementer can then provide the other
- // hash values through an additional set of attribute extensions as they
- // deem necessary.
- //
- // [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
- ArtifactHashKey = attribute.Key("artifact.hash")
-
- // ArtifactPurlKey is the attribute Key conforming to the "artifact.purl"
- // semantic conventions. It represents the [Package URL] of the
- // [package artifact] provides a standard way to identify and locate the
- // packaged artifact.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "pkg:github/package-url/purl-spec@1209109710924",
- // "pkg:npm/foo@12.12.3"
- //
- // [Package URL]: https://github.com/package-url/purl-spec
- // [package artifact]: https://slsa.dev/spec/v1.0/terminology#package-model
- ArtifactPurlKey = attribute.Key("artifact.purl")
-
- // ArtifactVersionKey is the attribute Key conforming to the "artifact.version"
- // semantic conventions. It represents the version of the artifact.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "v0.1.0", "1.2.1", "122691-build"
- ArtifactVersionKey = attribute.Key("artifact.version")
-)
-
-// ArtifactAttestationFilename returns an attribute KeyValue conforming to the
-// "artifact.attestation.filename" semantic conventions. It represents the
-// provenance filename of the built attestation which directly relates to the
-// build artifact filename. This filename SHOULD accompany the artifact at
-// publish time. See the [SLSA Relationship] specification for more information.
-//
-// [SLSA Relationship]: https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations
-func ArtifactAttestationFilename(val string) attribute.KeyValue {
- return ArtifactAttestationFilenameKey.String(val)
-}
-
-// ArtifactAttestationHash returns an attribute KeyValue conforming to the
-// "artifact.attestation.hash" semantic conventions. It represents the full
-// [hash value (see glossary)], of the built attestation. Some envelopes in the
-// [software attestation space] also refer to this as the **digest**.
-//
-// [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
-// [software attestation space]: https://github.com/in-toto/attestation/tree/main/spec
-func ArtifactAttestationHash(val string) attribute.KeyValue {
- return ArtifactAttestationHashKey.String(val)
-}
-
-// ArtifactAttestationID returns an attribute KeyValue conforming to the
-// "artifact.attestation.id" semantic conventions. It represents the id of the
-// build [software attestation].
-//
-// [software attestation]: https://slsa.dev/attestation-model
-func ArtifactAttestationID(val string) attribute.KeyValue {
- return ArtifactAttestationIDKey.String(val)
-}
-
-// ArtifactFilename returns an attribute KeyValue conforming to the
-// "artifact.filename" semantic conventions. It represents the human readable
-// file name of the artifact, typically generated during build and release
-// processes. Often includes the package name and version in the file name.
-func ArtifactFilename(val string) attribute.KeyValue {
- return ArtifactFilenameKey.String(val)
-}
-
-// ArtifactHash returns an attribute KeyValue conforming to the "artifact.hash"
-// semantic conventions. It represents the full [hash value (see glossary)],
-// often found in checksum.txt on a release of the artifact and used to verify
-// package integrity.
-//
-// [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
-func ArtifactHash(val string) attribute.KeyValue {
- return ArtifactHashKey.String(val)
-}
-
-// ArtifactPurl returns an attribute KeyValue conforming to the "artifact.purl"
-// semantic conventions. It represents the [Package URL] of the
-// [package artifact] provides a standard way to identify and locate the packaged
-// artifact.
-//
-// [Package URL]: https://github.com/package-url/purl-spec
-// [package artifact]: https://slsa.dev/spec/v1.0/terminology#package-model
-func ArtifactPurl(val string) attribute.KeyValue {
- return ArtifactPurlKey.String(val)
-}
-
-// ArtifactVersion returns an attribute KeyValue conforming to the
-// "artifact.version" semantic conventions. It represents the version of the
-// artifact.
-func ArtifactVersion(val string) attribute.KeyValue {
- return ArtifactVersionKey.String(val)
-}
-
-// Namespace: aws
-const (
- // AWSBedrockGuardrailIDKey is the attribute Key conforming to the
- // "aws.bedrock.guardrail.id" semantic conventions. It represents the unique
- // identifier of the AWS Bedrock Guardrail. A [guardrail] helps safeguard and
- // prevent unwanted behavior from model responses or user messages.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "sgi5gkybzqak"
- //
- // [guardrail]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html
- AWSBedrockGuardrailIDKey = attribute.Key("aws.bedrock.guardrail.id")
-
- // AWSBedrockKnowledgeBaseIDKey is the attribute Key conforming to the
- // "aws.bedrock.knowledge_base.id" semantic conventions. It represents the
- // unique identifier of the AWS Bedrock Knowledge base. A [knowledge base] is a
- // bank of information that can be queried by models to generate more relevant
- // responses and augment prompts.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "XFWUPB9PAW"
- //
- // [knowledge base]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html
- AWSBedrockKnowledgeBaseIDKey = attribute.Key("aws.bedrock.knowledge_base.id")
-
- // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to the
- // "aws.dynamodb.attribute_definitions" semantic conventions. It represents the
- // JSON-serialized value of each item in the `AttributeDefinitions` request
- // field.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "{ "AttributeName": "string", "AttributeType": "string" }"
- AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions")
-
- // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the
- // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
- // value of the `AttributesToGet` request parameter.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "lives", "id"
- AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get")
-
- // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the
- // "aws.dynamodb.consistent_read" semantic conventions. It represents the value
- // of the `ConsistentRead` request parameter.
- //
- // Type: boolean
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read")
-
- // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the
- // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
- // JSON-serialized value of each item in the `ConsumedCapacity` response field.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "{ "CapacityUnits": number, "GlobalSecondaryIndexes": { "string" :
- // { "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits":
- // number } }, "LocalSecondaryIndexes": { "string" : { "CapacityUnits": number,
- // "ReadCapacityUnits": number, "WriteCapacityUnits": number } },
- // "ReadCapacityUnits": number, "Table": { "CapacityUnits": number,
- // "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "TableName":
- // "string", "WriteCapacityUnits": number }"
- AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity")
-
- // AWSDynamoDBCountKey is the attribute Key conforming to the
- // "aws.dynamodb.count" semantic conventions. It represents the value of the
- // `Count` response parameter.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 10
- AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count")
-
- // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the
- // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents the
- // value of the `ExclusiveStartTableName` request parameter.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Users", "CatsTable"
- AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table")
-
- // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key conforming to
- // the "aws.dynamodb.global_secondary_index_updates" semantic conventions. It
- // represents the JSON-serialized value of each item in the
- // `GlobalSecondaryIndexUpdates` request field.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "{ "Create": { "IndexName": "string", "KeySchema": [ {
- // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
- // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" },
- // "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits":
- // number } }"
- AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates")
-
- // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to the
- // "aws.dynamodb.global_secondary_indexes" semantic conventions. It represents
- // the JSON-serialized value of each item of the `GlobalSecondaryIndexes`
- // request field.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "{ "IndexName": "string", "KeySchema": [ { "AttributeName":
- // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [
- // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": {
- // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }"
- AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes")
-
- // AWSDynamoDBIndexNameKey is the attribute Key conforming to the
- // "aws.dynamodb.index_name" semantic conventions. It represents the value of
- // the `IndexName` request parameter.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "name_to_group"
- AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name")
-
- // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to the
- // "aws.dynamodb.item_collection_metrics" semantic conventions. It represents
- // the JSON-serialized value of the `ItemCollectionMetrics` response field.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "{ "string" : [ { "ItemCollectionKey": { "string" : { "B": blob,
- // "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { "string" :
- // "AttributeValue" }, "N": "string", "NS": [ "string" ], "NULL": boolean, "S":
- // "string", "SS": [ "string" ] } }, "SizeEstimateRangeGB": [ number ] } ] }"
- AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics")
-
- // AWSDynamoDBLimitKey is the attribute Key conforming to the
- // "aws.dynamodb.limit" semantic conventions. It represents the value of the
- // `Limit` request parameter.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 10
- AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit")
-
- // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to the
- // "aws.dynamodb.local_secondary_indexes" semantic conventions. It represents
- // the JSON-serialized value of each item of the `LocalSecondaryIndexes` request
- // field.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "{ "IndexArn": "string", "IndexName": "string", "IndexSizeBytes":
- // number, "ItemCount": number, "KeySchema": [ { "AttributeName": "string",
- // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ],
- // "ProjectionType": "string" } }"
- AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes")
-
- // AWSDynamoDBProjectionKey is the attribute Key conforming to the
- // "aws.dynamodb.projection" semantic conventions. It represents the value of
- // the `ProjectionExpression` request parameter.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Title", "Title, Price, Color", "Title, Description, RelatedItems,
- // ProductReviews"
- AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection")
-
- // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to the
- // "aws.dynamodb.provisioned_read_capacity" semantic conventions. It represents
- // the value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.
- //
- // Type: double
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 1.0, 2.0
- AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity")
-
- // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming to the
- // "aws.dynamodb.provisioned_write_capacity" semantic conventions. It represents
- // the value of the `ProvisionedThroughput.WriteCapacityUnits` request
- // parameter.
- //
- // Type: double
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 1.0, 2.0
- AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity")
-
- // AWSDynamoDBScanForwardKey is the attribute Key conforming to the
- // "aws.dynamodb.scan_forward" semantic conventions. It represents the value of
- // the `ScanIndexForward` request parameter.
- //
- // Type: boolean
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward")
-
- // AWSDynamoDBScannedCountKey is the attribute Key conforming to the
- // "aws.dynamodb.scanned_count" semantic conventions. It represents the value of
- // the `ScannedCount` response parameter.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 50
- AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count")
-
- // AWSDynamoDBSegmentKey is the attribute Key conforming to the
- // "aws.dynamodb.segment" semantic conventions. It represents the value of the
- // `Segment` request parameter.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 10
- AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment")
-
- // AWSDynamoDBSelectKey is the attribute Key conforming to the
- // "aws.dynamodb.select" semantic conventions. It represents the value of the
- // `Select` request parameter.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "ALL_ATTRIBUTES", "COUNT"
- AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select")
-
- // AWSDynamoDBTableCountKey is the attribute Key conforming to the
- // "aws.dynamodb.table_count" semantic conventions. It represents the number of
- // items in the `TableNames` response parameter.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 20
- AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count")
-
- // AWSDynamoDBTableNamesKey is the attribute Key conforming to the
- // "aws.dynamodb.table_names" semantic conventions. It represents the keys in
- // the `RequestItems` object field.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Users", "Cats"
- AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names")
-
- // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the
- // "aws.dynamodb.total_segments" semantic conventions. It represents the value
- // of the `TotalSegments` request parameter.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 100
- AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments")
-
- // AWSECSClusterARNKey is the attribute Key conforming to the
- // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an
- // [ECS cluster].
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster"
- //
- // [ECS cluster]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html
- AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn")
-
- // AWSECSContainerARNKey is the attribute Key conforming to the
- // "aws.ecs.container.arn" semantic conventions. It represents the Amazon
- // Resource Name (ARN) of an [ECS container instance].
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // "arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9"
- //
- // [ECS container instance]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html
- AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn")
-
- // AWSECSLaunchtypeKey is the attribute Key conforming to the
- // "aws.ecs.launchtype" semantic conventions. It represents the [launch type]
- // for an ECS task.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- //
- // [launch type]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html
- AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype")
-
- // AWSECSTaskARNKey is the attribute Key conforming to the "aws.ecs.task.arn"
- // semantic conventions. It represents the ARN of a running [ECS task].
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // "arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b",
- // "arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task-id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd"
- //
- // [ECS task]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids
- AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn")
-
- // AWSECSTaskFamilyKey is the attribute Key conforming to the
- // "aws.ecs.task.family" semantic conventions. It represents the family name of
- // the [ECS task definition] used to create the ECS task.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "opentelemetry-family"
- //
- // [ECS task definition]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html
- AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family")
-
- // AWSECSTaskIDKey is the attribute Key conforming to the "aws.ecs.task.id"
- // semantic conventions. It represents the ID of a running ECS task. The ID MUST
- // be extracted from `task.arn`.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "10838bed-421f-43ef-870a-f43feacbbb5b",
- // "23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd"
- AWSECSTaskIDKey = attribute.Key("aws.ecs.task.id")
-
- // AWSECSTaskRevisionKey is the attribute Key conforming to the
- // "aws.ecs.task.revision" semantic conventions. It represents the revision for
- // the task definition used to create the ECS task.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "8", "26"
- AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision")
-
- // AWSEKSClusterARNKey is the attribute Key conforming to the
- // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS
- // cluster.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster"
- AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn")
-
- // AWSExtendedRequestIDKey is the attribute Key conforming to the
- // "aws.extended_request_id" semantic conventions. It represents the AWS
- // extended request ID as returned in the response header `x-amz-id-2`.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // "wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ="
- AWSExtendedRequestIDKey = attribute.Key("aws.extended_request_id")
-
- // AWSKinesisStreamNameKey is the attribute Key conforming to the
- // "aws.kinesis.stream_name" semantic conventions. It represents the name of the
- // AWS Kinesis [stream] the request refers to. Corresponds to the
- // `--stream-name` parameter of the Kinesis [describe-stream] operation.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "some-stream-name"
- //
- // [stream]: https://docs.aws.amazon.com/streams/latest/dev/introduction.html
- // [describe-stream]: https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html
- AWSKinesisStreamNameKey = attribute.Key("aws.kinesis.stream_name")
-
- // AWSLambdaInvokedARNKey is the attribute Key conforming to the
- // "aws.lambda.invoked_arn" semantic conventions. It represents the full invoked
- // ARN as provided on the `Context` passed to the function (
- // `Lambda-Runtime-Invoked-Function-Arn` header on the
- // `/runtime/invocation/next` applicable).
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "arn:aws:lambda:us-east-1:123456:function:myfunction:myalias"
- // Note: This may be different from `cloud.resource_id` if an alias is involved.
- AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn")
-
- // AWSLambdaResourceMappingIDKey is the attribute Key conforming to the
- // "aws.lambda.resource_mapping.id" semantic conventions. It represents the UUID
- // of the [AWS Lambda EvenSource Mapping]. An event source is mapped to a lambda
- // function. It's contents are read by Lambda and used to trigger a function.
- // This isn't available in the lambda execution context or the lambda runtime
- // environtment. This is going to be populated by the AWS SDK for each language
- // when that UUID is present. Some of these operations are
- // Create/Delete/Get/List/Update EventSourceMapping.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "587ad24b-03b9-4413-8202-bbd56b36e5b7"
- //
- // [AWS Lambda EvenSource Mapping]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html
- AWSLambdaResourceMappingIDKey = attribute.Key("aws.lambda.resource_mapping.id")
-
- // AWSLogGroupARNsKey is the attribute Key conforming to the
- // "aws.log.group.arns" semantic conventions. It represents the Amazon Resource
- // Name(s) (ARN) of the AWS log group(s).
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*"
- // Note: See the [log group ARN format documentation].
- //
- // [log group ARN format documentation]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format
- AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns")
-
- // AWSLogGroupNamesKey is the attribute Key conforming to the
- // "aws.log.group.names" semantic conventions. It represents the name(s) of the
- // AWS log group(s) an application is writing to.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "/aws/lambda/my-function", "opentelemetry-service"
- // Note: Multiple log groups must be supported for cases like multi-container
- // applications, where a single application has sidecar containers, and each
- // write to their own log group.
- AWSLogGroupNamesKey = attribute.Key("aws.log.group.names")
-
- // AWSLogStreamARNsKey is the attribute Key conforming to the
- // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the
- // AWS log stream(s).
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // "arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b"
- // Note: See the [log stream ARN format documentation]. One log group can
- // contain several log streams, so these ARNs necessarily identify both a log
- // group and a log stream.
- //
- // [log stream ARN format documentation]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format
- AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns")
-
- // AWSLogStreamNamesKey is the attribute Key conforming to the
- // "aws.log.stream.names" semantic conventions. It represents the name(s) of the
- // AWS log stream(s) an application is writing to.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "logs/main/10838bed-421f-43ef-870a-f43feacbbb5b"
- AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names")
-
- // AWSRequestIDKey is the attribute Key conforming to the "aws.request_id"
- // semantic conventions. It represents the AWS request ID as returned in the
- // response headers `x-amzn-requestid`, `x-amzn-request-id` or
- // `x-amz-request-id`.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "79b9da39-b7ae-508a-a6bc-864b2829c622", "C9ER4AJX75574TDJ"
- AWSRequestIDKey = attribute.Key("aws.request_id")
-
- // AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket"
- // semantic conventions. It represents the S3 bucket name the request refers to.
- // Corresponds to the `--bucket` parameter of the [S3 API] operations.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "some-bucket-name"
- // Note: The `bucket` attribute is applicable to all S3 operations that
- // reference a bucket, i.e. that require the bucket name as a mandatory
- // parameter.
- // This applies to almost all S3 operations except `list-buckets`.
- //
- // [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html
- AWSS3BucketKey = attribute.Key("aws.s3.bucket")
-
- // AWSS3CopySourceKey is the attribute Key conforming to the
- // "aws.s3.copy_source" semantic conventions. It represents the source object
- // (in the form `bucket`/`key`) for the copy operation.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "someFile.yml"
- // Note: The `copy_source` attribute applies to S3 copy operations and
- // corresponds to the `--copy-source` parameter
- // of the [copy-object operation within the S3 API].
- // This applies in particular to the following operations:
- //
- // - [copy-object]
- // - [upload-part-copy]
- //
- //
- // [copy-object operation within the S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html
- // [copy-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html
- // [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html
- AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source")
-
- // AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete"
- // semantic conventions. It represents the delete request container that
- // specifies the objects to be deleted.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // "Objects=[{Key=string,VersionId=string},{Key=string,VersionId=string}],Quiet=boolean"
- // Note: The `delete` attribute is only applicable to the [delete-object]
- // operation.
- // The `delete` attribute corresponds to the `--delete` parameter of the
- // [delete-objects operation within the S3 API].
- //
- // [delete-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html
- // [delete-objects operation within the S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html
- AWSS3DeleteKey = attribute.Key("aws.s3.delete")
-
- // AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic
- // conventions. It represents the S3 object key the request refers to.
- // Corresponds to the `--key` parameter of the [S3 API] operations.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "someFile.yml"
- // Note: The `key` attribute is applicable to all object-related S3 operations,
- // i.e. that require the object key as a mandatory parameter.
- // This applies in particular to the following operations:
- //
- // - [copy-object]
- // - [delete-object]
- // - [get-object]
- // - [head-object]
- // - [put-object]
- // - [restore-object]
- // - [select-object-content]
- // - [abort-multipart-upload]
- // - [complete-multipart-upload]
- // - [create-multipart-upload]
- // - [list-parts]
- // - [upload-part]
- // - [upload-part-copy]
- //
- //
- // [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html
- // [copy-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html
- // [delete-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html
- // [get-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html
- // [head-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html
- // [put-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html
- // [restore-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html
- // [select-object-content]: https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html
- // [abort-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html
- // [complete-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html
- // [create-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html
- // [list-parts]: https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html
- // [upload-part]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html
- // [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html
- AWSS3KeyKey = attribute.Key("aws.s3.key")
-
- // AWSS3PartNumberKey is the attribute Key conforming to the
- // "aws.s3.part_number" semantic conventions. It represents the part number of
- // the part being uploaded in a multipart-upload operation. This is a positive
- // integer between 1 and 10,000.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 3456
- // Note: The `part_number` attribute is only applicable to the [upload-part]
- // and [upload-part-copy] operations.
- // The `part_number` attribute corresponds to the `--part-number` parameter of
- // the
- // [upload-part operation within the S3 API].
- //
- // [upload-part]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html
- // [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html
- // [upload-part operation within the S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html
- AWSS3PartNumberKey = attribute.Key("aws.s3.part_number")
-
- // AWSS3UploadIDKey is the attribute Key conforming to the "aws.s3.upload_id"
- // semantic conventions. It represents the upload ID that identifies the
- // multipart upload.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ"
- // Note: The `upload_id` attribute applies to S3 multipart-upload operations and
- // corresponds to the `--upload-id` parameter
- // of the [S3 API] multipart operations.
- // This applies in particular to the following operations:
- //
- // - [abort-multipart-upload]
- // - [complete-multipart-upload]
- // - [list-parts]
- // - [upload-part]
- // - [upload-part-copy]
- //
- //
- // [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html
- // [abort-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html
- // [complete-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html
- // [list-parts]: https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html
- // [upload-part]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html
- // [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html
- AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id")
-
- // AWSSecretsmanagerSecretARNKey is the attribute Key conforming to the
- // "aws.secretsmanager.secret.arn" semantic conventions. It represents the ARN
- // of the Secret stored in the Secrets Mangger.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // "arn:aws:secretsmanager:us-east-1:123456789012:secret:SecretName-6RandomCharacters"
- AWSSecretsmanagerSecretARNKey = attribute.Key("aws.secretsmanager.secret.arn")
-
- // AWSSNSTopicARNKey is the attribute Key conforming to the "aws.sns.topic.arn"
- // semantic conventions. It represents the ARN of the AWS SNS Topic. An Amazon
- // SNS [topic] is a logical access point that acts as a communication channel.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "arn:aws:sns:us-east-1:123456789012:mystack-mytopic-NZJ5JSMVGFIE"
- //
- // [topic]: https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html
- AWSSNSTopicARNKey = attribute.Key("aws.sns.topic.arn")
-
- // AWSSQSQueueURLKey is the attribute Key conforming to the "aws.sqs.queue.url"
- // semantic conventions. It represents the URL of the AWS SQS Queue. It's a
- // unique identifier for a queue in Amazon Simple Queue Service (SQS) and is
- // used to access the queue and perform actions on it.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "https://sqs.us-east-1.amazonaws.com/123456789012/MyQueue"
- AWSSQSQueueURLKey = attribute.Key("aws.sqs.queue.url")
-
- // AWSStepFunctionsActivityARNKey is the attribute Key conforming to the
- // "aws.step_functions.activity.arn" semantic conventions. It represents the ARN
- // of the AWS Step Functions Activity.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "arn:aws:states:us-east-1:123456789012:activity:get-greeting"
- AWSStepFunctionsActivityARNKey = attribute.Key("aws.step_functions.activity.arn")
-
- // AWSStepFunctionsStateMachineARNKey is the attribute Key conforming to the
- // "aws.step_functions.state_machine.arn" semantic conventions. It represents
- // the ARN of the AWS Step Functions State Machine.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // "arn:aws:states:us-east-1:123456789012:stateMachine:myStateMachine:1"
- AWSStepFunctionsStateMachineARNKey = attribute.Key("aws.step_functions.state_machine.arn")
-)
-
-// AWSBedrockGuardrailID returns an attribute KeyValue conforming to the
-// "aws.bedrock.guardrail.id" semantic conventions. It represents the unique
-// identifier of the AWS Bedrock Guardrail. A [guardrail] helps safeguard and
-// prevent unwanted behavior from model responses or user messages.
-//
-// [guardrail]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html
-func AWSBedrockGuardrailID(val string) attribute.KeyValue {
- return AWSBedrockGuardrailIDKey.String(val)
-}
-
-// AWSBedrockKnowledgeBaseID returns an attribute KeyValue conforming to the
-// "aws.bedrock.knowledge_base.id" semantic conventions. It represents the unique
-// identifier of the AWS Bedrock Knowledge base. A [knowledge base] is a bank of
-// information that can be queried by models to generate more relevant responses
-// and augment prompts.
-//
-// [knowledge base]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html
-func AWSBedrockKnowledgeBaseID(val string) attribute.KeyValue {
- return AWSBedrockKnowledgeBaseIDKey.String(val)
-}
-
-// AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming to
-// the "aws.dynamodb.attribute_definitions" semantic conventions. It represents
-// the JSON-serialized value of each item in the `AttributeDefinitions` request
-// field.
-func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue {
- return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val)
-}
-
-// AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to the
-// "aws.dynamodb.attributes_to_get" semantic conventions. It represents the value
-// of the `AttributesToGet` request parameter.
-func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue {
- return AWSDynamoDBAttributesToGetKey.StringSlice(val)
-}
-
-// AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the
-// "aws.dynamodb.consistent_read" semantic conventions. It represents the value
-// of the `ConsistentRead` request parameter.
-func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue {
- return AWSDynamoDBConsistentReadKey.Bool(val)
-}
-
-// AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to the
-// "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
-// JSON-serialized value of each item in the `ConsumedCapacity` response field.
-func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue {
- return AWSDynamoDBConsumedCapacityKey.StringSlice(val)
-}
-
-// AWSDynamoDBCount returns an attribute KeyValue conforming to the
-// "aws.dynamodb.count" semantic conventions. It represents the value of the
-// `Count` response parameter.
-func AWSDynamoDBCount(val int) attribute.KeyValue {
- return AWSDynamoDBCountKey.Int(val)
-}
-
-// AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming to the
-// "aws.dynamodb.exclusive_start_table" semantic conventions. It represents the
-// value of the `ExclusiveStartTableName` request parameter.
-func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue {
- return AWSDynamoDBExclusiveStartTableKey.String(val)
-}
-
-// AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue
-// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
-// conventions. It represents the JSON-serialized value of each item in the
-// `GlobalSecondaryIndexUpdates` request field.
-func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue {
- return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val)
-}
-
-// AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue conforming to
-// the "aws.dynamodb.global_secondary_indexes" semantic conventions. It
-// represents the JSON-serialized value of each item of the
-// `GlobalSecondaryIndexes` request field.
-func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue {
- return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val)
-}
-
-// AWSDynamoDBIndexName returns an attribute KeyValue conforming to the
-// "aws.dynamodb.index_name" semantic conventions. It represents the value of the
-// `IndexName` request parameter.
-func AWSDynamoDBIndexName(val string) attribute.KeyValue {
- return AWSDynamoDBIndexNameKey.String(val)
-}
-
-// AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming to
-// the "aws.dynamodb.item_collection_metrics" semantic conventions. It represents
-// the JSON-serialized value of the `ItemCollectionMetrics` response field.
-func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue {
- return AWSDynamoDBItemCollectionMetricsKey.String(val)
-}
-
-// AWSDynamoDBLimit returns an attribute KeyValue conforming to the
-// "aws.dynamodb.limit" semantic conventions. It represents the value of the
-// `Limit` request parameter.
-func AWSDynamoDBLimit(val int) attribute.KeyValue {
- return AWSDynamoDBLimitKey.Int(val)
-}
-
-// AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming to
-// the "aws.dynamodb.local_secondary_indexes" semantic conventions. It represents
-// the JSON-serialized value of each item of the `LocalSecondaryIndexes` request
-// field.
-func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue {
- return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val)
-}
-
-// AWSDynamoDBProjection returns an attribute KeyValue conforming to the
-// "aws.dynamodb.projection" semantic conventions. It represents the value of the
-// `ProjectionExpression` request parameter.
-func AWSDynamoDBProjection(val string) attribute.KeyValue {
- return AWSDynamoDBProjectionKey.String(val)
-}
-
-// AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue conforming to
-// the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It
-// represents the value of the `ProvisionedThroughput.ReadCapacityUnits` request
-// parameter.
-func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue {
- return AWSDynamoDBProvisionedReadCapacityKey.Float64(val)
-}
-
-// AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue conforming
-// to the "aws.dynamodb.provisioned_write_capacity" semantic conventions. It
-// represents the value of the `ProvisionedThroughput.WriteCapacityUnits` request
-// parameter.
-func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue {
- return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val)
-}
-
-// AWSDynamoDBScanForward returns an attribute KeyValue conforming to the
-// "aws.dynamodb.scan_forward" semantic conventions. It represents the value of
-// the `ScanIndexForward` request parameter.
-func AWSDynamoDBScanForward(val bool) attribute.KeyValue {
- return AWSDynamoDBScanForwardKey.Bool(val)
-}
-
-// AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the
-// "aws.dynamodb.scanned_count" semantic conventions. It represents the value of
-// the `ScannedCount` response parameter.
-func AWSDynamoDBScannedCount(val int) attribute.KeyValue {
- return AWSDynamoDBScannedCountKey.Int(val)
-}
-
-// AWSDynamoDBSegment returns an attribute KeyValue conforming to the
-// "aws.dynamodb.segment" semantic conventions. It represents the value of the
-// `Segment` request parameter.
-func AWSDynamoDBSegment(val int) attribute.KeyValue {
- return AWSDynamoDBSegmentKey.Int(val)
-}
-
-// AWSDynamoDBSelect returns an attribute KeyValue conforming to the
-// "aws.dynamodb.select" semantic conventions. It represents the value of the
-// `Select` request parameter.
-func AWSDynamoDBSelect(val string) attribute.KeyValue {
- return AWSDynamoDBSelectKey.String(val)
-}
-
-// AWSDynamoDBTableCount returns an attribute KeyValue conforming to the
-// "aws.dynamodb.table_count" semantic conventions. It represents the number of
-// items in the `TableNames` response parameter.
-func AWSDynamoDBTableCount(val int) attribute.KeyValue {
- return AWSDynamoDBTableCountKey.Int(val)
-}
-
-// AWSDynamoDBTableNames returns an attribute KeyValue conforming to the
-// "aws.dynamodb.table_names" semantic conventions. It represents the keys in the
-// `RequestItems` object field.
-func AWSDynamoDBTableNames(val ...string) attribute.KeyValue {
- return AWSDynamoDBTableNamesKey.StringSlice(val)
-}
-
-// AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the
-// "aws.dynamodb.total_segments" semantic conventions. It represents the value of
-// the `TotalSegments` request parameter.
-func AWSDynamoDBTotalSegments(val int) attribute.KeyValue {
- return AWSDynamoDBTotalSegmentsKey.Int(val)
-}
-
-// AWSECSClusterARN returns an attribute KeyValue conforming to the
-// "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an
-// [ECS cluster].
-//
-// [ECS cluster]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html
-func AWSECSClusterARN(val string) attribute.KeyValue {
- return AWSECSClusterARNKey.String(val)
-}
-
-// AWSECSContainerARN returns an attribute KeyValue conforming to the
-// "aws.ecs.container.arn" semantic conventions. It represents the Amazon
-// Resource Name (ARN) of an [ECS container instance].
-//
-// [ECS container instance]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html
-func AWSECSContainerARN(val string) attribute.KeyValue {
- return AWSECSContainerARNKey.String(val)
-}
-
-// AWSECSTaskARN returns an attribute KeyValue conforming to the
-// "aws.ecs.task.arn" semantic conventions. It represents the ARN of a running
-// [ECS task].
-//
-// [ECS task]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids
-func AWSECSTaskARN(val string) attribute.KeyValue {
- return AWSECSTaskARNKey.String(val)
-}
-
-// AWSECSTaskFamily returns an attribute KeyValue conforming to the
-// "aws.ecs.task.family" semantic conventions. It represents the family name of
-// the [ECS task definition] used to create the ECS task.
-//
-// [ECS task definition]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html
-func AWSECSTaskFamily(val string) attribute.KeyValue {
- return AWSECSTaskFamilyKey.String(val)
-}
-
-// AWSECSTaskID returns an attribute KeyValue conforming to the "aws.ecs.task.id"
-// semantic conventions. It represents the ID of a running ECS task. The ID MUST
-// be extracted from `task.arn`.
-func AWSECSTaskID(val string) attribute.KeyValue {
- return AWSECSTaskIDKey.String(val)
-}
-
-// AWSECSTaskRevision returns an attribute KeyValue conforming to the
-// "aws.ecs.task.revision" semantic conventions. It represents the revision for
-// the task definition used to create the ECS task.
-func AWSECSTaskRevision(val string) attribute.KeyValue {
- return AWSECSTaskRevisionKey.String(val)
-}
-
-// AWSEKSClusterARN returns an attribute KeyValue conforming to the
-// "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS
-// cluster.
-func AWSEKSClusterARN(val string) attribute.KeyValue {
- return AWSEKSClusterARNKey.String(val)
-}
-
-// AWSExtendedRequestID returns an attribute KeyValue conforming to the
-// "aws.extended_request_id" semantic conventions. It represents the AWS extended
-// request ID as returned in the response header `x-amz-id-2`.
-func AWSExtendedRequestID(val string) attribute.KeyValue {
- return AWSExtendedRequestIDKey.String(val)
-}
-
-// AWSKinesisStreamName returns an attribute KeyValue conforming to the
-// "aws.kinesis.stream_name" semantic conventions. It represents the name of the
-// AWS Kinesis [stream] the request refers to. Corresponds to the `--stream-name`
-// parameter of the Kinesis [describe-stream] operation.
-//
-// [stream]: https://docs.aws.amazon.com/streams/latest/dev/introduction.html
-// [describe-stream]: https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html
-func AWSKinesisStreamName(val string) attribute.KeyValue {
- return AWSKinesisStreamNameKey.String(val)
-}
-
-// AWSLambdaInvokedARN returns an attribute KeyValue conforming to the
-// "aws.lambda.invoked_arn" semantic conventions. It represents the full invoked
-// ARN as provided on the `Context` passed to the function (
-// `Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next`
-// applicable).
-func AWSLambdaInvokedARN(val string) attribute.KeyValue {
- return AWSLambdaInvokedARNKey.String(val)
-}
-
-// AWSLambdaResourceMappingID returns an attribute KeyValue conforming to the
-// "aws.lambda.resource_mapping.id" semantic conventions. It represents the UUID
-// of the [AWS Lambda EvenSource Mapping]. An event source is mapped to a lambda
-// function. It's contents are read by Lambda and used to trigger a function.
-// This isn't available in the lambda execution context or the lambda runtime
-// environtment. This is going to be populated by the AWS SDK for each language
-// when that UUID is present. Some of these operations are
-// Create/Delete/Get/List/Update EventSourceMapping.
-//
-// [AWS Lambda EvenSource Mapping]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html
-func AWSLambdaResourceMappingID(val string) attribute.KeyValue {
- return AWSLambdaResourceMappingIDKey.String(val)
-}
-
-// AWSLogGroupARNs returns an attribute KeyValue conforming to the
-// "aws.log.group.arns" semantic conventions. It represents the Amazon Resource
-// Name(s) (ARN) of the AWS log group(s).
-func AWSLogGroupARNs(val ...string) attribute.KeyValue {
- return AWSLogGroupARNsKey.StringSlice(val)
-}
-
-// AWSLogGroupNames returns an attribute KeyValue conforming to the
-// "aws.log.group.names" semantic conventions. It represents the name(s) of the
-// AWS log group(s) an application is writing to.
-func AWSLogGroupNames(val ...string) attribute.KeyValue {
- return AWSLogGroupNamesKey.StringSlice(val)
-}
-
-// AWSLogStreamARNs returns an attribute KeyValue conforming to the
-// "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the
-// AWS log stream(s).
-func AWSLogStreamARNs(val ...string) attribute.KeyValue {
- return AWSLogStreamARNsKey.StringSlice(val)
-}
-
-// AWSLogStreamNames returns an attribute KeyValue conforming to the
-// "aws.log.stream.names" semantic conventions. It represents the name(s) of the
-// AWS log stream(s) an application is writing to.
-func AWSLogStreamNames(val ...string) attribute.KeyValue {
- return AWSLogStreamNamesKey.StringSlice(val)
-}
-
-// AWSRequestID returns an attribute KeyValue conforming to the "aws.request_id"
-// semantic conventions. It represents the AWS request ID as returned in the
-// response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`
-// .
-func AWSRequestID(val string) attribute.KeyValue {
- return AWSRequestIDKey.String(val)
-}
-
-// AWSS3Bucket returns an attribute KeyValue conforming to the "aws.s3.bucket"
-// semantic conventions. It represents the S3 bucket name the request refers to.
-// Corresponds to the `--bucket` parameter of the [S3 API] operations.
-//
-// [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html
-func AWSS3Bucket(val string) attribute.KeyValue {
- return AWSS3BucketKey.String(val)
-}
-
-// AWSS3CopySource returns an attribute KeyValue conforming to the
-// "aws.s3.copy_source" semantic conventions. It represents the source object (in
-// the form `bucket`/`key`) for the copy operation.
-func AWSS3CopySource(val string) attribute.KeyValue {
- return AWSS3CopySourceKey.String(val)
-}
-
-// AWSS3Delete returns an attribute KeyValue conforming to the "aws.s3.delete"
-// semantic conventions. It represents the delete request container that
-// specifies the objects to be deleted.
-func AWSS3Delete(val string) attribute.KeyValue {
- return AWSS3DeleteKey.String(val)
-}
-
-// AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key" semantic
-// conventions. It represents the S3 object key the request refers to.
-// Corresponds to the `--key` parameter of the [S3 API] operations.
-//
-// [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html
-func AWSS3Key(val string) attribute.KeyValue {
- return AWSS3KeyKey.String(val)
-}
-
-// AWSS3PartNumber returns an attribute KeyValue conforming to the
-// "aws.s3.part_number" semantic conventions. It represents the part number of
-// the part being uploaded in a multipart-upload operation. This is a positive
-// integer between 1 and 10,000.
-func AWSS3PartNumber(val int) attribute.KeyValue {
- return AWSS3PartNumberKey.Int(val)
-}
-
-// AWSS3UploadID returns an attribute KeyValue conforming to the
-// "aws.s3.upload_id" semantic conventions. It represents the upload ID that
-// identifies the multipart upload.
-func AWSS3UploadID(val string) attribute.KeyValue {
- return AWSS3UploadIDKey.String(val)
-}
-
-// AWSSecretsmanagerSecretARN returns an attribute KeyValue conforming to the
-// "aws.secretsmanager.secret.arn" semantic conventions. It represents the ARN of
-// the Secret stored in the Secrets Mangger.
-func AWSSecretsmanagerSecretARN(val string) attribute.KeyValue {
- return AWSSecretsmanagerSecretARNKey.String(val)
-}
-
-// AWSSNSTopicARN returns an attribute KeyValue conforming to the
-// "aws.sns.topic.arn" semantic conventions. It represents the ARN of the AWS SNS
-// Topic. An Amazon SNS [topic] is a logical access point that acts as a
-// communication channel.
-//
-// [topic]: https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html
-func AWSSNSTopicARN(val string) attribute.KeyValue {
- return AWSSNSTopicARNKey.String(val)
-}
-
-// AWSSQSQueueURL returns an attribute KeyValue conforming to the
-// "aws.sqs.queue.url" semantic conventions. It represents the URL of the AWS SQS
-// Queue. It's a unique identifier for a queue in Amazon Simple Queue Service
-// (SQS) and is used to access the queue and perform actions on it.
-func AWSSQSQueueURL(val string) attribute.KeyValue {
- return AWSSQSQueueURLKey.String(val)
-}
-
-// AWSStepFunctionsActivityARN returns an attribute KeyValue conforming to the
-// "aws.step_functions.activity.arn" semantic conventions. It represents the ARN
-// of the AWS Step Functions Activity.
-func AWSStepFunctionsActivityARN(val string) attribute.KeyValue {
- return AWSStepFunctionsActivityARNKey.String(val)
-}
-
-// AWSStepFunctionsStateMachineARN returns an attribute KeyValue conforming to
-// the "aws.step_functions.state_machine.arn" semantic conventions. It represents
-// the ARN of the AWS Step Functions State Machine.
-func AWSStepFunctionsStateMachineARN(val string) attribute.KeyValue {
- return AWSStepFunctionsStateMachineARNKey.String(val)
-}
-
-// Enum values for aws.ecs.launchtype
-var (
- // Amazon EC2
- // Stability: development
- AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2")
- // Amazon Fargate
- // Stability: development
- AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate")
-)
-
-// Namespace: azure
-const (
- // AzureClientIDKey is the attribute Key conforming to the "azure.client.id"
- // semantic conventions. It represents the unique identifier of the client
- // instance.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "3ba4827d-4422-483f-b59f-85b74211c11d", "storage-client-1"
- AzureClientIDKey = attribute.Key("azure.client.id")
-
- // AzureCosmosDBConnectionModeKey is the attribute Key conforming to the
- // "azure.cosmosdb.connection.mode" semantic conventions. It represents the
- // cosmos client connection mode.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- AzureCosmosDBConnectionModeKey = attribute.Key("azure.cosmosdb.connection.mode")
-
- // AzureCosmosDBConsistencyLevelKey is the attribute Key conforming to the
- // "azure.cosmosdb.consistency.level" semantic conventions. It represents the
- // account or request [consistency level].
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Eventual", "ConsistentPrefix", "BoundedStaleness", "Strong",
- // "Session"
- //
- // [consistency level]: https://learn.microsoft.com/azure/cosmos-db/consistency-levels
- AzureCosmosDBConsistencyLevelKey = attribute.Key("azure.cosmosdb.consistency.level")
-
- // AzureCosmosDBOperationContactedRegionsKey is the attribute Key conforming to
- // the "azure.cosmosdb.operation.contacted_regions" semantic conventions. It
- // represents the list of regions contacted during operation in the order that
- // they were contacted. If there is more than one region listed, it indicates
- // that the operation was performed on multiple regions i.e. cross-regional
- // call.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "North Central US", "Australia East", "Australia Southeast"
- // Note: Region name matches the format of `displayName` in [Azure Location API]
- //
- // [Azure Location API]: https://learn.microsoft.com/rest/api/resources/subscriptions/list-locations
- AzureCosmosDBOperationContactedRegionsKey = attribute.Key("azure.cosmosdb.operation.contacted_regions")
-
- // AzureCosmosDBOperationRequestChargeKey is the attribute Key conforming to the
- // "azure.cosmosdb.operation.request_charge" semantic conventions. It represents
- // the number of request units consumed by the operation.
- //
- // Type: double
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 46.18, 1.0
- AzureCosmosDBOperationRequestChargeKey = attribute.Key("azure.cosmosdb.operation.request_charge")
-
- // AzureCosmosDBRequestBodySizeKey is the attribute Key conforming to the
- // "azure.cosmosdb.request.body.size" semantic conventions. It represents the
- // request payload size in bytes.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- AzureCosmosDBRequestBodySizeKey = attribute.Key("azure.cosmosdb.request.body.size")
-
- // AzureCosmosDBResponseSubStatusCodeKey is the attribute Key conforming to the
- // "azure.cosmosdb.response.sub_status_code" semantic conventions. It represents
- // the cosmos DB sub status code.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 1000, 1002
- AzureCosmosDBResponseSubStatusCodeKey = attribute.Key("azure.cosmosdb.response.sub_status_code")
-
- // AzureResourceProviderNamespaceKey is the attribute Key conforming to the
- // "azure.resource_provider.namespace" semantic conventions. It represents the
- // [Azure Resource Provider Namespace] as recognized by the client.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Microsoft.Storage", "Microsoft.KeyVault", "Microsoft.ServiceBus"
- //
- // [Azure Resource Provider Namespace]: https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers
- AzureResourceProviderNamespaceKey = attribute.Key("azure.resource_provider.namespace")
-
- // AzureServiceRequestIDKey is the attribute Key conforming to the
- // "azure.service.request.id" semantic conventions. It represents the unique
- // identifier of the service request. It's generated by the Azure service and
- // returned with the response.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "00000000-0000-0000-0000-000000000000"
- AzureServiceRequestIDKey = attribute.Key("azure.service.request.id")
-)
-
-// AzureClientID returns an attribute KeyValue conforming to the
-// "azure.client.id" semantic conventions. It represents the unique identifier of
-// the client instance.
-func AzureClientID(val string) attribute.KeyValue {
- return AzureClientIDKey.String(val)
-}
-
-// AzureCosmosDBOperationContactedRegions returns an attribute KeyValue
-// conforming to the "azure.cosmosdb.operation.contacted_regions" semantic
-// conventions. It represents the list of regions contacted during operation in
-// the order that they were contacted. If there is more than one region listed,
-// it indicates that the operation was performed on multiple regions i.e.
-// cross-regional call.
-func AzureCosmosDBOperationContactedRegions(val ...string) attribute.KeyValue {
- return AzureCosmosDBOperationContactedRegionsKey.StringSlice(val)
-}
-
-// AzureCosmosDBOperationRequestCharge returns an attribute KeyValue conforming
-// to the "azure.cosmosdb.operation.request_charge" semantic conventions. It
-// represents the number of request units consumed by the operation.
-func AzureCosmosDBOperationRequestCharge(val float64) attribute.KeyValue {
- return AzureCosmosDBOperationRequestChargeKey.Float64(val)
-}
-
-// AzureCosmosDBRequestBodySize returns an attribute KeyValue conforming to the
-// "azure.cosmosdb.request.body.size" semantic conventions. It represents the
-// request payload size in bytes.
-func AzureCosmosDBRequestBodySize(val int) attribute.KeyValue {
- return AzureCosmosDBRequestBodySizeKey.Int(val)
-}
-
-// AzureCosmosDBResponseSubStatusCode returns an attribute KeyValue conforming to
-// the "azure.cosmosdb.response.sub_status_code" semantic conventions. It
-// represents the cosmos DB sub status code.
-func AzureCosmosDBResponseSubStatusCode(val int) attribute.KeyValue {
- return AzureCosmosDBResponseSubStatusCodeKey.Int(val)
-}
-
-// AzureResourceProviderNamespace returns an attribute KeyValue conforming to the
-// "azure.resource_provider.namespace" semantic conventions. It represents the
-// [Azure Resource Provider Namespace] as recognized by the client.
-//
-// [Azure Resource Provider Namespace]: https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers
-func AzureResourceProviderNamespace(val string) attribute.KeyValue {
- return AzureResourceProviderNamespaceKey.String(val)
-}
-
-// AzureServiceRequestID returns an attribute KeyValue conforming to the
-// "azure.service.request.id" semantic conventions. It represents the unique
-// identifier of the service request. It's generated by the Azure service and
-// returned with the response.
-func AzureServiceRequestID(val string) attribute.KeyValue {
- return AzureServiceRequestIDKey.String(val)
-}
-
-// Enum values for azure.cosmosdb.connection.mode
-var (
- // Gateway (HTTP) connection.
- // Stability: development
- AzureCosmosDBConnectionModeGateway = AzureCosmosDBConnectionModeKey.String("gateway")
- // Direct connection.
- // Stability: development
- AzureCosmosDBConnectionModeDirect = AzureCosmosDBConnectionModeKey.String("direct")
-)
-
-// Enum values for azure.cosmosdb.consistency.level
-var (
- // Strong
- // Stability: development
- AzureCosmosDBConsistencyLevelStrong = AzureCosmosDBConsistencyLevelKey.String("Strong")
- // Bounded Staleness
- // Stability: development
- AzureCosmosDBConsistencyLevelBoundedStaleness = AzureCosmosDBConsistencyLevelKey.String("BoundedStaleness")
- // Session
- // Stability: development
- AzureCosmosDBConsistencyLevelSession = AzureCosmosDBConsistencyLevelKey.String("Session")
- // Eventual
- // Stability: development
- AzureCosmosDBConsistencyLevelEventual = AzureCosmosDBConsistencyLevelKey.String("Eventual")
- // Consistent Prefix
- // Stability: development
- AzureCosmosDBConsistencyLevelConsistentPrefix = AzureCosmosDBConsistencyLevelKey.String("ConsistentPrefix")
-)
-
-// Namespace: browser
-const (
- // BrowserBrandsKey is the attribute Key conforming to the "browser.brands"
- // semantic conventions. It represents the array of brand name and version
- // separated by a space.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: " Not A;Brand 99", "Chromium 99", "Chrome 99"
- // Note: This value is intended to be taken from the [UA client hints API] (
- // `navigator.userAgentData.brands`).
- //
- // [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface
- BrowserBrandsKey = attribute.Key("browser.brands")
-
- // BrowserLanguageKey is the attribute Key conforming to the "browser.language"
- // semantic conventions. It represents the preferred language of the user using
- // the browser.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "en", "en-US", "fr", "fr-FR"
- // Note: This value is intended to be taken from the Navigator API
- // `navigator.language`.
- BrowserLanguageKey = attribute.Key("browser.language")
-
- // BrowserMobileKey is the attribute Key conforming to the "browser.mobile"
- // semantic conventions. It represents a boolean that is true if the browser is
- // running on a mobile device.
- //
- // Type: boolean
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // Note: This value is intended to be taken from the [UA client hints API] (
- // `navigator.userAgentData.mobile`). If unavailable, this attribute SHOULD be
- // left unset.
- //
- // [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface
- BrowserMobileKey = attribute.Key("browser.mobile")
-
- // BrowserPlatformKey is the attribute Key conforming to the "browser.platform"
- // semantic conventions. It represents the platform on which the browser is
- // running.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Windows", "macOS", "Android"
- // Note: This value is intended to be taken from the [UA client hints API] (
- // `navigator.userAgentData.platform`). If unavailable, the legacy
- // `navigator.platform` API SHOULD NOT be used instead and this attribute SHOULD
- // be left unset in order for the values to be consistent.
- // The list of possible values is defined in the
- // [W3C User-Agent Client Hints specification]. Note that some (but not all) of
- // these values can overlap with values in the
- // [`os.type` and `os.name` attributes]. However, for consistency, the values in
- // the `browser.platform` attribute should capture the exact value that the user
- // agent provides.
- //
- // [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface
- // [W3C User-Agent Client Hints specification]: https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform
- // [`os.type` and `os.name` attributes]: ./os.md
- BrowserPlatformKey = attribute.Key("browser.platform")
-)
-
-// BrowserBrands returns an attribute KeyValue conforming to the "browser.brands"
-// semantic conventions. It represents the array of brand name and version
-// separated by a space.
-func BrowserBrands(val ...string) attribute.KeyValue {
- return BrowserBrandsKey.StringSlice(val)
-}
-
-// BrowserLanguage returns an attribute KeyValue conforming to the
-// "browser.language" semantic conventions. It represents the preferred language
-// of the user using the browser.
-func BrowserLanguage(val string) attribute.KeyValue {
- return BrowserLanguageKey.String(val)
-}
-
-// BrowserMobile returns an attribute KeyValue conforming to the "browser.mobile"
-// semantic conventions. It represents a boolean that is true if the browser is
-// running on a mobile device.
-func BrowserMobile(val bool) attribute.KeyValue {
- return BrowserMobileKey.Bool(val)
-}
-
-// BrowserPlatform returns an attribute KeyValue conforming to the
-// "browser.platform" semantic conventions. It represents the platform on which
-// the browser is running.
-func BrowserPlatform(val string) attribute.KeyValue {
- return BrowserPlatformKey.String(val)
-}
-
-// Namespace: cassandra
-const (
- // CassandraConsistencyLevelKey is the attribute Key conforming to the
- // "cassandra.consistency.level" semantic conventions. It represents the
- // consistency level of the query. Based on consistency values from [CQL].
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- //
- // [CQL]: https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html
- CassandraConsistencyLevelKey = attribute.Key("cassandra.consistency.level")
-
- // CassandraCoordinatorDCKey is the attribute Key conforming to the
- // "cassandra.coordinator.dc" semantic conventions. It represents the data
- // center of the coordinating node for a query.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: us-west-2
- CassandraCoordinatorDCKey = attribute.Key("cassandra.coordinator.dc")
-
- // CassandraCoordinatorIDKey is the attribute Key conforming to the
- // "cassandra.coordinator.id" semantic conventions. It represents the ID of the
- // coordinating node for a query.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: be13faa2-8574-4d71-926d-27f16cf8a7af
- CassandraCoordinatorIDKey = attribute.Key("cassandra.coordinator.id")
-
- // CassandraPageSizeKey is the attribute Key conforming to the
- // "cassandra.page.size" semantic conventions. It represents the fetch size used
- // for paging, i.e. how many rows will be returned at once.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 5000
- CassandraPageSizeKey = attribute.Key("cassandra.page.size")
-
- // CassandraQueryIdempotentKey is the attribute Key conforming to the
- // "cassandra.query.idempotent" semantic conventions. It represents the whether
- // or not the query is idempotent.
- //
- // Type: boolean
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- CassandraQueryIdempotentKey = attribute.Key("cassandra.query.idempotent")
-
- // CassandraSpeculativeExecutionCountKey is the attribute Key conforming to the
- // "cassandra.speculative_execution.count" semantic conventions. It represents
- // the number of times a query was speculatively executed. Not set or `0` if the
- // query was not executed speculatively.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 0, 2
- CassandraSpeculativeExecutionCountKey = attribute.Key("cassandra.speculative_execution.count")
-)
-
-// CassandraCoordinatorDC returns an attribute KeyValue conforming to the
-// "cassandra.coordinator.dc" semantic conventions. It represents the data center
-// of the coordinating node for a query.
-func CassandraCoordinatorDC(val string) attribute.KeyValue {
- return CassandraCoordinatorDCKey.String(val)
-}
-
-// CassandraCoordinatorID returns an attribute KeyValue conforming to the
-// "cassandra.coordinator.id" semantic conventions. It represents the ID of the
-// coordinating node for a query.
-func CassandraCoordinatorID(val string) attribute.KeyValue {
- return CassandraCoordinatorIDKey.String(val)
-}
-
-// CassandraPageSize returns an attribute KeyValue conforming to the
-// "cassandra.page.size" semantic conventions. It represents the fetch size used
-// for paging, i.e. how many rows will be returned at once.
-func CassandraPageSize(val int) attribute.KeyValue {
- return CassandraPageSizeKey.Int(val)
-}
-
-// CassandraQueryIdempotent returns an attribute KeyValue conforming to the
-// "cassandra.query.idempotent" semantic conventions. It represents the whether
-// or not the query is idempotent.
-func CassandraQueryIdempotent(val bool) attribute.KeyValue {
- return CassandraQueryIdempotentKey.Bool(val)
-}
-
-// CassandraSpeculativeExecutionCount returns an attribute KeyValue conforming to
-// the "cassandra.speculative_execution.count" semantic conventions. It
-// represents the number of times a query was speculatively executed. Not set or
-// `0` if the query was not executed speculatively.
-func CassandraSpeculativeExecutionCount(val int) attribute.KeyValue {
- return CassandraSpeculativeExecutionCountKey.Int(val)
-}
-
-// Enum values for cassandra.consistency.level
-var (
- // All
- // Stability: development
- CassandraConsistencyLevelAll = CassandraConsistencyLevelKey.String("all")
- // Each Quorum
- // Stability: development
- CassandraConsistencyLevelEachQuorum = CassandraConsistencyLevelKey.String("each_quorum")
- // Quorum
- // Stability: development
- CassandraConsistencyLevelQuorum = CassandraConsistencyLevelKey.String("quorum")
- // Local Quorum
- // Stability: development
- CassandraConsistencyLevelLocalQuorum = CassandraConsistencyLevelKey.String("local_quorum")
- // One
- // Stability: development
- CassandraConsistencyLevelOne = CassandraConsistencyLevelKey.String("one")
- // Two
- // Stability: development
- CassandraConsistencyLevelTwo = CassandraConsistencyLevelKey.String("two")
- // Three
- // Stability: development
- CassandraConsistencyLevelThree = CassandraConsistencyLevelKey.String("three")
- // Local One
- // Stability: development
- CassandraConsistencyLevelLocalOne = CassandraConsistencyLevelKey.String("local_one")
- // Any
- // Stability: development
- CassandraConsistencyLevelAny = CassandraConsistencyLevelKey.String("any")
- // Serial
- // Stability: development
- CassandraConsistencyLevelSerial = CassandraConsistencyLevelKey.String("serial")
- // Local Serial
- // Stability: development
- CassandraConsistencyLevelLocalSerial = CassandraConsistencyLevelKey.String("local_serial")
-)
-
-// Namespace: cicd
-const (
- // CICDPipelineActionNameKey is the attribute Key conforming to the
- // "cicd.pipeline.action.name" semantic conventions. It represents the kind of
- // action a pipeline run is performing.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "BUILD", "RUN", "SYNC"
- CICDPipelineActionNameKey = attribute.Key("cicd.pipeline.action.name")
-
- // CICDPipelineNameKey is the attribute Key conforming to the
- // "cicd.pipeline.name" semantic conventions. It represents the human readable
- // name of the pipeline within a CI/CD system.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Build and Test", "Lint", "Deploy Go Project",
- // "deploy_to_environment"
- CICDPipelineNameKey = attribute.Key("cicd.pipeline.name")
-
- // CICDPipelineResultKey is the attribute Key conforming to the
- // "cicd.pipeline.result" semantic conventions. It represents the result of a
- // pipeline run.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "success", "failure", "timeout", "skipped"
- CICDPipelineResultKey = attribute.Key("cicd.pipeline.result")
-
- // CICDPipelineRunIDKey is the attribute Key conforming to the
- // "cicd.pipeline.run.id" semantic conventions. It represents the unique
- // identifier of a pipeline run within a CI/CD system.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "120912"
- CICDPipelineRunIDKey = attribute.Key("cicd.pipeline.run.id")
-
- // CICDPipelineRunStateKey is the attribute Key conforming to the
- // "cicd.pipeline.run.state" semantic conventions. It represents the pipeline
- // run goes through these states during its lifecycle.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "pending", "executing", "finalizing"
- CICDPipelineRunStateKey = attribute.Key("cicd.pipeline.run.state")
-
- // CICDPipelineRunURLFullKey is the attribute Key conforming to the
- // "cicd.pipeline.run.url.full" semantic conventions. It represents the [URL] of
- // the pipeline run, providing the complete address in order to locate and
- // identify the pipeline run.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // "https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763?pr=1075"
- //
- // [URL]: https://wikipedia.org/wiki/URL
- CICDPipelineRunURLFullKey = attribute.Key("cicd.pipeline.run.url.full")
-
- // CICDPipelineTaskNameKey is the attribute Key conforming to the
- // "cicd.pipeline.task.name" semantic conventions. It represents the human
- // readable name of a task within a pipeline. Task here most closely aligns with
- // a [computing process] in a pipeline. Other terms for tasks include commands,
- // steps, and procedures.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Run GoLang Linter", "Go Build", "go-test", "deploy_binary"
- //
- // [computing process]: https://wikipedia.org/wiki/Pipeline_(computing)
- CICDPipelineTaskNameKey = attribute.Key("cicd.pipeline.task.name")
-
- // CICDPipelineTaskRunIDKey is the attribute Key conforming to the
- // "cicd.pipeline.task.run.id" semantic conventions. It represents the unique
- // identifier of a task run within a pipeline.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "12097"
- CICDPipelineTaskRunIDKey = attribute.Key("cicd.pipeline.task.run.id")
-
- // CICDPipelineTaskRunResultKey is the attribute Key conforming to the
- // "cicd.pipeline.task.run.result" semantic conventions. It represents the
- // result of a task run.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "success", "failure", "timeout", "skipped"
- CICDPipelineTaskRunResultKey = attribute.Key("cicd.pipeline.task.run.result")
-
- // CICDPipelineTaskRunURLFullKey is the attribute Key conforming to the
- // "cicd.pipeline.task.run.url.full" semantic conventions. It represents the
- // [URL] of the pipeline task run, providing the complete address in order to
- // locate and identify the pipeline task run.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // "https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763/job/26920038674?pr=1075"
- //
- // [URL]: https://wikipedia.org/wiki/URL
- CICDPipelineTaskRunURLFullKey = attribute.Key("cicd.pipeline.task.run.url.full")
-
- // CICDPipelineTaskTypeKey is the attribute Key conforming to the
- // "cicd.pipeline.task.type" semantic conventions. It represents the type of the
- // task within a pipeline.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "build", "test", "deploy"
- CICDPipelineTaskTypeKey = attribute.Key("cicd.pipeline.task.type")
-
- // CICDSystemComponentKey is the attribute Key conforming to the
- // "cicd.system.component" semantic conventions. It represents the name of a
- // component of the CICD system.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "controller", "scheduler", "agent"
- CICDSystemComponentKey = attribute.Key("cicd.system.component")
-
- // CICDWorkerIDKey is the attribute Key conforming to the "cicd.worker.id"
- // semantic conventions. It represents the unique identifier of a worker within
- // a CICD system.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "abc123", "10.0.1.2", "controller"
- CICDWorkerIDKey = attribute.Key("cicd.worker.id")
-
- // CICDWorkerNameKey is the attribute Key conforming to the "cicd.worker.name"
- // semantic conventions. It represents the name of a worker within a CICD
- // system.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "agent-abc", "controller", "Ubuntu LTS"
- CICDWorkerNameKey = attribute.Key("cicd.worker.name")
-
- // CICDWorkerStateKey is the attribute Key conforming to the "cicd.worker.state"
- // semantic conventions. It represents the state of a CICD worker / agent.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "idle", "busy", "down"
- CICDWorkerStateKey = attribute.Key("cicd.worker.state")
-
- // CICDWorkerURLFullKey is the attribute Key conforming to the
- // "cicd.worker.url.full" semantic conventions. It represents the [URL] of the
- // worker, providing the complete address in order to locate and identify the
- // worker.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "https://cicd.example.org/worker/abc123"
- //
- // [URL]: https://wikipedia.org/wiki/URL
- CICDWorkerURLFullKey = attribute.Key("cicd.worker.url.full")
-)
-
-// CICDPipelineName returns an attribute KeyValue conforming to the
-// "cicd.pipeline.name" semantic conventions. It represents the human readable
-// name of the pipeline within a CI/CD system.
-func CICDPipelineName(val string) attribute.KeyValue {
- return CICDPipelineNameKey.String(val)
-}
-
-// CICDPipelineRunID returns an attribute KeyValue conforming to the
-// "cicd.pipeline.run.id" semantic conventions. It represents the unique
-// identifier of a pipeline run within a CI/CD system.
-func CICDPipelineRunID(val string) attribute.KeyValue {
- return CICDPipelineRunIDKey.String(val)
-}
-
-// CICDPipelineRunURLFull returns an attribute KeyValue conforming to the
-// "cicd.pipeline.run.url.full" semantic conventions. It represents the [URL] of
-// the pipeline run, providing the complete address in order to locate and
-// identify the pipeline run.
-//
-// [URL]: https://wikipedia.org/wiki/URL
-func CICDPipelineRunURLFull(val string) attribute.KeyValue {
- return CICDPipelineRunURLFullKey.String(val)
-}
-
-// CICDPipelineTaskName returns an attribute KeyValue conforming to the
-// "cicd.pipeline.task.name" semantic conventions. It represents the human
-// readable name of a task within a pipeline. Task here most closely aligns with
-// a [computing process] in a pipeline. Other terms for tasks include commands,
-// steps, and procedures.
-//
-// [computing process]: https://wikipedia.org/wiki/Pipeline_(computing)
-func CICDPipelineTaskName(val string) attribute.KeyValue {
- return CICDPipelineTaskNameKey.String(val)
-}
-
-// CICDPipelineTaskRunID returns an attribute KeyValue conforming to the
-// "cicd.pipeline.task.run.id" semantic conventions. It represents the unique
-// identifier of a task run within a pipeline.
-func CICDPipelineTaskRunID(val string) attribute.KeyValue {
- return CICDPipelineTaskRunIDKey.String(val)
-}
-
-// CICDPipelineTaskRunURLFull returns an attribute KeyValue conforming to the
-// "cicd.pipeline.task.run.url.full" semantic conventions. It represents the
-// [URL] of the pipeline task run, providing the complete address in order to
-// locate and identify the pipeline task run.
-//
-// [URL]: https://wikipedia.org/wiki/URL
-func CICDPipelineTaskRunURLFull(val string) attribute.KeyValue {
- return CICDPipelineTaskRunURLFullKey.String(val)
-}
-
-// CICDSystemComponent returns an attribute KeyValue conforming to the
-// "cicd.system.component" semantic conventions. It represents the name of a
-// component of the CICD system.
-func CICDSystemComponent(val string) attribute.KeyValue {
- return CICDSystemComponentKey.String(val)
-}
-
-// CICDWorkerID returns an attribute KeyValue conforming to the "cicd.worker.id"
-// semantic conventions. It represents the unique identifier of a worker within a
-// CICD system.
-func CICDWorkerID(val string) attribute.KeyValue {
- return CICDWorkerIDKey.String(val)
-}
-
-// CICDWorkerName returns an attribute KeyValue conforming to the
-// "cicd.worker.name" semantic conventions. It represents the name of a worker
-// within a CICD system.
-func CICDWorkerName(val string) attribute.KeyValue {
- return CICDWorkerNameKey.String(val)
-}
-
-// CICDWorkerURLFull returns an attribute KeyValue conforming to the
-// "cicd.worker.url.full" semantic conventions. It represents the [URL] of the
-// worker, providing the complete address in order to locate and identify the
-// worker.
-//
-// [URL]: https://wikipedia.org/wiki/URL
-func CICDWorkerURLFull(val string) attribute.KeyValue {
- return CICDWorkerURLFullKey.String(val)
-}
-
-// Enum values for cicd.pipeline.action.name
-var (
- // The pipeline run is executing a build.
- // Stability: development
- CICDPipelineActionNameBuild = CICDPipelineActionNameKey.String("BUILD")
- // The pipeline run is executing.
- // Stability: development
- CICDPipelineActionNameRun = CICDPipelineActionNameKey.String("RUN")
- // The pipeline run is executing a sync.
- // Stability: development
- CICDPipelineActionNameSync = CICDPipelineActionNameKey.String("SYNC")
-)
-
-// Enum values for cicd.pipeline.result
-var (
- // The pipeline run finished successfully.
- // Stability: development
- CICDPipelineResultSuccess = CICDPipelineResultKey.String("success")
- // The pipeline run did not finish successfully, eg. due to a compile error or a
- // failing test. Such failures are usually detected by non-zero exit codes of
- // the tools executed in the pipeline run.
- // Stability: development
- CICDPipelineResultFailure = CICDPipelineResultKey.String("failure")
- // The pipeline run failed due to an error in the CICD system, eg. due to the
- // worker being killed.
- // Stability: development
- CICDPipelineResultError = CICDPipelineResultKey.String("error")
- // A timeout caused the pipeline run to be interrupted.
- // Stability: development
- CICDPipelineResultTimeout = CICDPipelineResultKey.String("timeout")
- // The pipeline run was cancelled, eg. by a user manually cancelling the
- // pipeline run.
- // Stability: development
- CICDPipelineResultCancellation = CICDPipelineResultKey.String("cancellation")
- // The pipeline run was skipped, eg. due to a precondition not being met.
- // Stability: development
- CICDPipelineResultSkip = CICDPipelineResultKey.String("skip")
-)
-
-// Enum values for cicd.pipeline.run.state
-var (
- // The run pending state spans from the event triggering the pipeline run until
- // the execution of the run starts (eg. time spent in a queue, provisioning
- // agents, creating run resources).
- //
- // Stability: development
- CICDPipelineRunStatePending = CICDPipelineRunStateKey.String("pending")
- // The executing state spans the execution of any run tasks (eg. build, test).
- // Stability: development
- CICDPipelineRunStateExecuting = CICDPipelineRunStateKey.String("executing")
- // The finalizing state spans from when the run has finished executing (eg.
- // cleanup of run resources).
- // Stability: development
- CICDPipelineRunStateFinalizing = CICDPipelineRunStateKey.String("finalizing")
-)
-
-// Enum values for cicd.pipeline.task.run.result
-var (
- // The task run finished successfully.
- // Stability: development
- CICDPipelineTaskRunResultSuccess = CICDPipelineTaskRunResultKey.String("success")
- // The task run did not finish successfully, eg. due to a compile error or a
- // failing test. Such failures are usually detected by non-zero exit codes of
- // the tools executed in the task run.
- // Stability: development
- CICDPipelineTaskRunResultFailure = CICDPipelineTaskRunResultKey.String("failure")
- // The task run failed due to an error in the CICD system, eg. due to the worker
- // being killed.
- // Stability: development
- CICDPipelineTaskRunResultError = CICDPipelineTaskRunResultKey.String("error")
- // A timeout caused the task run to be interrupted.
- // Stability: development
- CICDPipelineTaskRunResultTimeout = CICDPipelineTaskRunResultKey.String("timeout")
- // The task run was cancelled, eg. by a user manually cancelling the task run.
- // Stability: development
- CICDPipelineTaskRunResultCancellation = CICDPipelineTaskRunResultKey.String("cancellation")
- // The task run was skipped, eg. due to a precondition not being met.
- // Stability: development
- CICDPipelineTaskRunResultSkip = CICDPipelineTaskRunResultKey.String("skip")
-)
-
-// Enum values for cicd.pipeline.task.type
-var (
- // build
- // Stability: development
- CICDPipelineTaskTypeBuild = CICDPipelineTaskTypeKey.String("build")
- // test
- // Stability: development
- CICDPipelineTaskTypeTest = CICDPipelineTaskTypeKey.String("test")
- // deploy
- // Stability: development
- CICDPipelineTaskTypeDeploy = CICDPipelineTaskTypeKey.String("deploy")
-)
-
-// Enum values for cicd.worker.state
-var (
- // The worker is not performing work for the CICD system. It is available to the
- // CICD system to perform work on (online / idle).
- // Stability: development
- CICDWorkerStateAvailable = CICDWorkerStateKey.String("available")
- // The worker is performing work for the CICD system.
- // Stability: development
- CICDWorkerStateBusy = CICDWorkerStateKey.String("busy")
- // The worker is not available to the CICD system (disconnected / down).
- // Stability: development
- CICDWorkerStateOffline = CICDWorkerStateKey.String("offline")
-)
-
-// Namespace: client
-const (
- // ClientAddressKey is the attribute Key conforming to the "client.address"
- // semantic conventions. It represents the client address - domain name if
- // available without reverse DNS lookup; otherwise, IP address or Unix domain
- // socket name.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "client.example.com", "10.1.2.80", "/tmp/my.sock"
- // Note: When observed from the server side, and when communicating through an
- // intermediary, `client.address` SHOULD represent the client address behind any
- // intermediaries, for example proxies, if it's available.
- ClientAddressKey = attribute.Key("client.address")
-
- // ClientPortKey is the attribute Key conforming to the "client.port" semantic
- // conventions. It represents the client port number.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: 65123
- // Note: When observed from the server side, and when communicating through an
- // intermediary, `client.port` SHOULD represent the client port behind any
- // intermediaries, for example proxies, if it's available.
- ClientPortKey = attribute.Key("client.port")
-)
-
-// ClientAddress returns an attribute KeyValue conforming to the "client.address"
-// semantic conventions. It represents the client address - domain name if
-// available without reverse DNS lookup; otherwise, IP address or Unix domain
-// socket name.
-func ClientAddress(val string) attribute.KeyValue {
- return ClientAddressKey.String(val)
-}
-
-// ClientPort returns an attribute KeyValue conforming to the "client.port"
-// semantic conventions. It represents the client port number.
-func ClientPort(val int) attribute.KeyValue {
- return ClientPortKey.Int(val)
-}
-
-// Namespace: cloud
-const (
- // CloudAccountIDKey is the attribute Key conforming to the "cloud.account.id"
- // semantic conventions. It represents the cloud account ID the resource is
- // assigned to.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "111111111111", "opentelemetry"
- CloudAccountIDKey = attribute.Key("cloud.account.id")
-
- // CloudAvailabilityZoneKey is the attribute Key conforming to the
- // "cloud.availability_zone" semantic conventions. It represents the cloud
- // regions often have multiple, isolated locations known as zones to increase
- // availability. Availability zone represents the zone where the resource is
- // running.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "us-east-1c"
- // Note: Availability zones are called "zones" on Alibaba Cloud and Google
- // Cloud.
- CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone")
-
- // CloudPlatformKey is the attribute Key conforming to the "cloud.platform"
- // semantic conventions. It represents the cloud platform in use.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // Note: The prefix of the service SHOULD match the one specified in
- // `cloud.provider`.
- CloudPlatformKey = attribute.Key("cloud.platform")
-
- // CloudProviderKey is the attribute Key conforming to the "cloud.provider"
- // semantic conventions. It represents the name of the cloud provider.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- CloudProviderKey = attribute.Key("cloud.provider")
-
- // CloudRegionKey is the attribute Key conforming to the "cloud.region" semantic
- // conventions. It represents the geographical region within a cloud provider.
- // When associated with a resource, this attribute specifies the region where
- // the resource operates. When calling services or APIs deployed on a cloud,
- // this attribute identifies the region where the called destination is
- // deployed.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "us-central1", "us-east-1"
- // Note: Refer to your provider's docs to see the available regions, for example
- // [Alibaba Cloud regions], [AWS regions], [Azure regions],
- // [Google Cloud regions], or [Tencent Cloud regions].
- //
- // [Alibaba Cloud regions]: https://www.alibabacloud.com/help/doc-detail/40654.htm
- // [AWS regions]: https://aws.amazon.com/about-aws/global-infrastructure/regions_az/
- // [Azure regions]: https://azure.microsoft.com/global-infrastructure/geographies/
- // [Google Cloud regions]: https://cloud.google.com/about/locations
- // [Tencent Cloud regions]: https://www.tencentcloud.com/document/product/213/6091
- CloudRegionKey = attribute.Key("cloud.region")
-
- // CloudResourceIDKey is the attribute Key conforming to the "cloud.resource_id"
- // semantic conventions. It represents the cloud provider-specific native
- // identifier of the monitored cloud resource (e.g. an [ARN] on AWS, a
- // [fully qualified resource ID] on Azure, a [full resource name] on GCP).
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function",
- // "//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID",
- // "/subscriptions//resourceGroups/
- // /providers/Microsoft.Web/sites//functions/"
- // Note: On some cloud providers, it may not be possible to determine the full
- // ID at startup,
- // so it may be necessary to set `cloud.resource_id` as a span attribute
- // instead.
- //
- // The exact value to use for `cloud.resource_id` depends on the cloud provider.
- // The following well-known definitions MUST be used if you set this attribute
- // and they apply:
- //
- // - **AWS Lambda:** The function [ARN].
- // Take care not to use the "invoked ARN" directly but replace any
- // [alias suffix]
- // with the resolved function version, as the same runtime instance may be
- // invocable with
- // multiple different aliases.
- // - **GCP:** The [URI of the resource]
- // - **Azure:** The [Fully Qualified Resource ID] of the invoked function,
- // *not* the function app, having the form
- //
- // `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`
- // .
- // This means that a span attribute MUST be used, as an Azure function app
- // can host multiple functions that would usually share
- // a TracerProvider.
- //
- //
- // [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
- // [fully qualified resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id
- // [full resource name]: https://google.aip.dev/122#full-resource-names
- // [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
- // [alias suffix]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html
- // [URI of the resource]: https://cloud.google.com/iam/docs/full-resource-names
- // [Fully Qualified Resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id
- CloudResourceIDKey = attribute.Key("cloud.resource_id")
-)
-
-// CloudAccountID returns an attribute KeyValue conforming to the
-// "cloud.account.id" semantic conventions. It represents the cloud account ID
-// the resource is assigned to.
-func CloudAccountID(val string) attribute.KeyValue {
- return CloudAccountIDKey.String(val)
-}
-
-// CloudAvailabilityZone returns an attribute KeyValue conforming to the
-// "cloud.availability_zone" semantic conventions. It represents the cloud
-// regions often have multiple, isolated locations known as zones to increase
-// availability. Availability zone represents the zone where the resource is
-// running.
-func CloudAvailabilityZone(val string) attribute.KeyValue {
- return CloudAvailabilityZoneKey.String(val)
-}
-
-// CloudRegion returns an attribute KeyValue conforming to the "cloud.region"
-// semantic conventions. It represents the geographical region within a cloud
-// provider. When associated with a resource, this attribute specifies the region
-// where the resource operates. When calling services or APIs deployed on a
-// cloud, this attribute identifies the region where the called destination is
-// deployed.
-func CloudRegion(val string) attribute.KeyValue {
- return CloudRegionKey.String(val)
-}
-
-// CloudResourceID returns an attribute KeyValue conforming to the
-// "cloud.resource_id" semantic conventions. It represents the cloud
-// provider-specific native identifier of the monitored cloud resource (e.g. an
-// [ARN] on AWS, a [fully qualified resource ID] on Azure, a [full resource name]
-// on GCP).
-//
-// [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
-// [fully qualified resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id
-// [full resource name]: https://google.aip.dev/122#full-resource-names
-func CloudResourceID(val string) attribute.KeyValue {
- return CloudResourceIDKey.String(val)
-}
-
-// Enum values for cloud.platform
-var (
- // Akamai Cloud Compute
- // Stability: development
- CloudPlatformAkamaiCloudCompute = CloudPlatformKey.String("akamai_cloud.compute")
- // Alibaba Cloud Elastic Compute Service
- // Stability: development
- CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs")
- // Alibaba Cloud Function Compute
- // Stability: development
- CloudPlatformAlibabaCloudFC = CloudPlatformKey.String("alibaba_cloud_fc")
- // Red Hat OpenShift on Alibaba Cloud
- // Stability: development
- CloudPlatformAlibabaCloudOpenShift = CloudPlatformKey.String("alibaba_cloud_openshift")
- // AWS Elastic Compute Cloud
- // Stability: development
- CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2")
- // AWS Elastic Container Service
- // Stability: development
- CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs")
- // AWS Elastic Kubernetes Service
- // Stability: development
- CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks")
- // AWS Lambda
- // Stability: development
- CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda")
- // AWS Elastic Beanstalk
- // Stability: development
- CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk")
- // AWS App Runner
- // Stability: development
- CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner")
- // Red Hat OpenShift on AWS (ROSA)
- // Stability: development
- CloudPlatformAWSOpenShift = CloudPlatformKey.String("aws_openshift")
- // Azure Virtual Machines
- // Stability: development
- CloudPlatformAzureVM = CloudPlatformKey.String("azure.vm")
- // Azure Container Apps
- // Stability: development
- CloudPlatformAzureContainerApps = CloudPlatformKey.String("azure.container_apps")
- // Azure Container Instances
- // Stability: development
- CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure.container_instances")
- // Azure Kubernetes Service
- // Stability: development
- CloudPlatformAzureAKS = CloudPlatformKey.String("azure.aks")
- // Azure Functions
- // Stability: development
- CloudPlatformAzureFunctions = CloudPlatformKey.String("azure.functions")
- // Azure App Service
- // Stability: development
- CloudPlatformAzureAppService = CloudPlatformKey.String("azure.app_service")
- // Azure Red Hat OpenShift
- // Stability: development
- CloudPlatformAzureOpenShift = CloudPlatformKey.String("azure.openshift")
- // Google Vertex AI Agent Engine
- // Stability: development
- CloudPlatformGCPAgentEngine = CloudPlatformKey.String("gcp.agent_engine")
- // Google Bare Metal Solution (BMS)
- // Stability: development
- CloudPlatformGCPBareMetalSolution = CloudPlatformKey.String("gcp_bare_metal_solution")
- // Google Cloud Compute Engine (GCE)
- // Stability: development
- CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine")
- // Google Cloud Run
- // Stability: development
- CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run")
- // Google Cloud Kubernetes Engine (GKE)
- // Stability: development
- CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine")
- // Google Cloud Functions (GCF)
- // Stability: development
- CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions")
- // Google Cloud App Engine (GAE)
- // Stability: development
- CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine")
- // Red Hat OpenShift on Google Cloud
- // Stability: development
- CloudPlatformGCPOpenShift = CloudPlatformKey.String("gcp_openshift")
- // Server on Hetzner Cloud
- // Stability: development
- CloudPlatformHetznerCloudServer = CloudPlatformKey.String("hetzner.cloud_server")
- // Red Hat OpenShift on IBM Cloud
- // Stability: development
- CloudPlatformIBMCloudOpenShift = CloudPlatformKey.String("ibm_cloud_openshift")
- // Compute on Oracle Cloud Infrastructure (OCI)
- // Stability: development
- CloudPlatformOracleCloudCompute = CloudPlatformKey.String("oracle_cloud_compute")
- // Kubernetes Engine (OKE) on Oracle Cloud Infrastructure (OCI)
- // Stability: development
- CloudPlatformOracleCloudOKE = CloudPlatformKey.String("oracle_cloud_oke")
- // Tencent Cloud Cloud Virtual Machine (CVM)
- // Stability: development
- CloudPlatformTencentCloudCVM = CloudPlatformKey.String("tencent_cloud_cvm")
- // Tencent Cloud Elastic Kubernetes Service (EKS)
- // Stability: development
- CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks")
- // Tencent Cloud Serverless Cloud Function (SCF)
- // Stability: development
- CloudPlatformTencentCloudSCF = CloudPlatformKey.String("tencent_cloud_scf")
- // Vultr Cloud Compute
- // Stability: development
- CloudPlatformVultrCloudCompute = CloudPlatformKey.String("vultr.cloud_compute")
-)
-
-// Enum values for cloud.provider
-var (
- // Akamai Cloud
- // Stability: development
- CloudProviderAkamaiCloud = CloudProviderKey.String("akamai_cloud")
- // Alibaba Cloud
- // Stability: development
- CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud")
- // Amazon Web Services
- // Stability: development
- CloudProviderAWS = CloudProviderKey.String("aws")
- // Microsoft Azure
- // Stability: development
- CloudProviderAzure = CloudProviderKey.String("azure")
- // Google Cloud Platform
- // Stability: development
- CloudProviderGCP = CloudProviderKey.String("gcp")
- // Heroku Platform as a Service
- // Stability: development
- CloudProviderHeroku = CloudProviderKey.String("heroku")
- // Hetzner
- // Stability: development
- CloudProviderHetzner = CloudProviderKey.String("hetzner")
- // IBM Cloud
- // Stability: development
- CloudProviderIBMCloud = CloudProviderKey.String("ibm_cloud")
- // Oracle Cloud Infrastructure (OCI)
- // Stability: development
- CloudProviderOracleCloud = CloudProviderKey.String("oracle_cloud")
- // Tencent Cloud
- // Stability: development
- CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud")
- // Vultr
- // Stability: development
- CloudProviderVultr = CloudProviderKey.String("vultr")
-)
-
-// Namespace: cloudevents
-const (
- // CloudEventsEventIDKey is the attribute Key conforming to the
- // "cloudevents.event_id" semantic conventions. It represents the [event_id]
- // uniquely identifies the event.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "123e4567-e89b-12d3-a456-426614174000", "0001"
- //
- // [event_id]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id
- CloudEventsEventIDKey = attribute.Key("cloudevents.event_id")
-
- // CloudEventsEventSourceKey is the attribute Key conforming to the
- // "cloudevents.event_source" semantic conventions. It represents the [source]
- // identifies the context in which an event happened.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "https://github.com/cloudevents", "/cloudevents/spec/pull/123",
- // "my-service"
- //
- // [source]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1
- CloudEventsEventSourceKey = attribute.Key("cloudevents.event_source")
-
- // CloudEventsEventSpecVersionKey is the attribute Key conforming to the
- // "cloudevents.event_spec_version" semantic conventions. It represents the
- // [version of the CloudEvents specification] which the event uses.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 1.0
- //
- // [version of the CloudEvents specification]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion
- CloudEventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version")
-
- // CloudEventsEventSubjectKey is the attribute Key conforming to the
- // "cloudevents.event_subject" semantic conventions. It represents the [subject]
- // of the event in the context of the event producer (identified by source).
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: mynewfile.jpg
- //
- // [subject]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject
- CloudEventsEventSubjectKey = attribute.Key("cloudevents.event_subject")
-
- // CloudEventsEventTypeKey is the attribute Key conforming to the
- // "cloudevents.event_type" semantic conventions. It represents the [event_type]
- // contains a value describing the type of event related to the originating
- // occurrence.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "com.github.pull_request.opened", "com.example.object.deleted.v2"
- //
- // [event_type]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type
- CloudEventsEventTypeKey = attribute.Key("cloudevents.event_type")
-)
-
-// CloudEventsEventID returns an attribute KeyValue conforming to the
-// "cloudevents.event_id" semantic conventions. It represents the [event_id]
-// uniquely identifies the event.
-//
-// [event_id]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id
-func CloudEventsEventID(val string) attribute.KeyValue {
- return CloudEventsEventIDKey.String(val)
-}
-
-// CloudEventsEventSource returns an attribute KeyValue conforming to the
-// "cloudevents.event_source" semantic conventions. It represents the [source]
-// identifies the context in which an event happened.
-//
-// [source]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1
-func CloudEventsEventSource(val string) attribute.KeyValue {
- return CloudEventsEventSourceKey.String(val)
-}
-
-// CloudEventsEventSpecVersion returns an attribute KeyValue conforming to the
-// "cloudevents.event_spec_version" semantic conventions. It represents the
-// [version of the CloudEvents specification] which the event uses.
-//
-// [version of the CloudEvents specification]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion
-func CloudEventsEventSpecVersion(val string) attribute.KeyValue {
- return CloudEventsEventSpecVersionKey.String(val)
-}
-
-// CloudEventsEventSubject returns an attribute KeyValue conforming to the
-// "cloudevents.event_subject" semantic conventions. It represents the [subject]
-// of the event in the context of the event producer (identified by source).
-//
-// [subject]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject
-func CloudEventsEventSubject(val string) attribute.KeyValue {
- return CloudEventsEventSubjectKey.String(val)
-}
-
-// CloudEventsEventType returns an attribute KeyValue conforming to the
-// "cloudevents.event_type" semantic conventions. It represents the [event_type]
-// contains a value describing the type of event related to the originating
-// occurrence.
-//
-// [event_type]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type
-func CloudEventsEventType(val string) attribute.KeyValue {
- return CloudEventsEventTypeKey.String(val)
-}
-
-// Namespace: cloudfoundry
-const (
- // CloudFoundryAppIDKey is the attribute Key conforming to the
- // "cloudfoundry.app.id" semantic conventions. It represents the guid of the
- // application.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d"
- // Note: Application instrumentation should use the value from environment
- // variable `VCAP_APPLICATION.application_id`. This is the same value as
- // reported by `cf app --guid`.
- CloudFoundryAppIDKey = attribute.Key("cloudfoundry.app.id")
-
- // CloudFoundryAppInstanceIDKey is the attribute Key conforming to the
- // "cloudfoundry.app.instance.id" semantic conventions. It represents the index
- // of the application instance. 0 when just one instance is active.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "0", "1"
- // Note: CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope]
- // .
- // It is used for logs and metrics emitted by CloudFoundry. It is
- // supposed to contain the application instance index for applications
- // deployed on the runtime.
- //
- // Application instrumentation should use the value from environment
- // variable `CF_INSTANCE_INDEX`.
- //
- // [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope
- CloudFoundryAppInstanceIDKey = attribute.Key("cloudfoundry.app.instance.id")
-
- // CloudFoundryAppNameKey is the attribute Key conforming to the
- // "cloudfoundry.app.name" semantic conventions. It represents the name of the
- // application.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "my-app-name"
- // Note: Application instrumentation should use the value from environment
- // variable `VCAP_APPLICATION.application_name`. This is the same value
- // as reported by `cf apps`.
- CloudFoundryAppNameKey = attribute.Key("cloudfoundry.app.name")
-
- // CloudFoundryOrgIDKey is the attribute Key conforming to the
- // "cloudfoundry.org.id" semantic conventions. It represents the guid of the
- // CloudFoundry org the application is running in.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d"
- // Note: Application instrumentation should use the value from environment
- // variable `VCAP_APPLICATION.org_id`. This is the same value as
- // reported by `cf org --guid`.
- CloudFoundryOrgIDKey = attribute.Key("cloudfoundry.org.id")
-
- // CloudFoundryOrgNameKey is the attribute Key conforming to the
- // "cloudfoundry.org.name" semantic conventions. It represents the name of the
- // CloudFoundry organization the app is running in.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "my-org-name"
- // Note: Application instrumentation should use the value from environment
- // variable `VCAP_APPLICATION.org_name`. This is the same value as
- // reported by `cf orgs`.
- CloudFoundryOrgNameKey = attribute.Key("cloudfoundry.org.name")
-
- // CloudFoundryProcessIDKey is the attribute Key conforming to the
- // "cloudfoundry.process.id" semantic conventions. It represents the UID
- // identifying the process.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d"
- // Note: Application instrumentation should use the value from environment
- // variable `VCAP_APPLICATION.process_id`. It is supposed to be equal to
- // `VCAP_APPLICATION.app_id` for applications deployed to the runtime.
- // For system components, this could be the actual PID.
- CloudFoundryProcessIDKey = attribute.Key("cloudfoundry.process.id")
-
- // CloudFoundryProcessTypeKey is the attribute Key conforming to the
- // "cloudfoundry.process.type" semantic conventions. It represents the type of
- // process.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "web"
- // Note: CloudFoundry applications can consist of multiple jobs. Usually the
- // main process will be of type `web`. There can be additional background
- // tasks or side-cars with different process types.
- CloudFoundryProcessTypeKey = attribute.Key("cloudfoundry.process.type")
-
- // CloudFoundrySpaceIDKey is the attribute Key conforming to the
- // "cloudfoundry.space.id" semantic conventions. It represents the guid of the
- // CloudFoundry space the application is running in.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d"
- // Note: Application instrumentation should use the value from environment
- // variable `VCAP_APPLICATION.space_id`. This is the same value as
- // reported by `cf space --guid`.
- CloudFoundrySpaceIDKey = attribute.Key("cloudfoundry.space.id")
-
- // CloudFoundrySpaceNameKey is the attribute Key conforming to the
- // "cloudfoundry.space.name" semantic conventions. It represents the name of the
- // CloudFoundry space the application is running in.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "my-space-name"
- // Note: Application instrumentation should use the value from environment
- // variable `VCAP_APPLICATION.space_name`. This is the same value as
- // reported by `cf spaces`.
- CloudFoundrySpaceNameKey = attribute.Key("cloudfoundry.space.name")
-
- // CloudFoundrySystemIDKey is the attribute Key conforming to the
- // "cloudfoundry.system.id" semantic conventions. It represents a guid or
- // another name describing the event source.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "cf/gorouter"
- // Note: CloudFoundry defines the `source_id` in the [Loggregator v2 envelope].
- // It is used for logs and metrics emitted by CloudFoundry. It is
- // supposed to contain the component name, e.g. "gorouter", for
- // CloudFoundry components.
- //
- // When system components are instrumented, values from the
- // [Bosh spec]
- // should be used. The `system.id` should be set to
- // `spec.deployment/spec.name`.
- //
- // [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope
- // [Bosh spec]: https://bosh.io/docs/jobs/#properties-spec
- CloudFoundrySystemIDKey = attribute.Key("cloudfoundry.system.id")
-
- // CloudFoundrySystemInstanceIDKey is the attribute Key conforming to the
- // "cloudfoundry.system.instance.id" semantic conventions. It represents a guid
- // describing the concrete instance of the event source.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d"
- // Note: CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope]
- // .
- // It is used for logs and metrics emitted by CloudFoundry. It is
- // supposed to contain the vm id for CloudFoundry components.
- //
- // When system components are instrumented, values from the
- // [Bosh spec]
- // should be used. The `system.instance.id` should be set to `spec.id`.
- //
- // [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope
- // [Bosh spec]: https://bosh.io/docs/jobs/#properties-spec
- CloudFoundrySystemInstanceIDKey = attribute.Key("cloudfoundry.system.instance.id")
-)
-
-// CloudFoundryAppID returns an attribute KeyValue conforming to the
-// "cloudfoundry.app.id" semantic conventions. It represents the guid of the
-// application.
-func CloudFoundryAppID(val string) attribute.KeyValue {
- return CloudFoundryAppIDKey.String(val)
-}
-
-// CloudFoundryAppInstanceID returns an attribute KeyValue conforming to the
-// "cloudfoundry.app.instance.id" semantic conventions. It represents the index
-// of the application instance. 0 when just one instance is active.
-func CloudFoundryAppInstanceID(val string) attribute.KeyValue {
- return CloudFoundryAppInstanceIDKey.String(val)
-}
-
-// CloudFoundryAppName returns an attribute KeyValue conforming to the
-// "cloudfoundry.app.name" semantic conventions. It represents the name of the
-// application.
-func CloudFoundryAppName(val string) attribute.KeyValue {
- return CloudFoundryAppNameKey.String(val)
-}
-
-// CloudFoundryOrgID returns an attribute KeyValue conforming to the
-// "cloudfoundry.org.id" semantic conventions. It represents the guid of the
-// CloudFoundry org the application is running in.
-func CloudFoundryOrgID(val string) attribute.KeyValue {
- return CloudFoundryOrgIDKey.String(val)
-}
-
-// CloudFoundryOrgName returns an attribute KeyValue conforming to the
-// "cloudfoundry.org.name" semantic conventions. It represents the name of the
-// CloudFoundry organization the app is running in.
-func CloudFoundryOrgName(val string) attribute.KeyValue {
- return CloudFoundryOrgNameKey.String(val)
-}
-
-// CloudFoundryProcessID returns an attribute KeyValue conforming to the
-// "cloudfoundry.process.id" semantic conventions. It represents the UID
-// identifying the process.
-func CloudFoundryProcessID(val string) attribute.KeyValue {
- return CloudFoundryProcessIDKey.String(val)
-}
-
-// CloudFoundryProcessType returns an attribute KeyValue conforming to the
-// "cloudfoundry.process.type" semantic conventions. It represents the type of
-// process.
-func CloudFoundryProcessType(val string) attribute.KeyValue {
- return CloudFoundryProcessTypeKey.String(val)
-}
-
-// CloudFoundrySpaceID returns an attribute KeyValue conforming to the
-// "cloudfoundry.space.id" semantic conventions. It represents the guid of the
-// CloudFoundry space the application is running in.
-func CloudFoundrySpaceID(val string) attribute.KeyValue {
- return CloudFoundrySpaceIDKey.String(val)
-}
-
-// CloudFoundrySpaceName returns an attribute KeyValue conforming to the
-// "cloudfoundry.space.name" semantic conventions. It represents the name of the
-// CloudFoundry space the application is running in.
-func CloudFoundrySpaceName(val string) attribute.KeyValue {
- return CloudFoundrySpaceNameKey.String(val)
-}
-
-// CloudFoundrySystemID returns an attribute KeyValue conforming to the
-// "cloudfoundry.system.id" semantic conventions. It represents a guid or another
-// name describing the event source.
-func CloudFoundrySystemID(val string) attribute.KeyValue {
- return CloudFoundrySystemIDKey.String(val)
-}
-
-// CloudFoundrySystemInstanceID returns an attribute KeyValue conforming to the
-// "cloudfoundry.system.instance.id" semantic conventions. It represents a guid
-// describing the concrete instance of the event source.
-func CloudFoundrySystemInstanceID(val string) attribute.KeyValue {
- return CloudFoundrySystemInstanceIDKey.String(val)
-}
-
-// Namespace: code
-const (
- // CodeColumnNumberKey is the attribute Key conforming to the
- // "code.column.number" semantic conventions. It represents the column number in
- // `code.file.path` best representing the operation. It SHOULD point within the
- // code unit named in `code.function.name`. This attribute MUST NOT be used on
- // the Profile signal since the data is already captured in 'message Line'. This
- // constraint is imposed to prevent redundancy and maintain data integrity.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Stable
- CodeColumnNumberKey = attribute.Key("code.column.number")
-
- // CodeFilePathKey is the attribute Key conforming to the "code.file.path"
- // semantic conventions. It represents the source code file name that identifies
- // the code unit as uniquely as possible (preferably an absolute file path).
- // This attribute MUST NOT be used on the Profile signal since the data is
- // already captured in 'message Function'. This constraint is imposed to prevent
- // redundancy and maintain data integrity.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: /usr/local/MyApplication/content_root/app/index.php
- CodeFilePathKey = attribute.Key("code.file.path")
-
- // CodeFunctionNameKey is the attribute Key conforming to the
- // "code.function.name" semantic conventions. It represents the method or
- // function fully-qualified name without arguments. The value should fit the
- // natural representation of the language runtime, which is also likely the same
- // used within `code.stacktrace` attribute value. This attribute MUST NOT be
- // used on the Profile signal since the data is already captured in 'message
- // Function'. This constraint is imposed to prevent redundancy and maintain data
- // integrity.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "com.example.MyHttpService.serveRequest",
- // "GuzzleHttp\Client::transfer", "fopen"
- // Note: Values and format depends on each language runtime, thus it is
- // impossible to provide an exhaustive list of examples.
- // The values are usually the same (or prefixes of) the ones found in native
- // stack trace representation stored in
- // `code.stacktrace` without information on arguments.
- //
- // Examples:
- //
- // - Java method: `com.example.MyHttpService.serveRequest`
- // - Java anonymous class method: `com.mycompany.Main$1.myMethod`
- // - Java lambda method:
- // `com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod`
- // - PHP function: `GuzzleHttp\Client::transfer`
- // - Go function: `github.com/my/repo/pkg.foo.func5`
- // - Elixir: `OpenTelemetry.Ctx.new`
- // - Erlang: `opentelemetry_ctx:new`
- // - Rust: `playground::my_module::my_cool_func`
- // - C function: `fopen`
- CodeFunctionNameKey = attribute.Key("code.function.name")
-
- // CodeLineNumberKey is the attribute Key conforming to the "code.line.number"
- // semantic conventions. It represents the line number in `code.file.path` best
- // representing the operation. It SHOULD point within the code unit named in
- // `code.function.name`. This attribute MUST NOT be used on the Profile signal
- // since the data is already captured in 'message Line'. This constraint is
- // imposed to prevent redundancy and maintain data integrity.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Stable
- CodeLineNumberKey = attribute.Key("code.line.number")
-
- // CodeStacktraceKey is the attribute Key conforming to the "code.stacktrace"
- // semantic conventions. It represents a stacktrace as a string in the natural
- // representation for the language runtime. The representation is identical to
- // [`exception.stacktrace`]. This attribute MUST NOT be used on the Profile
- // signal since the data is already captured in 'message Location'. This
- // constraint is imposed to prevent redundancy and maintain data integrity.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at
- // com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at
- // com.example.GenerateTrace.main(GenerateTrace.java:5)
- //
- // [`exception.stacktrace`]: /docs/exceptions/exceptions-spans.md#stacktrace-representation
- CodeStacktraceKey = attribute.Key("code.stacktrace")
-)
-
-// CodeColumnNumber returns an attribute KeyValue conforming to the
-// "code.column.number" semantic conventions. It represents the column number in
-// `code.file.path` best representing the operation. It SHOULD point within the
-// code unit named in `code.function.name`. This attribute MUST NOT be used on
-// the Profile signal since the data is already captured in 'message Line'. This
-// constraint is imposed to prevent redundancy and maintain data integrity.
-func CodeColumnNumber(val int) attribute.KeyValue {
- return CodeColumnNumberKey.Int(val)
-}
-
-// CodeFilePath returns an attribute KeyValue conforming to the "code.file.path"
-// semantic conventions. It represents the source code file name that identifies
-// the code unit as uniquely as possible (preferably an absolute file path). This
-// attribute MUST NOT be used on the Profile signal since the data is already
-// captured in 'message Function'. This constraint is imposed to prevent
-// redundancy and maintain data integrity.
-func CodeFilePath(val string) attribute.KeyValue {
- return CodeFilePathKey.String(val)
-}
-
-// CodeFunctionName returns an attribute KeyValue conforming to the
-// "code.function.name" semantic conventions. It represents the method or
-// function fully-qualified name without arguments. The value should fit the
-// natural representation of the language runtime, which is also likely the same
-// used within `code.stacktrace` attribute value. This attribute MUST NOT be used
-// on the Profile signal since the data is already captured in 'message
-// Function'. This constraint is imposed to prevent redundancy and maintain data
-// integrity.
-func CodeFunctionName(val string) attribute.KeyValue {
- return CodeFunctionNameKey.String(val)
-}
-
-// CodeLineNumber returns an attribute KeyValue conforming to the
-// "code.line.number" semantic conventions. It represents the line number in
-// `code.file.path` best representing the operation. It SHOULD point within the
-// code unit named in `code.function.name`. This attribute MUST NOT be used on
-// the Profile signal since the data is already captured in 'message Line'. This
-// constraint is imposed to prevent redundancy and maintain data integrity.
-func CodeLineNumber(val int) attribute.KeyValue {
- return CodeLineNumberKey.Int(val)
-}
-
-// CodeStacktrace returns an attribute KeyValue conforming to the
-// "code.stacktrace" semantic conventions. It represents a stacktrace as a string
-// in the natural representation for the language runtime. The representation is
-// identical to [`exception.stacktrace`]. This attribute MUST NOT be used on the
-// Profile signal since the data is already captured in 'message Location'. This
-// constraint is imposed to prevent redundancy and maintain data integrity.
-//
-// [`exception.stacktrace`]: /docs/exceptions/exceptions-spans.md#stacktrace-representation
-func CodeStacktrace(val string) attribute.KeyValue {
- return CodeStacktraceKey.String(val)
-}
-
-// Namespace: container
-const (
- // ContainerCommandKey is the attribute Key conforming to the
- // "container.command" semantic conventions. It represents the command used to
- // run the container (i.e. the command name).
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "otelcontribcol"
- // Note: If using embedded credentials or sensitive data, it is recommended to
- // remove them to prevent potential leakage.
- ContainerCommandKey = attribute.Key("container.command")
-
- // ContainerCommandArgsKey is the attribute Key conforming to the
- // "container.command_args" semantic conventions. It represents the all the
- // command arguments (including the command/executable itself) run by the
- // container.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "otelcontribcol", "--config", "config.yaml"
- ContainerCommandArgsKey = attribute.Key("container.command_args")
-
- // ContainerCommandLineKey is the attribute Key conforming to the
- // "container.command_line" semantic conventions. It represents the full command
- // run by the container as a single string representing the full command.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "otelcontribcol --config config.yaml"
- ContainerCommandLineKey = attribute.Key("container.command_line")
-
- // ContainerCSIPluginNameKey is the attribute Key conforming to the
- // "container.csi.plugin.name" semantic conventions. It represents the name of
- // the CSI ([Container Storage Interface]) plugin used by the volume.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "pd.csi.storage.gke.io"
- // Note: This can sometimes be referred to as a "driver" in CSI implementations.
- // This should represent the `name` field of the GetPluginInfo RPC.
- //
- // [Container Storage Interface]: https://github.com/container-storage-interface/spec
- ContainerCSIPluginNameKey = attribute.Key("container.csi.plugin.name")
-
- // ContainerCSIVolumeIDKey is the attribute Key conforming to the
- // "container.csi.volume.id" semantic conventions. It represents the unique
- // volume ID returned by the CSI ([Container Storage Interface]) plugin.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk"
- // Note: This can sometimes be referred to as a "volume handle" in CSI
- // implementations. This should represent the `Volume.volume_id` field in CSI
- // spec.
- //
- // [Container Storage Interface]: https://github.com/container-storage-interface/spec
- ContainerCSIVolumeIDKey = attribute.Key("container.csi.volume.id")
-
- // ContainerIDKey is the attribute Key conforming to the "container.id" semantic
- // conventions. It represents the container ID. Usually a UUID, as for example
- // used to [identify Docker containers]. The UUID might be abbreviated.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "a3bf90e006b2"
- //
- // [identify Docker containers]: https://docs.docker.com/engine/containers/run/#container-identification
- ContainerIDKey = attribute.Key("container.id")
-
- // ContainerImageIDKey is the attribute Key conforming to the
- // "container.image.id" semantic conventions. It represents the runtime specific
- // image identifier. Usually a hash algorithm followed by a UUID.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // "sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f"
- // Note: Docker defines a sha256 of the image id; `container.image.id`
- // corresponds to the `Image` field from the Docker container inspect [API]
- // endpoint.
- // K8s defines a link to the container registry repository with digest
- // `"imageID": "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`
- // .
- // The ID is assigned by the container runtime and can vary in different
- // environments. Consider using `oci.manifest.digest` if it is important to
- // identify the same image in different environments/runtimes.
- //
- // [API]: https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerInspect
- ContainerImageIDKey = attribute.Key("container.image.id")
-
- // ContainerImageNameKey is the attribute Key conforming to the
- // "container.image.name" semantic conventions. It represents the name of the
- // image the container was built on.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "gcr.io/opentelemetry/operator"
- ContainerImageNameKey = attribute.Key("container.image.name")
-
- // ContainerImageRepoDigestsKey is the attribute Key conforming to the
- // "container.image.repo_digests" semantic conventions. It represents the repo
- // digests of the container image as provided by the container runtime.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples:
- // "example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb",
- // "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578"
- // Note: [Docker] and [CRI] report those under the `RepoDigests` field.
- //
- // [Docker]: https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect
- // [CRI]: https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238
- ContainerImageRepoDigestsKey = attribute.Key("container.image.repo_digests")
-
- // ContainerImageTagsKey is the attribute Key conforming to the
- // "container.image.tags" semantic conventions. It represents the container
- // image tags. An example can be found in [Docker Image Inspect]. Should be only
- // the `` section of the full name for example from
- // `registry.example.com/my-org/my-image:`.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "v1.27.1", "3.5.7-0"
- //
- // [Docker Image Inspect]: https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect
- ContainerImageTagsKey = attribute.Key("container.image.tags")
-
- // ContainerNameKey is the attribute Key conforming to the "container.name"
- // semantic conventions. It represents the container name used by container
- // runtime.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "opentelemetry-autoconf"
- ContainerNameKey = attribute.Key("container.name")
-
- // ContainerRuntimeDescriptionKey is the attribute Key conforming to the
- // "container.runtime.description" semantic conventions. It represents a
- // description about the runtime which could include, for example details about
- // the CRI/API version being used or other customisations.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "docker://19.3.1 - CRI: 1.22.0"
- ContainerRuntimeDescriptionKey = attribute.Key("container.runtime.description")
-
- // ContainerRuntimeNameKey is the attribute Key conforming to the
- // "container.runtime.name" semantic conventions. It represents the container
- // runtime managing this container.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "docker", "containerd", "rkt"
- ContainerRuntimeNameKey = attribute.Key("container.runtime.name")
-
- // ContainerRuntimeVersionKey is the attribute Key conforming to the
- // "container.runtime.version" semantic conventions. It represents the version
- // of the runtime of this process, as returned by the runtime without
- // modification.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 1.0.0
- ContainerRuntimeVersionKey = attribute.Key("container.runtime.version")
-)
-
-// ContainerCommand returns an attribute KeyValue conforming to the
-// "container.command" semantic conventions. It represents the command used to
-// run the container (i.e. the command name).
-func ContainerCommand(val string) attribute.KeyValue {
- return ContainerCommandKey.String(val)
-}
-
-// ContainerCommandArgs returns an attribute KeyValue conforming to the
-// "container.command_args" semantic conventions. It represents the all the
-// command arguments (including the command/executable itself) run by the
-// container.
-func ContainerCommandArgs(val ...string) attribute.KeyValue {
- return ContainerCommandArgsKey.StringSlice(val)
-}
-
-// ContainerCommandLine returns an attribute KeyValue conforming to the
-// "container.command_line" semantic conventions. It represents the full command
-// run by the container as a single string representing the full command.
-func ContainerCommandLine(val string) attribute.KeyValue {
- return ContainerCommandLineKey.String(val)
-}
-
-// ContainerCSIPluginName returns an attribute KeyValue conforming to the
-// "container.csi.plugin.name" semantic conventions. It represents the name of
-// the CSI ([Container Storage Interface]) plugin used by the volume.
-//
-// [Container Storage Interface]: https://github.com/container-storage-interface/spec
-func ContainerCSIPluginName(val string) attribute.KeyValue {
- return ContainerCSIPluginNameKey.String(val)
-}
-
-// ContainerCSIVolumeID returns an attribute KeyValue conforming to the
-// "container.csi.volume.id" semantic conventions. It represents the unique
-// volume ID returned by the CSI ([Container Storage Interface]) plugin.
-//
-// [Container Storage Interface]: https://github.com/container-storage-interface/spec
-func ContainerCSIVolumeID(val string) attribute.KeyValue {
- return ContainerCSIVolumeIDKey.String(val)
-}
-
-// ContainerID returns an attribute KeyValue conforming to the "container.id"
-// semantic conventions. It represents the container ID. Usually a UUID, as for
-// example used to [identify Docker containers]. The UUID might be abbreviated.
-//
-// [identify Docker containers]: https://docs.docker.com/engine/containers/run/#container-identification
-func ContainerID(val string) attribute.KeyValue {
- return ContainerIDKey.String(val)
-}
-
-// ContainerImageID returns an attribute KeyValue conforming to the
-// "container.image.id" semantic conventions. It represents the runtime specific
-// image identifier. Usually a hash algorithm followed by a UUID.
-func ContainerImageID(val string) attribute.KeyValue {
- return ContainerImageIDKey.String(val)
-}
-
-// ContainerImageName returns an attribute KeyValue conforming to the
-// "container.image.name" semantic conventions. It represents the name of the
-// image the container was built on.
-func ContainerImageName(val string) attribute.KeyValue {
- return ContainerImageNameKey.String(val)
-}
-
-// ContainerImageRepoDigests returns an attribute KeyValue conforming to the
-// "container.image.repo_digests" semantic conventions. It represents the repo
-// digests of the container image as provided by the container runtime.
-func ContainerImageRepoDigests(val ...string) attribute.KeyValue {
- return ContainerImageRepoDigestsKey.StringSlice(val)
-}
-
-// ContainerImageTags returns an attribute KeyValue conforming to the
-// "container.image.tags" semantic conventions. It represents the container image
-// tags. An example can be found in [Docker Image Inspect]. Should be only the
-// `` section of the full name for example from
-// `registry.example.com/my-org/my-image:`.
-//
-// [Docker Image Inspect]: https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect
-func ContainerImageTags(val ...string) attribute.KeyValue {
- return ContainerImageTagsKey.StringSlice(val)
-}
-
-// ContainerLabel returns an attribute KeyValue conforming to the
-// "container.label" semantic conventions. It represents the container labels,
-// `` being the label name, the value being the label value.
-func ContainerLabel(key string, val string) attribute.KeyValue {
- return attribute.String("container.label."+key, val)
-}
-
-// ContainerName returns an attribute KeyValue conforming to the "container.name"
-// semantic conventions. It represents the container name used by container
-// runtime.
-func ContainerName(val string) attribute.KeyValue {
- return ContainerNameKey.String(val)
-}
-
-// ContainerRuntimeDescription returns an attribute KeyValue conforming to the
-// "container.runtime.description" semantic conventions. It represents a
-// description about the runtime which could include, for example details about
-// the CRI/API version being used or other customisations.
-func ContainerRuntimeDescription(val string) attribute.KeyValue {
- return ContainerRuntimeDescriptionKey.String(val)
-}
-
-// ContainerRuntimeName returns an attribute KeyValue conforming to the
-// "container.runtime.name" semantic conventions. It represents the container
-// runtime managing this container.
-func ContainerRuntimeName(val string) attribute.KeyValue {
- return ContainerRuntimeNameKey.String(val)
-}
-
-// ContainerRuntimeVersion returns an attribute KeyValue conforming to the
-// "container.runtime.version" semantic conventions. It represents the version of
-// the runtime of this process, as returned by the runtime without modification.
-func ContainerRuntimeVersion(val string) attribute.KeyValue {
- return ContainerRuntimeVersionKey.String(val)
-}
-
-// Namespace: cpu
-const (
- // CPULogicalNumberKey is the attribute Key conforming to the
- // "cpu.logical_number" semantic conventions. It represents the logical CPU
- // number [0..n-1].
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 1
- CPULogicalNumberKey = attribute.Key("cpu.logical_number")
-
- // CPUModeKey is the attribute Key conforming to the "cpu.mode" semantic
- // conventions. It represents the mode of the CPU.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "user", "system"
- CPUModeKey = attribute.Key("cpu.mode")
-)
-
-// CPULogicalNumber returns an attribute KeyValue conforming to the
-// "cpu.logical_number" semantic conventions. It represents the logical CPU
-// number [0..n-1].
-func CPULogicalNumber(val int) attribute.KeyValue {
- return CPULogicalNumberKey.Int(val)
-}
-
-// Enum values for cpu.mode
-var (
- // User
- // Stability: development
- CPUModeUser = CPUModeKey.String("user")
- // System
- // Stability: development
- CPUModeSystem = CPUModeKey.String("system")
- // Nice
- // Stability: development
- CPUModeNice = CPUModeKey.String("nice")
- // Idle
- // Stability: development
- CPUModeIdle = CPUModeKey.String("idle")
- // IO Wait
- // Stability: development
- CPUModeIOWait = CPUModeKey.String("iowait")
- // Interrupt
- // Stability: development
- CPUModeInterrupt = CPUModeKey.String("interrupt")
- // Steal
- // Stability: development
- CPUModeSteal = CPUModeKey.String("steal")
- // Kernel
- // Stability: development
- CPUModeKernel = CPUModeKey.String("kernel")
-)
-
-// Namespace: db
-const (
- // DBClientConnectionPoolNameKey is the attribute Key conforming to the
- // "db.client.connection.pool.name" semantic conventions. It represents the name
- // of the connection pool; unique within the instrumented application. In case
- // the connection pool implementation doesn't provide a name, instrumentation
- // SHOULD use a combination of parameters that would make the name unique, for
- // example, combining attributes `server.address`, `server.port`, and
- // `db.namespace`, formatted as `server.address:server.port/db.namespace`.
- // Instrumentations that generate connection pool name following different
- // patterns SHOULD document it.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "myDataSource"
- DBClientConnectionPoolNameKey = attribute.Key("db.client.connection.pool.name")
-
- // DBClientConnectionStateKey is the attribute Key conforming to the
- // "db.client.connection.state" semantic conventions. It represents the state of
- // a connection in the pool.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "idle"
- DBClientConnectionStateKey = attribute.Key("db.client.connection.state")
-
- // DBCollectionNameKey is the attribute Key conforming to the
- // "db.collection.name" semantic conventions. It represents the name of a
- // collection (table, container) within the database.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "public.users", "customers"
- // Note: It is RECOMMENDED to capture the value as provided by the application
- // without attempting to do any case normalization.
- //
- // The collection name SHOULD NOT be extracted from `db.query.text`,
- // when the database system supports query text with multiple collections
- // in non-batch operations.
- //
- // For batch operations, if the individual operations are known to have the same
- // collection name then that collection name SHOULD be used.
- DBCollectionNameKey = attribute.Key("db.collection.name")
-
- // DBNamespaceKey is the attribute Key conforming to the "db.namespace" semantic
- // conventions. It represents the name of the database, fully qualified within
- // the server address and port.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "customers", "test.users"
- // Note: If a database system has multiple namespace components, they SHOULD be
- // concatenated from the most general to the most specific namespace component,
- // using `|` as a separator between the components. Any missing components (and
- // their associated separators) SHOULD be omitted.
- // Semantic conventions for individual database systems SHOULD document what
- // `db.namespace` means in the context of that system.
- // It is RECOMMENDED to capture the value as provided by the application without
- // attempting to do any case normalization.
- DBNamespaceKey = attribute.Key("db.namespace")
-
- // DBOperationBatchSizeKey is the attribute Key conforming to the
- // "db.operation.batch.size" semantic conventions. It represents the number of
- // queries included in a batch operation.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: 2, 3, 4
- // Note: Operations are only considered batches when they contain two or more
- // operations, and so `db.operation.batch.size` SHOULD never be `1`.
- DBOperationBatchSizeKey = attribute.Key("db.operation.batch.size")
-
- // DBOperationNameKey is the attribute Key conforming to the "db.operation.name"
- // semantic conventions. It represents the name of the operation or command
- // being executed.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "findAndModify", "HMSET", "SELECT"
- // Note: It is RECOMMENDED to capture the value as provided by the application
- // without attempting to do any case normalization.
- //
- // The operation name SHOULD NOT be extracted from `db.query.text`,
- // when the database system supports query text with multiple operations
- // in non-batch operations.
- //
- // If spaces can occur in the operation name, multiple consecutive spaces
- // SHOULD be normalized to a single space.
- //
- // For batch operations, if the individual operations are known to have the same
- // operation name
- // then that operation name SHOULD be used prepended by `BATCH `,
- // otherwise `db.operation.name` SHOULD be `BATCH` or some other database
- // system specific term if more applicable.
- DBOperationNameKey = attribute.Key("db.operation.name")
-
- // DBQuerySummaryKey is the attribute Key conforming to the "db.query.summary"
- // semantic conventions. It represents the low cardinality summary of a database
- // query.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "SELECT wuser_table", "INSERT shipping_details SELECT orders", "get
- // user by id"
- // Note: The query summary describes a class of database queries and is useful
- // as a grouping key, especially when analyzing telemetry for database
- // calls involving complex queries.
- //
- // Summary may be available to the instrumentation through
- // instrumentation hooks or other means. If it is not available,
- // instrumentations
- // that support query parsing SHOULD generate a summary following
- // [Generating query summary]
- // section.
- //
- // [Generating query summary]: /docs/db/database-spans.md#generating-a-summary-of-the-query
- DBQuerySummaryKey = attribute.Key("db.query.summary")
-
- // DBQueryTextKey is the attribute Key conforming to the "db.query.text"
- // semantic conventions. It represents the database query being executed.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "SELECT * FROM wuser_table where username = ?", "SET mykey ?"
- // Note: For sanitization see [Sanitization of `db.query.text`].
- // For batch operations, if the individual operations are known to have the same
- // query text then that query text SHOULD be used, otherwise all of the
- // individual query texts SHOULD be concatenated with separator `; ` or some
- // other database system specific separator if more applicable.
- // Parameterized query text SHOULD NOT be sanitized. Even though parameterized
- // query text can potentially have sensitive data, by using a parameterized
- // query the user is giving a strong signal that any sensitive data will be
- // passed as parameter values, and the benefit to observability of capturing the
- // static part of the query text by default outweighs the risk.
- //
- // [Sanitization of `db.query.text`]: /docs/db/database-spans.md#sanitization-of-dbquerytext
- DBQueryTextKey = attribute.Key("db.query.text")
-
- // DBResponseReturnedRowsKey is the attribute Key conforming to the
- // "db.response.returned_rows" semantic conventions. It represents the number of
- // rows returned by the operation.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 10, 30, 1000
- DBResponseReturnedRowsKey = attribute.Key("db.response.returned_rows")
-
- // DBResponseStatusCodeKey is the attribute Key conforming to the
- // "db.response.status_code" semantic conventions. It represents the database
- // response status code.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "102", "ORA-17002", "08P01", "404"
- // Note: The status code returned by the database. Usually it represents an
- // error code, but may also represent partial success, warning, or differentiate
- // between various types of successful outcomes.
- // Semantic conventions for individual database systems SHOULD document what
- // `db.response.status_code` means in the context of that system.
- DBResponseStatusCodeKey = attribute.Key("db.response.status_code")
-
- // DBStoredProcedureNameKey is the attribute Key conforming to the
- // "db.stored_procedure.name" semantic conventions. It represents the name of a
- // stored procedure within the database.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "GetCustomer"
- // Note: It is RECOMMENDED to capture the value as provided by the application
- // without attempting to do any case normalization.
- //
- // For batch operations, if the individual operations are known to have the same
- // stored procedure name then that stored procedure name SHOULD be used.
- DBStoredProcedureNameKey = attribute.Key("db.stored_procedure.name")
-
- // DBSystemNameKey is the attribute Key conforming to the "db.system.name"
- // semantic conventions. It represents the database management system (DBMS)
- // product as identified by the client instrumentation.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples:
- // Note: The actual DBMS may differ from the one identified by the client. For
- // example, when using PostgreSQL client libraries to connect to a CockroachDB,
- // the `db.system.name` is set to `postgresql` based on the instrumentation's
- // best knowledge.
- DBSystemNameKey = attribute.Key("db.system.name")
-)
-
-// DBClientConnectionPoolName returns an attribute KeyValue conforming to the
-// "db.client.connection.pool.name" semantic conventions. It represents the name
-// of the connection pool; unique within the instrumented application. In case
-// the connection pool implementation doesn't provide a name, instrumentation
-// SHOULD use a combination of parameters that would make the name unique, for
-// example, combining attributes `server.address`, `server.port`, and
-// `db.namespace`, formatted as `server.address:server.port/db.namespace`.
-// Instrumentations that generate connection pool name following different
-// patterns SHOULD document it.
-func DBClientConnectionPoolName(val string) attribute.KeyValue {
- return DBClientConnectionPoolNameKey.String(val)
-}
-
-// DBCollectionName returns an attribute KeyValue conforming to the
-// "db.collection.name" semantic conventions. It represents the name of a
-// collection (table, container) within the database.
-func DBCollectionName(val string) attribute.KeyValue {
- return DBCollectionNameKey.String(val)
-}
-
-// DBNamespace returns an attribute KeyValue conforming to the "db.namespace"
-// semantic conventions. It represents the name of the database, fully qualified
-// within the server address and port.
-func DBNamespace(val string) attribute.KeyValue {
- return DBNamespaceKey.String(val)
-}
-
-// DBOperationBatchSize returns an attribute KeyValue conforming to the
-// "db.operation.batch.size" semantic conventions. It represents the number of
-// queries included in a batch operation.
-func DBOperationBatchSize(val int) attribute.KeyValue {
- return DBOperationBatchSizeKey.Int(val)
-}
-
-// DBOperationName returns an attribute KeyValue conforming to the
-// "db.operation.name" semantic conventions. It represents the name of the
-// operation or command being executed.
-func DBOperationName(val string) attribute.KeyValue {
- return DBOperationNameKey.String(val)
-}
-
-// DBOperationParameter returns an attribute KeyValue conforming to the
-// "db.operation.parameter" semantic conventions. It represents a database
-// operation parameter, with `` being the parameter name, and the attribute
-// value being a string representation of the parameter value.
-func DBOperationParameter(key string, val string) attribute.KeyValue {
- return attribute.String("db.operation.parameter."+key, val)
-}
-
-// DBQueryParameter returns an attribute KeyValue conforming to the
-// "db.query.parameter" semantic conventions. It represents a database query
-// parameter, with `` being the parameter name, and the attribute value
-// being a string representation of the parameter value.
-func DBQueryParameter(key string, val string) attribute.KeyValue {
- return attribute.String("db.query.parameter."+key, val)
-}
-
-// DBQuerySummary returns an attribute KeyValue conforming to the
-// "db.query.summary" semantic conventions. It represents the low cardinality
-// summary of a database query.
-func DBQuerySummary(val string) attribute.KeyValue {
- return DBQuerySummaryKey.String(val)
-}
-
-// DBQueryText returns an attribute KeyValue conforming to the "db.query.text"
-// semantic conventions. It represents the database query being executed.
-func DBQueryText(val string) attribute.KeyValue {
- return DBQueryTextKey.String(val)
-}
-
-// DBResponseReturnedRows returns an attribute KeyValue conforming to the
-// "db.response.returned_rows" semantic conventions. It represents the number of
-// rows returned by the operation.
-func DBResponseReturnedRows(val int) attribute.KeyValue {
- return DBResponseReturnedRowsKey.Int(val)
-}
-
-// DBResponseStatusCode returns an attribute KeyValue conforming to the
-// "db.response.status_code" semantic conventions. It represents the database
-// response status code.
-func DBResponseStatusCode(val string) attribute.KeyValue {
- return DBResponseStatusCodeKey.String(val)
-}
-
-// DBStoredProcedureName returns an attribute KeyValue conforming to the
-// "db.stored_procedure.name" semantic conventions. It represents the name of a
-// stored procedure within the database.
-func DBStoredProcedureName(val string) attribute.KeyValue {
- return DBStoredProcedureNameKey.String(val)
-}
-
-// Enum values for db.client.connection.state
-var (
- // idle
- // Stability: development
- DBClientConnectionStateIdle = DBClientConnectionStateKey.String("idle")
- // used
- // Stability: development
- DBClientConnectionStateUsed = DBClientConnectionStateKey.String("used")
-)
-
-// Enum values for db.system.name
-var (
- // Some other SQL database. Fallback only.
- // Stability: development
- DBSystemNameOtherSQL = DBSystemNameKey.String("other_sql")
- // [Adabas (Adaptable Database System)]
- // Stability: development
- //
- // [Adabas (Adaptable Database System)]: https://documentation.softwareag.com/?pf=adabas
- DBSystemNameSoftwareagAdabas = DBSystemNameKey.String("softwareag.adabas")
- // [Actian Ingres]
- // Stability: development
- //
- // [Actian Ingres]: https://www.actian.com/databases/ingres/
- DBSystemNameActianIngres = DBSystemNameKey.String("actian.ingres")
- // [Amazon DynamoDB]
- // Stability: development
- //
- // [Amazon DynamoDB]: https://aws.amazon.com/pm/dynamodb/
- DBSystemNameAWSDynamoDB = DBSystemNameKey.String("aws.dynamodb")
- // [Amazon Redshift]
- // Stability: development
- //
- // [Amazon Redshift]: https://aws.amazon.com/redshift/
- DBSystemNameAWSRedshift = DBSystemNameKey.String("aws.redshift")
- // [Azure Cosmos DB]
- // Stability: development
- //
- // [Azure Cosmos DB]: https://learn.microsoft.com/azure/cosmos-db
- DBSystemNameAzureCosmosDB = DBSystemNameKey.String("azure.cosmosdb")
- // [InterSystems Caché]
- // Stability: development
- //
- // [InterSystems Caché]: https://www.intersystems.com/products/cache/
- DBSystemNameIntersystemsCache = DBSystemNameKey.String("intersystems.cache")
- // [Apache Cassandra]
- // Stability: development
- //
- // [Apache Cassandra]: https://cassandra.apache.org/
- DBSystemNameCassandra = DBSystemNameKey.String("cassandra")
- // [ClickHouse]
- // Stability: development
- //
- // [ClickHouse]: https://clickhouse.com/
- DBSystemNameClickHouse = DBSystemNameKey.String("clickhouse")
- // [CockroachDB]
- // Stability: development
- //
- // [CockroachDB]: https://www.cockroachlabs.com/
- DBSystemNameCockroachDB = DBSystemNameKey.String("cockroachdb")
- // [Couchbase]
- // Stability: development
- //
- // [Couchbase]: https://www.couchbase.com/
- DBSystemNameCouchbase = DBSystemNameKey.String("couchbase")
- // [Apache CouchDB]
- // Stability: development
- //
- // [Apache CouchDB]: https://couchdb.apache.org/
- DBSystemNameCouchDB = DBSystemNameKey.String("couchdb")
- // [Apache Derby]
- // Stability: development
- //
- // [Apache Derby]: https://db.apache.org/derby/
- DBSystemNameDerby = DBSystemNameKey.String("derby")
- // [Elasticsearch]
- // Stability: development
- //
- // [Elasticsearch]: https://www.elastic.co/elasticsearch
- DBSystemNameElasticsearch = DBSystemNameKey.String("elasticsearch")
- // [Firebird]
- // Stability: development
- //
- // [Firebird]: https://www.firebirdsql.org/
- DBSystemNameFirebirdSQL = DBSystemNameKey.String("firebirdsql")
- // [Google Cloud Spanner]
- // Stability: development
- //
- // [Google Cloud Spanner]: https://cloud.google.com/spanner
- DBSystemNameGCPSpanner = DBSystemNameKey.String("gcp.spanner")
- // [Apache Geode]
- // Stability: development
- //
- // [Apache Geode]: https://geode.apache.org/
- DBSystemNameGeode = DBSystemNameKey.String("geode")
- // [H2 Database]
- // Stability: development
- //
- // [H2 Database]: https://h2database.com/
- DBSystemNameH2database = DBSystemNameKey.String("h2database")
- // [Apache HBase]
- // Stability: development
- //
- // [Apache HBase]: https://hbase.apache.org/
- DBSystemNameHBase = DBSystemNameKey.String("hbase")
- // [Apache Hive]
- // Stability: development
- //
- // [Apache Hive]: https://hive.apache.org/
- DBSystemNameHive = DBSystemNameKey.String("hive")
- // [HyperSQL Database]
- // Stability: development
- //
- // [HyperSQL Database]: https://hsqldb.org/
- DBSystemNameHSQLDB = DBSystemNameKey.String("hsqldb")
- // [IBM Db2]
- // Stability: development
- //
- // [IBM Db2]: https://www.ibm.com/db2
- DBSystemNameIBMDB2 = DBSystemNameKey.String("ibm.db2")
- // [IBM Informix]
- // Stability: development
- //
- // [IBM Informix]: https://www.ibm.com/products/informix
- DBSystemNameIBMInformix = DBSystemNameKey.String("ibm.informix")
- // [IBM Netezza]
- // Stability: development
- //
- // [IBM Netezza]: https://www.ibm.com/products/netezza
- DBSystemNameIBMNetezza = DBSystemNameKey.String("ibm.netezza")
- // [InfluxDB]
- // Stability: development
- //
- // [InfluxDB]: https://www.influxdata.com/
- DBSystemNameInfluxDB = DBSystemNameKey.String("influxdb")
- // [Instant]
- // Stability: development
- //
- // [Instant]: https://www.instantdb.com/
- DBSystemNameInstantDB = DBSystemNameKey.String("instantdb")
- // [MariaDB]
- // Stability: stable
- //
- // [MariaDB]: https://mariadb.org/
- DBSystemNameMariaDB = DBSystemNameKey.String("mariadb")
- // [Memcached]
- // Stability: development
- //
- // [Memcached]: https://memcached.org/
- DBSystemNameMemcached = DBSystemNameKey.String("memcached")
- // [MongoDB]
- // Stability: development
- //
- // [MongoDB]: https://www.mongodb.com/
- DBSystemNameMongoDB = DBSystemNameKey.String("mongodb")
- // [Microsoft SQL Server]
- // Stability: stable
- //
- // [Microsoft SQL Server]: https://www.microsoft.com/sql-server
- DBSystemNameMicrosoftSQLServer = DBSystemNameKey.String("microsoft.sql_server")
- // [MySQL]
- // Stability: stable
- //
- // [MySQL]: https://www.mysql.com/
- DBSystemNameMySQL = DBSystemNameKey.String("mysql")
- // [Neo4j]
- // Stability: development
- //
- // [Neo4j]: https://neo4j.com/
- DBSystemNameNeo4j = DBSystemNameKey.String("neo4j")
- // [OpenSearch]
- // Stability: development
- //
- // [OpenSearch]: https://opensearch.org/
- DBSystemNameOpenSearch = DBSystemNameKey.String("opensearch")
- // [Oracle Database]
- // Stability: development
- //
- // [Oracle Database]: https://www.oracle.com/database/
- DBSystemNameOracleDB = DBSystemNameKey.String("oracle.db")
- // [PostgreSQL]
- // Stability: stable
- //
- // [PostgreSQL]: https://www.postgresql.org/
- DBSystemNamePostgreSQL = DBSystemNameKey.String("postgresql")
- // [Redis]
- // Stability: development
- //
- // [Redis]: https://redis.io/
- DBSystemNameRedis = DBSystemNameKey.String("redis")
- // [SAP HANA]
- // Stability: development
- //
- // [SAP HANA]: https://www.sap.com/products/technology-platform/hana/what-is-sap-hana.html
- DBSystemNameSAPHANA = DBSystemNameKey.String("sap.hana")
- // [SAP MaxDB]
- // Stability: development
- //
- // [SAP MaxDB]: https://maxdb.sap.com/
- DBSystemNameSAPMaxDB = DBSystemNameKey.String("sap.maxdb")
- // [SQLite]
- // Stability: development
- //
- // [SQLite]: https://www.sqlite.org/
- DBSystemNameSQLite = DBSystemNameKey.String("sqlite")
- // [Teradata]
- // Stability: development
- //
- // [Teradata]: https://www.teradata.com/
- DBSystemNameTeradata = DBSystemNameKey.String("teradata")
- // [Trino]
- // Stability: development
- //
- // [Trino]: https://trino.io/
- DBSystemNameTrino = DBSystemNameKey.String("trino")
-)
-
-// Namespace: deployment
-const (
- // DeploymentEnvironmentNameKey is the attribute Key conforming to the
- // "deployment.environment.name" semantic conventions. It represents the name of
- // the [deployment environment] (aka deployment tier).
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "staging", "production"
- // Note: `deployment.environment.name` does not affect the uniqueness
- // constraints defined through
- // the `service.namespace`, `service.name` and `service.instance.id` resource
- // attributes.
- // This implies that resources carrying the following attribute combinations
- // MUST be
- // considered to be identifying the same service:
- //
- // - `service.name=frontend`, `deployment.environment.name=production`
- // - `service.name=frontend`, `deployment.environment.name=staging`.
- //
- //
- // [deployment environment]: https://wikipedia.org/wiki/Deployment_environment
- DeploymentEnvironmentNameKey = attribute.Key("deployment.environment.name")
-
- // DeploymentIDKey is the attribute Key conforming to the "deployment.id"
- // semantic conventions. It represents the id of the deployment.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "1208"
- DeploymentIDKey = attribute.Key("deployment.id")
-
- // DeploymentNameKey is the attribute Key conforming to the "deployment.name"
- // semantic conventions. It represents the name of the deployment.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "deploy my app", "deploy-frontend"
- DeploymentNameKey = attribute.Key("deployment.name")
-
- // DeploymentStatusKey is the attribute Key conforming to the
- // "deployment.status" semantic conventions. It represents the status of the
- // deployment.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- DeploymentStatusKey = attribute.Key("deployment.status")
-)
-
-// DeploymentEnvironmentName returns an attribute KeyValue conforming to the
-// "deployment.environment.name" semantic conventions. It represents the name of
-// the [deployment environment] (aka deployment tier).
-//
-// [deployment environment]: https://wikipedia.org/wiki/Deployment_environment
-func DeploymentEnvironmentName(val string) attribute.KeyValue {
- return DeploymentEnvironmentNameKey.String(val)
-}
-
-// DeploymentID returns an attribute KeyValue conforming to the "deployment.id"
-// semantic conventions. It represents the id of the deployment.
-func DeploymentID(val string) attribute.KeyValue {
- return DeploymentIDKey.String(val)
-}
-
-// DeploymentName returns an attribute KeyValue conforming to the
-// "deployment.name" semantic conventions. It represents the name of the
-// deployment.
-func DeploymentName(val string) attribute.KeyValue {
- return DeploymentNameKey.String(val)
-}
-
-// Enum values for deployment.status
-var (
- // failed
- // Stability: development
- DeploymentStatusFailed = DeploymentStatusKey.String("failed")
- // succeeded
- // Stability: development
- DeploymentStatusSucceeded = DeploymentStatusKey.String("succeeded")
-)
-
-// Namespace: destination
-const (
- // DestinationAddressKey is the attribute Key conforming to the
- // "destination.address" semantic conventions. It represents the destination
- // address - domain name if available without reverse DNS lookup; otherwise, IP
- // address or Unix domain socket name.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "destination.example.com", "10.1.2.80", "/tmp/my.sock"
- // Note: When observed from the source side, and when communicating through an
- // intermediary, `destination.address` SHOULD represent the destination address
- // behind any intermediaries, for example proxies, if it's available.
- DestinationAddressKey = attribute.Key("destination.address")
-
- // DestinationPortKey is the attribute Key conforming to the "destination.port"
- // semantic conventions. It represents the destination port number.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 3389, 2888
- DestinationPortKey = attribute.Key("destination.port")
-)
-
-// DestinationAddress returns an attribute KeyValue conforming to the
-// "destination.address" semantic conventions. It represents the destination
-// address - domain name if available without reverse DNS lookup; otherwise, IP
-// address or Unix domain socket name.
-func DestinationAddress(val string) attribute.KeyValue {
- return DestinationAddressKey.String(val)
-}
-
-// DestinationPort returns an attribute KeyValue conforming to the
-// "destination.port" semantic conventions. It represents the destination port
-// number.
-func DestinationPort(val int) attribute.KeyValue {
- return DestinationPortKey.Int(val)
-}
-
-// Namespace: device
-const (
- // DeviceIDKey is the attribute Key conforming to the "device.id" semantic
- // conventions. It represents a unique identifier representing the device.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "123456789012345", "01:23:45:67:89:AB"
- // Note: Its value SHOULD be identical for all apps on a device and it SHOULD
- // NOT change if an app is uninstalled and re-installed.
- // However, it might be resettable by the user for all apps on a device.
- // Hardware IDs (e.g. vendor-specific serial number, IMEI or MAC address) MAY be
- // used as values.
- //
- // More information about Android identifier best practices can be found in the
- // [Android user data IDs guide].
- //
- // > [!WARNING]> This attribute may contain sensitive (PII) information. Caution
- // > should be taken when storing personal data or anything which can identify a
- // > user. GDPR and data protection laws may apply,
- // > ensure you do your own due diligence.> Due to these reasons, this
- // > identifier is not recommended for consumer applications and will likely
- // > result in rejection from both Google Play and App Store.
- // > However, it may be appropriate for specific enterprise scenarios, such as
- // > kiosk devices or enterprise-managed devices, with appropriate compliance
- // > clearance.
- // > Any instrumentation providing this identifier MUST implement it as an
- // > opt-in feature.> See [`app.installation.id`]> for a more
- // > privacy-preserving alternative.
- //
- // [Android user data IDs guide]: https://developer.android.com/training/articles/user-data-ids
- // [`app.installation.id`]: /docs/registry/attributes/app.md#app-installation-id
- DeviceIDKey = attribute.Key("device.id")
-
- // DeviceManufacturerKey is the attribute Key conforming to the
- // "device.manufacturer" semantic conventions. It represents the name of the
- // device manufacturer.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Apple", "Samsung"
- // Note: The Android OS provides this field via [Build]. iOS apps SHOULD
- // hardcode the value `Apple`.
- //
- // [Build]: https://developer.android.com/reference/android/os/Build#MANUFACTURER
- DeviceManufacturerKey = attribute.Key("device.manufacturer")
-
- // DeviceModelIdentifierKey is the attribute Key conforming to the
- // "device.model.identifier" semantic conventions. It represents the model
- // identifier for the device.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "iPhone3,4", "SM-G920F"
- // Note: It's recommended this value represents a machine-readable version of
- // the model identifier rather than the market or consumer-friendly name of the
- // device.
- DeviceModelIdentifierKey = attribute.Key("device.model.identifier")
-
- // DeviceModelNameKey is the attribute Key conforming to the "device.model.name"
- // semantic conventions. It represents the marketing name for the device model.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "iPhone 6s Plus", "Samsung Galaxy S6"
- // Note: It's recommended this value represents a human-readable version of the
- // device model rather than a machine-readable alternative.
- DeviceModelNameKey = attribute.Key("device.model.name")
-)
-
-// DeviceID returns an attribute KeyValue conforming to the "device.id" semantic
-// conventions. It represents a unique identifier representing the device.
-func DeviceID(val string) attribute.KeyValue {
- return DeviceIDKey.String(val)
-}
-
-// DeviceManufacturer returns an attribute KeyValue conforming to the
-// "device.manufacturer" semantic conventions. It represents the name of the
-// device manufacturer.
-func DeviceManufacturer(val string) attribute.KeyValue {
- return DeviceManufacturerKey.String(val)
-}
-
-// DeviceModelIdentifier returns an attribute KeyValue conforming to the
-// "device.model.identifier" semantic conventions. It represents the model
-// identifier for the device.
-func DeviceModelIdentifier(val string) attribute.KeyValue {
- return DeviceModelIdentifierKey.String(val)
-}
-
-// DeviceModelName returns an attribute KeyValue conforming to the
-// "device.model.name" semantic conventions. It represents the marketing name for
-// the device model.
-func DeviceModelName(val string) attribute.KeyValue {
- return DeviceModelNameKey.String(val)
-}
-
-// Namespace: disk
-const (
- // DiskIODirectionKey is the attribute Key conforming to the "disk.io.direction"
- // semantic conventions. It represents the disk IO operation direction.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "read"
- DiskIODirectionKey = attribute.Key("disk.io.direction")
-)
-
-// Enum values for disk.io.direction
-var (
- // read
- // Stability: development
- DiskIODirectionRead = DiskIODirectionKey.String("read")
- // write
- // Stability: development
- DiskIODirectionWrite = DiskIODirectionKey.String("write")
-)
-
-// Namespace: dns
-const (
- // DNSAnswersKey is the attribute Key conforming to the "dns.answers" semantic
- // conventions. It represents the list of IPv4 or IPv6 addresses resolved during
- // DNS lookup.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "10.0.0.1", "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
- DNSAnswersKey = attribute.Key("dns.answers")
-
- // DNSQuestionNameKey is the attribute Key conforming to the "dns.question.name"
- // semantic conventions. It represents the name being queried.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "www.example.com", "opentelemetry.io"
- // Note: The name represents the queried domain name as it appears in the DNS
- // query without any additional normalization.
- DNSQuestionNameKey = attribute.Key("dns.question.name")
-)
-
-// DNSAnswers returns an attribute KeyValue conforming to the "dns.answers"
-// semantic conventions. It represents the list of IPv4 or IPv6 addresses
-// resolved during DNS lookup.
-func DNSAnswers(val ...string) attribute.KeyValue {
- return DNSAnswersKey.StringSlice(val)
-}
-
-// DNSQuestionName returns an attribute KeyValue conforming to the
-// "dns.question.name" semantic conventions. It represents the name being
-// queried.
-func DNSQuestionName(val string) attribute.KeyValue {
- return DNSQuestionNameKey.String(val)
-}
-
-// Namespace: elasticsearch
-const (
- // ElasticsearchNodeNameKey is the attribute Key conforming to the
- // "elasticsearch.node.name" semantic conventions. It represents the represents
- // the human-readable identifier of the node/instance to which a request was
- // routed.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "instance-0000000001"
- ElasticsearchNodeNameKey = attribute.Key("elasticsearch.node.name")
-)
-
-// ElasticsearchNodeName returns an attribute KeyValue conforming to the
-// "elasticsearch.node.name" semantic conventions. It represents the represents
-// the human-readable identifier of the node/instance to which a request was
-// routed.
-func ElasticsearchNodeName(val string) attribute.KeyValue {
- return ElasticsearchNodeNameKey.String(val)
-}
-
-// Namespace: enduser
-const (
- // EnduserIDKey is the attribute Key conforming to the "enduser.id" semantic
- // conventions. It represents the unique identifier of an end user in the
- // system. It maybe a username, email address, or other identifier.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "username"
- // Note: Unique identifier of an end user in the system.
- //
- // > [!Warning]
- // > This field contains sensitive (PII) information.
- EnduserIDKey = attribute.Key("enduser.id")
-
- // EnduserPseudoIDKey is the attribute Key conforming to the "enduser.pseudo.id"
- // semantic conventions. It represents the pseudonymous identifier of an end
- // user. This identifier should be a random value that is not directly linked or
- // associated with the end user's actual identity.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "QdH5CAWJgqVT4rOr0qtumf"
- // Note: Pseudonymous identifier of an end user.
- //
- // > [!Warning]
- // > This field contains sensitive (linkable PII) information.
- EnduserPseudoIDKey = attribute.Key("enduser.pseudo.id")
-)
-
-// EnduserID returns an attribute KeyValue conforming to the "enduser.id"
-// semantic conventions. It represents the unique identifier of an end user in
-// the system. It maybe a username, email address, or other identifier.
-func EnduserID(val string) attribute.KeyValue {
- return EnduserIDKey.String(val)
-}
-
-// EnduserPseudoID returns an attribute KeyValue conforming to the
-// "enduser.pseudo.id" semantic conventions. It represents the pseudonymous
-// identifier of an end user. This identifier should be a random value that is
-// not directly linked or associated with the end user's actual identity.
-func EnduserPseudoID(val string) attribute.KeyValue {
- return EnduserPseudoIDKey.String(val)
-}
-
-// Namespace: error
-const (
- // ErrorMessageKey is the attribute Key conforming to the "error.message"
- // semantic conventions. It represents a message providing more detail about an
- // error in human-readable form.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Unexpected input type: string", "The user has exceeded their
- // storage quota"
- // Note: `error.message` should provide additional context and detail about an
- // error.
- // It is NOT RECOMMENDED to duplicate the value of `error.type` in
- // `error.message`.
- // It is also NOT RECOMMENDED to duplicate the value of `exception.message` in
- // `error.message`.
- //
- // `error.message` is NOT RECOMMENDED for metrics or spans due to its unbounded
- // cardinality and overlap with span status.
- ErrorMessageKey = attribute.Key("error.message")
-
- // ErrorTypeKey is the attribute Key conforming to the "error.type" semantic
- // conventions. It represents the describes a class of error the operation ended
- // with.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "timeout", "java.net.UnknownHostException",
- // "server_certificate_invalid", "500"
- // Note: The `error.type` SHOULD be predictable, and SHOULD have low
- // cardinality.
- //
- // When `error.type` is set to a type (e.g., an exception type), its
- // canonical class name identifying the type within the artifact SHOULD be used.
- //
- // Instrumentations SHOULD document the list of errors they report.
- //
- // The cardinality of `error.type` within one instrumentation library SHOULD be
- // low.
- // Telemetry consumers that aggregate data from multiple instrumentation
- // libraries and applications
- // should be prepared for `error.type` to have high cardinality at query time
- // when no
- // additional filters are applied.
- //
- // If the operation has completed successfully, instrumentations SHOULD NOT set
- // `error.type`.
- //
- // If a specific domain defines its own set of error identifiers (such as HTTP
- // or RPC status codes),
- // it's RECOMMENDED to:
- //
- // - Use a domain-specific attribute
- // - Set `error.type` to capture all errors, regardless of whether they are
- // defined within the domain-specific set or not.
- ErrorTypeKey = attribute.Key("error.type")
-)
-
-// ErrorMessage returns an attribute KeyValue conforming to the "error.message"
-// semantic conventions. It represents a message providing more detail about an
-// error in human-readable form.
-func ErrorMessage(val string) attribute.KeyValue {
- return ErrorMessageKey.String(val)
-}
-
-// Enum values for error.type
-var (
- // A fallback error value to be used when the instrumentation doesn't define a
- // custom value.
- //
- // Stability: stable
- ErrorTypeOther = ErrorTypeKey.String("_OTHER")
-)
-
-// Namespace: exception
-const (
- // ExceptionMessageKey is the attribute Key conforming to the
- // "exception.message" semantic conventions. It represents the exception
- // message.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "Division by zero", "Can't convert 'int' object to str implicitly"
- ExceptionMessageKey = attribute.Key("exception.message")
-
- // ExceptionStacktraceKey is the attribute Key conforming to the
- // "exception.stacktrace" semantic conventions. It represents a stacktrace as a
- // string in the natural representation for the language runtime. The
- // representation is to be determined and documented by each language SIG.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: Exception in thread "main" java.lang.RuntimeException: Test
- // exception\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at
- // com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at
- // com.example.GenerateTrace.main(GenerateTrace.java:5)
- ExceptionStacktraceKey = attribute.Key("exception.stacktrace")
-
- // ExceptionTypeKey is the attribute Key conforming to the "exception.type"
- // semantic conventions. It represents the type of the exception (its
- // fully-qualified class name, if applicable). The dynamic type of the exception
- // should be preferred over the static type in languages that support it.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "java.net.ConnectException", "OSError"
- ExceptionTypeKey = attribute.Key("exception.type")
-)
-
-// ExceptionMessage returns an attribute KeyValue conforming to the
-// "exception.message" semantic conventions. It represents the exception message.
-func ExceptionMessage(val string) attribute.KeyValue {
- return ExceptionMessageKey.String(val)
-}
-
-// ExceptionStacktrace returns an attribute KeyValue conforming to the
-// "exception.stacktrace" semantic conventions. It represents a stacktrace as a
-// string in the natural representation for the language runtime. The
-// representation is to be determined and documented by each language SIG.
-func ExceptionStacktrace(val string) attribute.KeyValue {
- return ExceptionStacktraceKey.String(val)
-}
-
-// ExceptionType returns an attribute KeyValue conforming to the "exception.type"
-// semantic conventions. It represents the type of the exception (its
-// fully-qualified class name, if applicable). The dynamic type of the exception
-// should be preferred over the static type in languages that support it.
-func ExceptionType(val string) attribute.KeyValue {
- return ExceptionTypeKey.String(val)
-}
-
-// Namespace: faas
-const (
- // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart"
- // semantic conventions. It represents a boolean that is true if the serverless
- // function is executed for the first time (aka cold-start).
- //
- // Type: boolean
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- FaaSColdstartKey = attribute.Key("faas.coldstart")
-
- // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic
- // conventions. It represents a string containing the schedule period as
- // [Cron Expression].
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 0/5 * * * ? *
- //
- // [Cron Expression]: https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm
- FaaSCronKey = attribute.Key("faas.cron")
-
- // FaaSDocumentCollectionKey is the attribute Key conforming to the
- // "faas.document.collection" semantic conventions. It represents the name of
- // the source on which the triggering operation was performed. For example, in
- // Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the
- // database name.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "myBucketName", "myDbName"
- FaaSDocumentCollectionKey = attribute.Key("faas.document.collection")
-
- // FaaSDocumentNameKey is the attribute Key conforming to the
- // "faas.document.name" semantic conventions. It represents the document
- // name/table subjected to the operation. For example, in Cloud Storage or S3 is
- // the name of the file, and in Cosmos DB the table name.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "myFile.txt", "myTableName"
- FaaSDocumentNameKey = attribute.Key("faas.document.name")
-
- // FaaSDocumentOperationKey is the attribute Key conforming to the
- // "faas.document.operation" semantic conventions. It represents the describes
- // the type of the operation that was performed on the data.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- FaaSDocumentOperationKey = attribute.Key("faas.document.operation")
-
- // FaaSDocumentTimeKey is the attribute Key conforming to the
- // "faas.document.time" semantic conventions. It represents a string containing
- // the time when the data was accessed in the [ISO 8601] format expressed in
- // [UTC].
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 2020-01-23T13:47:06Z
- //
- // [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html
- // [UTC]: https://www.w3.org/TR/NOTE-datetime
- FaaSDocumentTimeKey = attribute.Key("faas.document.time")
-
- // FaaSInstanceKey is the attribute Key conforming to the "faas.instance"
- // semantic conventions. It represents the execution environment ID as a string,
- // that will be potentially reused for other invocations to the same
- // function/function version.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de"
- // Note: - **AWS Lambda:** Use the (full) log stream name.
- FaaSInstanceKey = attribute.Key("faas.instance")
-
- // FaaSInvocationIDKey is the attribute Key conforming to the
- // "faas.invocation_id" semantic conventions. It represents the invocation ID of
- // the current function invocation.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: af9d5aa4-a685-4c5f-a22b-444f80b3cc28
- FaaSInvocationIDKey = attribute.Key("faas.invocation_id")
-
- // FaaSInvokedNameKey is the attribute Key conforming to the "faas.invoked_name"
- // semantic conventions. It represents the name of the invoked function.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: my-function
- // Note: SHOULD be equal to the `faas.name` resource attribute of the invoked
- // function.
- FaaSInvokedNameKey = attribute.Key("faas.invoked_name")
-
- // FaaSInvokedProviderKey is the attribute Key conforming to the
- // "faas.invoked_provider" semantic conventions. It represents the cloud
- // provider of the invoked function.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // Note: SHOULD be equal to the `cloud.provider` resource attribute of the
- // invoked function.
- FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider")
-
- // FaaSInvokedRegionKey is the attribute Key conforming to the
- // "faas.invoked_region" semantic conventions. It represents the cloud region of
- // the invoked function.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: eu-central-1
- // Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked
- // function.
- FaaSInvokedRegionKey = attribute.Key("faas.invoked_region")
-
- // FaaSMaxMemoryKey is the attribute Key conforming to the "faas.max_memory"
- // semantic conventions. It represents the amount of memory available to the
- // serverless function converted to Bytes.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Note: It's recommended to set this attribute since e.g. too little memory can
- // easily stop a Java AWS Lambda function from working correctly. On AWS Lambda,
- // the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this
- // information (which must be multiplied by 1,048,576).
- FaaSMaxMemoryKey = attribute.Key("faas.max_memory")
-
- // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic
- // conventions. It represents the name of the single function that this runtime
- // instance executes.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "my-function", "myazurefunctionapp/some-function-name"
- // Note: This is the name of the function as configured/deployed on the FaaS
- // platform and is usually different from the name of the callback
- // function (which may be stored in the
- // [`code.namespace`/`code.function.name`]
- // span attributes).
- //
- // For some cloud providers, the above definition is ambiguous. The following
- // definition of function name MUST be used for this attribute
- // (and consequently the span name) for the listed cloud providers/products:
- //
- // - **Azure:** The full name `/`, i.e., function app name
- // followed by a forward slash followed by the function name (this form
- // can also be seen in the resource JSON for the function).
- // This means that a span attribute MUST be used, as an Azure function
- // app can host multiple functions that would usually share
- // a TracerProvider (see also the `cloud.resource_id` attribute).
- //
- //
- // [`code.namespace`/`code.function.name`]: /docs/general/attributes.md#source-code-attributes
- FaaSNameKey = attribute.Key("faas.name")
-
- // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic
- // conventions. It represents a string containing the function invocation time
- // in the [ISO 8601] format expressed in [UTC].
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 2020-01-23T13:47:06Z
- //
- // [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html
- // [UTC]: https://www.w3.org/TR/NOTE-datetime
- FaaSTimeKey = attribute.Key("faas.time")
-
- // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger" semantic
- // conventions. It represents the type of the trigger which caused this function
- // invocation.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- FaaSTriggerKey = attribute.Key("faas.trigger")
-
- // FaaSVersionKey is the attribute Key conforming to the "faas.version" semantic
- // conventions. It represents the immutable version of the function being
- // executed.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "26", "pinkfroid-00002"
- // Note: Depending on the cloud provider and platform, use:
- //
- // - **AWS Lambda:** The [function version]
- // (an integer represented as a decimal string).
- // - **Google Cloud Run (Services):** The [revision]
- // (i.e., the function name plus the revision suffix).
- // - **Google Cloud Functions:** The value of the
- // [`K_REVISION` environment variable].
- // - **Azure Functions:** Not applicable. Do not set this attribute.
- //
- //
- // [function version]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html
- // [revision]: https://cloud.google.com/run/docs/managing/revisions
- // [`K_REVISION` environment variable]: https://cloud.google.com/run/docs/container-contract#services-env-vars
- FaaSVersionKey = attribute.Key("faas.version")
-)
-
-// FaaSColdstart returns an attribute KeyValue conforming to the "faas.coldstart"
-// semantic conventions. It represents a boolean that is true if the serverless
-// function is executed for the first time (aka cold-start).
-func FaaSColdstart(val bool) attribute.KeyValue {
- return FaaSColdstartKey.Bool(val)
-}
-
-// FaaSCron returns an attribute KeyValue conforming to the "faas.cron" semantic
-// conventions. It represents a string containing the schedule period as
-// [Cron Expression].
-//
-// [Cron Expression]: https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm
-func FaaSCron(val string) attribute.KeyValue {
- return FaaSCronKey.String(val)
-}
-
-// FaaSDocumentCollection returns an attribute KeyValue conforming to the
-// "faas.document.collection" semantic conventions. It represents the name of the
-// source on which the triggering operation was performed. For example, in Cloud
-// Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database
-// name.
-func FaaSDocumentCollection(val string) attribute.KeyValue {
- return FaaSDocumentCollectionKey.String(val)
-}
-
-// FaaSDocumentName returns an attribute KeyValue conforming to the
-// "faas.document.name" semantic conventions. It represents the document
-// name/table subjected to the operation. For example, in Cloud Storage or S3 is
-// the name of the file, and in Cosmos DB the table name.
-func FaaSDocumentName(val string) attribute.KeyValue {
- return FaaSDocumentNameKey.String(val)
-}
-
-// FaaSDocumentTime returns an attribute KeyValue conforming to the
-// "faas.document.time" semantic conventions. It represents a string containing
-// the time when the data was accessed in the [ISO 8601] format expressed in
-// [UTC].
-//
-// [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html
-// [UTC]: https://www.w3.org/TR/NOTE-datetime
-func FaaSDocumentTime(val string) attribute.KeyValue {
- return FaaSDocumentTimeKey.String(val)
-}
-
-// FaaSInstance returns an attribute KeyValue conforming to the "faas.instance"
-// semantic conventions. It represents the execution environment ID as a string,
-// that will be potentially reused for other invocations to the same
-// function/function version.
-func FaaSInstance(val string) attribute.KeyValue {
- return FaaSInstanceKey.String(val)
-}
-
-// FaaSInvocationID returns an attribute KeyValue conforming to the
-// "faas.invocation_id" semantic conventions. It represents the invocation ID of
-// the current function invocation.
-func FaaSInvocationID(val string) attribute.KeyValue {
- return FaaSInvocationIDKey.String(val)
-}
-
-// FaaSInvokedName returns an attribute KeyValue conforming to the
-// "faas.invoked_name" semantic conventions. It represents the name of the
-// invoked function.
-func FaaSInvokedName(val string) attribute.KeyValue {
- return FaaSInvokedNameKey.String(val)
-}
-
-// FaaSInvokedRegion returns an attribute KeyValue conforming to the
-// "faas.invoked_region" semantic conventions. It represents the cloud region of
-// the invoked function.
-func FaaSInvokedRegion(val string) attribute.KeyValue {
- return FaaSInvokedRegionKey.String(val)
-}
-
-// FaaSMaxMemory returns an attribute KeyValue conforming to the
-// "faas.max_memory" semantic conventions. It represents the amount of memory
-// available to the serverless function converted to Bytes.
-func FaaSMaxMemory(val int) attribute.KeyValue {
- return FaaSMaxMemoryKey.Int(val)
-}
-
-// FaaSName returns an attribute KeyValue conforming to the "faas.name" semantic
-// conventions. It represents the name of the single function that this runtime
-// instance executes.
-func FaaSName(val string) attribute.KeyValue {
- return FaaSNameKey.String(val)
-}
-
-// FaaSTime returns an attribute KeyValue conforming to the "faas.time" semantic
-// conventions. It represents a string containing the function invocation time in
-// the [ISO 8601] format expressed in [UTC].
-//
-// [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html
-// [UTC]: https://www.w3.org/TR/NOTE-datetime
-func FaaSTime(val string) attribute.KeyValue {
- return FaaSTimeKey.String(val)
-}
-
-// FaaSVersion returns an attribute KeyValue conforming to the "faas.version"
-// semantic conventions. It represents the immutable version of the function
-// being executed.
-func FaaSVersion(val string) attribute.KeyValue {
- return FaaSVersionKey.String(val)
-}
-
-// Enum values for faas.document.operation
-var (
- // When a new object is created.
- // Stability: development
- FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert")
- // When an object is modified.
- // Stability: development
- FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit")
- // When an object is deleted.
- // Stability: development
- FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete")
-)
-
-// Enum values for faas.invoked_provider
-var (
- // Alibaba Cloud
- // Stability: development
- FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud")
- // Amazon Web Services
- // Stability: development
- FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws")
- // Microsoft Azure
- // Stability: development
- FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure")
- // Google Cloud Platform
- // Stability: development
- FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp")
- // Tencent Cloud
- // Stability: development
- FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud")
-)
-
-// Enum values for faas.trigger
-var (
- // A response to some data source operation such as a database or filesystem
- // read/write
- // Stability: development
- FaaSTriggerDatasource = FaaSTriggerKey.String("datasource")
- // To provide an answer to an inbound HTTP request
- // Stability: development
- FaaSTriggerHTTP = FaaSTriggerKey.String("http")
- // A function is set to be executed when messages are sent to a messaging system
- // Stability: development
- FaaSTriggerPubSub = FaaSTriggerKey.String("pubsub")
- // A function is scheduled to be executed regularly
- // Stability: development
- FaaSTriggerTimer = FaaSTriggerKey.String("timer")
- // If none of the others apply
- // Stability: development
- FaaSTriggerOther = FaaSTriggerKey.String("other")
-)
-
-// Namespace: feature_flag
-const (
- // FeatureFlagContextIDKey is the attribute Key conforming to the
- // "feature_flag.context.id" semantic conventions. It represents the unique
- // identifier for the flag evaluation context. For example, the targeting key.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Release_Candidate
- //
- // Examples: "5157782b-2203-4c80-a857-dbbd5e7761db"
- FeatureFlagContextIDKey = attribute.Key("feature_flag.context.id")
-
- // FeatureFlagKeyKey is the attribute Key conforming to the "feature_flag.key"
- // semantic conventions. It represents the lookup key of the feature flag.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Release_Candidate
- //
- // Examples: "logo-color"
- FeatureFlagKeyKey = attribute.Key("feature_flag.key")
-
- // FeatureFlagProviderNameKey is the attribute Key conforming to the
- // "feature_flag.provider.name" semantic conventions. It represents the
- // identifies the feature flag provider.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Release_Candidate
- //
- // Examples: "Flag Manager"
- FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider.name")
-
- // FeatureFlagResultReasonKey is the attribute Key conforming to the
- // "feature_flag.result.reason" semantic conventions. It represents the reason
- // code which shows how a feature flag value was determined.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Release_Candidate
- //
- // Examples: "static", "targeting_match", "error", "default"
- FeatureFlagResultReasonKey = attribute.Key("feature_flag.result.reason")
-
- // FeatureFlagResultValueKey is the attribute Key conforming to the
- // "feature_flag.result.value" semantic conventions. It represents the evaluated
- // value of the feature flag.
- //
- // Type: any
- // RequirementLevel: Recommended
- // Stability: Release_Candidate
- //
- // Examples: "#ff0000", true, 3
- // Note: With some feature flag providers, feature flag results can be quite
- // large or contain private or sensitive details.
- // Because of this, `feature_flag.result.variant` is often the preferred
- // attribute if it is available.
- //
- // It may be desirable to redact or otherwise limit the size and scope of
- // `feature_flag.result.value` if possible.
- // Because the evaluated flag value is unstructured and may be any type, it is
- // left to the instrumentation author to determine how best to achieve this.
- FeatureFlagResultValueKey = attribute.Key("feature_flag.result.value")
-
- // FeatureFlagResultVariantKey is the attribute Key conforming to the
- // "feature_flag.result.variant" semantic conventions. It represents a semantic
- // identifier for an evaluated flag value.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Release_Candidate
- //
- // Examples: "red", "true", "on"
- // Note: A semantic identifier, commonly referred to as a variant, provides a
- // means
- // for referring to a value without including the value itself. This can
- // provide additional context for understanding the meaning behind a value.
- // For example, the variant `red` maybe be used for the value `#c05543`.
- FeatureFlagResultVariantKey = attribute.Key("feature_flag.result.variant")
-
- // FeatureFlagSetIDKey is the attribute Key conforming to the
- // "feature_flag.set.id" semantic conventions. It represents the identifier of
- // the [flag set] to which the feature flag belongs.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Release_Candidate
- //
- // Examples: "proj-1", "ab98sgs", "service1/dev"
- //
- // [flag set]: https://openfeature.dev/specification/glossary/#flag-set
- FeatureFlagSetIDKey = attribute.Key("feature_flag.set.id")
-
- // FeatureFlagVersionKey is the attribute Key conforming to the
- // "feature_flag.version" semantic conventions. It represents the version of the
- // ruleset used during the evaluation. This may be any stable value which
- // uniquely identifies the ruleset.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Release_Candidate
- //
- // Examples: "1", "01ABCDEF"
- FeatureFlagVersionKey = attribute.Key("feature_flag.version")
-)
-
-// FeatureFlagContextID returns an attribute KeyValue conforming to the
-// "feature_flag.context.id" semantic conventions. It represents the unique
-// identifier for the flag evaluation context. For example, the targeting key.
-func FeatureFlagContextID(val string) attribute.KeyValue {
- return FeatureFlagContextIDKey.String(val)
-}
-
-// FeatureFlagKey returns an attribute KeyValue conforming to the
-// "feature_flag.key" semantic conventions. It represents the lookup key of the
-// feature flag.
-func FeatureFlagKey(val string) attribute.KeyValue {
- return FeatureFlagKeyKey.String(val)
-}
-
-// FeatureFlagProviderName returns an attribute KeyValue conforming to the
-// "feature_flag.provider.name" semantic conventions. It represents the
-// identifies the feature flag provider.
-func FeatureFlagProviderName(val string) attribute.KeyValue {
- return FeatureFlagProviderNameKey.String(val)
-}
-
-// FeatureFlagResultVariant returns an attribute KeyValue conforming to the
-// "feature_flag.result.variant" semantic conventions. It represents a semantic
-// identifier for an evaluated flag value.
-func FeatureFlagResultVariant(val string) attribute.KeyValue {
- return FeatureFlagResultVariantKey.String(val)
-}
-
-// FeatureFlagSetID returns an attribute KeyValue conforming to the
-// "feature_flag.set.id" semantic conventions. It represents the identifier of
-// the [flag set] to which the feature flag belongs.
-//
-// [flag set]: https://openfeature.dev/specification/glossary/#flag-set
-func FeatureFlagSetID(val string) attribute.KeyValue {
- return FeatureFlagSetIDKey.String(val)
-}
-
-// FeatureFlagVersion returns an attribute KeyValue conforming to the
-// "feature_flag.version" semantic conventions. It represents the version of the
-// ruleset used during the evaluation. This may be any stable value which
-// uniquely identifies the ruleset.
-func FeatureFlagVersion(val string) attribute.KeyValue {
- return FeatureFlagVersionKey.String(val)
-}
-
-// Enum values for feature_flag.result.reason
-var (
- // The resolved value is static (no dynamic evaluation).
- // Stability: release_candidate
- FeatureFlagResultReasonStatic = FeatureFlagResultReasonKey.String("static")
- // The resolved value fell back to a pre-configured value (no dynamic evaluation
- // occurred or dynamic evaluation yielded no result).
- // Stability: release_candidate
- FeatureFlagResultReasonDefault = FeatureFlagResultReasonKey.String("default")
- // The resolved value was the result of a dynamic evaluation, such as a rule or
- // specific user-targeting.
- // Stability: release_candidate
- FeatureFlagResultReasonTargetingMatch = FeatureFlagResultReasonKey.String("targeting_match")
- // The resolved value was the result of pseudorandom assignment.
- // Stability: release_candidate
- FeatureFlagResultReasonSplit = FeatureFlagResultReasonKey.String("split")
- // The resolved value was retrieved from cache.
- // Stability: release_candidate
- FeatureFlagResultReasonCached = FeatureFlagResultReasonKey.String("cached")
- // The resolved value was the result of the flag being disabled in the
- // management system.
- // Stability: release_candidate
- FeatureFlagResultReasonDisabled = FeatureFlagResultReasonKey.String("disabled")
- // The reason for the resolved value could not be determined.
- // Stability: release_candidate
- FeatureFlagResultReasonUnknown = FeatureFlagResultReasonKey.String("unknown")
- // The resolved value is non-authoritative or possibly out of date
- // Stability: release_candidate
- FeatureFlagResultReasonStale = FeatureFlagResultReasonKey.String("stale")
- // The resolved value was the result of an error.
- // Stability: release_candidate
- FeatureFlagResultReasonError = FeatureFlagResultReasonKey.String("error")
-)
-
-// Namespace: file
-const (
- // FileAccessedKey is the attribute Key conforming to the "file.accessed"
- // semantic conventions. It represents the time when the file was last accessed,
- // in ISO 8601 format.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "2021-01-01T12:00:00Z"
- // Note: This attribute might not be supported by some file systems — NFS,
- // FAT32, in embedded OS, etc.
- FileAccessedKey = attribute.Key("file.accessed")
-
- // FileAttributesKey is the attribute Key conforming to the "file.attributes"
- // semantic conventions. It represents the array of file attributes.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "readonly", "hidden"
- // Note: Attributes names depend on the OS or file system. Here’s a
- // non-exhaustive list of values expected for this attribute: `archive`,
- // `compressed`, `directory`, `encrypted`, `execute`, `hidden`, `immutable`,
- // `journaled`, `read`, `readonly`, `symbolic link`, `system`, `temporary`,
- // `write`.
- FileAttributesKey = attribute.Key("file.attributes")
-
- // FileChangedKey is the attribute Key conforming to the "file.changed" semantic
- // conventions. It represents the time when the file attributes or metadata was
- // last changed, in ISO 8601 format.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "2021-01-01T12:00:00Z"
- // Note: `file.changed` captures the time when any of the file's properties or
- // attributes (including the content) are changed, while `file.modified`
- // captures the timestamp when the file content is modified.
- FileChangedKey = attribute.Key("file.changed")
-
- // FileCreatedKey is the attribute Key conforming to the "file.created" semantic
- // conventions. It represents the time when the file was created, in ISO 8601
- // format.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "2021-01-01T12:00:00Z"
- // Note: This attribute might not be supported by some file systems — NFS,
- // FAT32, in embedded OS, etc.
- FileCreatedKey = attribute.Key("file.created")
-
- // FileDirectoryKey is the attribute Key conforming to the "file.directory"
- // semantic conventions. It represents the directory where the file is located.
- // It should include the drive letter, when appropriate.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "/home/user", "C:\Program Files\MyApp"
- FileDirectoryKey = attribute.Key("file.directory")
-
- // FileExtensionKey is the attribute Key conforming to the "file.extension"
- // semantic conventions. It represents the file extension, excluding the leading
- // dot.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "png", "gz"
- // Note: When the file name has multiple extensions (example.tar.gz), only the
- // last one should be captured ("gz", not "tar.gz").
- FileExtensionKey = attribute.Key("file.extension")
-
- // FileForkNameKey is the attribute Key conforming to the "file.fork_name"
- // semantic conventions. It represents the name of the fork. A fork is
- // additional data associated with a filesystem object.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Zone.Identifier"
- // Note: On Linux, a resource fork is used to store additional data with a
- // filesystem object. A file always has at least one fork for the data portion,
- // and additional forks may exist.
- // On NTFS, this is analogous to an Alternate Data Stream (ADS), and the default
- // data stream for a file is just called $DATA. Zone.Identifier is commonly used
- // by Windows to track contents downloaded from the Internet. An ADS is
- // typically of the form: C:\path\to\filename.extension:some_fork_name, and
- // some_fork_name is the value that should populate `fork_name`.
- // `filename.extension` should populate `file.name`, and `extension` should
- // populate `file.extension`. The full path, `file.path`, will include the fork
- // name.
- FileForkNameKey = attribute.Key("file.fork_name")
-
- // FileGroupIDKey is the attribute Key conforming to the "file.group.id"
- // semantic conventions. It represents the primary Group ID (GID) of the file.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "1000"
- FileGroupIDKey = attribute.Key("file.group.id")
-
- // FileGroupNameKey is the attribute Key conforming to the "file.group.name"
- // semantic conventions. It represents the primary group name of the file.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "users"
- FileGroupNameKey = attribute.Key("file.group.name")
-
- // FileInodeKey is the attribute Key conforming to the "file.inode" semantic
- // conventions. It represents the inode representing the file in the filesystem.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "256383"
- FileInodeKey = attribute.Key("file.inode")
-
- // FileModeKey is the attribute Key conforming to the "file.mode" semantic
- // conventions. It represents the mode of the file in octal representation.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "0640"
- FileModeKey = attribute.Key("file.mode")
-
- // FileModifiedKey is the attribute Key conforming to the "file.modified"
- // semantic conventions. It represents the time when the file content was last
- // modified, in ISO 8601 format.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "2021-01-01T12:00:00Z"
- FileModifiedKey = attribute.Key("file.modified")
-
- // FileNameKey is the attribute Key conforming to the "file.name" semantic
- // conventions. It represents the name of the file including the extension,
- // without the directory.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "example.png"
- FileNameKey = attribute.Key("file.name")
-
- // FileOwnerIDKey is the attribute Key conforming to the "file.owner.id"
- // semantic conventions. It represents the user ID (UID) or security identifier
- // (SID) of the file owner.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "1000"
- FileOwnerIDKey = attribute.Key("file.owner.id")
-
- // FileOwnerNameKey is the attribute Key conforming to the "file.owner.name"
- // semantic conventions. It represents the username of the file owner.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "root"
- FileOwnerNameKey = attribute.Key("file.owner.name")
-
- // FilePathKey is the attribute Key conforming to the "file.path" semantic
- // conventions. It represents the full path to the file, including the file
- // name. It should include the drive letter, when appropriate.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "/home/alice/example.png", "C:\Program Files\MyApp\myapp.exe"
- FilePathKey = attribute.Key("file.path")
-
- // FileSizeKey is the attribute Key conforming to the "file.size" semantic
- // conventions. It represents the file size in bytes.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- FileSizeKey = attribute.Key("file.size")
-
- // FileSymbolicLinkTargetPathKey is the attribute Key conforming to the
- // "file.symbolic_link.target_path" semantic conventions. It represents the path
- // to the target of a symbolic link.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "/usr/bin/python3"
- // Note: This attribute is only applicable to symbolic links.
- FileSymbolicLinkTargetPathKey = attribute.Key("file.symbolic_link.target_path")
-)
-
-// FileAccessed returns an attribute KeyValue conforming to the "file.accessed"
-// semantic conventions. It represents the time when the file was last accessed,
-// in ISO 8601 format.
-func FileAccessed(val string) attribute.KeyValue {
- return FileAccessedKey.String(val)
-}
-
-// FileAttributes returns an attribute KeyValue conforming to the
-// "file.attributes" semantic conventions. It represents the array of file
-// attributes.
-func FileAttributes(val ...string) attribute.KeyValue {
- return FileAttributesKey.StringSlice(val)
-}
-
-// FileChanged returns an attribute KeyValue conforming to the "file.changed"
-// semantic conventions. It represents the time when the file attributes or
-// metadata was last changed, in ISO 8601 format.
-func FileChanged(val string) attribute.KeyValue {
- return FileChangedKey.String(val)
-}
-
-// FileCreated returns an attribute KeyValue conforming to the "file.created"
-// semantic conventions. It represents the time when the file was created, in ISO
-// 8601 format.
-func FileCreated(val string) attribute.KeyValue {
- return FileCreatedKey.String(val)
-}
-
-// FileDirectory returns an attribute KeyValue conforming to the "file.directory"
-// semantic conventions. It represents the directory where the file is located.
-// It should include the drive letter, when appropriate.
-func FileDirectory(val string) attribute.KeyValue {
- return FileDirectoryKey.String(val)
-}
-
-// FileExtension returns an attribute KeyValue conforming to the "file.extension"
-// semantic conventions. It represents the file extension, excluding the leading
-// dot.
-func FileExtension(val string) attribute.KeyValue {
- return FileExtensionKey.String(val)
-}
-
-// FileForkName returns an attribute KeyValue conforming to the "file.fork_name"
-// semantic conventions. It represents the name of the fork. A fork is additional
-// data associated with a filesystem object.
-func FileForkName(val string) attribute.KeyValue {
- return FileForkNameKey.String(val)
-}
-
-// FileGroupID returns an attribute KeyValue conforming to the "file.group.id"
-// semantic conventions. It represents the primary Group ID (GID) of the file.
-func FileGroupID(val string) attribute.KeyValue {
- return FileGroupIDKey.String(val)
-}
-
-// FileGroupName returns an attribute KeyValue conforming to the
-// "file.group.name" semantic conventions. It represents the primary group name
-// of the file.
-func FileGroupName(val string) attribute.KeyValue {
- return FileGroupNameKey.String(val)
-}
-
-// FileInode returns an attribute KeyValue conforming to the "file.inode"
-// semantic conventions. It represents the inode representing the file in the
-// filesystem.
-func FileInode(val string) attribute.KeyValue {
- return FileInodeKey.String(val)
-}
-
-// FileMode returns an attribute KeyValue conforming to the "file.mode" semantic
-// conventions. It represents the mode of the file in octal representation.
-func FileMode(val string) attribute.KeyValue {
- return FileModeKey.String(val)
-}
-
-// FileModified returns an attribute KeyValue conforming to the "file.modified"
-// semantic conventions. It represents the time when the file content was last
-// modified, in ISO 8601 format.
-func FileModified(val string) attribute.KeyValue {
- return FileModifiedKey.String(val)
-}
-
-// FileName returns an attribute KeyValue conforming to the "file.name" semantic
-// conventions. It represents the name of the file including the extension,
-// without the directory.
-func FileName(val string) attribute.KeyValue {
- return FileNameKey.String(val)
-}
-
-// FileOwnerID returns an attribute KeyValue conforming to the "file.owner.id"
-// semantic conventions. It represents the user ID (UID) or security identifier
-// (SID) of the file owner.
-func FileOwnerID(val string) attribute.KeyValue {
- return FileOwnerIDKey.String(val)
-}
-
-// FileOwnerName returns an attribute KeyValue conforming to the
-// "file.owner.name" semantic conventions. It represents the username of the file
-// owner.
-func FileOwnerName(val string) attribute.KeyValue {
- return FileOwnerNameKey.String(val)
-}
-
-// FilePath returns an attribute KeyValue conforming to the "file.path" semantic
-// conventions. It represents the full path to the file, including the file name.
-// It should include the drive letter, when appropriate.
-func FilePath(val string) attribute.KeyValue {
- return FilePathKey.String(val)
-}
-
-// FileSize returns an attribute KeyValue conforming to the "file.size" semantic
-// conventions. It represents the file size in bytes.
-func FileSize(val int) attribute.KeyValue {
- return FileSizeKey.Int(val)
-}
-
-// FileSymbolicLinkTargetPath returns an attribute KeyValue conforming to the
-// "file.symbolic_link.target_path" semantic conventions. It represents the path
-// to the target of a symbolic link.
-func FileSymbolicLinkTargetPath(val string) attribute.KeyValue {
- return FileSymbolicLinkTargetPathKey.String(val)
-}
-
-// Namespace: gcp
-const (
- // GCPAppHubApplicationContainerKey is the attribute Key conforming to the
- // "gcp.apphub.application.container" semantic conventions. It represents the
- // container within GCP where the AppHub application is defined.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "projects/my-container-project"
- GCPAppHubApplicationContainerKey = attribute.Key("gcp.apphub.application.container")
-
- // GCPAppHubApplicationIDKey is the attribute Key conforming to the
- // "gcp.apphub.application.id" semantic conventions. It represents the name of
- // the application as configured in AppHub.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "my-application"
- GCPAppHubApplicationIDKey = attribute.Key("gcp.apphub.application.id")
-
- // GCPAppHubApplicationLocationKey is the attribute Key conforming to the
- // "gcp.apphub.application.location" semantic conventions. It represents the GCP
- // zone or region where the application is defined.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "us-central1"
- GCPAppHubApplicationLocationKey = attribute.Key("gcp.apphub.application.location")
-
- // GCPAppHubServiceCriticalityTypeKey is the attribute Key conforming to the
- // "gcp.apphub.service.criticality_type" semantic conventions. It represents the
- // criticality of a service indicates its importance to the business.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // Note: [See AppHub type enum]
- //
- // [See AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type
- GCPAppHubServiceCriticalityTypeKey = attribute.Key("gcp.apphub.service.criticality_type")
-
- // GCPAppHubServiceEnvironmentTypeKey is the attribute Key conforming to the
- // "gcp.apphub.service.environment_type" semantic conventions. It represents the
- // environment of a service is the stage of a software lifecycle.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // Note: [See AppHub environment type]
- //
- // [See AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1
- GCPAppHubServiceEnvironmentTypeKey = attribute.Key("gcp.apphub.service.environment_type")
-
- // GCPAppHubServiceIDKey is the attribute Key conforming to the
- // "gcp.apphub.service.id" semantic conventions. It represents the name of the
- // service as configured in AppHub.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "my-service"
- GCPAppHubServiceIDKey = attribute.Key("gcp.apphub.service.id")
-
- // GCPAppHubWorkloadCriticalityTypeKey is the attribute Key conforming to the
- // "gcp.apphub.workload.criticality_type" semantic conventions. It represents
- // the criticality of a workload indicates its importance to the business.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // Note: [See AppHub type enum]
- //
- // [See AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type
- GCPAppHubWorkloadCriticalityTypeKey = attribute.Key("gcp.apphub.workload.criticality_type")
-
- // GCPAppHubWorkloadEnvironmentTypeKey is the attribute Key conforming to the
- // "gcp.apphub.workload.environment_type" semantic conventions. It represents
- // the environment of a workload is the stage of a software lifecycle.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // Note: [See AppHub environment type]
- //
- // [See AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1
- GCPAppHubWorkloadEnvironmentTypeKey = attribute.Key("gcp.apphub.workload.environment_type")
-
- // GCPAppHubWorkloadIDKey is the attribute Key conforming to the
- // "gcp.apphub.workload.id" semantic conventions. It represents the name of the
- // workload as configured in AppHub.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "my-workload"
- GCPAppHubWorkloadIDKey = attribute.Key("gcp.apphub.workload.id")
-
- // GCPAppHubDestinationApplicationContainerKey is the attribute Key conforming
- // to the "gcp.apphub_destination.application.container" semantic conventions.
- // It represents the container within GCP where the AppHub destination
- // application is defined.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "projects/my-container-project"
- GCPAppHubDestinationApplicationContainerKey = attribute.Key("gcp.apphub_destination.application.container")
-
- // GCPAppHubDestinationApplicationIDKey is the attribute Key conforming to the
- // "gcp.apphub_destination.application.id" semantic conventions. It represents
- // the name of the destination application as configured in AppHub.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "my-application"
- GCPAppHubDestinationApplicationIDKey = attribute.Key("gcp.apphub_destination.application.id")
-
- // GCPAppHubDestinationApplicationLocationKey is the attribute Key conforming to
- // the "gcp.apphub_destination.application.location" semantic conventions. It
- // represents the GCP zone or region where the destination application is
- // defined.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "us-central1"
- GCPAppHubDestinationApplicationLocationKey = attribute.Key("gcp.apphub_destination.application.location")
-
- // GCPAppHubDestinationServiceCriticalityTypeKey is the attribute Key conforming
- // to the "gcp.apphub_destination.service.criticality_type" semantic
- // conventions. It represents the criticality of a destination workload
- // indicates its importance to the business as specified in [AppHub type enum].
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- //
- // [AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type
- GCPAppHubDestinationServiceCriticalityTypeKey = attribute.Key("gcp.apphub_destination.service.criticality_type")
-
- // GCPAppHubDestinationServiceEnvironmentTypeKey is the attribute Key conforming
- // to the "gcp.apphub_destination.service.environment_type" semantic
- // conventions. It represents the software lifecycle stage of a destination
- // service as defined [AppHub environment type].
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- //
- // [AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1
- GCPAppHubDestinationServiceEnvironmentTypeKey = attribute.Key("gcp.apphub_destination.service.environment_type")
-
- // GCPAppHubDestinationServiceIDKey is the attribute Key conforming to the
- // "gcp.apphub_destination.service.id" semantic conventions. It represents the
- // name of the destination service as configured in AppHub.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "my-service"
- GCPAppHubDestinationServiceIDKey = attribute.Key("gcp.apphub_destination.service.id")
-
- // GCPAppHubDestinationWorkloadCriticalityTypeKey is the attribute Key
- // conforming to the "gcp.apphub_destination.workload.criticality_type" semantic
- // conventions. It represents the criticality of a destination workload
- // indicates its importance to the business as specified in [AppHub type enum].
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- //
- // [AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type
- GCPAppHubDestinationWorkloadCriticalityTypeKey = attribute.Key("gcp.apphub_destination.workload.criticality_type")
-
- // GCPAppHubDestinationWorkloadEnvironmentTypeKey is the attribute Key
- // conforming to the "gcp.apphub_destination.workload.environment_type" semantic
- // conventions. It represents the environment of a destination workload is the
- // stage of a software lifecycle as provided in the [AppHub environment type].
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- //
- // [AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1
- GCPAppHubDestinationWorkloadEnvironmentTypeKey = attribute.Key("gcp.apphub_destination.workload.environment_type")
-
- // GCPAppHubDestinationWorkloadIDKey is the attribute Key conforming to the
- // "gcp.apphub_destination.workload.id" semantic conventions. It represents the
- // name of the destination workload as configured in AppHub.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "my-workload"
- GCPAppHubDestinationWorkloadIDKey = attribute.Key("gcp.apphub_destination.workload.id")
-
- // GCPClientServiceKey is the attribute Key conforming to the
- // "gcp.client.service" semantic conventions. It represents the identifies the
- // Google Cloud service for which the official client library is intended.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "appengine", "run", "firestore", "alloydb", "spanner"
- // Note: Intended to be a stable identifier for Google Cloud client libraries
- // that is uniform across implementation languages. The value should be derived
- // from the canonical service domain for the service; for example,
- // 'foo.googleapis.com' should result in a value of 'foo'.
- GCPClientServiceKey = attribute.Key("gcp.client.service")
-
- // GCPCloudRunJobExecutionKey is the attribute Key conforming to the
- // "gcp.cloud_run.job.execution" semantic conventions. It represents the name of
- // the Cloud Run [execution] being run for the Job, as set by the
- // [`CLOUD_RUN_EXECUTION`] environment variable.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "job-name-xxxx", "sample-job-mdw84"
- //
- // [execution]: https://cloud.google.com/run/docs/managing/job-executions
- // [`CLOUD_RUN_EXECUTION`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars
- GCPCloudRunJobExecutionKey = attribute.Key("gcp.cloud_run.job.execution")
-
- // GCPCloudRunJobTaskIndexKey is the attribute Key conforming to the
- // "gcp.cloud_run.job.task_index" semantic conventions. It represents the index
- // for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`]
- // environment variable.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 0, 1
- //
- // [`CLOUD_RUN_TASK_INDEX`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars
- GCPCloudRunJobTaskIndexKey = attribute.Key("gcp.cloud_run.job.task_index")
-
- // GCPGCEInstanceHostnameKey is the attribute Key conforming to the
- // "gcp.gce.instance.hostname" semantic conventions. It represents the hostname
- // of a GCE instance. This is the full value of the default or [custom hostname]
- // .
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "my-host1234.example.com",
- // "sample-vm.us-west1-b.c.my-project.internal"
- //
- // [custom hostname]: https://cloud.google.com/compute/docs/instances/custom-hostname-vm
- GCPGCEInstanceHostnameKey = attribute.Key("gcp.gce.instance.hostname")
-
- // GCPGCEInstanceNameKey is the attribute Key conforming to the
- // "gcp.gce.instance.name" semantic conventions. It represents the instance name
- // of a GCE instance. This is the value provided by `host.name`, the visible
- // name of the instance in the Cloud Console UI, and the prefix for the default
- // hostname of the instance as defined by the [default internal DNS name].
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "instance-1", "my-vm-name"
- //
- // [default internal DNS name]: https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names
- GCPGCEInstanceNameKey = attribute.Key("gcp.gce.instance.name")
-)
-
-// GCPAppHubApplicationContainer returns an attribute KeyValue conforming to the
-// "gcp.apphub.application.container" semantic conventions. It represents the
-// container within GCP where the AppHub application is defined.
-func GCPAppHubApplicationContainer(val string) attribute.KeyValue {
- return GCPAppHubApplicationContainerKey.String(val)
-}
-
-// GCPAppHubApplicationID returns an attribute KeyValue conforming to the
-// "gcp.apphub.application.id" semantic conventions. It represents the name of
-// the application as configured in AppHub.
-func GCPAppHubApplicationID(val string) attribute.KeyValue {
- return GCPAppHubApplicationIDKey.String(val)
-}
-
-// GCPAppHubApplicationLocation returns an attribute KeyValue conforming to the
-// "gcp.apphub.application.location" semantic conventions. It represents the GCP
-// zone or region where the application is defined.
-func GCPAppHubApplicationLocation(val string) attribute.KeyValue {
- return GCPAppHubApplicationLocationKey.String(val)
-}
-
-// GCPAppHubServiceID returns an attribute KeyValue conforming to the
-// "gcp.apphub.service.id" semantic conventions. It represents the name of the
-// service as configured in AppHub.
-func GCPAppHubServiceID(val string) attribute.KeyValue {
- return GCPAppHubServiceIDKey.String(val)
-}
-
-// GCPAppHubWorkloadID returns an attribute KeyValue conforming to the
-// "gcp.apphub.workload.id" semantic conventions. It represents the name of the
-// workload as configured in AppHub.
-func GCPAppHubWorkloadID(val string) attribute.KeyValue {
- return GCPAppHubWorkloadIDKey.String(val)
-}
-
-// GCPAppHubDestinationApplicationContainer returns an attribute KeyValue
-// conforming to the "gcp.apphub_destination.application.container" semantic
-// conventions. It represents the container within GCP where the AppHub
-// destination application is defined.
-func GCPAppHubDestinationApplicationContainer(val string) attribute.KeyValue {
- return GCPAppHubDestinationApplicationContainerKey.String(val)
-}
-
-// GCPAppHubDestinationApplicationID returns an attribute KeyValue conforming to
-// the "gcp.apphub_destination.application.id" semantic conventions. It
-// represents the name of the destination application as configured in AppHub.
-func GCPAppHubDestinationApplicationID(val string) attribute.KeyValue {
- return GCPAppHubDestinationApplicationIDKey.String(val)
-}
-
-// GCPAppHubDestinationApplicationLocation returns an attribute KeyValue
-// conforming to the "gcp.apphub_destination.application.location" semantic
-// conventions. It represents the GCP zone or region where the destination
-// application is defined.
-func GCPAppHubDestinationApplicationLocation(val string) attribute.KeyValue {
- return GCPAppHubDestinationApplicationLocationKey.String(val)
-}
-
-// GCPAppHubDestinationServiceID returns an attribute KeyValue conforming to the
-// "gcp.apphub_destination.service.id" semantic conventions. It represents the
-// name of the destination service as configured in AppHub.
-func GCPAppHubDestinationServiceID(val string) attribute.KeyValue {
- return GCPAppHubDestinationServiceIDKey.String(val)
-}
-
-// GCPAppHubDestinationWorkloadID returns an attribute KeyValue conforming to the
-// "gcp.apphub_destination.workload.id" semantic conventions. It represents the
-// name of the destination workload as configured in AppHub.
-func GCPAppHubDestinationWorkloadID(val string) attribute.KeyValue {
- return GCPAppHubDestinationWorkloadIDKey.String(val)
-}
-
-// GCPClientService returns an attribute KeyValue conforming to the
-// "gcp.client.service" semantic conventions. It represents the identifies the
-// Google Cloud service for which the official client library is intended.
-func GCPClientService(val string) attribute.KeyValue {
- return GCPClientServiceKey.String(val)
-}
-
-// GCPCloudRunJobExecution returns an attribute KeyValue conforming to the
-// "gcp.cloud_run.job.execution" semantic conventions. It represents the name of
-// the Cloud Run [execution] being run for the Job, as set by the
-// [`CLOUD_RUN_EXECUTION`] environment variable.
-//
-// [execution]: https://cloud.google.com/run/docs/managing/job-executions
-// [`CLOUD_RUN_EXECUTION`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars
-func GCPCloudRunJobExecution(val string) attribute.KeyValue {
- return GCPCloudRunJobExecutionKey.String(val)
-}
-
-// GCPCloudRunJobTaskIndex returns an attribute KeyValue conforming to the
-// "gcp.cloud_run.job.task_index" semantic conventions. It represents the index
-// for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`]
-// environment variable.
-//
-// [`CLOUD_RUN_TASK_INDEX`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars
-func GCPCloudRunJobTaskIndex(val int) attribute.KeyValue {
- return GCPCloudRunJobTaskIndexKey.Int(val)
-}
-
-// GCPGCEInstanceHostname returns an attribute KeyValue conforming to the
-// "gcp.gce.instance.hostname" semantic conventions. It represents the hostname
-// of a GCE instance. This is the full value of the default or [custom hostname]
-// .
-//
-// [custom hostname]: https://cloud.google.com/compute/docs/instances/custom-hostname-vm
-func GCPGCEInstanceHostname(val string) attribute.KeyValue {
- return GCPGCEInstanceHostnameKey.String(val)
-}
-
-// GCPGCEInstanceName returns an attribute KeyValue conforming to the
-// "gcp.gce.instance.name" semantic conventions. It represents the instance name
-// of a GCE instance. This is the value provided by `host.name`, the visible name
-// of the instance in the Cloud Console UI, and the prefix for the default
-// hostname of the instance as defined by the [default internal DNS name].
-//
-// [default internal DNS name]: https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names
-func GCPGCEInstanceName(val string) attribute.KeyValue {
- return GCPGCEInstanceNameKey.String(val)
-}
-
-// Enum values for gcp.apphub.service.criticality_type
-var (
- // Mission critical service.
- // Stability: development
- GCPAppHubServiceCriticalityTypeMissionCritical = GCPAppHubServiceCriticalityTypeKey.String("MISSION_CRITICAL")
- // High impact.
- // Stability: development
- GCPAppHubServiceCriticalityTypeHigh = GCPAppHubServiceCriticalityTypeKey.String("HIGH")
- // Medium impact.
- // Stability: development
- GCPAppHubServiceCriticalityTypeMedium = GCPAppHubServiceCriticalityTypeKey.String("MEDIUM")
- // Low impact.
- // Stability: development
- GCPAppHubServiceCriticalityTypeLow = GCPAppHubServiceCriticalityTypeKey.String("LOW")
-)
-
-// Enum values for gcp.apphub.service.environment_type
-var (
- // Production environment.
- // Stability: development
- GCPAppHubServiceEnvironmentTypeProduction = GCPAppHubServiceEnvironmentTypeKey.String("PRODUCTION")
- // Staging environment.
- // Stability: development
- GCPAppHubServiceEnvironmentTypeStaging = GCPAppHubServiceEnvironmentTypeKey.String("STAGING")
- // Test environment.
- // Stability: development
- GCPAppHubServiceEnvironmentTypeTest = GCPAppHubServiceEnvironmentTypeKey.String("TEST")
- // Development environment.
- // Stability: development
- GCPAppHubServiceEnvironmentTypeDevelopment = GCPAppHubServiceEnvironmentTypeKey.String("DEVELOPMENT")
-)
-
-// Enum values for gcp.apphub.workload.criticality_type
-var (
- // Mission critical service.
- // Stability: development
- GCPAppHubWorkloadCriticalityTypeMissionCritical = GCPAppHubWorkloadCriticalityTypeKey.String("MISSION_CRITICAL")
- // High impact.
- // Stability: development
- GCPAppHubWorkloadCriticalityTypeHigh = GCPAppHubWorkloadCriticalityTypeKey.String("HIGH")
- // Medium impact.
- // Stability: development
- GCPAppHubWorkloadCriticalityTypeMedium = GCPAppHubWorkloadCriticalityTypeKey.String("MEDIUM")
- // Low impact.
- // Stability: development
- GCPAppHubWorkloadCriticalityTypeLow = GCPAppHubWorkloadCriticalityTypeKey.String("LOW")
-)
-
-// Enum values for gcp.apphub.workload.environment_type
-var (
- // Production environment.
- // Stability: development
- GCPAppHubWorkloadEnvironmentTypeProduction = GCPAppHubWorkloadEnvironmentTypeKey.String("PRODUCTION")
- // Staging environment.
- // Stability: development
- GCPAppHubWorkloadEnvironmentTypeStaging = GCPAppHubWorkloadEnvironmentTypeKey.String("STAGING")
- // Test environment.
- // Stability: development
- GCPAppHubWorkloadEnvironmentTypeTest = GCPAppHubWorkloadEnvironmentTypeKey.String("TEST")
- // Development environment.
- // Stability: development
- GCPAppHubWorkloadEnvironmentTypeDevelopment = GCPAppHubWorkloadEnvironmentTypeKey.String("DEVELOPMENT")
-)
-
-// Enum values for gcp.apphub_destination.service.criticality_type
-var (
- // Mission critical service.
- // Stability: development
- GCPAppHubDestinationServiceCriticalityTypeMissionCritical = GCPAppHubDestinationServiceCriticalityTypeKey.String("MISSION_CRITICAL")
- // High impact.
- // Stability: development
- GCPAppHubDestinationServiceCriticalityTypeHigh = GCPAppHubDestinationServiceCriticalityTypeKey.String("HIGH")
- // Medium impact.
- // Stability: development
- GCPAppHubDestinationServiceCriticalityTypeMedium = GCPAppHubDestinationServiceCriticalityTypeKey.String("MEDIUM")
- // Low impact.
- // Stability: development
- GCPAppHubDestinationServiceCriticalityTypeLow = GCPAppHubDestinationServiceCriticalityTypeKey.String("LOW")
-)
-
-// Enum values for gcp.apphub_destination.service.environment_type
-var (
- // Production environment.
- // Stability: development
- GCPAppHubDestinationServiceEnvironmentTypeProduction = GCPAppHubDestinationServiceEnvironmentTypeKey.String("PRODUCTION")
- // Staging environment.
- // Stability: development
- GCPAppHubDestinationServiceEnvironmentTypeStaging = GCPAppHubDestinationServiceEnvironmentTypeKey.String("STAGING")
- // Test environment.
- // Stability: development
- GCPAppHubDestinationServiceEnvironmentTypeTest = GCPAppHubDestinationServiceEnvironmentTypeKey.String("TEST")
- // Development environment.
- // Stability: development
- GCPAppHubDestinationServiceEnvironmentTypeDevelopment = GCPAppHubDestinationServiceEnvironmentTypeKey.String("DEVELOPMENT")
-)
-
-// Enum values for gcp.apphub_destination.workload.criticality_type
-var (
- // Mission critical service.
- // Stability: development
- GCPAppHubDestinationWorkloadCriticalityTypeMissionCritical = GCPAppHubDestinationWorkloadCriticalityTypeKey.String("MISSION_CRITICAL")
- // High impact.
- // Stability: development
- GCPAppHubDestinationWorkloadCriticalityTypeHigh = GCPAppHubDestinationWorkloadCriticalityTypeKey.String("HIGH")
- // Medium impact.
- // Stability: development
- GCPAppHubDestinationWorkloadCriticalityTypeMedium = GCPAppHubDestinationWorkloadCriticalityTypeKey.String("MEDIUM")
- // Low impact.
- // Stability: development
- GCPAppHubDestinationWorkloadCriticalityTypeLow = GCPAppHubDestinationWorkloadCriticalityTypeKey.String("LOW")
-)
-
-// Enum values for gcp.apphub_destination.workload.environment_type
-var (
- // Production environment.
- // Stability: development
- GCPAppHubDestinationWorkloadEnvironmentTypeProduction = GCPAppHubDestinationWorkloadEnvironmentTypeKey.String("PRODUCTION")
- // Staging environment.
- // Stability: development
- GCPAppHubDestinationWorkloadEnvironmentTypeStaging = GCPAppHubDestinationWorkloadEnvironmentTypeKey.String("STAGING")
- // Test environment.
- // Stability: development
- GCPAppHubDestinationWorkloadEnvironmentTypeTest = GCPAppHubDestinationWorkloadEnvironmentTypeKey.String("TEST")
- // Development environment.
- // Stability: development
- GCPAppHubDestinationWorkloadEnvironmentTypeDevelopment = GCPAppHubDestinationWorkloadEnvironmentTypeKey.String("DEVELOPMENT")
-)
-
-// Namespace: gen_ai
-const (
- // GenAIAgentDescriptionKey is the attribute Key conforming to the
- // "gen_ai.agent.description" semantic conventions. It represents the free-form
- // description of the GenAI agent provided by the application.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Helps with math problems", "Generates fiction stories"
- GenAIAgentDescriptionKey = attribute.Key("gen_ai.agent.description")
-
- // GenAIAgentIDKey is the attribute Key conforming to the "gen_ai.agent.id"
- // semantic conventions. It represents the unique identifier of the GenAI agent.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "asst_5j66UpCpwteGg4YSxUnt7lPY"
- GenAIAgentIDKey = attribute.Key("gen_ai.agent.id")
-
- // GenAIAgentNameKey is the attribute Key conforming to the "gen_ai.agent.name"
- // semantic conventions. It represents the human-readable name of the GenAI
- // agent provided by the application.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Math Tutor", "Fiction Writer"
- GenAIAgentNameKey = attribute.Key("gen_ai.agent.name")
-
- // GenAIConversationIDKey is the attribute Key conforming to the
- // "gen_ai.conversation.id" semantic conventions. It represents the unique
- // identifier for a conversation (session, thread), used to store and correlate
- // messages within this conversation.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "conv_5j66UpCpwteGg4YSxUnt7lPY"
- GenAIConversationIDKey = attribute.Key("gen_ai.conversation.id")
-
- // GenAIDataSourceIDKey is the attribute Key conforming to the
- // "gen_ai.data_source.id" semantic conventions. It represents the data source
- // identifier.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "H7STPQYOND"
- // Note: Data sources are used by AI agents and RAG applications to store
- // grounding data. A data source may be an external database, object store,
- // document collection, website, or any other storage system used by the GenAI
- // agent or application. The `gen_ai.data_source.id` SHOULD match the identifier
- // used by the GenAI system rather than a name specific to the external storage,
- // such as a database or object store. Semantic conventions referencing
- // `gen_ai.data_source.id` MAY also leverage additional attributes, such as
- // `db.*`, to further identify and describe the data source.
- GenAIDataSourceIDKey = attribute.Key("gen_ai.data_source.id")
-
- // GenAIEmbeddingsDimensionCountKey is the attribute Key conforming to the
- // "gen_ai.embeddings.dimension.count" semantic conventions. It represents the
- // number of dimensions the resulting output embeddings should have.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 512, 1024
- GenAIEmbeddingsDimensionCountKey = attribute.Key("gen_ai.embeddings.dimension.count")
-
- // GenAIEvaluationExplanationKey is the attribute Key conforming to the
- // "gen_ai.evaluation.explanation" semantic conventions. It represents a
- // free-form explanation for the assigned score provided by the evaluator.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "The response is factually accurate but lacks sufficient detail to
- // fully address the question."
- GenAIEvaluationExplanationKey = attribute.Key("gen_ai.evaluation.explanation")
-
- // GenAIEvaluationNameKey is the attribute Key conforming to the
- // "gen_ai.evaluation.name" semantic conventions. It represents the name of the
- // evaluation metric used for the GenAI response.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Relevance", "IntentResolution"
- GenAIEvaluationNameKey = attribute.Key("gen_ai.evaluation.name")
-
- // GenAIEvaluationScoreLabelKey is the attribute Key conforming to the
- // "gen_ai.evaluation.score.label" semantic conventions. It represents the human
- // readable label for evaluation.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "relevant", "not_relevant", "correct", "incorrect", "pass", "fail"
- // Note: This attribute provides a human-readable interpretation of the
- // evaluation score produced by an evaluator. For example, a score value of 1
- // could mean "relevant" in one evaluation system and "not relevant" in another,
- // depending on the scoring range and evaluator. The label SHOULD have low
- // cardinality. Possible values depend on the evaluation metric and evaluator
- // used; implementations SHOULD document the possible values.
- GenAIEvaluationScoreLabelKey = attribute.Key("gen_ai.evaluation.score.label")
-
- // GenAIEvaluationScoreValueKey is the attribute Key conforming to the
- // "gen_ai.evaluation.score.value" semantic conventions. It represents the
- // evaluation score returned by the evaluator.
- //
- // Type: double
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 4.0
- GenAIEvaluationScoreValueKey = attribute.Key("gen_ai.evaluation.score.value")
-
- // GenAIInputMessagesKey is the attribute Key conforming to the
- // "gen_ai.input.messages" semantic conventions. It represents the chat history
- // provided to the model as an input.
- //
- // Type: any
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "[\n {\n "role": "user",\n "parts": [\n {\n "type": "text",\n
- // "content": "Weather in Paris?"\n }\n ]\n },\n {\n "role": "assistant",\n
- // "parts": [\n {\n "type": "tool_call",\n "id":
- // "call_VSPygqKTWdrhaFErNvMV18Yl",\n "name": "get_weather",\n "arguments": {\n
- // "location": "Paris"\n }\n }\n ]\n },\n {\n "role": "tool",\n "parts": [\n {\n
- // "type": "tool_call_response",\n "id": " call_VSPygqKTWdrhaFErNvMV18Yl",\n
- // "result": "rainy, 57°F"\n }\n ]\n }\n]\n"
- // Note: Instrumentations MUST follow [Input messages JSON schema].
- // When the attribute is recorded on events, it MUST be recorded in structured
- // form. When recorded on spans, it MAY be recorded as a JSON string if
- // structured
- // format is not supported and SHOULD be recorded in structured form otherwise.
- //
- // Messages MUST be provided in the order they were sent to the model.
- // Instrumentations MAY provide a way for users to filter or truncate
- // input messages.
- //
- // > [!Warning]
- // > This attribute is likely to contain sensitive information including
- // > user/PII data.
- //
- // See [Recording content on attributes]
- // section for more details.
- //
- // [Input messages JSON schema]: /docs/gen-ai/gen-ai-input-messages.json
- // [Recording content on attributes]: /docs/gen-ai/gen-ai-spans.md#recording-content-on-attributes
- GenAIInputMessagesKey = attribute.Key("gen_ai.input.messages")
-
- // GenAIOperationNameKey is the attribute Key conforming to the
- // "gen_ai.operation.name" semantic conventions. It represents the name of the
- // operation being performed.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // Note: If one of the predefined values applies, but specific system uses a
- // different name it's RECOMMENDED to document it in the semantic conventions
- // for specific GenAI system and use system-specific name in the
- // instrumentation. If a different name is not documented, instrumentation
- // libraries SHOULD use applicable predefined value.
- GenAIOperationNameKey = attribute.Key("gen_ai.operation.name")
-
- // GenAIOutputMessagesKey is the attribute Key conforming to the
- // "gen_ai.output.messages" semantic conventions. It represents the messages
- // returned by the model where each message represents a specific model response
- // (choice, candidate).
- //
- // Type: any
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "[\n {\n "role": "assistant",\n "parts": [\n {\n "type": "text",\n
- // "content": "The weather in Paris is currently rainy with a temperature of
- // 57°F."\n }\n ],\n "finish_reason": "stop"\n }\n]\n"
- // Note: Instrumentations MUST follow [Output messages JSON schema]
- //
- // Each message represents a single output choice/candidate generated by
- // the model. Each message corresponds to exactly one generation
- // (choice/candidate) and vice versa - one choice cannot be split across
- // multiple messages or one message cannot contain parts from multiple choices.
- //
- // When the attribute is recorded on events, it MUST be recorded in structured
- // form. When recorded on spans, it MAY be recorded as a JSON string if
- // structured
- // format is not supported and SHOULD be recorded in structured form otherwise.
- //
- // Instrumentations MAY provide a way for users to filter or truncate
- // output messages.
- //
- // > [!Warning]
- // > This attribute is likely to contain sensitive information including
- // > user/PII data.
- //
- // See [Recording content on attributes]
- // section for more details.
- //
- // [Output messages JSON schema]: /docs/gen-ai/gen-ai-output-messages.json
- // [Recording content on attributes]: /docs/gen-ai/gen-ai-spans.md#recording-content-on-attributes
- GenAIOutputMessagesKey = attribute.Key("gen_ai.output.messages")
-
- // GenAIOutputTypeKey is the attribute Key conforming to the
- // "gen_ai.output.type" semantic conventions. It represents the represents the
- // content type requested by the client.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // Note: This attribute SHOULD be used when the client requests output of a
- // specific type. The model may return zero or more outputs of this type.
- // This attribute specifies the output modality and not the actual output
- // format. For example, if an image is requested, the actual output could be a
- // URL pointing to an image file.
- // Additional output format details may be recorded in the future in the
- // `gen_ai.output.{type}.*` attributes.
- GenAIOutputTypeKey = attribute.Key("gen_ai.output.type")
-
- // GenAIPromptNameKey is the attribute Key conforming to the
- // "gen_ai.prompt.name" semantic conventions. It represents the name of the
- // prompt that uniquely identifies it.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "analyze-code"
- GenAIPromptNameKey = attribute.Key("gen_ai.prompt.name")
-
- // GenAIProviderNameKey is the attribute Key conforming to the
- // "gen_ai.provider.name" semantic conventions. It represents the Generative AI
- // provider as identified by the client or server instrumentation.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // Note: The attribute SHOULD be set based on the instrumentation's best
- // knowledge and may differ from the actual model provider.
- //
- // Multiple providers, including Azure OpenAI, Gemini, and AI hosting platforms
- // are accessible using the OpenAI REST API and corresponding client libraries,
- // but may proxy or host models from different providers.
- //
- // The `gen_ai.request.model`, `gen_ai.response.model`, and `server.address`
- // attributes may help identify the actual system in use.
- //
- // The `gen_ai.provider.name` attribute acts as a discriminator that
- // identifies the GenAI telemetry format flavor specific to that provider
- // within GenAI semantic conventions.
- // It SHOULD be set consistently with provider-specific attributes and signals.
- // For example, GenAI spans, metrics, and events related to AWS Bedrock
- // should have the `gen_ai.provider.name` set to `aws.bedrock` and include
- // applicable `aws.bedrock.*` attributes and are not expected to include
- // `openai.*` attributes.
- GenAIProviderNameKey = attribute.Key("gen_ai.provider.name")
-
- // GenAIRequestChoiceCountKey is the attribute Key conforming to the
- // "gen_ai.request.choice.count" semantic conventions. It represents the target
- // number of candidate completions to return.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 3
- GenAIRequestChoiceCountKey = attribute.Key("gen_ai.request.choice.count")
-
- // GenAIRequestEncodingFormatsKey is the attribute Key conforming to the
- // "gen_ai.request.encoding_formats" semantic conventions. It represents the
- // encoding formats requested in an embeddings operation, if specified.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "base64"], ["float", "binary"
- // Note: In some GenAI systems the encoding formats are called embedding types.
- // Also, some GenAI systems only accept a single format per request.
- GenAIRequestEncodingFormatsKey = attribute.Key("gen_ai.request.encoding_formats")
-
- // GenAIRequestFrequencyPenaltyKey is the attribute Key conforming to the
- // "gen_ai.request.frequency_penalty" semantic conventions. It represents the
- // frequency penalty setting for the GenAI request.
- //
- // Type: double
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 0.1
- GenAIRequestFrequencyPenaltyKey = attribute.Key("gen_ai.request.frequency_penalty")
-
- // GenAIRequestMaxTokensKey is the attribute Key conforming to the
- // "gen_ai.request.max_tokens" semantic conventions. It represents the maximum
- // number of tokens the model generates for a request.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 100
- GenAIRequestMaxTokensKey = attribute.Key("gen_ai.request.max_tokens")
-
- // GenAIRequestModelKey is the attribute Key conforming to the
- // "gen_ai.request.model" semantic conventions. It represents the name of the
- // GenAI model a request is being made to.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: gpt-4
- GenAIRequestModelKey = attribute.Key("gen_ai.request.model")
-
- // GenAIRequestPresencePenaltyKey is the attribute Key conforming to the
- // "gen_ai.request.presence_penalty" semantic conventions. It represents the
- // presence penalty setting for the GenAI request.
- //
- // Type: double
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 0.1
- GenAIRequestPresencePenaltyKey = attribute.Key("gen_ai.request.presence_penalty")
-
- // GenAIRequestSeedKey is the attribute Key conforming to the
- // "gen_ai.request.seed" semantic conventions. It represents the requests with
- // same seed value more likely to return same result.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 100
- GenAIRequestSeedKey = attribute.Key("gen_ai.request.seed")
-
- // GenAIRequestStopSequencesKey is the attribute Key conforming to the
- // "gen_ai.request.stop_sequences" semantic conventions. It represents the list
- // of sequences that the model will use to stop generating further tokens.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "forest", "lived"
- GenAIRequestStopSequencesKey = attribute.Key("gen_ai.request.stop_sequences")
-
- // GenAIRequestTemperatureKey is the attribute Key conforming to the
- // "gen_ai.request.temperature" semantic conventions. It represents the
- // temperature setting for the GenAI request.
- //
- // Type: double
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 0.0
- GenAIRequestTemperatureKey = attribute.Key("gen_ai.request.temperature")
-
- // GenAIRequestTopKKey is the attribute Key conforming to the
- // "gen_ai.request.top_k" semantic conventions. It represents the top_k sampling
- // setting for the GenAI request.
- //
- // Type: double
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 1.0
- GenAIRequestTopKKey = attribute.Key("gen_ai.request.top_k")
-
- // GenAIRequestTopPKey is the attribute Key conforming to the
- // "gen_ai.request.top_p" semantic conventions. It represents the top_p sampling
- // setting for the GenAI request.
- //
- // Type: double
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 1.0
- GenAIRequestTopPKey = attribute.Key("gen_ai.request.top_p")
-
- // GenAIResponseFinishReasonsKey is the attribute Key conforming to the
- // "gen_ai.response.finish_reasons" semantic conventions. It represents the
- // array of reasons the model stopped generating tokens, corresponding to each
- // generation received.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "stop"], ["stop", "length"
- GenAIResponseFinishReasonsKey = attribute.Key("gen_ai.response.finish_reasons")
-
- // GenAIResponseIDKey is the attribute Key conforming to the
- // "gen_ai.response.id" semantic conventions. It represents the unique
- // identifier for the completion.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "chatcmpl-123"
- GenAIResponseIDKey = attribute.Key("gen_ai.response.id")
-
- // GenAIResponseModelKey is the attribute Key conforming to the
- // "gen_ai.response.model" semantic conventions. It represents the name of the
- // model that generated the response.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "gpt-4-0613"
- GenAIResponseModelKey = attribute.Key("gen_ai.response.model")
-
- // GenAISystemInstructionsKey is the attribute Key conforming to the
- // "gen_ai.system_instructions" semantic conventions. It represents the system
- // message or instructions provided to the GenAI model separately from the chat
- // history.
- //
- // Type: any
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "[\n {\n "type": "text",\n "content": "You are an Agent that greet
- // users, always use greetings tool to respond"\n }\n]\n", "[\n {\n "type":
- // "text",\n "content": "You are a language translator."\n },\n {\n "type":
- // "text",\n "content": "Your mission is to translate text in English to
- // French."\n }\n]\n"
- // Note: This attribute SHOULD be used when the corresponding provider or API
- // allows to provide system instructions or messages separately from the
- // chat history.
- //
- // Instructions that are part of the chat history SHOULD be recorded in
- // `gen_ai.input.messages` attribute instead.
- //
- // Instrumentations MUST follow [System instructions JSON schema].
- //
- // When recorded on spans, it MAY be recorded as a JSON string if structured
- // format is not supported and SHOULD be recorded in structured form otherwise.
- //
- // Instrumentations MAY provide a way for users to filter or truncate
- // system instructions.
- //
- // > [!Warning]
- // > This attribute may contain sensitive information.
- //
- // See [Recording content on attributes]
- // section for more details.
- //
- // [System instructions JSON schema]: /docs/gen-ai/gen-ai-system-instructions.json
- // [Recording content on attributes]: /docs/gen-ai/gen-ai-spans.md#recording-content-on-attributes
- GenAISystemInstructionsKey = attribute.Key("gen_ai.system_instructions")
-
- // GenAITokenTypeKey is the attribute Key conforming to the "gen_ai.token.type"
- // semantic conventions. It represents the type of token being counted.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "input", "output"
- GenAITokenTypeKey = attribute.Key("gen_ai.token.type")
-
- // GenAIToolCallArgumentsKey is the attribute Key conforming to the
- // "gen_ai.tool.call.arguments" semantic conventions. It represents the
- // parameters passed to the tool call.
- //
- // Type: any
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "{\n "location": "San Francisco?",\n "date": "2025-10-01"\n}\n"
- // Note: > [!WARNING]
- //
- // > This attribute may contain sensitive information.
- //
- // It's expected to be an object - in case a serialized string is available
- // to the instrumentation, the instrumentation SHOULD do the best effort to
- // deserialize it to an object. When recorded on spans, it MAY be recorded as a
- // JSON string if structured format is not supported and SHOULD be recorded in
- // structured form otherwise.
- GenAIToolCallArgumentsKey = attribute.Key("gen_ai.tool.call.arguments")
-
- // GenAIToolCallIDKey is the attribute Key conforming to the
- // "gen_ai.tool.call.id" semantic conventions. It represents the tool call
- // identifier.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "call_mszuSIzqtI65i1wAUOE8w5H4"
- GenAIToolCallIDKey = attribute.Key("gen_ai.tool.call.id")
-
- // GenAIToolCallResultKey is the attribute Key conforming to the
- // "gen_ai.tool.call.result" semantic conventions. It represents the result
- // returned by the tool call (if any and if execution was successful).
- //
- // Type: any
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "{\n "temperature_range": {\n "high": 75,\n "low": 60\n },\n
- // "conditions": "sunny"\n}\n"
- // Note: > [!WARNING]
- //
- // > This attribute may contain sensitive information.
- //
- // It's expected to be an object - in case a serialized string is available
- // to the instrumentation, the instrumentation SHOULD do the best effort to
- // deserialize it to an object. When recorded on spans, it MAY be recorded as a
- // JSON string if structured format is not supported and SHOULD be recorded in
- // structured form otherwise.
- GenAIToolCallResultKey = attribute.Key("gen_ai.tool.call.result")
-
- // GenAIToolDefinitionsKey is the attribute Key conforming to the
- // "gen_ai.tool.definitions" semantic conventions. It represents the list of
- // source system tool definitions available to the GenAI agent or model.
- //
- // Type: any
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "[\n {\n "type": "function",\n "name": "get_current_weather",\n
- // "description": "Get the current weather in a given location",\n "parameters":
- // {\n "type": "object",\n "properties": {\n "location": {\n "type": "string",\n
- // "description": "The city and state, e.g. San Francisco, CA"\n },\n "unit":
- // {\n "type": "string",\n "enum": [\n "celsius",\n "fahrenheit"\n ]\n }\n },\n
- // "required": [\n "location",\n "unit"\n ]\n }\n }\n]\n"
- // Note: The value of this attribute matches source system tool definition
- // format.
- //
- // It's expected to be an array of objects where each object represents a tool
- // definition. In case a serialized string is available
- // to the instrumentation, the instrumentation SHOULD do the best effort to
- // deserialize it to an array. When recorded on spans, it MAY be recorded as a
- // JSON string if structured format is not supported and SHOULD be recorded in
- // structured form otherwise.
- //
- // Since this attribute could be large, it's NOT RECOMMENDED to populate
- // it by default. Instrumentations MAY provide a way to enable
- // populating this attribute.
- GenAIToolDefinitionsKey = attribute.Key("gen_ai.tool.definitions")
-
- // GenAIToolDescriptionKey is the attribute Key conforming to the
- // "gen_ai.tool.description" semantic conventions. It represents the tool
- // description.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Multiply two numbers"
- GenAIToolDescriptionKey = attribute.Key("gen_ai.tool.description")
-
- // GenAIToolNameKey is the attribute Key conforming to the "gen_ai.tool.name"
- // semantic conventions. It represents the name of the tool utilized by the
- // agent.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Flights"
- GenAIToolNameKey = attribute.Key("gen_ai.tool.name")
-
- // GenAIToolTypeKey is the attribute Key conforming to the "gen_ai.tool.type"
- // semantic conventions. It represents the type of the tool utilized by the
- // agent.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "function", "extension", "datastore"
- // Note: Extension: A tool executed on the agent-side to directly call external
- // APIs, bridging the gap between the agent and real-world systems.
- // Agent-side operations involve actions that are performed by the agent on the
- // server or within the agent's controlled environment.
- // Function: A tool executed on the client-side, where the agent generates
- // parameters for a predefined function, and the client executes the logic.
- // Client-side operations are actions taken on the user's end or within the
- // client application.
- // Datastore: A tool used by the agent to access and query structured or
- // unstructured external data for retrieval-augmented tasks or knowledge
- // updates.
- GenAIToolTypeKey = attribute.Key("gen_ai.tool.type")
-
- // GenAIUsageInputTokensKey is the attribute Key conforming to the
- // "gen_ai.usage.input_tokens" semantic conventions. It represents the number of
- // tokens used in the GenAI input (prompt).
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 100
- GenAIUsageInputTokensKey = attribute.Key("gen_ai.usage.input_tokens")
-
- // GenAIUsageOutputTokensKey is the attribute Key conforming to the
- // "gen_ai.usage.output_tokens" semantic conventions. It represents the number
- // of tokens used in the GenAI response (completion).
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 180
- GenAIUsageOutputTokensKey = attribute.Key("gen_ai.usage.output_tokens")
-)
-
-// GenAIAgentDescription returns an attribute KeyValue conforming to the
-// "gen_ai.agent.description" semantic conventions. It represents the free-form
-// description of the GenAI agent provided by the application.
-func GenAIAgentDescription(val string) attribute.KeyValue {
- return GenAIAgentDescriptionKey.String(val)
-}
-
-// GenAIAgentID returns an attribute KeyValue conforming to the "gen_ai.agent.id"
-// semantic conventions. It represents the unique identifier of the GenAI agent.
-func GenAIAgentID(val string) attribute.KeyValue {
- return GenAIAgentIDKey.String(val)
-}
-
-// GenAIAgentName returns an attribute KeyValue conforming to the
-// "gen_ai.agent.name" semantic conventions. It represents the human-readable
-// name of the GenAI agent provided by the application.
-func GenAIAgentName(val string) attribute.KeyValue {
- return GenAIAgentNameKey.String(val)
-}
-
-// GenAIConversationID returns an attribute KeyValue conforming to the
-// "gen_ai.conversation.id" semantic conventions. It represents the unique
-// identifier for a conversation (session, thread), used to store and correlate
-// messages within this conversation.
-func GenAIConversationID(val string) attribute.KeyValue {
- return GenAIConversationIDKey.String(val)
-}
-
-// GenAIDataSourceID returns an attribute KeyValue conforming to the
-// "gen_ai.data_source.id" semantic conventions. It represents the data source
-// identifier.
-func GenAIDataSourceID(val string) attribute.KeyValue {
- return GenAIDataSourceIDKey.String(val)
-}
-
-// GenAIEmbeddingsDimensionCount returns an attribute KeyValue conforming to the
-// "gen_ai.embeddings.dimension.count" semantic conventions. It represents the
-// number of dimensions the resulting output embeddings should have.
-func GenAIEmbeddingsDimensionCount(val int) attribute.KeyValue {
- return GenAIEmbeddingsDimensionCountKey.Int(val)
-}
-
-// GenAIEvaluationExplanation returns an attribute KeyValue conforming to the
-// "gen_ai.evaluation.explanation" semantic conventions. It represents a
-// free-form explanation for the assigned score provided by the evaluator.
-func GenAIEvaluationExplanation(val string) attribute.KeyValue {
- return GenAIEvaluationExplanationKey.String(val)
-}
-
-// GenAIEvaluationName returns an attribute KeyValue conforming to the
-// "gen_ai.evaluation.name" semantic conventions. It represents the name of the
-// evaluation metric used for the GenAI response.
-func GenAIEvaluationName(val string) attribute.KeyValue {
- return GenAIEvaluationNameKey.String(val)
-}
-
-// GenAIEvaluationScoreLabel returns an attribute KeyValue conforming to the
-// "gen_ai.evaluation.score.label" semantic conventions. It represents the human
-// readable label for evaluation.
-func GenAIEvaluationScoreLabel(val string) attribute.KeyValue {
- return GenAIEvaluationScoreLabelKey.String(val)
-}
-
-// GenAIEvaluationScoreValue returns an attribute KeyValue conforming to the
-// "gen_ai.evaluation.score.value" semantic conventions. It represents the
-// evaluation score returned by the evaluator.
-func GenAIEvaluationScoreValue(val float64) attribute.KeyValue {
- return GenAIEvaluationScoreValueKey.Float64(val)
-}
-
-// GenAIPromptName returns an attribute KeyValue conforming to the
-// "gen_ai.prompt.name" semantic conventions. It represents the name of the
-// prompt that uniquely identifies it.
-func GenAIPromptName(val string) attribute.KeyValue {
- return GenAIPromptNameKey.String(val)
-}
-
-// GenAIRequestChoiceCount returns an attribute KeyValue conforming to the
-// "gen_ai.request.choice.count" semantic conventions. It represents the target
-// number of candidate completions to return.
-func GenAIRequestChoiceCount(val int) attribute.KeyValue {
- return GenAIRequestChoiceCountKey.Int(val)
-}
-
-// GenAIRequestEncodingFormats returns an attribute KeyValue conforming to the
-// "gen_ai.request.encoding_formats" semantic conventions. It represents the
-// encoding formats requested in an embeddings operation, if specified.
-func GenAIRequestEncodingFormats(val ...string) attribute.KeyValue {
- return GenAIRequestEncodingFormatsKey.StringSlice(val)
-}
-
-// GenAIRequestFrequencyPenalty returns an attribute KeyValue conforming to the
-// "gen_ai.request.frequency_penalty" semantic conventions. It represents the
-// frequency penalty setting for the GenAI request.
-func GenAIRequestFrequencyPenalty(val float64) attribute.KeyValue {
- return GenAIRequestFrequencyPenaltyKey.Float64(val)
-}
-
-// GenAIRequestMaxTokens returns an attribute KeyValue conforming to the
-// "gen_ai.request.max_tokens" semantic conventions. It represents the maximum
-// number of tokens the model generates for a request.
-func GenAIRequestMaxTokens(val int) attribute.KeyValue {
- return GenAIRequestMaxTokensKey.Int(val)
-}
-
-// GenAIRequestModel returns an attribute KeyValue conforming to the
-// "gen_ai.request.model" semantic conventions. It represents the name of the
-// GenAI model a request is being made to.
-func GenAIRequestModel(val string) attribute.KeyValue {
- return GenAIRequestModelKey.String(val)
-}
-
-// GenAIRequestPresencePenalty returns an attribute KeyValue conforming to the
-// "gen_ai.request.presence_penalty" semantic conventions. It represents the
-// presence penalty setting for the GenAI request.
-func GenAIRequestPresencePenalty(val float64) attribute.KeyValue {
- return GenAIRequestPresencePenaltyKey.Float64(val)
-}
-
-// GenAIRequestSeed returns an attribute KeyValue conforming to the
-// "gen_ai.request.seed" semantic conventions. It represents the requests with
-// same seed value more likely to return same result.
-func GenAIRequestSeed(val int) attribute.KeyValue {
- return GenAIRequestSeedKey.Int(val)
-}
-
-// GenAIRequestStopSequences returns an attribute KeyValue conforming to the
-// "gen_ai.request.stop_sequences" semantic conventions. It represents the list
-// of sequences that the model will use to stop generating further tokens.
-func GenAIRequestStopSequences(val ...string) attribute.KeyValue {
- return GenAIRequestStopSequencesKey.StringSlice(val)
-}
-
-// GenAIRequestTemperature returns an attribute KeyValue conforming to the
-// "gen_ai.request.temperature" semantic conventions. It represents the
-// temperature setting for the GenAI request.
-func GenAIRequestTemperature(val float64) attribute.KeyValue {
- return GenAIRequestTemperatureKey.Float64(val)
-}
-
-// GenAIRequestTopK returns an attribute KeyValue conforming to the
-// "gen_ai.request.top_k" semantic conventions. It represents the top_k sampling
-// setting for the GenAI request.
-func GenAIRequestTopK(val float64) attribute.KeyValue {
- return GenAIRequestTopKKey.Float64(val)
-}
-
-// GenAIRequestTopP returns an attribute KeyValue conforming to the
-// "gen_ai.request.top_p" semantic conventions. It represents the top_p sampling
-// setting for the GenAI request.
-func GenAIRequestTopP(val float64) attribute.KeyValue {
- return GenAIRequestTopPKey.Float64(val)
-}
-
-// GenAIResponseFinishReasons returns an attribute KeyValue conforming to the
-// "gen_ai.response.finish_reasons" semantic conventions. It represents the array
-// of reasons the model stopped generating tokens, corresponding to each
-// generation received.
-func GenAIResponseFinishReasons(val ...string) attribute.KeyValue {
- return GenAIResponseFinishReasonsKey.StringSlice(val)
-}
-
-// GenAIResponseID returns an attribute KeyValue conforming to the
-// "gen_ai.response.id" semantic conventions. It represents the unique identifier
-// for the completion.
-func GenAIResponseID(val string) attribute.KeyValue {
- return GenAIResponseIDKey.String(val)
-}
-
-// GenAIResponseModel returns an attribute KeyValue conforming to the
-// "gen_ai.response.model" semantic conventions. It represents the name of the
-// model that generated the response.
-func GenAIResponseModel(val string) attribute.KeyValue {
- return GenAIResponseModelKey.String(val)
-}
-
-// GenAIToolCallID returns an attribute KeyValue conforming to the
-// "gen_ai.tool.call.id" semantic conventions. It represents the tool call
-// identifier.
-func GenAIToolCallID(val string) attribute.KeyValue {
- return GenAIToolCallIDKey.String(val)
-}
-
-// GenAIToolDescription returns an attribute KeyValue conforming to the
-// "gen_ai.tool.description" semantic conventions. It represents the tool
-// description.
-func GenAIToolDescription(val string) attribute.KeyValue {
- return GenAIToolDescriptionKey.String(val)
-}
-
-// GenAIToolName returns an attribute KeyValue conforming to the
-// "gen_ai.tool.name" semantic conventions. It represents the name of the tool
-// utilized by the agent.
-func GenAIToolName(val string) attribute.KeyValue {
- return GenAIToolNameKey.String(val)
-}
-
-// GenAIToolType returns an attribute KeyValue conforming to the
-// "gen_ai.tool.type" semantic conventions. It represents the type of the tool
-// utilized by the agent.
-func GenAIToolType(val string) attribute.KeyValue {
- return GenAIToolTypeKey.String(val)
-}
-
-// GenAIUsageInputTokens returns an attribute KeyValue conforming to the
-// "gen_ai.usage.input_tokens" semantic conventions. It represents the number of
-// tokens used in the GenAI input (prompt).
-func GenAIUsageInputTokens(val int) attribute.KeyValue {
- return GenAIUsageInputTokensKey.Int(val)
-}
-
-// GenAIUsageOutputTokens returns an attribute KeyValue conforming to the
-// "gen_ai.usage.output_tokens" semantic conventions. It represents the number of
-// tokens used in the GenAI response (completion).
-func GenAIUsageOutputTokens(val int) attribute.KeyValue {
- return GenAIUsageOutputTokensKey.Int(val)
-}
-
-// Enum values for gen_ai.operation.name
-var (
- // Chat completion operation such as [OpenAI Chat API]
- // Stability: development
- //
- // [OpenAI Chat API]: https://platform.openai.com/docs/api-reference/chat
- GenAIOperationNameChat = GenAIOperationNameKey.String("chat")
- // Multimodal content generation operation such as [Gemini Generate Content]
- // Stability: development
- //
- // [Gemini Generate Content]: https://ai.google.dev/api/generate-content
- GenAIOperationNameGenerateContent = GenAIOperationNameKey.String("generate_content")
- // Text completions operation such as [OpenAI Completions API (Legacy)]
- // Stability: development
- //
- // [OpenAI Completions API (Legacy)]: https://platform.openai.com/docs/api-reference/completions
- GenAIOperationNameTextCompletion = GenAIOperationNameKey.String("text_completion")
- // Embeddings operation such as [OpenAI Create embeddings API]
- // Stability: development
- //
- // [OpenAI Create embeddings API]: https://platform.openai.com/docs/api-reference/embeddings/create
- GenAIOperationNameEmbeddings = GenAIOperationNameKey.String("embeddings")
- // Create GenAI agent
- // Stability: development
- GenAIOperationNameCreateAgent = GenAIOperationNameKey.String("create_agent")
- // Invoke GenAI agent
- // Stability: development
- GenAIOperationNameInvokeAgent = GenAIOperationNameKey.String("invoke_agent")
- // Execute a tool
- // Stability: development
- GenAIOperationNameExecuteTool = GenAIOperationNameKey.String("execute_tool")
-)
-
-// Enum values for gen_ai.output.type
-var (
- // Plain text
- // Stability: development
- GenAIOutputTypeText = GenAIOutputTypeKey.String("text")
- // JSON object with known or unknown schema
- // Stability: development
- GenAIOutputTypeJSON = GenAIOutputTypeKey.String("json")
- // Image
- // Stability: development
- GenAIOutputTypeImage = GenAIOutputTypeKey.String("image")
- // Speech
- // Stability: development
- GenAIOutputTypeSpeech = GenAIOutputTypeKey.String("speech")
-)
-
-// Enum values for gen_ai.provider.name
-var (
- // [OpenAI]
- // Stability: development
- //
- // [OpenAI]: https://openai.com/
- GenAIProviderNameOpenAI = GenAIProviderNameKey.String("openai")
- // Any Google generative AI endpoint
- // Stability: development
- GenAIProviderNameGCPGenAI = GenAIProviderNameKey.String("gcp.gen_ai")
- // [Vertex AI]
- // Stability: development
- //
- // [Vertex AI]: https://cloud.google.com/vertex-ai
- GenAIProviderNameGCPVertexAI = GenAIProviderNameKey.String("gcp.vertex_ai")
- // [Gemini]
- // Stability: development
- //
- // [Gemini]: https://cloud.google.com/products/gemini
- GenAIProviderNameGCPGemini = GenAIProviderNameKey.String("gcp.gemini")
- // [Anthropic]
- // Stability: development
- //
- // [Anthropic]: https://www.anthropic.com/
- GenAIProviderNameAnthropic = GenAIProviderNameKey.String("anthropic")
- // [Cohere]
- // Stability: development
- //
- // [Cohere]: https://cohere.com/
- GenAIProviderNameCohere = GenAIProviderNameKey.String("cohere")
- // Azure AI Inference
- // Stability: development
- GenAIProviderNameAzureAIInference = GenAIProviderNameKey.String("azure.ai.inference")
- // [Azure OpenAI]
- // Stability: development
- //
- // [Azure OpenAI]: https://azure.microsoft.com/products/ai-services/openai-service/
- GenAIProviderNameAzureAIOpenAI = GenAIProviderNameKey.String("azure.ai.openai")
- // [IBM Watsonx AI]
- // Stability: development
- //
- // [IBM Watsonx AI]: https://www.ibm.com/products/watsonx-ai
- GenAIProviderNameIBMWatsonxAI = GenAIProviderNameKey.String("ibm.watsonx.ai")
- // [AWS Bedrock]
- // Stability: development
- //
- // [AWS Bedrock]: https://aws.amazon.com/bedrock
- GenAIProviderNameAWSBedrock = GenAIProviderNameKey.String("aws.bedrock")
- // [Perplexity]
- // Stability: development
- //
- // [Perplexity]: https://www.perplexity.ai/
- GenAIProviderNamePerplexity = GenAIProviderNameKey.String("perplexity")
- // [xAI]
- // Stability: development
- //
- // [xAI]: https://x.ai/
- GenAIProviderNameXAI = GenAIProviderNameKey.String("x_ai")
- // [DeepSeek]
- // Stability: development
- //
- // [DeepSeek]: https://www.deepseek.com/
- GenAIProviderNameDeepseek = GenAIProviderNameKey.String("deepseek")
- // [Groq]
- // Stability: development
- //
- // [Groq]: https://groq.com/
- GenAIProviderNameGroq = GenAIProviderNameKey.String("groq")
- // [Mistral AI]
- // Stability: development
- //
- // [Mistral AI]: https://mistral.ai/
- GenAIProviderNameMistralAI = GenAIProviderNameKey.String("mistral_ai")
-)
-
-// Enum values for gen_ai.token.type
-var (
- // Input tokens (prompt, input, etc.)
- // Stability: development
- GenAITokenTypeInput = GenAITokenTypeKey.String("input")
- // Output tokens (completion, response, etc.)
- // Stability: development
- GenAITokenTypeOutput = GenAITokenTypeKey.String("output")
-)
-
-// Namespace: geo
-const (
- // GeoContinentCodeKey is the attribute Key conforming to the
- // "geo.continent.code" semantic conventions. It represents the two-letter code
- // representing continent’s name.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- GeoContinentCodeKey = attribute.Key("geo.continent.code")
-
- // GeoCountryISOCodeKey is the attribute Key conforming to the
- // "geo.country.iso_code" semantic conventions. It represents the two-letter ISO
- // Country Code ([ISO 3166-1 alpha2]).
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "CA"
- //
- // [ISO 3166-1 alpha2]: https://wikipedia.org/wiki/ISO_3166-1#Codes
- GeoCountryISOCodeKey = attribute.Key("geo.country.iso_code")
-
- // GeoLocalityNameKey is the attribute Key conforming to the "geo.locality.name"
- // semantic conventions. It represents the locality name. Represents the name of
- // a city, town, village, or similar populated place.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Montreal", "Berlin"
- GeoLocalityNameKey = attribute.Key("geo.locality.name")
-
- // GeoLocationLatKey is the attribute Key conforming to the "geo.location.lat"
- // semantic conventions. It represents the latitude of the geo location in
- // [WGS84].
- //
- // Type: double
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 45.505918
- //
- // [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84
- GeoLocationLatKey = attribute.Key("geo.location.lat")
-
- // GeoLocationLonKey is the attribute Key conforming to the "geo.location.lon"
- // semantic conventions. It represents the longitude of the geo location in
- // [WGS84].
- //
- // Type: double
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: -73.61483
- //
- // [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84
- GeoLocationLonKey = attribute.Key("geo.location.lon")
-
- // GeoPostalCodeKey is the attribute Key conforming to the "geo.postal_code"
- // semantic conventions. It represents the postal code associated with the
- // location. Values appropriate for this field may also be known as a postcode
- // or ZIP code and will vary widely from country to country.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "94040"
- GeoPostalCodeKey = attribute.Key("geo.postal_code")
-
- // GeoRegionISOCodeKey is the attribute Key conforming to the
- // "geo.region.iso_code" semantic conventions. It represents the region ISO code
- // ([ISO 3166-2]).
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "CA-QC"
- //
- // [ISO 3166-2]: https://wikipedia.org/wiki/ISO_3166-2
- GeoRegionISOCodeKey = attribute.Key("geo.region.iso_code")
-)
-
-// GeoCountryISOCode returns an attribute KeyValue conforming to the
-// "geo.country.iso_code" semantic conventions. It represents the two-letter ISO
-// Country Code ([ISO 3166-1 alpha2]).
-//
-// [ISO 3166-1 alpha2]: https://wikipedia.org/wiki/ISO_3166-1#Codes
-func GeoCountryISOCode(val string) attribute.KeyValue {
- return GeoCountryISOCodeKey.String(val)
-}
-
-// GeoLocalityName returns an attribute KeyValue conforming to the
-// "geo.locality.name" semantic conventions. It represents the locality name.
-// Represents the name of a city, town, village, or similar populated place.
-func GeoLocalityName(val string) attribute.KeyValue {
- return GeoLocalityNameKey.String(val)
-}
-
-// GeoLocationLat returns an attribute KeyValue conforming to the
-// "geo.location.lat" semantic conventions. It represents the latitude of the geo
-// location in [WGS84].
-//
-// [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84
-func GeoLocationLat(val float64) attribute.KeyValue {
- return GeoLocationLatKey.Float64(val)
-}
-
-// GeoLocationLon returns an attribute KeyValue conforming to the
-// "geo.location.lon" semantic conventions. It represents the longitude of the
-// geo location in [WGS84].
-//
-// [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84
-func GeoLocationLon(val float64) attribute.KeyValue {
- return GeoLocationLonKey.Float64(val)
-}
-
-// GeoPostalCode returns an attribute KeyValue conforming to the
-// "geo.postal_code" semantic conventions. It represents the postal code
-// associated with the location. Values appropriate for this field may also be
-// known as a postcode or ZIP code and will vary widely from country to country.
-func GeoPostalCode(val string) attribute.KeyValue {
- return GeoPostalCodeKey.String(val)
-}
-
-// GeoRegionISOCode returns an attribute KeyValue conforming to the
-// "geo.region.iso_code" semantic conventions. It represents the region ISO code
-// ([ISO 3166-2]).
-//
-// [ISO 3166-2]: https://wikipedia.org/wiki/ISO_3166-2
-func GeoRegionISOCode(val string) attribute.KeyValue {
- return GeoRegionISOCodeKey.String(val)
-}
-
-// Enum values for geo.continent.code
-var (
- // Africa
- // Stability: development
- GeoContinentCodeAf = GeoContinentCodeKey.String("AF")
- // Antarctica
- // Stability: development
- GeoContinentCodeAn = GeoContinentCodeKey.String("AN")
- // Asia
- // Stability: development
- GeoContinentCodeAs = GeoContinentCodeKey.String("AS")
- // Europe
- // Stability: development
- GeoContinentCodeEu = GeoContinentCodeKey.String("EU")
- // North America
- // Stability: development
- GeoContinentCodeNa = GeoContinentCodeKey.String("NA")
- // Oceania
- // Stability: development
- GeoContinentCodeOc = GeoContinentCodeKey.String("OC")
- // South America
- // Stability: development
- GeoContinentCodeSa = GeoContinentCodeKey.String("SA")
-)
-
-// Namespace: go
-const (
- // GoMemoryTypeKey is the attribute Key conforming to the "go.memory.type"
- // semantic conventions. It represents the type of memory.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "other", "stack"
- GoMemoryTypeKey = attribute.Key("go.memory.type")
-)
-
-// Enum values for go.memory.type
-var (
- // Memory allocated from the heap that is reserved for stack space, whether or
- // not it is currently in-use.
- // Stability: development
- GoMemoryTypeStack = GoMemoryTypeKey.String("stack")
- // Memory used by the Go runtime, excluding other categories of memory usage
- // described in this enumeration.
- // Stability: development
- GoMemoryTypeOther = GoMemoryTypeKey.String("other")
-)
-
-// Namespace: graphql
-const (
- // GraphQLDocumentKey is the attribute Key conforming to the "graphql.document"
- // semantic conventions. It represents the GraphQL document being executed.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: query findBookById { bookById(id: ?) { name } }
- // Note: The value may be sanitized to exclude sensitive information.
- GraphQLDocumentKey = attribute.Key("graphql.document")
-
- // GraphQLOperationNameKey is the attribute Key conforming to the
- // "graphql.operation.name" semantic conventions. It represents the name of the
- // operation being executed.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: findBookById
- GraphQLOperationNameKey = attribute.Key("graphql.operation.name")
-
- // GraphQLOperationTypeKey is the attribute Key conforming to the
- // "graphql.operation.type" semantic conventions. It represents the type of the
- // operation being executed.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "query", "mutation", "subscription"
- GraphQLOperationTypeKey = attribute.Key("graphql.operation.type")
-)
-
-// GraphQLDocument returns an attribute KeyValue conforming to the
-// "graphql.document" semantic conventions. It represents the GraphQL document
-// being executed.
-func GraphQLDocument(val string) attribute.KeyValue {
- return GraphQLDocumentKey.String(val)
-}
-
-// GraphQLOperationName returns an attribute KeyValue conforming to the
-// "graphql.operation.name" semantic conventions. It represents the name of the
-// operation being executed.
-func GraphQLOperationName(val string) attribute.KeyValue {
- return GraphQLOperationNameKey.String(val)
-}
-
-// Enum values for graphql.operation.type
-var (
- // GraphQL query
- // Stability: development
- GraphQLOperationTypeQuery = GraphQLOperationTypeKey.String("query")
- // GraphQL mutation
- // Stability: development
- GraphQLOperationTypeMutation = GraphQLOperationTypeKey.String("mutation")
- // GraphQL subscription
- // Stability: development
- GraphQLOperationTypeSubscription = GraphQLOperationTypeKey.String("subscription")
-)
-
-// Namespace: heroku
-const (
- // HerokuAppIDKey is the attribute Key conforming to the "heroku.app.id"
- // semantic conventions. It represents the unique identifier for the
- // application.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "2daa2797-e42b-4624-9322-ec3f968df4da"
- HerokuAppIDKey = attribute.Key("heroku.app.id")
-
- // HerokuReleaseCommitKey is the attribute Key conforming to the
- // "heroku.release.commit" semantic conventions. It represents the commit hash
- // for the current release.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "e6134959463efd8966b20e75b913cafe3f5ec"
- HerokuReleaseCommitKey = attribute.Key("heroku.release.commit")
-
- // HerokuReleaseCreationTimestampKey is the attribute Key conforming to the
- // "heroku.release.creation_timestamp" semantic conventions. It represents the
- // time and date the release was created.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "2022-10-23T18:00:42Z"
- HerokuReleaseCreationTimestampKey = attribute.Key("heroku.release.creation_timestamp")
-)
-
-// HerokuAppID returns an attribute KeyValue conforming to the "heroku.app.id"
-// semantic conventions. It represents the unique identifier for the application.
-func HerokuAppID(val string) attribute.KeyValue {
- return HerokuAppIDKey.String(val)
-}
-
-// HerokuReleaseCommit returns an attribute KeyValue conforming to the
-// "heroku.release.commit" semantic conventions. It represents the commit hash
-// for the current release.
-func HerokuReleaseCommit(val string) attribute.KeyValue {
- return HerokuReleaseCommitKey.String(val)
-}
-
-// HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming to the
-// "heroku.release.creation_timestamp" semantic conventions. It represents the
-// time and date the release was created.
-func HerokuReleaseCreationTimestamp(val string) attribute.KeyValue {
- return HerokuReleaseCreationTimestampKey.String(val)
-}
-
-// Namespace: host
-const (
- // HostArchKey is the attribute Key conforming to the "host.arch" semantic
- // conventions. It represents the CPU architecture the host system is running
- // on.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- HostArchKey = attribute.Key("host.arch")
-
- // HostCPUCacheL2SizeKey is the attribute Key conforming to the
- // "host.cpu.cache.l2.size" semantic conventions. It represents the amount of
- // level 2 memory cache available to the processor (in Bytes).
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 12288000
- HostCPUCacheL2SizeKey = attribute.Key("host.cpu.cache.l2.size")
-
- // HostCPUFamilyKey is the attribute Key conforming to the "host.cpu.family"
- // semantic conventions. It represents the family or generation of the CPU.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "6", "PA-RISC 1.1e"
- HostCPUFamilyKey = attribute.Key("host.cpu.family")
-
- // HostCPUModelIDKey is the attribute Key conforming to the "host.cpu.model.id"
- // semantic conventions. It represents the model identifier. It provides more
- // granular information about the CPU, distinguishing it from other CPUs within
- // the same family.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "6", "9000/778/B180L"
- HostCPUModelIDKey = attribute.Key("host.cpu.model.id")
-
- // HostCPUModelNameKey is the attribute Key conforming to the
- // "host.cpu.model.name" semantic conventions. It represents the model
- // designation of the processor.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz"
- HostCPUModelNameKey = attribute.Key("host.cpu.model.name")
-
- // HostCPUSteppingKey is the attribute Key conforming to the "host.cpu.stepping"
- // semantic conventions. It represents the stepping or core revisions.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "1", "r1p1"
- HostCPUSteppingKey = attribute.Key("host.cpu.stepping")
-
- // HostCPUVendorIDKey is the attribute Key conforming to the
- // "host.cpu.vendor.id" semantic conventions. It represents the processor
- // manufacturer identifier. A maximum 12-character string.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "GenuineIntel"
- // Note: [CPUID] command returns the vendor ID string in EBX, EDX and ECX
- // registers. Writing these to memory in this order results in a 12-character
- // string.
- //
- // [CPUID]: https://wiki.osdev.org/CPUID
- HostCPUVendorIDKey = attribute.Key("host.cpu.vendor.id")
-
- // HostIDKey is the attribute Key conforming to the "host.id" semantic
- // conventions. It represents the unique host ID. For Cloud, this must be the
- // instance_id assigned by the cloud provider. For non-containerized systems,
- // this should be the `machine-id`. See the table below for the sources to use
- // to determine the `machine-id` based on operating system.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "fdbf79e8af94cb7f9e8df36789187052"
- HostIDKey = attribute.Key("host.id")
-
- // HostImageIDKey is the attribute Key conforming to the "host.image.id"
- // semantic conventions. It represents the VM image ID or host OS image ID. For
- // Cloud, this value is from the provider.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "ami-07b06b442921831e5"
- HostImageIDKey = attribute.Key("host.image.id")
-
- // HostImageNameKey is the attribute Key conforming to the "host.image.name"
- // semantic conventions. It represents the name of the VM image or OS install
- // the host was instantiated from.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "infra-ami-eks-worker-node-7d4ec78312", "CentOS-8-x86_64-1905"
- HostImageNameKey = attribute.Key("host.image.name")
-
- // HostImageVersionKey is the attribute Key conforming to the
- // "host.image.version" semantic conventions. It represents the version string
- // of the VM image or host OS as defined in [Version Attributes].
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "0.1"
- //
- // [Version Attributes]: /docs/resource/README.md#version-attributes
- HostImageVersionKey = attribute.Key("host.image.version")
-
- // HostIPKey is the attribute Key conforming to the "host.ip" semantic
- // conventions. It represents the available IP addresses of the host, excluding
- // loopback interfaces.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "192.168.1.140", "fe80::abc2:4a28:737a:609e"
- // Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6
- // addresses MUST be specified in the [RFC 5952] format.
- //
- // [RFC 5952]: https://www.rfc-editor.org/rfc/rfc5952.html
- HostIPKey = attribute.Key("host.ip")
-
- // HostMacKey is the attribute Key conforming to the "host.mac" semantic
- // conventions. It represents the available MAC addresses of the host, excluding
- // loopback interfaces.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "AC-DE-48-23-45-67", "AC-DE-48-23-45-67-01-9F"
- // Note: MAC Addresses MUST be represented in [IEEE RA hexadecimal form]: as
- // hyphen-separated octets in uppercase hexadecimal form from most to least
- // significant.
- //
- // [IEEE RA hexadecimal form]: https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf
- HostMacKey = attribute.Key("host.mac")
-
- // HostNameKey is the attribute Key conforming to the "host.name" semantic
- // conventions. It represents the name of the host. On Unix systems, it may
- // contain what the hostname command returns, or the fully qualified hostname,
- // or another name specified by the user.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "opentelemetry-test"
- HostNameKey = attribute.Key("host.name")
-
- // HostTypeKey is the attribute Key conforming to the "host.type" semantic
- // conventions. It represents the type of host. For Cloud, this must be the
- // machine type.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "n1-standard-1"
- HostTypeKey = attribute.Key("host.type")
-)
-
-// HostCPUCacheL2Size returns an attribute KeyValue conforming to the
-// "host.cpu.cache.l2.size" semantic conventions. It represents the amount of
-// level 2 memory cache available to the processor (in Bytes).
-func HostCPUCacheL2Size(val int) attribute.KeyValue {
- return HostCPUCacheL2SizeKey.Int(val)
-}
-
-// HostCPUFamily returns an attribute KeyValue conforming to the
-// "host.cpu.family" semantic conventions. It represents the family or generation
-// of the CPU.
-func HostCPUFamily(val string) attribute.KeyValue {
- return HostCPUFamilyKey.String(val)
-}
-
-// HostCPUModelID returns an attribute KeyValue conforming to the
-// "host.cpu.model.id" semantic conventions. It represents the model identifier.
-// It provides more granular information about the CPU, distinguishing it from
-// other CPUs within the same family.
-func HostCPUModelID(val string) attribute.KeyValue {
- return HostCPUModelIDKey.String(val)
-}
-
-// HostCPUModelName returns an attribute KeyValue conforming to the
-// "host.cpu.model.name" semantic conventions. It represents the model
-// designation of the processor.
-func HostCPUModelName(val string) attribute.KeyValue {
- return HostCPUModelNameKey.String(val)
-}
-
-// HostCPUStepping returns an attribute KeyValue conforming to the
-// "host.cpu.stepping" semantic conventions. It represents the stepping or core
-// revisions.
-func HostCPUStepping(val string) attribute.KeyValue {
- return HostCPUSteppingKey.String(val)
-}
-
-// HostCPUVendorID returns an attribute KeyValue conforming to the
-// "host.cpu.vendor.id" semantic conventions. It represents the processor
-// manufacturer identifier. A maximum 12-character string.
-func HostCPUVendorID(val string) attribute.KeyValue {
- return HostCPUVendorIDKey.String(val)
-}
-
-// HostID returns an attribute KeyValue conforming to the "host.id" semantic
-// conventions. It represents the unique host ID. For Cloud, this must be the
-// instance_id assigned by the cloud provider. For non-containerized systems,
-// this should be the `machine-id`. See the table below for the sources to use to
-// determine the `machine-id` based on operating system.
-func HostID(val string) attribute.KeyValue {
- return HostIDKey.String(val)
-}
-
-// HostImageID returns an attribute KeyValue conforming to the "host.image.id"
-// semantic conventions. It represents the VM image ID or host OS image ID. For
-// Cloud, this value is from the provider.
-func HostImageID(val string) attribute.KeyValue {
- return HostImageIDKey.String(val)
-}
-
-// HostImageName returns an attribute KeyValue conforming to the
-// "host.image.name" semantic conventions. It represents the name of the VM image
-// or OS install the host was instantiated from.
-func HostImageName(val string) attribute.KeyValue {
- return HostImageNameKey.String(val)
-}
-
-// HostImageVersion returns an attribute KeyValue conforming to the
-// "host.image.version" semantic conventions. It represents the version string of
-// the VM image or host OS as defined in [Version Attributes].
-//
-// [Version Attributes]: /docs/resource/README.md#version-attributes
-func HostImageVersion(val string) attribute.KeyValue {
- return HostImageVersionKey.String(val)
-}
-
-// HostIP returns an attribute KeyValue conforming to the "host.ip" semantic
-// conventions. It represents the available IP addresses of the host, excluding
-// loopback interfaces.
-func HostIP(val ...string) attribute.KeyValue {
- return HostIPKey.StringSlice(val)
-}
-
-// HostMac returns an attribute KeyValue conforming to the "host.mac" semantic
-// conventions. It represents the available MAC addresses of the host, excluding
-// loopback interfaces.
-func HostMac(val ...string) attribute.KeyValue {
- return HostMacKey.StringSlice(val)
-}
-
-// HostName returns an attribute KeyValue conforming to the "host.name" semantic
-// conventions. It represents the name of the host. On Unix systems, it may
-// contain what the hostname command returns, or the fully qualified hostname, or
-// another name specified by the user.
-func HostName(val string) attribute.KeyValue {
- return HostNameKey.String(val)
-}
-
-// HostType returns an attribute KeyValue conforming to the "host.type" semantic
-// conventions. It represents the type of host. For Cloud, this must be the
-// machine type.
-func HostType(val string) attribute.KeyValue {
- return HostTypeKey.String(val)
-}
-
-// Enum values for host.arch
-var (
- // AMD64
- // Stability: development
- HostArchAMD64 = HostArchKey.String("amd64")
- // ARM32
- // Stability: development
- HostArchARM32 = HostArchKey.String("arm32")
- // ARM64
- // Stability: development
- HostArchARM64 = HostArchKey.String("arm64")
- // Itanium
- // Stability: development
- HostArchIA64 = HostArchKey.String("ia64")
- // 32-bit PowerPC
- // Stability: development
- HostArchPPC32 = HostArchKey.String("ppc32")
- // 64-bit PowerPC
- // Stability: development
- HostArchPPC64 = HostArchKey.String("ppc64")
- // IBM z/Architecture
- // Stability: development
- HostArchS390x = HostArchKey.String("s390x")
- // 32-bit x86
- // Stability: development
- HostArchX86 = HostArchKey.String("x86")
-)
-
-// Namespace: http
-const (
- // HTTPConnectionStateKey is the attribute Key conforming to the
- // "http.connection.state" semantic conventions. It represents the state of the
- // HTTP connection in the HTTP connection pool.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "active", "idle"
- HTTPConnectionStateKey = attribute.Key("http.connection.state")
-
- // HTTPRequestBodySizeKey is the attribute Key conforming to the
- // "http.request.body.size" semantic conventions. It represents the size of the
- // request payload body in bytes. This is the number of bytes transferred
- // excluding headers and is often, but not always, present as the
- // [Content-Length] header. For requests using transport encoding, this should
- // be the compressed size.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length
- HTTPRequestBodySizeKey = attribute.Key("http.request.body.size")
-
- // HTTPRequestMethodKey is the attribute Key conforming to the
- // "http.request.method" semantic conventions. It represents the HTTP request
- // method.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "GET", "POST", "HEAD"
- // Note: HTTP request method value SHOULD be "known" to the instrumentation.
- // By default, this convention defines "known" methods as the ones listed in
- // [RFC9110],
- // the PATCH method defined in [RFC5789]
- // and the QUERY method defined in [httpbis-safe-method-w-body].
- //
- // If the HTTP request method is not known to instrumentation, it MUST set the
- // `http.request.method` attribute to `_OTHER`.
- //
- // If the HTTP instrumentation could end up converting valid HTTP request
- // methods to `_OTHER`, then it MUST provide a way to override
- // the list of known HTTP methods. If this override is done via environment
- // variable, then the environment variable MUST be named
- // OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of
- // case-sensitive known HTTP methods
- // (this list MUST be a full override of the default known method, it is not a
- // list of known methods in addition to the defaults).
- //
- // HTTP method names are case-sensitive and `http.request.method` attribute
- // value MUST match a known HTTP method name exactly.
- // Instrumentations for specific web frameworks that consider HTTP methods to be
- // case insensitive, SHOULD populate a canonical equivalent.
- // Tracing instrumentations that do so, MUST also set
- // `http.request.method_original` to the original value.
- //
- // [RFC9110]: https://www.rfc-editor.org/rfc/rfc9110.html#name-methods
- // [RFC5789]: https://www.rfc-editor.org/rfc/rfc5789.html
- // [httpbis-safe-method-w-body]: https://datatracker.ietf.org/doc/draft-ietf-httpbis-safe-method-w-body/?include_text=1
- HTTPRequestMethodKey = attribute.Key("http.request.method")
-
- // HTTPRequestMethodOriginalKey is the attribute Key conforming to the
- // "http.request.method_original" semantic conventions. It represents the
- // original HTTP method sent by the client in the request line.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "GeT", "ACL", "foo"
- HTTPRequestMethodOriginalKey = attribute.Key("http.request.method_original")
-
- // HTTPRequestResendCountKey is the attribute Key conforming to the
- // "http.request.resend_count" semantic conventions. It represents the ordinal
- // number of request resending attempt (for any reason, including redirects).
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Note: The resend count SHOULD be updated each time an HTTP request gets
- // resent by the client, regardless of what was the cause of the resending (e.g.
- // redirection, authorization failure, 503 Server Unavailable, network issues,
- // or any other).
- HTTPRequestResendCountKey = attribute.Key("http.request.resend_count")
-
- // HTTPRequestSizeKey is the attribute Key conforming to the "http.request.size"
- // semantic conventions. It represents the total size of the request in bytes.
- // This should be the total number of bytes sent over the wire, including the
- // request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and request
- // body if any.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- HTTPRequestSizeKey = attribute.Key("http.request.size")
-
- // HTTPResponseBodySizeKey is the attribute Key conforming to the
- // "http.response.body.size" semantic conventions. It represents the size of the
- // response payload body in bytes. This is the number of bytes transferred
- // excluding headers and is often, but not always, present as the
- // [Content-Length] header. For requests using transport encoding, this should
- // be the compressed size.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length
- HTTPResponseBodySizeKey = attribute.Key("http.response.body.size")
-
- // HTTPResponseSizeKey is the attribute Key conforming to the
- // "http.response.size" semantic conventions. It represents the total size of
- // the response in bytes. This should be the total number of bytes sent over the
- // wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3),
- // headers, and response body and trailers if any.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- HTTPResponseSizeKey = attribute.Key("http.response.size")
-
- // HTTPResponseStatusCodeKey is the attribute Key conforming to the
- // "http.response.status_code" semantic conventions. It represents the
- // [HTTP response status code].
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: 200
- //
- // [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6
- HTTPResponseStatusCodeKey = attribute.Key("http.response.status_code")
-
- // HTTPRouteKey is the attribute Key conforming to the "http.route" semantic
- // conventions. It represents the matched route template for the request. This
- // MUST be low-cardinality and include all static path segments, with dynamic
- // path segments represented with placeholders.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "/users/:userID?", "my-controller/my-action/{id?}"
- // Note: MUST NOT be populated when this is not supported by the HTTP server
- // framework as the route attribute should have low-cardinality and the URI path
- // can NOT substitute it.
- // SHOULD include the [application root] if there is one.
- //
- // A static path segment is a part of the route template with a fixed,
- // low-cardinality value. This includes literal strings like `/users/` and
- // placeholders that
- // are constrained to a finite, predefined set of values, e.g. `{controller}` or
- // `{action}`.
- //
- // A dynamic path segment is a placeholder for a value that can have high
- // cardinality and is not constrained to a predefined list like static path
- // segments.
- //
- // Instrumentations SHOULD use routing information provided by the corresponding
- // web framework. They SHOULD pick the most precise source of routing
- // information and MAY
- // support custom route formatting. Instrumentations SHOULD document the format
- // and the API used to obtain the route string.
- //
- // [application root]: /docs/http/http-spans.md#http-server-definitions
- HTTPRouteKey = attribute.Key("http.route")
-)
-
-// HTTPRequestBodySize returns an attribute KeyValue conforming to the
-// "http.request.body.size" semantic conventions. It represents the size of the
-// request payload body in bytes. This is the number of bytes transferred
-// excluding headers and is often, but not always, present as the
-// [Content-Length] header. For requests using transport encoding, this should be
-// the compressed size.
-//
-// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length
-func HTTPRequestBodySize(val int) attribute.KeyValue {
- return HTTPRequestBodySizeKey.Int(val)
-}
-
-// HTTPRequestHeader returns an attribute KeyValue conforming to the
-// "http.request.header" semantic conventions. It represents the HTTP request
-// headers, `` being the normalized HTTP Header name (lowercase), the value
-// being the header values.
-func HTTPRequestHeader(key string, val ...string) attribute.KeyValue {
- return attribute.StringSlice("http.request.header."+key, val)
-}
-
-// HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the
-// "http.request.method_original" semantic conventions. It represents the
-// original HTTP method sent by the client in the request line.
-func HTTPRequestMethodOriginal(val string) attribute.KeyValue {
- return HTTPRequestMethodOriginalKey.String(val)
-}
-
-// HTTPRequestResendCount returns an attribute KeyValue conforming to the
-// "http.request.resend_count" semantic conventions. It represents the ordinal
-// number of request resending attempt (for any reason, including redirects).
-func HTTPRequestResendCount(val int) attribute.KeyValue {
- return HTTPRequestResendCountKey.Int(val)
-}
-
-// HTTPRequestSize returns an attribute KeyValue conforming to the
-// "http.request.size" semantic conventions. It represents the total size of the
-// request in bytes. This should be the total number of bytes sent over the wire,
-// including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers,
-// and request body if any.
-func HTTPRequestSize(val int) attribute.KeyValue {
- return HTTPRequestSizeKey.Int(val)
-}
-
-// HTTPResponseBodySize returns an attribute KeyValue conforming to the
-// "http.response.body.size" semantic conventions. It represents the size of the
-// response payload body in bytes. This is the number of bytes transferred
-// excluding headers and is often, but not always, present as the
-// [Content-Length] header. For requests using transport encoding, this should be
-// the compressed size.
-//
-// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length
-func HTTPResponseBodySize(val int) attribute.KeyValue {
- return HTTPResponseBodySizeKey.Int(val)
-}
-
-// HTTPResponseHeader returns an attribute KeyValue conforming to the
-// "http.response.header" semantic conventions. It represents the HTTP response
-// headers, `` being the normalized HTTP Header name (lowercase), the value
-// being the header values.
-func HTTPResponseHeader(key string, val ...string) attribute.KeyValue {
- return attribute.StringSlice("http.response.header."+key, val)
-}
-
-// HTTPResponseSize returns an attribute KeyValue conforming to the
-// "http.response.size" semantic conventions. It represents the total size of the
-// response in bytes. This should be the total number of bytes sent over the
-// wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3),
-// headers, and response body and trailers if any.
-func HTTPResponseSize(val int) attribute.KeyValue {
- return HTTPResponseSizeKey.Int(val)
-}
-
-// HTTPResponseStatusCode returns an attribute KeyValue conforming to the
-// "http.response.status_code" semantic conventions. It represents the
-// [HTTP response status code].
-//
-// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6
-func HTTPResponseStatusCode(val int) attribute.KeyValue {
- return HTTPResponseStatusCodeKey.Int(val)
-}
-
-// HTTPRoute returns an attribute KeyValue conforming to the "http.route"
-// semantic conventions. It represents the matched route template for the
-// request. This MUST be low-cardinality and include all static path segments,
-// with dynamic path segments represented with placeholders.
-func HTTPRoute(val string) attribute.KeyValue {
- return HTTPRouteKey.String(val)
-}
-
-// Enum values for http.connection.state
-var (
- // active state.
- // Stability: development
- HTTPConnectionStateActive = HTTPConnectionStateKey.String("active")
- // idle state.
- // Stability: development
- HTTPConnectionStateIdle = HTTPConnectionStateKey.String("idle")
-)
-
-// Enum values for http.request.method
-var (
- // CONNECT method.
- // Stability: stable
- HTTPRequestMethodConnect = HTTPRequestMethodKey.String("CONNECT")
- // DELETE method.
- // Stability: stable
- HTTPRequestMethodDelete = HTTPRequestMethodKey.String("DELETE")
- // GET method.
- // Stability: stable
- HTTPRequestMethodGet = HTTPRequestMethodKey.String("GET")
- // HEAD method.
- // Stability: stable
- HTTPRequestMethodHead = HTTPRequestMethodKey.String("HEAD")
- // OPTIONS method.
- // Stability: stable
- HTTPRequestMethodOptions = HTTPRequestMethodKey.String("OPTIONS")
- // PATCH method.
- // Stability: stable
- HTTPRequestMethodPatch = HTTPRequestMethodKey.String("PATCH")
- // POST method.
- // Stability: stable
- HTTPRequestMethodPost = HTTPRequestMethodKey.String("POST")
- // PUT method.
- // Stability: stable
- HTTPRequestMethodPut = HTTPRequestMethodKey.String("PUT")
- // TRACE method.
- // Stability: stable
- HTTPRequestMethodTrace = HTTPRequestMethodKey.String("TRACE")
- // QUERY method.
- // Stability: development
- HTTPRequestMethodQuery = HTTPRequestMethodKey.String("QUERY")
- // Any HTTP method that the instrumentation has no prior knowledge of.
- // Stability: stable
- HTTPRequestMethodOther = HTTPRequestMethodKey.String("_OTHER")
-)
-
-// Namespace: hw
-const (
- // HwBatteryCapacityKey is the attribute Key conforming to the
- // "hw.battery.capacity" semantic conventions. It represents the design capacity
- // in Watts-hours or Amper-hours.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "9.3Ah", "50Wh"
- HwBatteryCapacityKey = attribute.Key("hw.battery.capacity")
-
- // HwBatteryChemistryKey is the attribute Key conforming to the
- // "hw.battery.chemistry" semantic conventions. It represents the battery
- // [chemistry], e.g. Lithium-Ion, Nickel-Cadmium, etc.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Li-ion", "NiMH"
- //
- // [chemistry]: https://schemas.dmtf.org/wbem/cim-html/2.31.0/CIM_Battery.html
- HwBatteryChemistryKey = attribute.Key("hw.battery.chemistry")
-
- // HwBatteryStateKey is the attribute Key conforming to the "hw.battery.state"
- // semantic conventions. It represents the current state of the battery.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- HwBatteryStateKey = attribute.Key("hw.battery.state")
-
- // HwBiosVersionKey is the attribute Key conforming to the "hw.bios_version"
- // semantic conventions. It represents the BIOS version of the hardware
- // component.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "1.2.3"
- HwBiosVersionKey = attribute.Key("hw.bios_version")
-
- // HwDriverVersionKey is the attribute Key conforming to the "hw.driver_version"
- // semantic conventions. It represents the driver version for the hardware
- // component.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "10.2.1-3"
- HwDriverVersionKey = attribute.Key("hw.driver_version")
-
- // HwEnclosureTypeKey is the attribute Key conforming to the "hw.enclosure.type"
- // semantic conventions. It represents the type of the enclosure (useful for
- // modular systems).
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Computer", "Storage", "Switch"
- HwEnclosureTypeKey = attribute.Key("hw.enclosure.type")
-
- // HwFirmwareVersionKey is the attribute Key conforming to the
- // "hw.firmware_version" semantic conventions. It represents the firmware
- // version of the hardware component.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "2.0.1"
- HwFirmwareVersionKey = attribute.Key("hw.firmware_version")
-
- // HwGpuTaskKey is the attribute Key conforming to the "hw.gpu.task" semantic
- // conventions. It represents the type of task the GPU is performing.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- HwGpuTaskKey = attribute.Key("hw.gpu.task")
-
- // HwIDKey is the attribute Key conforming to the "hw.id" semantic conventions.
- // It represents an identifier for the hardware component, unique within the
- // monitored host.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "win32battery_battery_testsysa33_1"
- HwIDKey = attribute.Key("hw.id")
-
- // HwLimitTypeKey is the attribute Key conforming to the "hw.limit_type"
- // semantic conventions. It represents the type of limit for hardware
- // components.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- HwLimitTypeKey = attribute.Key("hw.limit_type")
-
- // HwLogicalDiskRaidLevelKey is the attribute Key conforming to the
- // "hw.logical_disk.raid_level" semantic conventions. It represents the RAID
- // Level of the logical disk.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "RAID0+1", "RAID5", "RAID10"
- HwLogicalDiskRaidLevelKey = attribute.Key("hw.logical_disk.raid_level")
-
- // HwLogicalDiskStateKey is the attribute Key conforming to the
- // "hw.logical_disk.state" semantic conventions. It represents the state of the
- // logical disk space usage.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- HwLogicalDiskStateKey = attribute.Key("hw.logical_disk.state")
-
- // HwMemoryTypeKey is the attribute Key conforming to the "hw.memory.type"
- // semantic conventions. It represents the type of the memory module.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "DDR4", "DDR5", "LPDDR5"
- HwMemoryTypeKey = attribute.Key("hw.memory.type")
-
- // HwModelKey is the attribute Key conforming to the "hw.model" semantic
- // conventions. It represents the descriptive model name of the hardware
- // component.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "PERC H740P", "Intel(R) Core(TM) i7-10700K", "Dell XPS 15 Battery"
- HwModelKey = attribute.Key("hw.model")
-
- // HwNameKey is the attribute Key conforming to the "hw.name" semantic
- // conventions. It represents an easily-recognizable name for the hardware
- // component.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "eth0"
- HwNameKey = attribute.Key("hw.name")
-
- // HwNetworkLogicalAddressesKey is the attribute Key conforming to the
- // "hw.network.logical_addresses" semantic conventions. It represents the
- // logical addresses of the adapter (e.g. IP address, or WWPN).
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "172.16.8.21", "57.11.193.42"
- HwNetworkLogicalAddressesKey = attribute.Key("hw.network.logical_addresses")
-
- // HwNetworkPhysicalAddressKey is the attribute Key conforming to the
- // "hw.network.physical_address" semantic conventions. It represents the
- // physical address of the adapter (e.g. MAC address, or WWNN).
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "00-90-F5-E9-7B-36"
- HwNetworkPhysicalAddressKey = attribute.Key("hw.network.physical_address")
-
- // HwParentKey is the attribute Key conforming to the "hw.parent" semantic
- // conventions. It represents the unique identifier of the parent component
- // (typically the `hw.id` attribute of the enclosure, or disk controller).
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "dellStorage_perc_0"
- HwParentKey = attribute.Key("hw.parent")
-
- // HwPhysicalDiskSmartAttributeKey is the attribute Key conforming to the
- // "hw.physical_disk.smart_attribute" semantic conventions. It represents the
- // [S.M.A.R.T.] (Self-Monitoring, Analysis, and Reporting Technology) attribute
- // of the physical disk.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Spin Retry Count", "Seek Error Rate", "Raw Read Error Rate"
- //
- // [S.M.A.R.T.]: https://wikipedia.org/wiki/S.M.A.R.T.
- HwPhysicalDiskSmartAttributeKey = attribute.Key("hw.physical_disk.smart_attribute")
-
- // HwPhysicalDiskStateKey is the attribute Key conforming to the
- // "hw.physical_disk.state" semantic conventions. It represents the state of the
- // physical disk endurance utilization.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- HwPhysicalDiskStateKey = attribute.Key("hw.physical_disk.state")
-
- // HwPhysicalDiskTypeKey is the attribute Key conforming to the
- // "hw.physical_disk.type" semantic conventions. It represents the type of the
- // physical disk.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "HDD", "SSD", "10K"
- HwPhysicalDiskTypeKey = attribute.Key("hw.physical_disk.type")
-
- // HwSensorLocationKey is the attribute Key conforming to the
- // "hw.sensor_location" semantic conventions. It represents the location of the
- // sensor.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "cpu0", "ps1", "INLET", "CPU0_DIE", "AMBIENT", "MOTHERBOARD", "PS0
- // V3_3", "MAIN_12V", "CPU_VCORE"
- HwSensorLocationKey = attribute.Key("hw.sensor_location")
-
- // HwSerialNumberKey is the attribute Key conforming to the "hw.serial_number"
- // semantic conventions. It represents the serial number of the hardware
- // component.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "CNFCP0123456789"
- HwSerialNumberKey = attribute.Key("hw.serial_number")
-
- // HwStateKey is the attribute Key conforming to the "hw.state" semantic
- // conventions. It represents the current state of the component.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- HwStateKey = attribute.Key("hw.state")
-
- // HwTapeDriveOperationTypeKey is the attribute Key conforming to the
- // "hw.tape_drive.operation_type" semantic conventions. It represents the type
- // of tape drive operation.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- HwTapeDriveOperationTypeKey = attribute.Key("hw.tape_drive.operation_type")
-
- // HwTypeKey is the attribute Key conforming to the "hw.type" semantic
- // conventions. It represents the type of the component.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // Note: Describes the category of the hardware component for which `hw.state`
- // is being reported. For example, `hw.type=temperature` along with
- // `hw.state=degraded` would indicate that the temperature of the hardware
- // component has been reported as `degraded`.
- HwTypeKey = attribute.Key("hw.type")
-
- // HwVendorKey is the attribute Key conforming to the "hw.vendor" semantic
- // conventions. It represents the vendor name of the hardware component.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Dell", "HP", "Intel", "AMD", "LSI", "Lenovo"
- HwVendorKey = attribute.Key("hw.vendor")
-)
-
-// HwBatteryCapacity returns an attribute KeyValue conforming to the
-// "hw.battery.capacity" semantic conventions. It represents the design capacity
-// in Watts-hours or Amper-hours.
-func HwBatteryCapacity(val string) attribute.KeyValue {
- return HwBatteryCapacityKey.String(val)
-}
-
-// HwBatteryChemistry returns an attribute KeyValue conforming to the
-// "hw.battery.chemistry" semantic conventions. It represents the battery
-// [chemistry], e.g. Lithium-Ion, Nickel-Cadmium, etc.
-//
-// [chemistry]: https://schemas.dmtf.org/wbem/cim-html/2.31.0/CIM_Battery.html
-func HwBatteryChemistry(val string) attribute.KeyValue {
- return HwBatteryChemistryKey.String(val)
-}
-
-// HwBiosVersion returns an attribute KeyValue conforming to the
-// "hw.bios_version" semantic conventions. It represents the BIOS version of the
-// hardware component.
-func HwBiosVersion(val string) attribute.KeyValue {
- return HwBiosVersionKey.String(val)
-}
-
-// HwDriverVersion returns an attribute KeyValue conforming to the
-// "hw.driver_version" semantic conventions. It represents the driver version for
-// the hardware component.
-func HwDriverVersion(val string) attribute.KeyValue {
- return HwDriverVersionKey.String(val)
-}
-
-// HwEnclosureType returns an attribute KeyValue conforming to the
-// "hw.enclosure.type" semantic conventions. It represents the type of the
-// enclosure (useful for modular systems).
-func HwEnclosureType(val string) attribute.KeyValue {
- return HwEnclosureTypeKey.String(val)
-}
-
-// HwFirmwareVersion returns an attribute KeyValue conforming to the
-// "hw.firmware_version" semantic conventions. It represents the firmware version
-// of the hardware component.
-func HwFirmwareVersion(val string) attribute.KeyValue {
- return HwFirmwareVersionKey.String(val)
-}
-
-// HwID returns an attribute KeyValue conforming to the "hw.id" semantic
-// conventions. It represents an identifier for the hardware component, unique
-// within the monitored host.
-func HwID(val string) attribute.KeyValue {
- return HwIDKey.String(val)
-}
-
-// HwLogicalDiskRaidLevel returns an attribute KeyValue conforming to the
-// "hw.logical_disk.raid_level" semantic conventions. It represents the RAID
-// Level of the logical disk.
-func HwLogicalDiskRaidLevel(val string) attribute.KeyValue {
- return HwLogicalDiskRaidLevelKey.String(val)
-}
-
-// HwMemoryType returns an attribute KeyValue conforming to the "hw.memory.type"
-// semantic conventions. It represents the type of the memory module.
-func HwMemoryType(val string) attribute.KeyValue {
- return HwMemoryTypeKey.String(val)
-}
-
-// HwModel returns an attribute KeyValue conforming to the "hw.model" semantic
-// conventions. It represents the descriptive model name of the hardware
-// component.
-func HwModel(val string) attribute.KeyValue {
- return HwModelKey.String(val)
-}
-
-// HwName returns an attribute KeyValue conforming to the "hw.name" semantic
-// conventions. It represents an easily-recognizable name for the hardware
-// component.
-func HwName(val string) attribute.KeyValue {
- return HwNameKey.String(val)
-}
-
-// HwNetworkLogicalAddresses returns an attribute KeyValue conforming to the
-// "hw.network.logical_addresses" semantic conventions. It represents the logical
-// addresses of the adapter (e.g. IP address, or WWPN).
-func HwNetworkLogicalAddresses(val ...string) attribute.KeyValue {
- return HwNetworkLogicalAddressesKey.StringSlice(val)
-}
-
-// HwNetworkPhysicalAddress returns an attribute KeyValue conforming to the
-// "hw.network.physical_address" semantic conventions. It represents the physical
-// address of the adapter (e.g. MAC address, or WWNN).
-func HwNetworkPhysicalAddress(val string) attribute.KeyValue {
- return HwNetworkPhysicalAddressKey.String(val)
-}
-
-// HwParent returns an attribute KeyValue conforming to the "hw.parent" semantic
-// conventions. It represents the unique identifier of the parent component
-// (typically the `hw.id` attribute of the enclosure, or disk controller).
-func HwParent(val string) attribute.KeyValue {
- return HwParentKey.String(val)
-}
-
-// HwPhysicalDiskSmartAttribute returns an attribute KeyValue conforming to the
-// "hw.physical_disk.smart_attribute" semantic conventions. It represents the
-// [S.M.A.R.T.] (Self-Monitoring, Analysis, and Reporting Technology) attribute
-// of the physical disk.
-//
-// [S.M.A.R.T.]: https://wikipedia.org/wiki/S.M.A.R.T.
-func HwPhysicalDiskSmartAttribute(val string) attribute.KeyValue {
- return HwPhysicalDiskSmartAttributeKey.String(val)
-}
-
-// HwPhysicalDiskType returns an attribute KeyValue conforming to the
-// "hw.physical_disk.type" semantic conventions. It represents the type of the
-// physical disk.
-func HwPhysicalDiskType(val string) attribute.KeyValue {
- return HwPhysicalDiskTypeKey.String(val)
-}
-
-// HwSensorLocation returns an attribute KeyValue conforming to the
-// "hw.sensor_location" semantic conventions. It represents the location of the
-// sensor.
-func HwSensorLocation(val string) attribute.KeyValue {
- return HwSensorLocationKey.String(val)
-}
-
-// HwSerialNumber returns an attribute KeyValue conforming to the
-// "hw.serial_number" semantic conventions. It represents the serial number of
-// the hardware component.
-func HwSerialNumber(val string) attribute.KeyValue {
- return HwSerialNumberKey.String(val)
-}
-
-// HwVendor returns an attribute KeyValue conforming to the "hw.vendor" semantic
-// conventions. It represents the vendor name of the hardware component.
-func HwVendor(val string) attribute.KeyValue {
- return HwVendorKey.String(val)
-}
-
-// Enum values for hw.battery.state
-var (
- // Charging
- // Stability: development
- HwBatteryStateCharging = HwBatteryStateKey.String("charging")
- // Discharging
- // Stability: development
- HwBatteryStateDischarging = HwBatteryStateKey.String("discharging")
-)
-
-// Enum values for hw.gpu.task
-var (
- // Decoder
- // Stability: development
- HwGpuTaskDecoder = HwGpuTaskKey.String("decoder")
- // Encoder
- // Stability: development
- HwGpuTaskEncoder = HwGpuTaskKey.String("encoder")
- // General
- // Stability: development
- HwGpuTaskGeneral = HwGpuTaskKey.String("general")
-)
-
-// Enum values for hw.limit_type
-var (
- // Critical
- // Stability: development
- HwLimitTypeCritical = HwLimitTypeKey.String("critical")
- // Degraded
- // Stability: development
- HwLimitTypeDegraded = HwLimitTypeKey.String("degraded")
- // High Critical
- // Stability: development
- HwLimitTypeHighCritical = HwLimitTypeKey.String("high.critical")
- // High Degraded
- // Stability: development
- HwLimitTypeHighDegraded = HwLimitTypeKey.String("high.degraded")
- // Low Critical
- // Stability: development
- HwLimitTypeLowCritical = HwLimitTypeKey.String("low.critical")
- // Low Degraded
- // Stability: development
- HwLimitTypeLowDegraded = HwLimitTypeKey.String("low.degraded")
- // Maximum
- // Stability: development
- HwLimitTypeMax = HwLimitTypeKey.String("max")
- // Throttled
- // Stability: development
- HwLimitTypeThrottled = HwLimitTypeKey.String("throttled")
- // Turbo
- // Stability: development
- HwLimitTypeTurbo = HwLimitTypeKey.String("turbo")
-)
-
-// Enum values for hw.logical_disk.state
-var (
- // Used
- // Stability: development
- HwLogicalDiskStateUsed = HwLogicalDiskStateKey.String("used")
- // Free
- // Stability: development
- HwLogicalDiskStateFree = HwLogicalDiskStateKey.String("free")
-)
-
-// Enum values for hw.physical_disk.state
-var (
- // Remaining
- // Stability: development
- HwPhysicalDiskStateRemaining = HwPhysicalDiskStateKey.String("remaining")
-)
-
-// Enum values for hw.state
-var (
- // Degraded
- // Stability: development
- HwStateDegraded = HwStateKey.String("degraded")
- // Failed
- // Stability: development
- HwStateFailed = HwStateKey.String("failed")
- // Needs Cleaning
- // Stability: development
- HwStateNeedsCleaning = HwStateKey.String("needs_cleaning")
- // OK
- // Stability: development
- HwStateOk = HwStateKey.String("ok")
- // Predicted Failure
- // Stability: development
- HwStatePredictedFailure = HwStateKey.String("predicted_failure")
-)
-
-// Enum values for hw.tape_drive.operation_type
-var (
- // Mount
- // Stability: development
- HwTapeDriveOperationTypeMount = HwTapeDriveOperationTypeKey.String("mount")
- // Unmount
- // Stability: development
- HwTapeDriveOperationTypeUnmount = HwTapeDriveOperationTypeKey.String("unmount")
- // Clean
- // Stability: development
- HwTapeDriveOperationTypeClean = HwTapeDriveOperationTypeKey.String("clean")
-)
-
-// Enum values for hw.type
-var (
- // Battery
- // Stability: development
- HwTypeBattery = HwTypeKey.String("battery")
- // CPU
- // Stability: development
- HwTypeCPU = HwTypeKey.String("cpu")
- // Disk controller
- // Stability: development
- HwTypeDiskController = HwTypeKey.String("disk_controller")
- // Enclosure
- // Stability: development
- HwTypeEnclosure = HwTypeKey.String("enclosure")
- // Fan
- // Stability: development
- HwTypeFan = HwTypeKey.String("fan")
- // GPU
- // Stability: development
- HwTypeGpu = HwTypeKey.String("gpu")
- // Logical disk
- // Stability: development
- HwTypeLogicalDisk = HwTypeKey.String("logical_disk")
- // Memory
- // Stability: development
- HwTypeMemory = HwTypeKey.String("memory")
- // Network
- // Stability: development
- HwTypeNetwork = HwTypeKey.String("network")
- // Physical disk
- // Stability: development
- HwTypePhysicalDisk = HwTypeKey.String("physical_disk")
- // Power supply
- // Stability: development
- HwTypePowerSupply = HwTypeKey.String("power_supply")
- // Tape drive
- // Stability: development
- HwTypeTapeDrive = HwTypeKey.String("tape_drive")
- // Temperature
- // Stability: development
- HwTypeTemperature = HwTypeKey.String("temperature")
- // Voltage
- // Stability: development
- HwTypeVoltage = HwTypeKey.String("voltage")
-)
-
-// Namespace: ios
-const (
- // IOSAppStateKey is the attribute Key conforming to the "ios.app.state"
- // semantic conventions. It represents the this attribute represents the state
- // of the application.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // Note: The iOS lifecycle states are defined in the
- // [UIApplicationDelegate documentation], and from which the `OS terminology`
- // column values are derived.
- //
- // [UIApplicationDelegate documentation]: https://developer.apple.com/documentation/uikit/uiapplicationdelegate
- IOSAppStateKey = attribute.Key("ios.app.state")
-)
-
-// Enum values for ios.app.state
-var (
- // The app has become `active`. Associated with UIKit notification
- // `applicationDidBecomeActive`.
- //
- // Stability: development
- IOSAppStateActive = IOSAppStateKey.String("active")
- // The app is now `inactive`. Associated with UIKit notification
- // `applicationWillResignActive`.
- //
- // Stability: development
- IOSAppStateInactive = IOSAppStateKey.String("inactive")
- // The app is now in the background. This value is associated with UIKit
- // notification `applicationDidEnterBackground`.
- //
- // Stability: development
- IOSAppStateBackground = IOSAppStateKey.String("background")
- // The app is now in the foreground. This value is associated with UIKit
- // notification `applicationWillEnterForeground`.
- //
- // Stability: development
- IOSAppStateForeground = IOSAppStateKey.String("foreground")
- // The app is about to terminate. Associated with UIKit notification
- // `applicationWillTerminate`.
- //
- // Stability: development
- IOSAppStateTerminate = IOSAppStateKey.String("terminate")
-)
-
-// Namespace: jsonrpc
-const (
- // JSONRPCProtocolVersionKey is the attribute Key conforming to the
- // "jsonrpc.protocol.version" semantic conventions. It represents the protocol
- // version, as specified in the `jsonrpc` property of the request and its
- // corresponding response.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "2.0", "1.0"
- JSONRPCProtocolVersionKey = attribute.Key("jsonrpc.protocol.version")
-
- // JSONRPCRequestIDKey is the attribute Key conforming to the
- // "jsonrpc.request.id" semantic conventions. It represents a string
- // representation of the `id` property of the request and its corresponding
- // response.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "10", "request-7"
- // Note: Under the [JSON-RPC specification], the `id` property may be a string,
- // number, null, or omitted entirely. When omitted, the request is treated as a
- // notification. Using `null` is not equivalent to omitting the `id`, but it is
- // discouraged.
- // Instrumentations SHOULD NOT capture this attribute when the `id` is `null` or
- // omitted.
- //
- // [JSON-RPC specification]: https://www.jsonrpc.org/specification
- JSONRPCRequestIDKey = attribute.Key("jsonrpc.request.id")
-)
-
-// JSONRPCProtocolVersion returns an attribute KeyValue conforming to the
-// "jsonrpc.protocol.version" semantic conventions. It represents the protocol
-// version, as specified in the `jsonrpc` property of the request and its
-// corresponding response.
-func JSONRPCProtocolVersion(val string) attribute.KeyValue {
- return JSONRPCProtocolVersionKey.String(val)
-}
-
-// JSONRPCRequestID returns an attribute KeyValue conforming to the
-// "jsonrpc.request.id" semantic conventions. It represents a string
-// representation of the `id` property of the request and its corresponding
-// response.
-func JSONRPCRequestID(val string) attribute.KeyValue {
- return JSONRPCRequestIDKey.String(val)
-}
-
-// Namespace: k8s
-const (
- // K8SClusterNameKey is the attribute Key conforming to the "k8s.cluster.name"
- // semantic conventions. It represents the name of the cluster.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "opentelemetry-cluster"
- K8SClusterNameKey = attribute.Key("k8s.cluster.name")
-
- // K8SClusterUIDKey is the attribute Key conforming to the "k8s.cluster.uid"
- // semantic conventions. It represents a pseudo-ID for the cluster, set to the
- // UID of the `kube-system` namespace.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d"
- // Note: K8s doesn't have support for obtaining a cluster ID. If this is ever
- // added, we will recommend collecting the `k8s.cluster.uid` through the
- // official APIs. In the meantime, we are able to use the `uid` of the
- // `kube-system` namespace as a proxy for cluster ID. Read on for the
- // rationale.
- //
- // Every object created in a K8s cluster is assigned a distinct UID. The
- // `kube-system` namespace is used by Kubernetes itself and will exist
- // for the lifetime of the cluster. Using the `uid` of the `kube-system`
- // namespace is a reasonable proxy for the K8s ClusterID as it will only
- // change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are
- // UUIDs as standardized by
- // [ISO/IEC 9834-8 and ITU-T X.667].
- // Which states:
- //
- // > If generated according to one of the mechanisms defined in Rec.
- // > ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be
- // > different from all other UUIDs generated before 3603 A.D., or is
- // > extremely likely to be different (depending on the mechanism chosen).
- //
- // Therefore, UIDs between clusters should be extremely unlikely to
- // conflict.
- //
- // [ISO/IEC 9834-8 and ITU-T X.667]: https://www.itu.int/ITU-T/studygroups/com17/oid.html
- K8SClusterUIDKey = attribute.Key("k8s.cluster.uid")
-
- // K8SContainerNameKey is the attribute Key conforming to the
- // "k8s.container.name" semantic conventions. It represents the name of the
- // Container from Pod specification, must be unique within a Pod. Container
- // runtime usually uses different globally unique name (`container.name`).
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "redis"
- K8SContainerNameKey = attribute.Key("k8s.container.name")
-
- // K8SContainerRestartCountKey is the attribute Key conforming to the
- // "k8s.container.restart_count" semantic conventions. It represents the number
- // of times the container was restarted. This attribute can be used to identify
- // a particular container (running or stopped) within a container spec.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples:
- K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count")
-
- // K8SContainerStatusLastTerminatedReasonKey is the attribute Key conforming to
- // the "k8s.container.status.last_terminated_reason" semantic conventions. It
- // represents the last terminated reason of the Container.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Evicted", "Error"
- K8SContainerStatusLastTerminatedReasonKey = attribute.Key("k8s.container.status.last_terminated_reason")
-
- // K8SContainerStatusReasonKey is the attribute Key conforming to the
- // "k8s.container.status.reason" semantic conventions. It represents the reason
- // for the container state. Corresponds to the `reason` field of the:
- // [K8s ContainerStateWaiting] or [K8s ContainerStateTerminated].
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "ContainerCreating", "CrashLoopBackOff",
- // "CreateContainerConfigError", "ErrImagePull", "ImagePullBackOff",
- // "OOMKilled", "Completed", "Error", "ContainerCannotRun"
- //
- // [K8s ContainerStateWaiting]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstatewaiting-v1-core
- // [K8s ContainerStateTerminated]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstateterminated-v1-core
- K8SContainerStatusReasonKey = attribute.Key("k8s.container.status.reason")
-
- // K8SContainerStatusStateKey is the attribute Key conforming to the
- // "k8s.container.status.state" semantic conventions. It represents the state of
- // the container. [K8s ContainerState].
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "terminated", "running", "waiting"
- //
- // [K8s ContainerState]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstate-v1-core
- K8SContainerStatusStateKey = attribute.Key("k8s.container.status.state")
-
- // K8SCronJobNameKey is the attribute Key conforming to the "k8s.cronjob.name"
- // semantic conventions. It represents the name of the CronJob.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "opentelemetry"
- K8SCronJobNameKey = attribute.Key("k8s.cronjob.name")
-
- // K8SCronJobUIDKey is the attribute Key conforming to the "k8s.cronjob.uid"
- // semantic conventions. It represents the UID of the CronJob.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
- K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid")
-
- // K8SDaemonSetNameKey is the attribute Key conforming to the
- // "k8s.daemonset.name" semantic conventions. It represents the name of the
- // DaemonSet.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "opentelemetry"
- K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name")
-
- // K8SDaemonSetUIDKey is the attribute Key conforming to the "k8s.daemonset.uid"
- // semantic conventions. It represents the UID of the DaemonSet.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
- K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid")
-
- // K8SDeploymentNameKey is the attribute Key conforming to the
- // "k8s.deployment.name" semantic conventions. It represents the name of the
- // Deployment.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "opentelemetry"
- K8SDeploymentNameKey = attribute.Key("k8s.deployment.name")
-
- // K8SDeploymentUIDKey is the attribute Key conforming to the
- // "k8s.deployment.uid" semantic conventions. It represents the UID of the
- // Deployment.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
- K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid")
-
- // K8SHPAMetricTypeKey is the attribute Key conforming to the
- // "k8s.hpa.metric.type" semantic conventions. It represents the type of metric
- // source for the horizontal pod autoscaler.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Resource", "ContainerResource"
- // Note: This attribute reflects the `type` field of spec.metrics[] in the HPA.
- K8SHPAMetricTypeKey = attribute.Key("k8s.hpa.metric.type")
-
- // K8SHPANameKey is the attribute Key conforming to the "k8s.hpa.name" semantic
- // conventions. It represents the name of the horizontal pod autoscaler.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "opentelemetry"
- K8SHPANameKey = attribute.Key("k8s.hpa.name")
-
- // K8SHPAScaletargetrefAPIVersionKey is the attribute Key conforming to the
- // "k8s.hpa.scaletargetref.api_version" semantic conventions. It represents the
- // API version of the target resource to scale for the HorizontalPodAutoscaler.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "apps/v1", "autoscaling/v2"
- // Note: This maps to the `apiVersion` field in the `scaleTargetRef` of the HPA
- // spec.
- K8SHPAScaletargetrefAPIVersionKey = attribute.Key("k8s.hpa.scaletargetref.api_version")
-
- // K8SHPAScaletargetrefKindKey is the attribute Key conforming to the
- // "k8s.hpa.scaletargetref.kind" semantic conventions. It represents the kind of
- // the target resource to scale for the HorizontalPodAutoscaler.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Deployment", "StatefulSet"
- // Note: This maps to the `kind` field in the `scaleTargetRef` of the HPA spec.
- K8SHPAScaletargetrefKindKey = attribute.Key("k8s.hpa.scaletargetref.kind")
-
- // K8SHPAScaletargetrefNameKey is the attribute Key conforming to the
- // "k8s.hpa.scaletargetref.name" semantic conventions. It represents the name of
- // the target resource to scale for the HorizontalPodAutoscaler.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "my-deployment", "my-statefulset"
- // Note: This maps to the `name` field in the `scaleTargetRef` of the HPA spec.
- K8SHPAScaletargetrefNameKey = attribute.Key("k8s.hpa.scaletargetref.name")
-
- // K8SHPAUIDKey is the attribute Key conforming to the "k8s.hpa.uid" semantic
- // conventions. It represents the UID of the horizontal pod autoscaler.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
- K8SHPAUIDKey = attribute.Key("k8s.hpa.uid")
-
- // K8SHugepageSizeKey is the attribute Key conforming to the "k8s.hugepage.size"
- // semantic conventions. It represents the size (identifier) of the K8s huge
- // page.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "2Mi"
- K8SHugepageSizeKey = attribute.Key("k8s.hugepage.size")
-
- // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name" semantic
- // conventions. It represents the name of the Job.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "opentelemetry"
- K8SJobNameKey = attribute.Key("k8s.job.name")
-
- // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid" semantic
- // conventions. It represents the UID of the Job.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
- K8SJobUIDKey = attribute.Key("k8s.job.uid")
-
- // K8SNamespaceNameKey is the attribute Key conforming to the
- // "k8s.namespace.name" semantic conventions. It represents the name of the
- // namespace that the pod is running in.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "default"
- K8SNamespaceNameKey = attribute.Key("k8s.namespace.name")
-
- // K8SNamespacePhaseKey is the attribute Key conforming to the
- // "k8s.namespace.phase" semantic conventions. It represents the phase of the
- // K8s namespace.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "active", "terminating"
- // Note: This attribute aligns with the `phase` field of the
- // [K8s NamespaceStatus]
- //
- // [K8s NamespaceStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#namespacestatus-v1-core
- K8SNamespacePhaseKey = attribute.Key("k8s.namespace.phase")
-
- // K8SNodeConditionStatusKey is the attribute Key conforming to the
- // "k8s.node.condition.status" semantic conventions. It represents the status of
- // the condition, one of True, False, Unknown.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "true", "false", "unknown"
- // Note: This attribute aligns with the `status` field of the
- // [NodeCondition]
- //
- // [NodeCondition]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#nodecondition-v1-core
- K8SNodeConditionStatusKey = attribute.Key("k8s.node.condition.status")
-
- // K8SNodeConditionTypeKey is the attribute Key conforming to the
- // "k8s.node.condition.type" semantic conventions. It represents the condition
- // type of a K8s Node.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Ready", "DiskPressure"
- // Note: K8s Node conditions as described
- // by [K8s documentation].
- //
- // This attribute aligns with the `type` field of the
- // [NodeCondition]
- //
- // The set of possible values is not limited to those listed here. Managed
- // Kubernetes environments,
- // or custom controllers MAY introduce additional node condition types.
- // When this occurs, the exact value as reported by the Kubernetes API SHOULD be
- // used.
- //
- // [K8s documentation]: https://v1-32.docs.kubernetes.io/docs/reference/node/node-status/#condition
- // [NodeCondition]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#nodecondition-v1-core
- K8SNodeConditionTypeKey = attribute.Key("k8s.node.condition.type")
-
- // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name"
- // semantic conventions. It represents the name of the Node.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "node-1"
- K8SNodeNameKey = attribute.Key("k8s.node.name")
-
- // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid" semantic
- // conventions. It represents the UID of the Node.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2"
- K8SNodeUIDKey = attribute.Key("k8s.node.uid")
-
- // K8SPodHostnameKey is the attribute Key conforming to the "k8s.pod.hostname"
- // semantic conventions. It represents the specifies the hostname of the Pod.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "collector-gateway"
- // Note: The K8s Pod spec has an optional hostname field, which can be used to
- // specify a hostname.
- // Refer to [K8s docs]
- // for more information about this field.
- //
- // This attribute aligns with the `hostname` field of the
- // [K8s PodSpec].
- //
- // [K8s docs]: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-hostname-and-subdomain-field
- // [K8s PodSpec]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podspec-v1-core
- K8SPodHostnameKey = attribute.Key("k8s.pod.hostname")
-
- // K8SPodIPKey is the attribute Key conforming to the "k8s.pod.ip" semantic
- // conventions. It represents the IP address allocated to the Pod.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "172.18.0.2"
- // Note: This attribute aligns with the `podIP` field of the
- // [K8s PodStatus].
- //
- // [K8s PodStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podstatus-v1-core
- K8SPodIPKey = attribute.Key("k8s.pod.ip")
-
- // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name" semantic
- // conventions. It represents the name of the Pod.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "opentelemetry-pod-autoconf"
- K8SPodNameKey = attribute.Key("k8s.pod.name")
-
- // K8SPodStartTimeKey is the attribute Key conforming to the
- // "k8s.pod.start_time" semantic conventions. It represents the start timestamp
- // of the Pod.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "2025-12-04T08:41:03Z"
- // Note: Date and time at which the object was acknowledged by the Kubelet.
- // This is before the Kubelet pulled the container image(s) for the pod.
- //
- // This attribute aligns with the `startTime` field of the
- // [K8s PodStatus],
- // in ISO 8601 (RFC 3339 compatible) format.
- //
- // [K8s PodStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podstatus-v1-core
- K8SPodStartTimeKey = attribute.Key("k8s.pod.start_time")
-
- // K8SPodStatusPhaseKey is the attribute Key conforming to the
- // "k8s.pod.status.phase" semantic conventions. It represents the phase for the
- // pod. Corresponds to the `phase` field of the: [K8s PodStatus].
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Pending", "Running"
- //
- // [K8s PodStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core
- K8SPodStatusPhaseKey = attribute.Key("k8s.pod.status.phase")
-
- // K8SPodStatusReasonKey is the attribute Key conforming to the
- // "k8s.pod.status.reason" semantic conventions. It represents the reason for
- // the pod state. Corresponds to the `reason` field of the: [K8s PodStatus].
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Evicted", "NodeAffinity"
- //
- // [K8s PodStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core
- K8SPodStatusReasonKey = attribute.Key("k8s.pod.status.reason")
-
- // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid" semantic
- // conventions. It represents the UID of the Pod.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
- K8SPodUIDKey = attribute.Key("k8s.pod.uid")
-
- // K8SReplicaSetNameKey is the attribute Key conforming to the
- // "k8s.replicaset.name" semantic conventions. It represents the name of the
- // ReplicaSet.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "opentelemetry"
- K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name")
-
- // K8SReplicaSetUIDKey is the attribute Key conforming to the
- // "k8s.replicaset.uid" semantic conventions. It represents the UID of the
- // ReplicaSet.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
- K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid")
-
- // K8SReplicationControllerNameKey is the attribute Key conforming to the
- // "k8s.replicationcontroller.name" semantic conventions. It represents the name
- // of the replication controller.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "opentelemetry"
- K8SReplicationControllerNameKey = attribute.Key("k8s.replicationcontroller.name")
-
- // K8SReplicationControllerUIDKey is the attribute Key conforming to the
- // "k8s.replicationcontroller.uid" semantic conventions. It represents the UID
- // of the replication controller.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
- K8SReplicationControllerUIDKey = attribute.Key("k8s.replicationcontroller.uid")
-
- // K8SResourceQuotaNameKey is the attribute Key conforming to the
- // "k8s.resourcequota.name" semantic conventions. It represents the name of the
- // resource quota.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "opentelemetry"
- K8SResourceQuotaNameKey = attribute.Key("k8s.resourcequota.name")
-
- // K8SResourceQuotaResourceNameKey is the attribute Key conforming to the
- // "k8s.resourcequota.resource_name" semantic conventions. It represents the
- // name of the K8s resource a resource quota defines.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "count/replicationcontrollers"
- // Note: The value for this attribute can be either the full
- // `count/[.]` string (e.g., count/deployments.apps,
- // count/pods), or, for certain core Kubernetes resources, just the resource
- // name (e.g., pods, services, configmaps). Both forms are supported by
- // Kubernetes for object count quotas. See
- // [Kubernetes Resource Quotas documentation] for more details.
- //
- // [Kubernetes Resource Quotas documentation]: https://kubernetes.io/docs/concepts/policy/resource-quotas/#quota-on-object-count
- K8SResourceQuotaResourceNameKey = attribute.Key("k8s.resourcequota.resource_name")
-
- // K8SResourceQuotaUIDKey is the attribute Key conforming to the
- // "k8s.resourcequota.uid" semantic conventions. It represents the UID of the
- // resource quota.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
- K8SResourceQuotaUIDKey = attribute.Key("k8s.resourcequota.uid")
-
- // K8SStatefulSetNameKey is the attribute Key conforming to the
- // "k8s.statefulset.name" semantic conventions. It represents the name of the
- // StatefulSet.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "opentelemetry"
- K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name")
-
- // K8SStatefulSetUIDKey is the attribute Key conforming to the
- // "k8s.statefulset.uid" semantic conventions. It represents the UID of the
- // StatefulSet.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Alpha
- //
- // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
- K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid")
-
- // K8SStorageclassNameKey is the attribute Key conforming to the
- // "k8s.storageclass.name" semantic conventions. It represents the name of K8s
- // [StorageClass] object.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "gold.storageclass.storage.k8s.io"
- //
- // [StorageClass]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#storageclass-v1-storage-k8s-io
- K8SStorageclassNameKey = attribute.Key("k8s.storageclass.name")
-
- // K8SVolumeNameKey is the attribute Key conforming to the "k8s.volume.name"
- // semantic conventions. It represents the name of the K8s volume.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "volume0"
- K8SVolumeNameKey = attribute.Key("k8s.volume.name")
-
- // K8SVolumeTypeKey is the attribute Key conforming to the "k8s.volume.type"
- // semantic conventions. It represents the type of the K8s volume.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "emptyDir", "persistentVolumeClaim"
- K8SVolumeTypeKey = attribute.Key("k8s.volume.type")
-)
-
-// K8SClusterName returns an attribute KeyValue conforming to the
-// "k8s.cluster.name" semantic conventions. It represents the name of the
-// cluster.
-func K8SClusterName(val string) attribute.KeyValue {
- return K8SClusterNameKey.String(val)
-}
-
-// K8SClusterUID returns an attribute KeyValue conforming to the
-// "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for the
-// cluster, set to the UID of the `kube-system` namespace.
-func K8SClusterUID(val string) attribute.KeyValue {
- return K8SClusterUIDKey.String(val)
-}
-
-// K8SContainerName returns an attribute KeyValue conforming to the
-// "k8s.container.name" semantic conventions. It represents the name of the
-// Container from Pod specification, must be unique within a Pod. Container
-// runtime usually uses different globally unique name (`container.name`).
-func K8SContainerName(val string) attribute.KeyValue {
- return K8SContainerNameKey.String(val)
-}
-
-// K8SContainerRestartCount returns an attribute KeyValue conforming to the
-// "k8s.container.restart_count" semantic conventions. It represents the number
-// of times the container was restarted. This attribute can be used to identify a
-// particular container (running or stopped) within a container spec.
-func K8SContainerRestartCount(val int) attribute.KeyValue {
- return K8SContainerRestartCountKey.Int(val)
-}
-
-// K8SContainerStatusLastTerminatedReason returns an attribute KeyValue
-// conforming to the "k8s.container.status.last_terminated_reason" semantic
-// conventions. It represents the last terminated reason of the Container.
-func K8SContainerStatusLastTerminatedReason(val string) attribute.KeyValue {
- return K8SContainerStatusLastTerminatedReasonKey.String(val)
-}
-
-// K8SCronJobAnnotation returns an attribute KeyValue conforming to the
-// "k8s.cronjob.annotation" semantic conventions. It represents the cronjob
-// annotation placed on the CronJob, the `` being the annotation name, the
-// value being the annotation value.
-func K8SCronJobAnnotation(key string, val string) attribute.KeyValue {
- return attribute.String("k8s.cronjob.annotation."+key, val)
-}
-
-// K8SCronJobLabel returns an attribute KeyValue conforming to the
-// "k8s.cronjob.label" semantic conventions. It represents the label placed on
-// the CronJob, the `` being the label name, the value being the label
-// value.
-func K8SCronJobLabel(key string, val string) attribute.KeyValue {
- return attribute.String("k8s.cronjob.label."+key, val)
-}
-
-// K8SCronJobName returns an attribute KeyValue conforming to the
-// "k8s.cronjob.name" semantic conventions. It represents the name of the
-// CronJob.
-func K8SCronJobName(val string) attribute.KeyValue {
- return K8SCronJobNameKey.String(val)
-}
-
-// K8SCronJobUID returns an attribute KeyValue conforming to the
-// "k8s.cronjob.uid" semantic conventions. It represents the UID of the CronJob.
-func K8SCronJobUID(val string) attribute.KeyValue {
- return K8SCronJobUIDKey.String(val)
-}
-
-// K8SDaemonSetAnnotation returns an attribute KeyValue conforming to the
-// "k8s.daemonset.annotation" semantic conventions. It represents the annotation
-// placed on the DaemonSet, the `` being the annotation name, the value
-// being the annotation value, even if the value is empty.
-func K8SDaemonSetAnnotation(key string, val string) attribute.KeyValue {
- return attribute.String("k8s.daemonset.annotation."+key, val)
-}
-
-// K8SDaemonSetLabel returns an attribute KeyValue conforming to the
-// "k8s.daemonset.label" semantic conventions. It represents the label placed on
-// the DaemonSet, the `` being the label name, the value being the label
-// value, even if the value is empty.
-func K8SDaemonSetLabel(key string, val string) attribute.KeyValue {
- return attribute.String("k8s.daemonset.label."+key, val)
-}
-
-// K8SDaemonSetName returns an attribute KeyValue conforming to the
-// "k8s.daemonset.name" semantic conventions. It represents the name of the
-// DaemonSet.
-func K8SDaemonSetName(val string) attribute.KeyValue {
- return K8SDaemonSetNameKey.String(val)
-}
-
-// K8SDaemonSetUID returns an attribute KeyValue conforming to the
-// "k8s.daemonset.uid" semantic conventions. It represents the UID of the
-// DaemonSet.
-func K8SDaemonSetUID(val string) attribute.KeyValue {
- return K8SDaemonSetUIDKey.String(val)
-}
-
-// K8SDeploymentAnnotation returns an attribute KeyValue conforming to the
-// "k8s.deployment.annotation" semantic conventions. It represents the annotation
-// placed on the Deployment, the `` being the annotation name, the value
-// being the annotation value, even if the value is empty.
-func K8SDeploymentAnnotation(key string, val string) attribute.KeyValue {
- return attribute.String("k8s.deployment.annotation."+key, val)
-}
-
-// K8SDeploymentLabel returns an attribute KeyValue conforming to the
-// "k8s.deployment.label" semantic conventions. It represents the label placed on
-// the Deployment, the `` being the label name, the value being the label
-// value, even if the value is empty.
-func K8SDeploymentLabel(key string, val string) attribute.KeyValue {
- return attribute.String("k8s.deployment.label."+key, val)
-}
-
-// K8SDeploymentName returns an attribute KeyValue conforming to the
-// "k8s.deployment.name" semantic conventions. It represents the name of the
-// Deployment.
-func K8SDeploymentName(val string) attribute.KeyValue {
- return K8SDeploymentNameKey.String(val)
-}
-
-// K8SDeploymentUID returns an attribute KeyValue conforming to the
-// "k8s.deployment.uid" semantic conventions. It represents the UID of the
-// Deployment.
-func K8SDeploymentUID(val string) attribute.KeyValue {
- return K8SDeploymentUIDKey.String(val)
-}
-
-// K8SHPAMetricType returns an attribute KeyValue conforming to the
-// "k8s.hpa.metric.type" semantic conventions. It represents the type of metric
-// source for the horizontal pod autoscaler.
-func K8SHPAMetricType(val string) attribute.KeyValue {
- return K8SHPAMetricTypeKey.String(val)
-}
-
-// K8SHPAName returns an attribute KeyValue conforming to the "k8s.hpa.name"
-// semantic conventions. It represents the name of the horizontal pod autoscaler.
-func K8SHPAName(val string) attribute.KeyValue {
- return K8SHPANameKey.String(val)
-}
-
-// K8SHPAScaletargetrefAPIVersion returns an attribute KeyValue conforming to the
-// "k8s.hpa.scaletargetref.api_version" semantic conventions. It represents the
-// API version of the target resource to scale for the HorizontalPodAutoscaler.
-func K8SHPAScaletargetrefAPIVersion(val string) attribute.KeyValue {
- return K8SHPAScaletargetrefAPIVersionKey.String(val)
-}
-
-// K8SHPAScaletargetrefKind returns an attribute KeyValue conforming to the
-// "k8s.hpa.scaletargetref.kind" semantic conventions. It represents the kind of
-// the target resource to scale for the HorizontalPodAutoscaler.
-func K8SHPAScaletargetrefKind(val string) attribute.KeyValue {
- return K8SHPAScaletargetrefKindKey.String(val)
-}
-
-// K8SHPAScaletargetrefName returns an attribute KeyValue conforming to the
-// "k8s.hpa.scaletargetref.name" semantic conventions. It represents the name of
-// the target resource to scale for the HorizontalPodAutoscaler.
-func K8SHPAScaletargetrefName(val string) attribute.KeyValue {
- return K8SHPAScaletargetrefNameKey.String(val)
-}
-
-// K8SHPAUID returns an attribute KeyValue conforming to the "k8s.hpa.uid"
-// semantic conventions. It represents the UID of the horizontal pod autoscaler.
-func K8SHPAUID(val string) attribute.KeyValue {
- return K8SHPAUIDKey.String(val)
-}
-
-// K8SHugepageSize returns an attribute KeyValue conforming to the
-// "k8s.hugepage.size" semantic conventions. It represents the size (identifier)
-// of the K8s huge page.
-func K8SHugepageSize(val string) attribute.KeyValue {
- return K8SHugepageSizeKey.String(val)
-}
-
-// K8SJobAnnotation returns an attribute KeyValue conforming to the
-// "k8s.job.annotation" semantic conventions. It represents the annotation placed
-// on the Job, the `` being the annotation name, the value being the
-// annotation value, even if the value is empty.
-func K8SJobAnnotation(key string, val string) attribute.KeyValue {
- return attribute.String("k8s.job.annotation."+key, val)
-}
-
-// K8SJobLabel returns an attribute KeyValue conforming to the "k8s.job.label"
-// semantic conventions. It represents the label placed on the Job, the ``
-// being the label name, the value being the label value, even if the value is
-// empty.
-func K8SJobLabel(key string, val string) attribute.KeyValue {
- return attribute.String("k8s.job.label."+key, val)
-}
-
-// K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name"
-// semantic conventions. It represents the name of the Job.
-func K8SJobName(val string) attribute.KeyValue {
- return K8SJobNameKey.String(val)
-}
-
-// K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid"
-// semantic conventions. It represents the UID of the Job.
-func K8SJobUID(val string) attribute.KeyValue {
- return K8SJobUIDKey.String(val)
-}
-
-// K8SNamespaceAnnotation returns an attribute KeyValue conforming to the
-// "k8s.namespace.annotation" semantic conventions. It represents the annotation
-// placed on the Namespace, the `` being the annotation name, the value
-// being the annotation value, even if the value is empty.
-func K8SNamespaceAnnotation(key string, val string) attribute.KeyValue {
- return attribute.String("k8s.namespace.annotation."+key, val)
-}
-
-// K8SNamespaceLabel returns an attribute KeyValue conforming to the
-// "k8s.namespace.label" semantic conventions. It represents the label placed on
-// the Namespace, the `` being the label name, the value being the label
-// value, even if the value is empty.
-func K8SNamespaceLabel(key string, val string) attribute.KeyValue {
- return attribute.String("k8s.namespace.label."+key, val)
-}
-
-// K8SNamespaceName returns an attribute KeyValue conforming to the
-// "k8s.namespace.name" semantic conventions. It represents the name of the
-// namespace that the pod is running in.
-func K8SNamespaceName(val string) attribute.KeyValue {
- return K8SNamespaceNameKey.String(val)
-}
-
-// K8SNodeAnnotation returns an attribute KeyValue conforming to the
-// "k8s.node.annotation" semantic conventions. It represents the annotation
-// placed on the Node, the `` being the annotation name, the value being the
-// annotation value, even if the value is empty.
-func K8SNodeAnnotation(key string, val string) attribute.KeyValue {
- return attribute.String("k8s.node.annotation."+key, val)
-}
-
-// K8SNodeLabel returns an attribute KeyValue conforming to the "k8s.node.label"
-// semantic conventions. It represents the label placed on the Node, the ``
-// being the label name, the value being the label value, even if the value is
-// empty.
-func K8SNodeLabel(key string, val string) attribute.KeyValue {
- return attribute.String("k8s.node.label."+key, val)
-}
-
-// K8SNodeName returns an attribute KeyValue conforming to the "k8s.node.name"
-// semantic conventions. It represents the name of the Node.
-func K8SNodeName(val string) attribute.KeyValue {
- return K8SNodeNameKey.String(val)
-}
-
-// K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid"
-// semantic conventions. It represents the UID of the Node.
-func K8SNodeUID(val string) attribute.KeyValue {
- return K8SNodeUIDKey.String(val)
-}
-
-// K8SPodAnnotation returns an attribute KeyValue conforming to the
-// "k8s.pod.annotation" semantic conventions. It represents the annotation placed
-// on the Pod, the `` being the annotation name, the value being the
-// annotation value.
-func K8SPodAnnotation(key string, val string) attribute.KeyValue {
- return attribute.String("k8s.pod.annotation."+key, val)
-}
-
-// K8SPodHostname returns an attribute KeyValue conforming to the
-// "k8s.pod.hostname" semantic conventions. It represents the specifies the
-// hostname of the Pod.
-func K8SPodHostname(val string) attribute.KeyValue {
- return K8SPodHostnameKey.String(val)
-}
-
-// K8SPodIP returns an attribute KeyValue conforming to the "k8s.pod.ip" semantic
-// conventions. It represents the IP address allocated to the Pod.
-func K8SPodIP(val string) attribute.KeyValue {
- return K8SPodIPKey.String(val)
-}
-
-// K8SPodLabel returns an attribute KeyValue conforming to the "k8s.pod.label"
-// semantic conventions. It represents the label placed on the Pod, the ``
-// being the label name, the value being the label value.
-func K8SPodLabel(key string, val string) attribute.KeyValue {
- return attribute.String("k8s.pod.label."+key, val)
-}
-
-// K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name"
-// semantic conventions. It represents the name of the Pod.
-func K8SPodName(val string) attribute.KeyValue {
- return K8SPodNameKey.String(val)
-}
-
-// K8SPodStartTime returns an attribute KeyValue conforming to the
-// "k8s.pod.start_time" semantic conventions. It represents the start timestamp
-// of the Pod.
-func K8SPodStartTime(val string) attribute.KeyValue {
- return K8SPodStartTimeKey.String(val)
-}
-
-// K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid"
-// semantic conventions. It represents the UID of the Pod.
-func K8SPodUID(val string) attribute.KeyValue {
- return K8SPodUIDKey.String(val)
-}
-
-// K8SReplicaSetAnnotation returns an attribute KeyValue conforming to the
-// "k8s.replicaset.annotation" semantic conventions. It represents the annotation
-// placed on the ReplicaSet, the `` being the annotation name, the value
-// being the annotation value, even if the value is empty.
-func K8SReplicaSetAnnotation(key string, val string) attribute.KeyValue {
- return attribute.String("k8s.replicaset.annotation."+key, val)
-}
-
-// K8SReplicaSetLabel returns an attribute KeyValue conforming to the
-// "k8s.replicaset.label" semantic conventions. It represents the label placed on
-// the ReplicaSet, the `` being the label name, the value being the label
-// value, even if the value is empty.
-func K8SReplicaSetLabel(key string, val string) attribute.KeyValue {
- return attribute.String("k8s.replicaset.label."+key, val)
-}
-
-// K8SReplicaSetName returns an attribute KeyValue conforming to the
-// "k8s.replicaset.name" semantic conventions. It represents the name of the
-// ReplicaSet.
-func K8SReplicaSetName(val string) attribute.KeyValue {
- return K8SReplicaSetNameKey.String(val)
-}
-
-// K8SReplicaSetUID returns an attribute KeyValue conforming to the
-// "k8s.replicaset.uid" semantic conventions. It represents the UID of the
-// ReplicaSet.
-func K8SReplicaSetUID(val string) attribute.KeyValue {
- return K8SReplicaSetUIDKey.String(val)
-}
-
-// K8SReplicationControllerName returns an attribute KeyValue conforming to the
-// "k8s.replicationcontroller.name" semantic conventions. It represents the name
-// of the replication controller.
-func K8SReplicationControllerName(val string) attribute.KeyValue {
- return K8SReplicationControllerNameKey.String(val)
-}
-
-// K8SReplicationControllerUID returns an attribute KeyValue conforming to the
-// "k8s.replicationcontroller.uid" semantic conventions. It represents the UID of
-// the replication controller.
-func K8SReplicationControllerUID(val string) attribute.KeyValue {
- return K8SReplicationControllerUIDKey.String(val)
-}
-
-// K8SResourceQuotaName returns an attribute KeyValue conforming to the
-// "k8s.resourcequota.name" semantic conventions. It represents the name of the
-// resource quota.
-func K8SResourceQuotaName(val string) attribute.KeyValue {
- return K8SResourceQuotaNameKey.String(val)
-}
-
-// K8SResourceQuotaResourceName returns an attribute KeyValue conforming to the
-// "k8s.resourcequota.resource_name" semantic conventions. It represents the name
-// of the K8s resource a resource quota defines.
-func K8SResourceQuotaResourceName(val string) attribute.KeyValue {
- return K8SResourceQuotaResourceNameKey.String(val)
-}
-
-// K8SResourceQuotaUID returns an attribute KeyValue conforming to the
-// "k8s.resourcequota.uid" semantic conventions. It represents the UID of the
-// resource quota.
-func K8SResourceQuotaUID(val string) attribute.KeyValue {
- return K8SResourceQuotaUIDKey.String(val)
-}
-
-// K8SStatefulSetAnnotation returns an attribute KeyValue conforming to the
-// "k8s.statefulset.annotation" semantic conventions. It represents the
-// annotation placed on the StatefulSet, the `` being the annotation name,
-// the value being the annotation value, even if the value is empty.
-func K8SStatefulSetAnnotation(key string, val string) attribute.KeyValue {
- return attribute.String("k8s.statefulset.annotation."+key, val)
-}
-
-// K8SStatefulSetLabel returns an attribute KeyValue conforming to the
-// "k8s.statefulset.label" semantic conventions. It represents the label placed
-// on the StatefulSet, the `` being the label name, the value being the
-// label value, even if the value is empty.
-func K8SStatefulSetLabel(key string, val string) attribute.KeyValue {
- return attribute.String("k8s.statefulset.label."+key, val)
-}
-
-// K8SStatefulSetName returns an attribute KeyValue conforming to the
-// "k8s.statefulset.name" semantic conventions. It represents the name of the
-// StatefulSet.
-func K8SStatefulSetName(val string) attribute.KeyValue {
- return K8SStatefulSetNameKey.String(val)
-}
-
-// K8SStatefulSetUID returns an attribute KeyValue conforming to the
-// "k8s.statefulset.uid" semantic conventions. It represents the UID of the
-// StatefulSet.
-func K8SStatefulSetUID(val string) attribute.KeyValue {
- return K8SStatefulSetUIDKey.String(val)
-}
-
-// K8SStorageclassName returns an attribute KeyValue conforming to the
-// "k8s.storageclass.name" semantic conventions. It represents the name of K8s
-// [StorageClass] object.
-//
-// [StorageClass]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#storageclass-v1-storage-k8s-io
-func K8SStorageclassName(val string) attribute.KeyValue {
- return K8SStorageclassNameKey.String(val)
-}
-
-// K8SVolumeName returns an attribute KeyValue conforming to the
-// "k8s.volume.name" semantic conventions. It represents the name of the K8s
-// volume.
-func K8SVolumeName(val string) attribute.KeyValue {
- return K8SVolumeNameKey.String(val)
-}
-
-// Enum values for k8s.container.status.reason
-var (
- // The container is being created.
- // Stability: development
- K8SContainerStatusReasonContainerCreating = K8SContainerStatusReasonKey.String("ContainerCreating")
- // The container is in a crash loop back off state.
- // Stability: development
- K8SContainerStatusReasonCrashLoopBackOff = K8SContainerStatusReasonKey.String("CrashLoopBackOff")
- // There was an error creating the container configuration.
- // Stability: development
- K8SContainerStatusReasonCreateContainerConfigError = K8SContainerStatusReasonKey.String("CreateContainerConfigError")
- // There was an error pulling the container image.
- // Stability: development
- K8SContainerStatusReasonErrImagePull = K8SContainerStatusReasonKey.String("ErrImagePull")
- // The container image pull is in back off state.
- // Stability: development
- K8SContainerStatusReasonImagePullBackOff = K8SContainerStatusReasonKey.String("ImagePullBackOff")
- // The container was killed due to out of memory.
- // Stability: development
- K8SContainerStatusReasonOomKilled = K8SContainerStatusReasonKey.String("OOMKilled")
- // The container has completed execution.
- // Stability: development
- K8SContainerStatusReasonCompleted = K8SContainerStatusReasonKey.String("Completed")
- // There was an error with the container.
- // Stability: development
- K8SContainerStatusReasonError = K8SContainerStatusReasonKey.String("Error")
- // The container cannot run.
- // Stability: development
- K8SContainerStatusReasonContainerCannotRun = K8SContainerStatusReasonKey.String("ContainerCannotRun")
-)
-
-// Enum values for k8s.container.status.state
-var (
- // The container has terminated.
- // Stability: development
- K8SContainerStatusStateTerminated = K8SContainerStatusStateKey.String("terminated")
- // The container is running.
- // Stability: development
- K8SContainerStatusStateRunning = K8SContainerStatusStateKey.String("running")
- // The container is waiting.
- // Stability: development
- K8SContainerStatusStateWaiting = K8SContainerStatusStateKey.String("waiting")
-)
-
-// Enum values for k8s.namespace.phase
-var (
- // Active namespace phase as described by [K8s API]
- // Stability: development
- //
- // [K8s API]: https://pkg.go.dev/k8s.io/api@v0.31.3/core/v1#NamespacePhase
- K8SNamespacePhaseActive = K8SNamespacePhaseKey.String("active")
- // Terminating namespace phase as described by [K8s API]
- // Stability: development
- //
- // [K8s API]: https://pkg.go.dev/k8s.io/api@v0.31.3/core/v1#NamespacePhase
- K8SNamespacePhaseTerminating = K8SNamespacePhaseKey.String("terminating")
-)
-
-// Enum values for k8s.node.condition.status
-var (
- // condition_true
- // Stability: development
- K8SNodeConditionStatusConditionTrue = K8SNodeConditionStatusKey.String("true")
- // condition_false
- // Stability: development
- K8SNodeConditionStatusConditionFalse = K8SNodeConditionStatusKey.String("false")
- // condition_unknown
- // Stability: development
- K8SNodeConditionStatusConditionUnknown = K8SNodeConditionStatusKey.String("unknown")
-)
-
-// Enum values for k8s.node.condition.type
-var (
- // The node is healthy and ready to accept pods
- // Stability: development
- K8SNodeConditionTypeReady = K8SNodeConditionTypeKey.String("Ready")
- // Pressure exists on the disk size—that is, if the disk capacity is low
- // Stability: development
- K8SNodeConditionTypeDiskPressure = K8SNodeConditionTypeKey.String("DiskPressure")
- // Pressure exists on the node memory—that is, if the node memory is low
- // Stability: development
- K8SNodeConditionTypeMemoryPressure = K8SNodeConditionTypeKey.String("MemoryPressure")
- // Pressure exists on the processes—that is, if there are too many processes
- // on the node
- // Stability: development
- K8SNodeConditionTypePIDPressure = K8SNodeConditionTypeKey.String("PIDPressure")
- // The network for the node is not correctly configured
- // Stability: development
- K8SNodeConditionTypeNetworkUnavailable = K8SNodeConditionTypeKey.String("NetworkUnavailable")
-)
-
-// Enum values for k8s.pod.status.phase
-var (
- // The pod has been accepted by the system, but one or more of the containers
- // has not been started. This includes time before being bound to a node, as
- // well as time spent pulling images onto the host.
- //
- // Stability: development
- K8SPodStatusPhasePending = K8SPodStatusPhaseKey.String("Pending")
- // The pod has been bound to a node and all of the containers have been started.
- // At least one container is still running or is in the process of being
- // restarted.
- //
- // Stability: development
- K8SPodStatusPhaseRunning = K8SPodStatusPhaseKey.String("Running")
- // All containers in the pod have voluntarily terminated with a container exit
- // code of 0, and the system is not going to restart any of these containers.
- //
- // Stability: development
- K8SPodStatusPhaseSucceeded = K8SPodStatusPhaseKey.String("Succeeded")
- // All containers in the pod have terminated, and at least one container has
- // terminated in a failure (exited with a non-zero exit code or was stopped by
- // the system).
- //
- // Stability: development
- K8SPodStatusPhaseFailed = K8SPodStatusPhaseKey.String("Failed")
- // For some reason the state of the pod could not be obtained, typically due to
- // an error in communicating with the host of the pod.
- //
- // Stability: development
- K8SPodStatusPhaseUnknown = K8SPodStatusPhaseKey.String("Unknown")
-)
-
-// Enum values for k8s.pod.status.reason
-var (
- // The pod is evicted.
- // Stability: development
- K8SPodStatusReasonEvicted = K8SPodStatusReasonKey.String("Evicted")
- // The pod is in a status because of its node affinity
- // Stability: development
- K8SPodStatusReasonNodeAffinity = K8SPodStatusReasonKey.String("NodeAffinity")
- // The reason on a pod when its state cannot be confirmed as kubelet is
- // unresponsive on the node it is (was) running.
- //
- // Stability: development
- K8SPodStatusReasonNodeLost = K8SPodStatusReasonKey.String("NodeLost")
- // The node is shutdown
- // Stability: development
- K8SPodStatusReasonShutdown = K8SPodStatusReasonKey.String("Shutdown")
- // The pod was rejected admission to the node because of an error during
- // admission that could not be categorized.
- //
- // Stability: development
- K8SPodStatusReasonUnexpectedAdmissionError = K8SPodStatusReasonKey.String("UnexpectedAdmissionError")
-)
-
-// Enum values for k8s.volume.type
-var (
- // A [persistentVolumeClaim] volume
- // Stability: development
- //
- // [persistentVolumeClaim]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#persistentvolumeclaim
- K8SVolumeTypePersistentVolumeClaim = K8SVolumeTypeKey.String("persistentVolumeClaim")
- // A [configMap] volume
- // Stability: development
- //
- // [configMap]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#configmap
- K8SVolumeTypeConfigMap = K8SVolumeTypeKey.String("configMap")
- // A [downwardAPI] volume
- // Stability: development
- //
- // [downwardAPI]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#downwardapi
- K8SVolumeTypeDownwardAPI = K8SVolumeTypeKey.String("downwardAPI")
- // An [emptyDir] volume
- // Stability: development
- //
- // [emptyDir]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#emptydir
- K8SVolumeTypeEmptyDir = K8SVolumeTypeKey.String("emptyDir")
- // A [secret] volume
- // Stability: development
- //
- // [secret]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#secret
- K8SVolumeTypeSecret = K8SVolumeTypeKey.String("secret")
- // A [local] volume
- // Stability: development
- //
- // [local]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#local
- K8SVolumeTypeLocal = K8SVolumeTypeKey.String("local")
-)
-
-// Namespace: log
-const (
- // LogFileNameKey is the attribute Key conforming to the "log.file.name"
- // semantic conventions. It represents the basename of the file.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "audit.log"
- LogFileNameKey = attribute.Key("log.file.name")
-
- // LogFileNameResolvedKey is the attribute Key conforming to the
- // "log.file.name_resolved" semantic conventions. It represents the basename of
- // the file, with symlinks resolved.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "uuid.log"
- LogFileNameResolvedKey = attribute.Key("log.file.name_resolved")
-
- // LogFilePathKey is the attribute Key conforming to the "log.file.path"
- // semantic conventions. It represents the full path to the file.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "/var/log/mysql/audit.log"
- LogFilePathKey = attribute.Key("log.file.path")
-
- // LogFilePathResolvedKey is the attribute Key conforming to the
- // "log.file.path_resolved" semantic conventions. It represents the full path to
- // the file, with symlinks resolved.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "/var/lib/docker/uuid.log"
- LogFilePathResolvedKey = attribute.Key("log.file.path_resolved")
-
- // LogIostreamKey is the attribute Key conforming to the "log.iostream" semantic
- // conventions. It represents the stream associated with the log. See below for
- // a list of well-known values.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- LogIostreamKey = attribute.Key("log.iostream")
-
- // LogRecordOriginalKey is the attribute Key conforming to the
- // "log.record.original" semantic conventions. It represents the complete
- // original Log Record.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - -
- // Something happened", "[INFO] 8/3/24 12:34:56 Something happened"
- // Note: This value MAY be added when processing a Log Record which was
- // originally transmitted as a string or equivalent data type AND the Body field
- // of the Log Record does not contain the same value. (e.g. a syslog or a log
- // record read from a file.)
- LogRecordOriginalKey = attribute.Key("log.record.original")
-
- // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid"
- // semantic conventions. It represents a unique identifier for the Log Record.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "01ARZ3NDEKTSV4RRFFQ69G5FAV"
- // Note: If an id is provided, other log records with the same id will be
- // considered duplicates and can be removed safely. This means, that two
- // distinguishable log records MUST have different values.
- // The id MAY be an
- // [Universally Unique Lexicographically Sortable Identifier (ULID)], but other
- // identifiers (e.g. UUID) may be used as needed.
- //
- // [Universally Unique Lexicographically Sortable Identifier (ULID)]: https://github.com/ulid/spec
- LogRecordUIDKey = attribute.Key("log.record.uid")
-)
-
-// LogFileName returns an attribute KeyValue conforming to the "log.file.name"
-// semantic conventions. It represents the basename of the file.
-func LogFileName(val string) attribute.KeyValue {
- return LogFileNameKey.String(val)
-}
-
-// LogFileNameResolved returns an attribute KeyValue conforming to the
-// "log.file.name_resolved" semantic conventions. It represents the basename of
-// the file, with symlinks resolved.
-func LogFileNameResolved(val string) attribute.KeyValue {
- return LogFileNameResolvedKey.String(val)
-}
-
-// LogFilePath returns an attribute KeyValue conforming to the "log.file.path"
-// semantic conventions. It represents the full path to the file.
-func LogFilePath(val string) attribute.KeyValue {
- return LogFilePathKey.String(val)
-}
-
-// LogFilePathResolved returns an attribute KeyValue conforming to the
-// "log.file.path_resolved" semantic conventions. It represents the full path to
-// the file, with symlinks resolved.
-func LogFilePathResolved(val string) attribute.KeyValue {
- return LogFilePathResolvedKey.String(val)
-}
-
-// LogRecordOriginal returns an attribute KeyValue conforming to the
-// "log.record.original" semantic conventions. It represents the complete
-// original Log Record.
-func LogRecordOriginal(val string) attribute.KeyValue {
- return LogRecordOriginalKey.String(val)
-}
-
-// LogRecordUID returns an attribute KeyValue conforming to the "log.record.uid"
-// semantic conventions. It represents a unique identifier for the Log Record.
-func LogRecordUID(val string) attribute.KeyValue {
- return LogRecordUIDKey.String(val)
-}
-
-// Enum values for log.iostream
-var (
- // Logs from stdout stream
- // Stability: development
- LogIostreamStdout = LogIostreamKey.String("stdout")
- // Events from stderr stream
- // Stability: development
- LogIostreamStderr = LogIostreamKey.String("stderr")
-)
-
-// Namespace: mainframe
-const (
- // MainframeLparNameKey is the attribute Key conforming to the
- // "mainframe.lpar.name" semantic conventions. It represents the name of the
- // logical partition that hosts a systems with a mainframe operating system.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "LPAR01"
- MainframeLparNameKey = attribute.Key("mainframe.lpar.name")
-)
-
-// MainframeLparName returns an attribute KeyValue conforming to the
-// "mainframe.lpar.name" semantic conventions. It represents the name of the
-// logical partition that hosts a systems with a mainframe operating system.
-func MainframeLparName(val string) attribute.KeyValue {
- return MainframeLparNameKey.String(val)
-}
-
-// Namespace: mcp
-const (
- // McpMethodNameKey is the attribute Key conforming to the "mcp.method.name"
- // semantic conventions. It represents the name of the request or notification
- // method.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- McpMethodNameKey = attribute.Key("mcp.method.name")
-
- // McpProtocolVersionKey is the attribute Key conforming to the
- // "mcp.protocol.version" semantic conventions. It represents the [version] of
- // the Model Context Protocol used.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "2025-06-18"
- //
- // [version]: https://modelcontextprotocol.io/specification/versioning
- McpProtocolVersionKey = attribute.Key("mcp.protocol.version")
-
- // McpResourceURIKey is the attribute Key conforming to the "mcp.resource.uri"
- // semantic conventions. It represents the value of the resource uri.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "postgres://database/customers/schema",
- // "file:///home/user/documents/report.pdf"
- // Note: This is a URI of the resource provided in the following requests or
- // notifications: `resources/read`, `resources/subscribe`,
- // `resources/unsubscribe`, or `notifications/resources/updated`.
- McpResourceURIKey = attribute.Key("mcp.resource.uri")
-
- // McpSessionIDKey is the attribute Key conforming to the "mcp.session.id"
- // semantic conventions. It represents the identifies [MCP session].
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "191c4850af6c49e08843a3f6c80e5046"
- //
- // [MCP session]: https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#session-management
- McpSessionIDKey = attribute.Key("mcp.session.id")
-)
-
-// McpProtocolVersion returns an attribute KeyValue conforming to the
-// "mcp.protocol.version" semantic conventions. It represents the [version] of
-// the Model Context Protocol used.
-//
-// [version]: https://modelcontextprotocol.io/specification/versioning
-func McpProtocolVersion(val string) attribute.KeyValue {
- return McpProtocolVersionKey.String(val)
-}
-
-// McpResourceURI returns an attribute KeyValue conforming to the
-// "mcp.resource.uri" semantic conventions. It represents the value of the
-// resource uri.
-func McpResourceURI(val string) attribute.KeyValue {
- return McpResourceURIKey.String(val)
-}
-
-// McpSessionID returns an attribute KeyValue conforming to the "mcp.session.id"
-// semantic conventions. It represents the identifies [MCP session].
-//
-// [MCP session]: https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#session-management
-func McpSessionID(val string) attribute.KeyValue {
- return McpSessionIDKey.String(val)
-}
-
-// Enum values for mcp.method.name
-var (
- // Notification cancelling a previously-issued request.
- //
- // Stability: development
- McpMethodNameNotificationsCancelled = McpMethodNameKey.String("notifications/cancelled")
- // Request to initialize the MCP client.
- //
- // Stability: development
- McpMethodNameInitialize = McpMethodNameKey.String("initialize")
- // Notification indicating that the MCP client has been initialized.
- //
- // Stability: development
- McpMethodNameNotificationsInitialized = McpMethodNameKey.String("notifications/initialized")
- // Notification indicating the progress for a long-running operation.
- //
- // Stability: development
- McpMethodNameNotificationsProgress = McpMethodNameKey.String("notifications/progress")
- // Request to check that the other party is still alive.
- //
- // Stability: development
- McpMethodNamePing = McpMethodNameKey.String("ping")
- // Request to list resources available on server.
- //
- // Stability: development
- McpMethodNameResourcesList = McpMethodNameKey.String("resources/list")
- // Request to list resource templates available on server.
- //
- // Stability: development
- McpMethodNameResourcesTemplatesList = McpMethodNameKey.String("resources/templates/list")
- // Request to read a resource.
- //
- // Stability: development
- McpMethodNameResourcesRead = McpMethodNameKey.String("resources/read")
- // Notification indicating that the list of resources has changed.
- //
- // Stability: development
- McpMethodNameNotificationsResourcesListChanged = McpMethodNameKey.String("notifications/resources/list_changed")
- // Request to subscribe to a resource.
- //
- // Stability: development
- McpMethodNameResourcesSubscribe = McpMethodNameKey.String("resources/subscribe")
- // Request to unsubscribe from resource updates.
- //
- // Stability: development
- McpMethodNameResourcesUnsubscribe = McpMethodNameKey.String("resources/unsubscribe")
- // Notification indicating that a resource has been updated.
- //
- // Stability: development
- McpMethodNameNotificationsResourcesUpdated = McpMethodNameKey.String("notifications/resources/updated")
- // Request to list prompts available on server.
- //
- // Stability: development
- McpMethodNamePromptsList = McpMethodNameKey.String("prompts/list")
- // Request to get a prompt.
- //
- // Stability: development
- McpMethodNamePromptsGet = McpMethodNameKey.String("prompts/get")
- // Notification indicating that the list of prompts has changed.
- //
- // Stability: development
- McpMethodNameNotificationsPromptsListChanged = McpMethodNameKey.String("notifications/prompts/list_changed")
- // Request to list tools available on server.
- //
- // Stability: development
- McpMethodNameToolsList = McpMethodNameKey.String("tools/list")
- // Request to call a tool.
- //
- // Stability: development
- McpMethodNameToolsCall = McpMethodNameKey.String("tools/call")
- // Notification indicating that the list of tools has changed.
- //
- // Stability: development
- McpMethodNameNotificationsToolsListChanged = McpMethodNameKey.String("notifications/tools/list_changed")
- // Request to set the logging level.
- //
- // Stability: development
- McpMethodNameLoggingSetLevel = McpMethodNameKey.String("logging/setLevel")
- // Notification indicating that a message has been received.
- //
- // Stability: development
- McpMethodNameNotificationsMessage = McpMethodNameKey.String("notifications/message")
- // Request to create a sampling message.
- //
- // Stability: development
- McpMethodNameSamplingCreateMessage = McpMethodNameKey.String("sampling/createMessage")
- // Request to complete a prompt.
- //
- // Stability: development
- McpMethodNameCompletionComplete = McpMethodNameKey.String("completion/complete")
- // Request to list roots available on server.
- //
- // Stability: development
- McpMethodNameRootsList = McpMethodNameKey.String("roots/list")
- // Notification indicating that the list of roots has changed.
- //
- // Stability: development
- McpMethodNameNotificationsRootsListChanged = McpMethodNameKey.String("notifications/roots/list_changed")
- // Request from the server to elicit additional information from the user via
- // the client
- //
- // Stability: development
- McpMethodNameElicitationCreate = McpMethodNameKey.String("elicitation/create")
-)
-
-// Namespace: messaging
-const (
- // MessagingBatchMessageCountKey is the attribute Key conforming to the
- // "messaging.batch.message_count" semantic conventions. It represents the
- // number of messages sent, received, or processed in the scope of the batching
- // operation.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 0, 1, 2
- // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on
- // spans that operate with a single message. When a messaging client library
- // supports both batch and single-message API for the same operation,
- // instrumentations SHOULD use `messaging.batch.message_count` for batching APIs
- // and SHOULD NOT use it for single-message APIs.
- MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count")
-
- // MessagingClientIDKey is the attribute Key conforming to the
- // "messaging.client.id" semantic conventions. It represents a unique identifier
- // for the client that consumes or produces a message.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "client-5", "myhost@8742@s8083jm"
- MessagingClientIDKey = attribute.Key("messaging.client.id")
-
- // MessagingConsumerGroupNameKey is the attribute Key conforming to the
- // "messaging.consumer.group.name" semantic conventions. It represents the name
- // of the consumer group with which a consumer is associated.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "my-group", "indexer"
- // Note: Semantic conventions for individual messaging systems SHOULD document
- // whether `messaging.consumer.group.name` is applicable and what it means in
- // the context of that system.
- MessagingConsumerGroupNameKey = attribute.Key("messaging.consumer.group.name")
-
- // MessagingDestinationAnonymousKey is the attribute Key conforming to the
- // "messaging.destination.anonymous" semantic conventions. It represents a
- // boolean that is true if the message destination is anonymous (could be
- // unnamed or have auto-generated name).
- //
- // Type: boolean
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous")
-
- // MessagingDestinationNameKey is the attribute Key conforming to the
- // "messaging.destination.name" semantic conventions. It represents the message
- // destination name.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "MyQueue", "MyTopic"
- // Note: Destination name SHOULD uniquely identify a specific queue, topic or
- // other entity within the broker. If
- // the broker doesn't have such notion, the destination name SHOULD uniquely
- // identify the broker.
- MessagingDestinationNameKey = attribute.Key("messaging.destination.name")
-
- // MessagingDestinationPartitionIDKey is the attribute Key conforming to the
- // "messaging.destination.partition.id" semantic conventions. It represents the
- // identifier of the partition messages are sent to or received from, unique
- // within the `messaging.destination.name`.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 1
- MessagingDestinationPartitionIDKey = attribute.Key("messaging.destination.partition.id")
-
- // MessagingDestinationSubscriptionNameKey is the attribute Key conforming to
- // the "messaging.destination.subscription.name" semantic conventions. It
- // represents the name of the destination subscription from which a message is
- // consumed.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "subscription-a"
- // Note: Semantic conventions for individual messaging systems SHOULD document
- // whether `messaging.destination.subscription.name` is applicable and what it
- // means in the context of that system.
- MessagingDestinationSubscriptionNameKey = attribute.Key("messaging.destination.subscription.name")
-
- // MessagingDestinationTemplateKey is the attribute Key conforming to the
- // "messaging.destination.template" semantic conventions. It represents the low
- // cardinality representation of the messaging destination name.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "/customers/{customerId}"
- // Note: Destination names could be constructed from templates. An example would
- // be a destination name involving a user name or product id. Although the
- // destination name in this case is of high cardinality, the underlying template
- // is of low cardinality and can be effectively used for grouping and
- // aggregation.
- MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template")
-
- // MessagingDestinationTemporaryKey is the attribute Key conforming to the
- // "messaging.destination.temporary" semantic conventions. It represents a
- // boolean that is true if the message destination is temporary and might not
- // exist anymore after messages are processed.
- //
- // Type: boolean
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary")
-
- // MessagingEventHubsMessageEnqueuedTimeKey is the attribute Key conforming to
- // the "messaging.eventhubs.message.enqueued_time" semantic conventions. It
- // represents the UTC epoch seconds at which the message has been accepted and
- // stored in the entity.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- MessagingEventHubsMessageEnqueuedTimeKey = attribute.Key("messaging.eventhubs.message.enqueued_time")
-
- // MessagingGCPPubSubMessageAckDeadlineKey is the attribute Key conforming to
- // the "messaging.gcp_pubsub.message.ack_deadline" semantic conventions. It
- // represents the ack deadline in seconds set for the modify ack deadline
- // request.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- MessagingGCPPubSubMessageAckDeadlineKey = attribute.Key("messaging.gcp_pubsub.message.ack_deadline")
-
- // MessagingGCPPubSubMessageAckIDKey is the attribute Key conforming to the
- // "messaging.gcp_pubsub.message.ack_id" semantic conventions. It represents the
- // ack id for a given message.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: ack_id
- MessagingGCPPubSubMessageAckIDKey = attribute.Key("messaging.gcp_pubsub.message.ack_id")
-
- // MessagingGCPPubSubMessageDeliveryAttemptKey is the attribute Key conforming
- // to the "messaging.gcp_pubsub.message.delivery_attempt" semantic conventions.
- // It represents the delivery attempt for a given message.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- MessagingGCPPubSubMessageDeliveryAttemptKey = attribute.Key("messaging.gcp_pubsub.message.delivery_attempt")
-
- // MessagingGCPPubSubMessageOrderingKeyKey is the attribute Key conforming to
- // the "messaging.gcp_pubsub.message.ordering_key" semantic conventions. It
- // represents the ordering key for a given message. If the attribute is not
- // present, the message does not have an ordering key.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: ordering_key
- MessagingGCPPubSubMessageOrderingKeyKey = attribute.Key("messaging.gcp_pubsub.message.ordering_key")
-
- // MessagingKafkaMessageKeyKey is the attribute Key conforming to the
- // "messaging.kafka.message.key" semantic conventions. It represents the message
- // keys in Kafka are used for grouping alike messages to ensure they're
- // processed on the same partition. They differ from `messaging.message.id` in
- // that they're not unique. If the key is `null`, the attribute MUST NOT be set.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: myKey
- // Note: If the key type is not string, it's string representation has to be
- // supplied for the attribute. If the key has no unambiguous, canonical string
- // form, don't include its value.
- MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key")
-
- // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the
- // "messaging.kafka.message.tombstone" semantic conventions. It represents a
- // boolean that is true if the message is a tombstone.
- //
- // Type: boolean
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone")
-
- // MessagingKafkaOffsetKey is the attribute Key conforming to the
- // "messaging.kafka.offset" semantic conventions. It represents the offset of a
- // record in the corresponding Kafka partition.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- MessagingKafkaOffsetKey = attribute.Key("messaging.kafka.offset")
-
- // MessagingMessageBodySizeKey is the attribute Key conforming to the
- // "messaging.message.body.size" semantic conventions. It represents the size of
- // the message body in bytes.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Note: This can refer to both the compressed or uncompressed body size. If
- // both sizes are known, the uncompressed
- // body size should be used.
- MessagingMessageBodySizeKey = attribute.Key("messaging.message.body.size")
-
- // MessagingMessageConversationIDKey is the attribute Key conforming to the
- // "messaging.message.conversation_id" semantic conventions. It represents the
- // conversation ID identifying the conversation to which the message belongs,
- // represented as a string. Sometimes called "Correlation ID".
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: MyConversationId
- MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id")
-
- // MessagingMessageEnvelopeSizeKey is the attribute Key conforming to the
- // "messaging.message.envelope.size" semantic conventions. It represents the
- // size of the message body and metadata in bytes.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Note: This can refer to both the compressed or uncompressed size. If both
- // sizes are known, the uncompressed
- // size should be used.
- MessagingMessageEnvelopeSizeKey = attribute.Key("messaging.message.envelope.size")
-
- // MessagingMessageIDKey is the attribute Key conforming to the
- // "messaging.message.id" semantic conventions. It represents a value used by
- // the messaging system as an identifier for the message, represented as a
- // string.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 452a7c7c7c7048c2f887f61572b18fc2
- MessagingMessageIDKey = attribute.Key("messaging.message.id")
-
- // MessagingOperationNameKey is the attribute Key conforming to the
- // "messaging.operation.name" semantic conventions. It represents the
- // system-specific name of the messaging operation.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "ack", "nack", "send"
- MessagingOperationNameKey = attribute.Key("messaging.operation.name")
-
- // MessagingOperationTypeKey is the attribute Key conforming to the
- // "messaging.operation.type" semantic conventions. It represents a string
- // identifying the type of the messaging operation.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // Note: If a custom value is used, it MUST be of low cardinality.
- MessagingOperationTypeKey = attribute.Key("messaging.operation.type")
-
- // MessagingRabbitMQDestinationRoutingKeyKey is the attribute Key conforming to
- // the "messaging.rabbitmq.destination.routing_key" semantic conventions. It
- // represents the rabbitMQ message routing key.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: myKey
- MessagingRabbitMQDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key")
-
- // MessagingRabbitMQMessageDeliveryTagKey is the attribute Key conforming to the
- // "messaging.rabbitmq.message.delivery_tag" semantic conventions. It represents
- // the rabbitMQ message delivery tag.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- MessagingRabbitMQMessageDeliveryTagKey = attribute.Key("messaging.rabbitmq.message.delivery_tag")
-
- // MessagingRocketMQConsumptionModelKey is the attribute Key conforming to the
- // "messaging.rocketmq.consumption_model" semantic conventions. It represents
- // the model of message consumption. This only applies to consumer spans.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- MessagingRocketMQConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model")
-
- // MessagingRocketMQMessageDelayTimeLevelKey is the attribute Key conforming to
- // the "messaging.rocketmq.message.delay_time_level" semantic conventions. It
- // represents the delay time level for delay message, which determines the
- // message delay time.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- MessagingRocketMQMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level")
-
- // MessagingRocketMQMessageDeliveryTimestampKey is the attribute Key conforming
- // to the "messaging.rocketmq.message.delivery_timestamp" semantic conventions.
- // It represents the timestamp in milliseconds that the delay message is
- // expected to be delivered to consumer.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- MessagingRocketMQMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp")
-
- // MessagingRocketMQMessageGroupKey is the attribute Key conforming to the
- // "messaging.rocketmq.message.group" semantic conventions. It represents the it
- // is essential for FIFO message. Messages that belong to the same message group
- // are always processed one by one within the same consumer group.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: myMessageGroup
- MessagingRocketMQMessageGroupKey = attribute.Key("messaging.rocketmq.message.group")
-
- // MessagingRocketMQMessageKeysKey is the attribute Key conforming to the
- // "messaging.rocketmq.message.keys" semantic conventions. It represents the
- // key(s) of message, another way to mark message besides message id.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "keyA", "keyB"
- MessagingRocketMQMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys")
-
- // MessagingRocketMQMessageTagKey is the attribute Key conforming to the
- // "messaging.rocketmq.message.tag" semantic conventions. It represents the
- // secondary classifier of message besides topic.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: tagA
- MessagingRocketMQMessageTagKey = attribute.Key("messaging.rocketmq.message.tag")
-
- // MessagingRocketMQMessageTypeKey is the attribute Key conforming to the
- // "messaging.rocketmq.message.type" semantic conventions. It represents the
- // type of message.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- MessagingRocketMQMessageTypeKey = attribute.Key("messaging.rocketmq.message.type")
-
- // MessagingRocketMQNamespaceKey is the attribute Key conforming to the
- // "messaging.rocketmq.namespace" semantic conventions. It represents the
- // namespace of RocketMQ resources, resources in different namespaces are
- // individual.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: myNamespace
- MessagingRocketMQNamespaceKey = attribute.Key("messaging.rocketmq.namespace")
-
- // MessagingServiceBusDispositionStatusKey is the attribute Key conforming to
- // the "messaging.servicebus.disposition_status" semantic conventions. It
- // represents the describes the [settlement type].
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- //
- // [settlement type]: https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock
- MessagingServiceBusDispositionStatusKey = attribute.Key("messaging.servicebus.disposition_status")
-
- // MessagingServiceBusMessageDeliveryCountKey is the attribute Key conforming to
- // the "messaging.servicebus.message.delivery_count" semantic conventions. It
- // represents the number of deliveries that have been attempted for this
- // message.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- MessagingServiceBusMessageDeliveryCountKey = attribute.Key("messaging.servicebus.message.delivery_count")
-
- // MessagingServiceBusMessageEnqueuedTimeKey is the attribute Key conforming to
- // the "messaging.servicebus.message.enqueued_time" semantic conventions. It
- // represents the UTC epoch seconds at which the message has been accepted and
- // stored in the entity.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- MessagingServiceBusMessageEnqueuedTimeKey = attribute.Key("messaging.servicebus.message.enqueued_time")
-
- // MessagingSystemKey is the attribute Key conforming to the "messaging.system"
- // semantic conventions. It represents the messaging system as identified by the
- // client instrumentation.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // Note: The actual messaging system may differ from the one known by the
- // client. For example, when using Kafka client libraries to communicate with
- // Azure Event Hubs, the `messaging.system` is set to `kafka` based on the
- // instrumentation's best knowledge.
- MessagingSystemKey = attribute.Key("messaging.system")
-)
-
-// MessagingBatchMessageCount returns an attribute KeyValue conforming to the
-// "messaging.batch.message_count" semantic conventions. It represents the number
-// of messages sent, received, or processed in the scope of the batching
-// operation.
-func MessagingBatchMessageCount(val int) attribute.KeyValue {
- return MessagingBatchMessageCountKey.Int(val)
-}
-
-// MessagingClientID returns an attribute KeyValue conforming to the
-// "messaging.client.id" semantic conventions. It represents a unique identifier
-// for the client that consumes or produces a message.
-func MessagingClientID(val string) attribute.KeyValue {
- return MessagingClientIDKey.String(val)
-}
-
-// MessagingConsumerGroupName returns an attribute KeyValue conforming to the
-// "messaging.consumer.group.name" semantic conventions. It represents the name
-// of the consumer group with which a consumer is associated.
-func MessagingConsumerGroupName(val string) attribute.KeyValue {
- return MessagingConsumerGroupNameKey.String(val)
-}
-
-// MessagingDestinationAnonymous returns an attribute KeyValue conforming to the
-// "messaging.destination.anonymous" semantic conventions. It represents a
-// boolean that is true if the message destination is anonymous (could be unnamed
-// or have auto-generated name).
-func MessagingDestinationAnonymous(val bool) attribute.KeyValue {
- return MessagingDestinationAnonymousKey.Bool(val)
-}
-
-// MessagingDestinationName returns an attribute KeyValue conforming to the
-// "messaging.destination.name" semantic conventions. It represents the message
-// destination name.
-func MessagingDestinationName(val string) attribute.KeyValue {
- return MessagingDestinationNameKey.String(val)
-}
-
-// MessagingDestinationPartitionID returns an attribute KeyValue conforming to
-// the "messaging.destination.partition.id" semantic conventions. It represents
-// the identifier of the partition messages are sent to or received from, unique
-// within the `messaging.destination.name`.
-func MessagingDestinationPartitionID(val string) attribute.KeyValue {
- return MessagingDestinationPartitionIDKey.String(val)
-}
-
-// MessagingDestinationSubscriptionName returns an attribute KeyValue conforming
-// to the "messaging.destination.subscription.name" semantic conventions. It
-// represents the name of the destination subscription from which a message is
-// consumed.
-func MessagingDestinationSubscriptionName(val string) attribute.KeyValue {
- return MessagingDestinationSubscriptionNameKey.String(val)
-}
-
-// MessagingDestinationTemplate returns an attribute KeyValue conforming to the
-// "messaging.destination.template" semantic conventions. It represents the low
-// cardinality representation of the messaging destination name.
-func MessagingDestinationTemplate(val string) attribute.KeyValue {
- return MessagingDestinationTemplateKey.String(val)
-}
-
-// MessagingDestinationTemporary returns an attribute KeyValue conforming to the
-// "messaging.destination.temporary" semantic conventions. It represents a
-// boolean that is true if the message destination is temporary and might not
-// exist anymore after messages are processed.
-func MessagingDestinationTemporary(val bool) attribute.KeyValue {
- return MessagingDestinationTemporaryKey.Bool(val)
-}
-
-// MessagingEventHubsMessageEnqueuedTime returns an attribute KeyValue conforming
-// to the "messaging.eventhubs.message.enqueued_time" semantic conventions. It
-// represents the UTC epoch seconds at which the message has been accepted and
-// stored in the entity.
-func MessagingEventHubsMessageEnqueuedTime(val int) attribute.KeyValue {
- return MessagingEventHubsMessageEnqueuedTimeKey.Int(val)
-}
-
-// MessagingGCPPubSubMessageAckDeadline returns an attribute KeyValue conforming
-// to the "messaging.gcp_pubsub.message.ack_deadline" semantic conventions. It
-// represents the ack deadline in seconds set for the modify ack deadline
-// request.
-func MessagingGCPPubSubMessageAckDeadline(val int) attribute.KeyValue {
- return MessagingGCPPubSubMessageAckDeadlineKey.Int(val)
-}
-
-// MessagingGCPPubSubMessageAckID returns an attribute KeyValue conforming to the
-// "messaging.gcp_pubsub.message.ack_id" semantic conventions. It represents the
-// ack id for a given message.
-func MessagingGCPPubSubMessageAckID(val string) attribute.KeyValue {
- return MessagingGCPPubSubMessageAckIDKey.String(val)
-}
-
-// MessagingGCPPubSubMessageDeliveryAttempt returns an attribute KeyValue
-// conforming to the "messaging.gcp_pubsub.message.delivery_attempt" semantic
-// conventions. It represents the delivery attempt for a given message.
-func MessagingGCPPubSubMessageDeliveryAttempt(val int) attribute.KeyValue {
- return MessagingGCPPubSubMessageDeliveryAttemptKey.Int(val)
-}
-
-// MessagingGCPPubSubMessageOrderingKey returns an attribute KeyValue conforming
-// to the "messaging.gcp_pubsub.message.ordering_key" semantic conventions. It
-// represents the ordering key for a given message. If the attribute is not
-// present, the message does not have an ordering key.
-func MessagingGCPPubSubMessageOrderingKey(val string) attribute.KeyValue {
- return MessagingGCPPubSubMessageOrderingKeyKey.String(val)
-}
-
-// MessagingKafkaMessageKey returns an attribute KeyValue conforming to the
-// "messaging.kafka.message.key" semantic conventions. It represents the message
-// keys in Kafka are used for grouping alike messages to ensure they're processed
-// on the same partition. They differ from `messaging.message.id` in that they're
-// not unique. If the key is `null`, the attribute MUST NOT be set.
-func MessagingKafkaMessageKey(val string) attribute.KeyValue {
- return MessagingKafkaMessageKeyKey.String(val)
-}
-
-// MessagingKafkaMessageTombstone returns an attribute KeyValue conforming to the
-// "messaging.kafka.message.tombstone" semantic conventions. It represents a
-// boolean that is true if the message is a tombstone.
-func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue {
- return MessagingKafkaMessageTombstoneKey.Bool(val)
-}
-
-// MessagingKafkaOffset returns an attribute KeyValue conforming to the
-// "messaging.kafka.offset" semantic conventions. It represents the offset of a
-// record in the corresponding Kafka partition.
-func MessagingKafkaOffset(val int) attribute.KeyValue {
- return MessagingKafkaOffsetKey.Int(val)
-}
-
-// MessagingMessageBodySize returns an attribute KeyValue conforming to the
-// "messaging.message.body.size" semantic conventions. It represents the size of
-// the message body in bytes.
-func MessagingMessageBodySize(val int) attribute.KeyValue {
- return MessagingMessageBodySizeKey.Int(val)
-}
-
-// MessagingMessageConversationID returns an attribute KeyValue conforming to the
-// "messaging.message.conversation_id" semantic conventions. It represents the
-// conversation ID identifying the conversation to which the message belongs,
-// represented as a string. Sometimes called "Correlation ID".
-func MessagingMessageConversationID(val string) attribute.KeyValue {
- return MessagingMessageConversationIDKey.String(val)
-}
-
-// MessagingMessageEnvelopeSize returns an attribute KeyValue conforming to the
-// "messaging.message.envelope.size" semantic conventions. It represents the size
-// of the message body and metadata in bytes.
-func MessagingMessageEnvelopeSize(val int) attribute.KeyValue {
- return MessagingMessageEnvelopeSizeKey.Int(val)
-}
-
-// MessagingMessageID returns an attribute KeyValue conforming to the
-// "messaging.message.id" semantic conventions. It represents a value used by the
-// messaging system as an identifier for the message, represented as a string.
-func MessagingMessageID(val string) attribute.KeyValue {
- return MessagingMessageIDKey.String(val)
-}
-
-// MessagingOperationName returns an attribute KeyValue conforming to the
-// "messaging.operation.name" semantic conventions. It represents the
-// system-specific name of the messaging operation.
-func MessagingOperationName(val string) attribute.KeyValue {
- return MessagingOperationNameKey.String(val)
-}
-
-// MessagingRabbitMQDestinationRoutingKey returns an attribute KeyValue
-// conforming to the "messaging.rabbitmq.destination.routing_key" semantic
-// conventions. It represents the rabbitMQ message routing key.
-func MessagingRabbitMQDestinationRoutingKey(val string) attribute.KeyValue {
- return MessagingRabbitMQDestinationRoutingKeyKey.String(val)
-}
-
-// MessagingRabbitMQMessageDeliveryTag returns an attribute KeyValue conforming
-// to the "messaging.rabbitmq.message.delivery_tag" semantic conventions. It
-// represents the rabbitMQ message delivery tag.
-func MessagingRabbitMQMessageDeliveryTag(val int) attribute.KeyValue {
- return MessagingRabbitMQMessageDeliveryTagKey.Int(val)
-}
-
-// MessagingRocketMQMessageDelayTimeLevel returns an attribute KeyValue
-// conforming to the "messaging.rocketmq.message.delay_time_level" semantic
-// conventions. It represents the delay time level for delay message, which
-// determines the message delay time.
-func MessagingRocketMQMessageDelayTimeLevel(val int) attribute.KeyValue {
- return MessagingRocketMQMessageDelayTimeLevelKey.Int(val)
-}
-
-// MessagingRocketMQMessageDeliveryTimestamp returns an attribute KeyValue
-// conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic
-// conventions. It represents the timestamp in milliseconds that the delay
-// message is expected to be delivered to consumer.
-func MessagingRocketMQMessageDeliveryTimestamp(val int) attribute.KeyValue {
- return MessagingRocketMQMessageDeliveryTimestampKey.Int(val)
-}
-
-// MessagingRocketMQMessageGroup returns an attribute KeyValue conforming to the
-// "messaging.rocketmq.message.group" semantic conventions. It represents the it
-// is essential for FIFO message. Messages that belong to the same message group
-// are always processed one by one within the same consumer group.
-func MessagingRocketMQMessageGroup(val string) attribute.KeyValue {
- return MessagingRocketMQMessageGroupKey.String(val)
-}
-
-// MessagingRocketMQMessageKeys returns an attribute KeyValue conforming to the
-// "messaging.rocketmq.message.keys" semantic conventions. It represents the
-// key(s) of message, another way to mark message besides message id.
-func MessagingRocketMQMessageKeys(val ...string) attribute.KeyValue {
- return MessagingRocketMQMessageKeysKey.StringSlice(val)
-}
-
-// MessagingRocketMQMessageTag returns an attribute KeyValue conforming to the
-// "messaging.rocketmq.message.tag" semantic conventions. It represents the
-// secondary classifier of message besides topic.
-func MessagingRocketMQMessageTag(val string) attribute.KeyValue {
- return MessagingRocketMQMessageTagKey.String(val)
-}
-
-// MessagingRocketMQNamespace returns an attribute KeyValue conforming to the
-// "messaging.rocketmq.namespace" semantic conventions. It represents the
-// namespace of RocketMQ resources, resources in different namespaces are
-// individual.
-func MessagingRocketMQNamespace(val string) attribute.KeyValue {
- return MessagingRocketMQNamespaceKey.String(val)
-}
-
-// MessagingServiceBusMessageDeliveryCount returns an attribute KeyValue
-// conforming to the "messaging.servicebus.message.delivery_count" semantic
-// conventions. It represents the number of deliveries that have been attempted
-// for this message.
-func MessagingServiceBusMessageDeliveryCount(val int) attribute.KeyValue {
- return MessagingServiceBusMessageDeliveryCountKey.Int(val)
-}
-
-// MessagingServiceBusMessageEnqueuedTime returns an attribute KeyValue
-// conforming to the "messaging.servicebus.message.enqueued_time" semantic
-// conventions. It represents the UTC epoch seconds at which the message has been
-// accepted and stored in the entity.
-func MessagingServiceBusMessageEnqueuedTime(val int) attribute.KeyValue {
- return MessagingServiceBusMessageEnqueuedTimeKey.Int(val)
-}
-
-// Enum values for messaging.operation.type
-var (
- // A message is created. "Create" spans always refer to a single message and are
- // used to provide a unique creation context for messages in batch sending
- // scenarios.
- //
- // Stability: development
- MessagingOperationTypeCreate = MessagingOperationTypeKey.String("create")
- // One or more messages are provided for sending to an intermediary. If a single
- // message is sent, the context of the "Send" span can be used as the creation
- // context and no "Create" span needs to be created.
- //
- // Stability: development
- MessagingOperationTypeSend = MessagingOperationTypeKey.String("send")
- // One or more messages are requested by a consumer. This operation refers to
- // pull-based scenarios, where consumers explicitly call methods of messaging
- // SDKs to receive messages.
- //
- // Stability: development
- MessagingOperationTypeReceive = MessagingOperationTypeKey.String("receive")
- // One or more messages are processed by a consumer.
- //
- // Stability: development
- MessagingOperationTypeProcess = MessagingOperationTypeKey.String("process")
- // One or more messages are settled.
- //
- // Stability: development
- MessagingOperationTypeSettle = MessagingOperationTypeKey.String("settle")
-)
-
-// Enum values for messaging.rocketmq.consumption_model
-var (
- // Clustering consumption model
- // Stability: development
- MessagingRocketMQConsumptionModelClustering = MessagingRocketMQConsumptionModelKey.String("clustering")
- // Broadcasting consumption model
- // Stability: development
- MessagingRocketMQConsumptionModelBroadcasting = MessagingRocketMQConsumptionModelKey.String("broadcasting")
-)
-
-// Enum values for messaging.rocketmq.message.type
-var (
- // Normal message
- // Stability: development
- MessagingRocketMQMessageTypeNormal = MessagingRocketMQMessageTypeKey.String("normal")
- // FIFO message
- // Stability: development
- MessagingRocketMQMessageTypeFifo = MessagingRocketMQMessageTypeKey.String("fifo")
- // Delay message
- // Stability: development
- MessagingRocketMQMessageTypeDelay = MessagingRocketMQMessageTypeKey.String("delay")
- // Transaction message
- // Stability: development
- MessagingRocketMQMessageTypeTransaction = MessagingRocketMQMessageTypeKey.String("transaction")
-)
-
-// Enum values for messaging.servicebus.disposition_status
-var (
- // Message is completed
- // Stability: development
- MessagingServiceBusDispositionStatusComplete = MessagingServiceBusDispositionStatusKey.String("complete")
- // Message is abandoned
- // Stability: development
- MessagingServiceBusDispositionStatusAbandon = MessagingServiceBusDispositionStatusKey.String("abandon")
- // Message is sent to dead letter queue
- // Stability: development
- MessagingServiceBusDispositionStatusDeadLetter = MessagingServiceBusDispositionStatusKey.String("dead_letter")
- // Message is deferred
- // Stability: development
- MessagingServiceBusDispositionStatusDefer = MessagingServiceBusDispositionStatusKey.String("defer")
-)
-
-// Enum values for messaging.system
-var (
- // Apache ActiveMQ
- // Stability: development
- MessagingSystemActiveMQ = MessagingSystemKey.String("activemq")
- // Amazon Simple Notification Service (SNS)
- // Stability: development
- MessagingSystemAWSSNS = MessagingSystemKey.String("aws.sns")
- // Amazon Simple Queue Service (SQS)
- // Stability: development
- MessagingSystemAWSSQS = MessagingSystemKey.String("aws_sqs")
- // Azure Event Grid
- // Stability: development
- MessagingSystemEventGrid = MessagingSystemKey.String("eventgrid")
- // Azure Event Hubs
- // Stability: development
- MessagingSystemEventHubs = MessagingSystemKey.String("eventhubs")
- // Azure Service Bus
- // Stability: development
- MessagingSystemServiceBus = MessagingSystemKey.String("servicebus")
- // Google Cloud Pub/Sub
- // Stability: development
- MessagingSystemGCPPubSub = MessagingSystemKey.String("gcp_pubsub")
- // Java Message Service
- // Stability: development
- MessagingSystemJMS = MessagingSystemKey.String("jms")
- // Apache Kafka
- // Stability: development
- MessagingSystemKafka = MessagingSystemKey.String("kafka")
- // RabbitMQ
- // Stability: development
- MessagingSystemRabbitMQ = MessagingSystemKey.String("rabbitmq")
- // Apache RocketMQ
- // Stability: development
- MessagingSystemRocketMQ = MessagingSystemKey.String("rocketmq")
- // Apache Pulsar
- // Stability: development
- MessagingSystemPulsar = MessagingSystemKey.String("pulsar")
-)
-
-// Namespace: network
-const (
- // NetworkCarrierICCKey is the attribute Key conforming to the
- // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
- // alpha-2 2-character country code associated with the mobile carrier network.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: DE
- NetworkCarrierICCKey = attribute.Key("network.carrier.icc")
-
- // NetworkCarrierMCCKey is the attribute Key conforming to the
- // "network.carrier.mcc" semantic conventions. It represents the mobile carrier
- // country code.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 310
- NetworkCarrierMCCKey = attribute.Key("network.carrier.mcc")
-
- // NetworkCarrierMNCKey is the attribute Key conforming to the
- // "network.carrier.mnc" semantic conventions. It represents the mobile carrier
- // network code.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 001
- NetworkCarrierMNCKey = attribute.Key("network.carrier.mnc")
-
- // NetworkCarrierNameKey is the attribute Key conforming to the
- // "network.carrier.name" semantic conventions. It represents the name of the
- // mobile carrier.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: sprint
- NetworkCarrierNameKey = attribute.Key("network.carrier.name")
-
- // NetworkConnectionStateKey is the attribute Key conforming to the
- // "network.connection.state" semantic conventions. It represents the state of
- // network connection.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "close_wait"
- // Note: Connection states are defined as part of the [rfc9293]
- //
- // [rfc9293]: https://datatracker.ietf.org/doc/html/rfc9293#section-3.3.2
- NetworkConnectionStateKey = attribute.Key("network.connection.state")
-
- // NetworkConnectionSubtypeKey is the attribute Key conforming to the
- // "network.connection.subtype" semantic conventions. It represents the this
- // describes more details regarding the connection.type. It may be the type of
- // cell technology connection, but it could be used for describing details about
- // a wifi connection.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: LTE
- NetworkConnectionSubtypeKey = attribute.Key("network.connection.subtype")
-
- // NetworkConnectionTypeKey is the attribute Key conforming to the
- // "network.connection.type" semantic conventions. It represents the internet
- // connection type.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: wifi
- NetworkConnectionTypeKey = attribute.Key("network.connection.type")
-
- // NetworkInterfaceNameKey is the attribute Key conforming to the
- // "network.interface.name" semantic conventions. It represents the network
- // interface name.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "lo", "eth0"
- NetworkInterfaceNameKey = attribute.Key("network.interface.name")
-
- // NetworkIODirectionKey is the attribute Key conforming to the
- // "network.io.direction" semantic conventions. It represents the network IO
- // operation direction.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "transmit"
- NetworkIODirectionKey = attribute.Key("network.io.direction")
-
- // NetworkLocalAddressKey is the attribute Key conforming to the
- // "network.local.address" semantic conventions. It represents the local address
- // of the network connection - IP address or Unix domain socket name.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "10.1.2.80", "/tmp/my.sock"
- NetworkLocalAddressKey = attribute.Key("network.local.address")
-
- // NetworkLocalPortKey is the attribute Key conforming to the
- // "network.local.port" semantic conventions. It represents the local port
- // number of the network connection.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: 65123
- NetworkLocalPortKey = attribute.Key("network.local.port")
-
- // NetworkPeerAddressKey is the attribute Key conforming to the
- // "network.peer.address" semantic conventions. It represents the peer address
- // of the network connection - IP address or Unix domain socket name.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "10.1.2.80", "/tmp/my.sock"
- NetworkPeerAddressKey = attribute.Key("network.peer.address")
-
- // NetworkPeerPortKey is the attribute Key conforming to the "network.peer.port"
- // semantic conventions. It represents the peer port number of the network
- // connection.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: 65123
- NetworkPeerPortKey = attribute.Key("network.peer.port")
-
- // NetworkProtocolNameKey is the attribute Key conforming to the
- // "network.protocol.name" semantic conventions. It represents the
- // [OSI application layer] or non-OSI equivalent.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "amqp", "http", "mqtt"
- // Note: The value SHOULD be normalized to lowercase.
- //
- // [OSI application layer]: https://wikipedia.org/wiki/Application_layer
- NetworkProtocolNameKey = attribute.Key("network.protocol.name")
-
- // NetworkProtocolVersionKey is the attribute Key conforming to the
- // "network.protocol.version" semantic conventions. It represents the actual
- // version of the protocol used for network communication.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "1.1", "2"
- // Note: If protocol version is subject to negotiation (for example using [ALPN]
- // ), this attribute SHOULD be set to the negotiated version. If the actual
- // protocol version is not known, this attribute SHOULD NOT be set.
- //
- // [ALPN]: https://www.rfc-editor.org/rfc/rfc7301.html
- NetworkProtocolVersionKey = attribute.Key("network.protocol.version")
-
- // NetworkTransportKey is the attribute Key conforming to the
- // "network.transport" semantic conventions. It represents the
- // [OSI transport layer] or [inter-process communication method].
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "tcp", "udp"
- // Note: The value SHOULD be normalized to lowercase.
- //
- // Consider always setting the transport when setting a port number, since
- // a port number is ambiguous without knowing the transport. For example
- // different processes could be listening on TCP port 12345 and UDP port 12345.
- //
- // [OSI transport layer]: https://wikipedia.org/wiki/Transport_layer
- // [inter-process communication method]: https://wikipedia.org/wiki/Inter-process_communication
- NetworkTransportKey = attribute.Key("network.transport")
-
- // NetworkTypeKey is the attribute Key conforming to the "network.type" semantic
- // conventions. It represents the [OSI network layer] or non-OSI equivalent.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "ipv4", "ipv6"
- // Note: The value SHOULD be normalized to lowercase.
- //
- // [OSI network layer]: https://wikipedia.org/wiki/Network_layer
- NetworkTypeKey = attribute.Key("network.type")
-)
-
-// NetworkCarrierICC returns an attribute KeyValue conforming to the
-// "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
-// alpha-2 2-character country code associated with the mobile carrier network.
-func NetworkCarrierICC(val string) attribute.KeyValue {
- return NetworkCarrierICCKey.String(val)
-}
-
-// NetworkCarrierMCC returns an attribute KeyValue conforming to the
-// "network.carrier.mcc" semantic conventions. It represents the mobile carrier
-// country code.
-func NetworkCarrierMCC(val string) attribute.KeyValue {
- return NetworkCarrierMCCKey.String(val)
-}
-
-// NetworkCarrierMNC returns an attribute KeyValue conforming to the
-// "network.carrier.mnc" semantic conventions. It represents the mobile carrier
-// network code.
-func NetworkCarrierMNC(val string) attribute.KeyValue {
- return NetworkCarrierMNCKey.String(val)
-}
-
-// NetworkCarrierName returns an attribute KeyValue conforming to the
-// "network.carrier.name" semantic conventions. It represents the name of the
-// mobile carrier.
-func NetworkCarrierName(val string) attribute.KeyValue {
- return NetworkCarrierNameKey.String(val)
-}
-
-// NetworkInterfaceName returns an attribute KeyValue conforming to the
-// "network.interface.name" semantic conventions. It represents the network
-// interface name.
-func NetworkInterfaceName(val string) attribute.KeyValue {
- return NetworkInterfaceNameKey.String(val)
-}
-
-// NetworkLocalAddress returns an attribute KeyValue conforming to the
-// "network.local.address" semantic conventions. It represents the local address
-// of the network connection - IP address or Unix domain socket name.
-func NetworkLocalAddress(val string) attribute.KeyValue {
- return NetworkLocalAddressKey.String(val)
-}
-
-// NetworkLocalPort returns an attribute KeyValue conforming to the
-// "network.local.port" semantic conventions. It represents the local port number
-// of the network connection.
-func NetworkLocalPort(val int) attribute.KeyValue {
- return NetworkLocalPortKey.Int(val)
-}
-
-// NetworkPeerAddress returns an attribute KeyValue conforming to the
-// "network.peer.address" semantic conventions. It represents the peer address of
-// the network connection - IP address or Unix domain socket name.
-func NetworkPeerAddress(val string) attribute.KeyValue {
- return NetworkPeerAddressKey.String(val)
-}
-
-// NetworkPeerPort returns an attribute KeyValue conforming to the
-// "network.peer.port" semantic conventions. It represents the peer port number
-// of the network connection.
-func NetworkPeerPort(val int) attribute.KeyValue {
- return NetworkPeerPortKey.Int(val)
-}
-
-// NetworkProtocolName returns an attribute KeyValue conforming to the
-// "network.protocol.name" semantic conventions. It represents the
-// [OSI application layer] or non-OSI equivalent.
-//
-// [OSI application layer]: https://wikipedia.org/wiki/Application_layer
-func NetworkProtocolName(val string) attribute.KeyValue {
- return NetworkProtocolNameKey.String(val)
-}
-
-// NetworkProtocolVersion returns an attribute KeyValue conforming to the
-// "network.protocol.version" semantic conventions. It represents the actual
-// version of the protocol used for network communication.
-func NetworkProtocolVersion(val string) attribute.KeyValue {
- return NetworkProtocolVersionKey.String(val)
-}
-
-// Enum values for network.connection.state
-var (
- // closed
- // Stability: development
- NetworkConnectionStateClosed = NetworkConnectionStateKey.String("closed")
- // close_wait
- // Stability: development
- NetworkConnectionStateCloseWait = NetworkConnectionStateKey.String("close_wait")
- // closing
- // Stability: development
- NetworkConnectionStateClosing = NetworkConnectionStateKey.String("closing")
- // established
- // Stability: development
- NetworkConnectionStateEstablished = NetworkConnectionStateKey.String("established")
- // fin_wait_1
- // Stability: development
- NetworkConnectionStateFinWait1 = NetworkConnectionStateKey.String("fin_wait_1")
- // fin_wait_2
- // Stability: development
- NetworkConnectionStateFinWait2 = NetworkConnectionStateKey.String("fin_wait_2")
- // last_ack
- // Stability: development
- NetworkConnectionStateLastAck = NetworkConnectionStateKey.String("last_ack")
- // listen
- // Stability: development
- NetworkConnectionStateListen = NetworkConnectionStateKey.String("listen")
- // syn_received
- // Stability: development
- NetworkConnectionStateSynReceived = NetworkConnectionStateKey.String("syn_received")
- // syn_sent
- // Stability: development
- NetworkConnectionStateSynSent = NetworkConnectionStateKey.String("syn_sent")
- // time_wait
- // Stability: development
- NetworkConnectionStateTimeWait = NetworkConnectionStateKey.String("time_wait")
-)
-
-// Enum values for network.connection.subtype
-var (
- // GPRS
- // Stability: development
- NetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String("gprs")
- // EDGE
- // Stability: development
- NetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String("edge")
- // UMTS
- // Stability: development
- NetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String("umts")
- // CDMA
- // Stability: development
- NetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String("cdma")
- // EVDO Rel. 0
- // Stability: development
- NetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String("evdo_0")
- // EVDO Rev. A
- // Stability: development
- NetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String("evdo_a")
- // CDMA2000 1XRTT
- // Stability: development
- NetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String("cdma2000_1xrtt")
- // HSDPA
- // Stability: development
- NetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String("hsdpa")
- // HSUPA
- // Stability: development
- NetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String("hsupa")
- // HSPA
- // Stability: development
- NetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String("hspa")
- // IDEN
- // Stability: development
- NetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String("iden")
- // EVDO Rev. B
- // Stability: development
- NetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String("evdo_b")
- // LTE
- // Stability: development
- NetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String("lte")
- // EHRPD
- // Stability: development
- NetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String("ehrpd")
- // HSPAP
- // Stability: development
- NetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String("hspap")
- // GSM
- // Stability: development
- NetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String("gsm")
- // TD-SCDMA
- // Stability: development
- NetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String("td_scdma")
- // IWLAN
- // Stability: development
- NetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String("iwlan")
- // 5G NR (New Radio)
- // Stability: development
- NetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String("nr")
- // 5G NRNSA (New Radio Non-Standalone)
- // Stability: development
- NetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String("nrnsa")
- // LTE CA
- // Stability: development
- NetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String("lte_ca")
-)
-
-// Enum values for network.connection.type
-var (
- // wifi
- // Stability: development
- NetworkConnectionTypeWifi = NetworkConnectionTypeKey.String("wifi")
- // wired
- // Stability: development
- NetworkConnectionTypeWired = NetworkConnectionTypeKey.String("wired")
- // cell
- // Stability: development
- NetworkConnectionTypeCell = NetworkConnectionTypeKey.String("cell")
- // unavailable
- // Stability: development
- NetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String("unavailable")
- // unknown
- // Stability: development
- NetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String("unknown")
-)
-
-// Enum values for network.io.direction
-var (
- // transmit
- // Stability: development
- NetworkIODirectionTransmit = NetworkIODirectionKey.String("transmit")
- // receive
- // Stability: development
- NetworkIODirectionReceive = NetworkIODirectionKey.String("receive")
-)
-
-// Enum values for network.transport
-var (
- // TCP
- // Stability: stable
- NetworkTransportTCP = NetworkTransportKey.String("tcp")
- // UDP
- // Stability: stable
- NetworkTransportUDP = NetworkTransportKey.String("udp")
- // Named or anonymous pipe.
- // Stability: stable
- NetworkTransportPipe = NetworkTransportKey.String("pipe")
- // Unix domain socket
- // Stability: stable
- NetworkTransportUnix = NetworkTransportKey.String("unix")
- // QUIC
- // Stability: stable
- NetworkTransportQUIC = NetworkTransportKey.String("quic")
-)
-
-// Enum values for network.type
-var (
- // IPv4
- // Stability: stable
- NetworkTypeIPv4 = NetworkTypeKey.String("ipv4")
- // IPv6
- // Stability: stable
- NetworkTypeIPv6 = NetworkTypeKey.String("ipv6")
-)
-
-// Namespace: nfs
-const (
- // NfsOperationNameKey is the attribute Key conforming to the
- // "nfs.operation.name" semantic conventions. It represents the NFSv4+ operation
- // name.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "OPEN", "READ", "GETATTR"
- NfsOperationNameKey = attribute.Key("nfs.operation.name")
-
- // NfsServerRepcacheStatusKey is the attribute Key conforming to the
- // "nfs.server.repcache.status" semantic conventions. It represents the linux:
- // one of "hit" (NFSD_STATS_RC_HITS), "miss" (NFSD_STATS_RC_MISSES), or
- // "nocache" (NFSD_STATS_RC_NOCACHE -- uncacheable).
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: hit
- NfsServerRepcacheStatusKey = attribute.Key("nfs.server.repcache.status")
-)
-
-// NfsOperationName returns an attribute KeyValue conforming to the
-// "nfs.operation.name" semantic conventions. It represents the NFSv4+ operation
-// name.
-func NfsOperationName(val string) attribute.KeyValue {
- return NfsOperationNameKey.String(val)
-}
-
-// NfsServerRepcacheStatus returns an attribute KeyValue conforming to the
-// "nfs.server.repcache.status" semantic conventions. It represents the linux:
-// one of "hit" (NFSD_STATS_RC_HITS), "miss" (NFSD_STATS_RC_MISSES), or "nocache"
-// (NFSD_STATS_RC_NOCACHE -- uncacheable).
-func NfsServerRepcacheStatus(val string) attribute.KeyValue {
- return NfsServerRepcacheStatusKey.String(val)
-}
-
-// Namespace: oci
-const (
- // OCIManifestDigestKey is the attribute Key conforming to the
- // "oci.manifest.digest" semantic conventions. It represents the digest of the
- // OCI image manifest. For container images specifically is the digest by which
- // the container image is known.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // "sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4"
- // Note: Follows [OCI Image Manifest Specification], and specifically the
- // [Digest property].
- // An example can be found in [Example Image Manifest].
- //
- // [OCI Image Manifest Specification]: https://github.com/opencontainers/image-spec/blob/main/manifest.md
- // [Digest property]: https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests
- // [Example Image Manifest]: https://github.com/opencontainers/image-spec/blob/main/manifest.md#example-image-manifest
- OCIManifestDigestKey = attribute.Key("oci.manifest.digest")
-)
-
-// OCIManifestDigest returns an attribute KeyValue conforming to the
-// "oci.manifest.digest" semantic conventions. It represents the digest of the
-// OCI image manifest. For container images specifically is the digest by which
-// the container image is known.
-func OCIManifestDigest(val string) attribute.KeyValue {
- return OCIManifestDigestKey.String(val)
-}
-
-// Namespace: onc_rpc
-const (
- // OncRPCProcedureNameKey is the attribute Key conforming to the
- // "onc_rpc.procedure.name" semantic conventions. It represents the ONC/Sun RPC
- // procedure name.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "OPEN", "READ", "GETATTR"
- OncRPCProcedureNameKey = attribute.Key("onc_rpc.procedure.name")
-
- // OncRPCProcedureNumberKey is the attribute Key conforming to the
- // "onc_rpc.procedure.number" semantic conventions. It represents the ONC/Sun
- // RPC procedure number.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- OncRPCProcedureNumberKey = attribute.Key("onc_rpc.procedure.number")
-
- // OncRPCProgramNameKey is the attribute Key conforming to the
- // "onc_rpc.program.name" semantic conventions. It represents the ONC/Sun RPC
- // program name.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "portmapper", "nfs"
- OncRPCProgramNameKey = attribute.Key("onc_rpc.program.name")
-
- // OncRPCVersionKey is the attribute Key conforming to the "onc_rpc.version"
- // semantic conventions. It represents the ONC/Sun RPC program version.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- OncRPCVersionKey = attribute.Key("onc_rpc.version")
-)
-
-// OncRPCProcedureName returns an attribute KeyValue conforming to the
-// "onc_rpc.procedure.name" semantic conventions. It represents the ONC/Sun RPC
-// procedure name.
-func OncRPCProcedureName(val string) attribute.KeyValue {
- return OncRPCProcedureNameKey.String(val)
-}
-
-// OncRPCProcedureNumber returns an attribute KeyValue conforming to the
-// "onc_rpc.procedure.number" semantic conventions. It represents the ONC/Sun RPC
-// procedure number.
-func OncRPCProcedureNumber(val int) attribute.KeyValue {
- return OncRPCProcedureNumberKey.Int(val)
-}
-
-// OncRPCProgramName returns an attribute KeyValue conforming to the
-// "onc_rpc.program.name" semantic conventions. It represents the ONC/Sun RPC
-// program name.
-func OncRPCProgramName(val string) attribute.KeyValue {
- return OncRPCProgramNameKey.String(val)
-}
-
-// OncRPCVersion returns an attribute KeyValue conforming to the
-// "onc_rpc.version" semantic conventions. It represents the ONC/Sun RPC program
-// version.
-func OncRPCVersion(val int) attribute.KeyValue {
- return OncRPCVersionKey.Int(val)
-}
-
-// Namespace: openai
-const (
- // OpenAIRequestServiceTierKey is the attribute Key conforming to the
- // "openai.request.service_tier" semantic conventions. It represents the service
- // tier requested. May be a specific tier, default, or auto.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "auto", "default"
- OpenAIRequestServiceTierKey = attribute.Key("openai.request.service_tier")
-
- // OpenAIResponseServiceTierKey is the attribute Key conforming to the
- // "openai.response.service_tier" semantic conventions. It represents the
- // service tier used for the response.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "scale", "default"
- OpenAIResponseServiceTierKey = attribute.Key("openai.response.service_tier")
-
- // OpenAIResponseSystemFingerprintKey is the attribute Key conforming to the
- // "openai.response.system_fingerprint" semantic conventions. It represents a
- // fingerprint to track any eventual change in the Generative AI environment.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "fp_44709d6fcb"
- OpenAIResponseSystemFingerprintKey = attribute.Key("openai.response.system_fingerprint")
-)
-
-// OpenAIResponseServiceTier returns an attribute KeyValue conforming to the
-// "openai.response.service_tier" semantic conventions. It represents the service
-// tier used for the response.
-func OpenAIResponseServiceTier(val string) attribute.KeyValue {
- return OpenAIResponseServiceTierKey.String(val)
-}
-
-// OpenAIResponseSystemFingerprint returns an attribute KeyValue conforming to
-// the "openai.response.system_fingerprint" semantic conventions. It represents a
-// fingerprint to track any eventual change in the Generative AI environment.
-func OpenAIResponseSystemFingerprint(val string) attribute.KeyValue {
- return OpenAIResponseSystemFingerprintKey.String(val)
-}
-
-// Enum values for openai.request.service_tier
-var (
- // The system will utilize scale tier credits until they are exhausted.
- // Stability: development
- OpenAIRequestServiceTierAuto = OpenAIRequestServiceTierKey.String("auto")
- // The system will utilize the default scale tier.
- // Stability: development
- OpenAIRequestServiceTierDefault = OpenAIRequestServiceTierKey.String("default")
-)
-
-// Namespace: openshift
-const (
- // OpenShiftClusterquotaNameKey is the attribute Key conforming to the
- // "openshift.clusterquota.name" semantic conventions. It represents the name of
- // the cluster quota.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "opentelemetry"
- OpenShiftClusterquotaNameKey = attribute.Key("openshift.clusterquota.name")
-
- // OpenShiftClusterquotaUIDKey is the attribute Key conforming to the
- // "openshift.clusterquota.uid" semantic conventions. It represents the UID of
- // the cluster quota.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
- OpenShiftClusterquotaUIDKey = attribute.Key("openshift.clusterquota.uid")
-)
-
-// OpenShiftClusterquotaName returns an attribute KeyValue conforming to the
-// "openshift.clusterquota.name" semantic conventions. It represents the name of
-// the cluster quota.
-func OpenShiftClusterquotaName(val string) attribute.KeyValue {
- return OpenShiftClusterquotaNameKey.String(val)
-}
-
-// OpenShiftClusterquotaUID returns an attribute KeyValue conforming to the
-// "openshift.clusterquota.uid" semantic conventions. It represents the UID of
-// the cluster quota.
-func OpenShiftClusterquotaUID(val string) attribute.KeyValue {
- return OpenShiftClusterquotaUIDKey.String(val)
-}
-
-// Namespace: opentracing
-const (
- // OpenTracingRefTypeKey is the attribute Key conforming to the
- // "opentracing.ref_type" semantic conventions. It represents the parent-child
- // Reference type.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // Note: The causal relationship between a child Span and a parent Span.
- OpenTracingRefTypeKey = attribute.Key("opentracing.ref_type")
-)
-
-// Enum values for opentracing.ref_type
-var (
- // The parent Span depends on the child Span in some capacity
- // Stability: development
- OpenTracingRefTypeChildOf = OpenTracingRefTypeKey.String("child_of")
- // The parent Span doesn't depend in any way on the result of the child Span
- // Stability: development
- OpenTracingRefTypeFollowsFrom = OpenTracingRefTypeKey.String("follows_from")
-)
-
-// Namespace: os
-const (
- // OSBuildIDKey is the attribute Key conforming to the "os.build_id" semantic
- // conventions. It represents the unique identifier for a particular build or
- // compilation of the operating system.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "TQ3C.230805.001.B2", "20E247", "22621"
- OSBuildIDKey = attribute.Key("os.build_id")
-
- // OSDescriptionKey is the attribute Key conforming to the "os.description"
- // semantic conventions. It represents the human readable (not intended to be
- // parsed) OS version information, like e.g. reported by `ver` or
- // `lsb_release -a` commands.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Microsoft Windows [Version 10.0.18363.778]", "Ubuntu 18.04.1 LTS"
- OSDescriptionKey = attribute.Key("os.description")
-
- // OSNameKey is the attribute Key conforming to the "os.name" semantic
- // conventions. It represents the human readable operating system name.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "iOS", "Android", "Ubuntu"
- OSNameKey = attribute.Key("os.name")
-
- // OSTypeKey is the attribute Key conforming to the "os.type" semantic
- // conventions. It represents the operating system type.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- OSTypeKey = attribute.Key("os.type")
-
- // OSVersionKey is the attribute Key conforming to the "os.version" semantic
- // conventions. It represents the version string of the operating system as
- // defined in [Version Attributes].
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "14.2.1", "18.04.1"
- //
- // [Version Attributes]: /docs/resource/README.md#version-attributes
- OSVersionKey = attribute.Key("os.version")
-)
-
-// OSBuildID returns an attribute KeyValue conforming to the "os.build_id"
-// semantic conventions. It represents the unique identifier for a particular
-// build or compilation of the operating system.
-func OSBuildID(val string) attribute.KeyValue {
- return OSBuildIDKey.String(val)
-}
-
-// OSDescription returns an attribute KeyValue conforming to the "os.description"
-// semantic conventions. It represents the human readable (not intended to be
-// parsed) OS version information, like e.g. reported by `ver` or
-// `lsb_release -a` commands.
-func OSDescription(val string) attribute.KeyValue {
- return OSDescriptionKey.String(val)
-}
-
-// OSName returns an attribute KeyValue conforming to the "os.name" semantic
-// conventions. It represents the human readable operating system name.
-func OSName(val string) attribute.KeyValue {
- return OSNameKey.String(val)
-}
-
-// OSVersion returns an attribute KeyValue conforming to the "os.version"
-// semantic conventions. It represents the version string of the operating system
-// as defined in [Version Attributes].
-//
-// [Version Attributes]: /docs/resource/README.md#version-attributes
-func OSVersion(val string) attribute.KeyValue {
- return OSVersionKey.String(val)
-}
-
-// Enum values for os.type
-var (
- // Microsoft Windows
- // Stability: development
- OSTypeWindows = OSTypeKey.String("windows")
- // Linux
- // Stability: development
- OSTypeLinux = OSTypeKey.String("linux")
- // Apple Darwin
- // Stability: development
- OSTypeDarwin = OSTypeKey.String("darwin")
- // FreeBSD
- // Stability: development
- OSTypeFreeBSD = OSTypeKey.String("freebsd")
- // NetBSD
- // Stability: development
- OSTypeNetBSD = OSTypeKey.String("netbsd")
- // OpenBSD
- // Stability: development
- OSTypeOpenBSD = OSTypeKey.String("openbsd")
- // DragonFly BSD
- // Stability: development
- OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd")
- // HP-UX (Hewlett Packard Unix)
- // Stability: development
- OSTypeHPUX = OSTypeKey.String("hpux")
- // AIX (Advanced Interactive eXecutive)
- // Stability: development
- OSTypeAIX = OSTypeKey.String("aix")
- // SunOS, Oracle Solaris
- // Stability: development
- OSTypeSolaris = OSTypeKey.String("solaris")
- // IBM z/OS
- // Stability: development
- OSTypeZOS = OSTypeKey.String("zos")
-)
-
-// Namespace: otel
-const (
- // OTelComponentNameKey is the attribute Key conforming to the
- // "otel.component.name" semantic conventions. It represents a name uniquely
- // identifying the instance of the OpenTelemetry component within its containing
- // SDK instance.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "otlp_grpc_span_exporter/0", "custom-name"
- // Note: Implementations SHOULD ensure a low cardinality for this attribute,
- // even across application or SDK restarts.
- // E.g. implementations MUST NOT use UUIDs as values for this attribute.
- //
- // Implementations MAY achieve these goals by following a
- // `/` pattern, e.g.
- // `batching_span_processor/0`.
- // Hereby `otel.component.type` refers to the corresponding attribute value of
- // the component.
- //
- // The value of `instance-counter` MAY be automatically assigned by the
- // component and uniqueness within the enclosing SDK instance MUST be
- // guaranteed.
- // For example, `` MAY be implemented by using a monotonically
- // increasing counter (starting with `0`), which is incremented every time an
- // instance of the given component type is started.
- //
- // With this implementation, for example the first Batching Span Processor would
- // have `batching_span_processor/0`
- // as `otel.component.name`, the second one `batching_span_processor/1` and so
- // on.
- // These values will therefore be reused in the case of an application restart.
- OTelComponentNameKey = attribute.Key("otel.component.name")
-
- // OTelComponentTypeKey is the attribute Key conforming to the
- // "otel.component.type" semantic conventions. It represents a name identifying
- // the type of the OpenTelemetry component.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "batching_span_processor", "com.example.MySpanExporter"
- // Note: If none of the standardized values apply, implementations SHOULD use
- // the language-defined name of the type.
- // E.g. for Java the fully qualified classname SHOULD be used in this case.
- OTelComponentTypeKey = attribute.Key("otel.component.type")
-
- // OTelEventNameKey is the attribute Key conforming to the "otel.event.name"
- // semantic conventions. It represents the identifies the class / type of event.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "browser.mouse.click", "device.app.lifecycle"
- // Note: This attribute SHOULD be used by non-OTLP exporters when destination
- // does not support `EventName` or equivalent field. This attribute MAY be used
- // by applications using existing logging libraries so that it can be used to
- // set the `EventName` field by Collector or SDK components.
- OTelEventNameKey = attribute.Key("otel.event.name")
-
- // OTelScopeNameKey is the attribute Key conforming to the "otel.scope.name"
- // semantic conventions. It represents the name of the instrumentation scope - (
- // `InstrumentationScope.Name` in OTLP).
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "io.opentelemetry.contrib.mongodb"
- OTelScopeNameKey = attribute.Key("otel.scope.name")
-
- // OTelScopeSchemaURLKey is the attribute Key conforming to the
- // "otel.scope.schema_url" semantic conventions. It represents the schema URL of
- // the instrumentation scope.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "https://opentelemetry.io/schemas/1.31.0"
- OTelScopeSchemaURLKey = attribute.Key("otel.scope.schema_url")
-
- // OTelScopeVersionKey is the attribute Key conforming to the
- // "otel.scope.version" semantic conventions. It represents the version of the
- // instrumentation scope - (`InstrumentationScope.Version` in OTLP).
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "1.0.0"
- OTelScopeVersionKey = attribute.Key("otel.scope.version")
-
- // OTelSpanParentOriginKey is the attribute Key conforming to the
- // "otel.span.parent.origin" semantic conventions. It represents the determines
- // whether the span has a parent span, and if so,
- // [whether it is a remote parent].
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- //
- // [whether it is a remote parent]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote
- OTelSpanParentOriginKey = attribute.Key("otel.span.parent.origin")
-
- // OTelSpanSamplingResultKey is the attribute Key conforming to the
- // "otel.span.sampling_result" semantic conventions. It represents the result
- // value of the sampler for this span.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- OTelSpanSamplingResultKey = attribute.Key("otel.span.sampling_result")
-
- // OTelStatusCodeKey is the attribute Key conforming to the "otel.status_code"
- // semantic conventions. It represents the name of the code, either "OK" or
- // "ERROR". MUST NOT be set if the status code is UNSET.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples:
- OTelStatusCodeKey = attribute.Key("otel.status_code")
-
- // OTelStatusDescriptionKey is the attribute Key conforming to the
- // "otel.status_description" semantic conventions. It represents the description
- // of the Status if it has a value, otherwise not set.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "resource not found"
- OTelStatusDescriptionKey = attribute.Key("otel.status_description")
-)
-
-// OTelComponentName returns an attribute KeyValue conforming to the
-// "otel.component.name" semantic conventions. It represents a name uniquely
-// identifying the instance of the OpenTelemetry component within its containing
-// SDK instance.
-func OTelComponentName(val string) attribute.KeyValue {
- return OTelComponentNameKey.String(val)
-}
-
-// OTelEventName returns an attribute KeyValue conforming to the
-// "otel.event.name" semantic conventions. It represents the identifies the class
-// / type of event.
-func OTelEventName(val string) attribute.KeyValue {
- return OTelEventNameKey.String(val)
-}
-
-// OTelScopeName returns an attribute KeyValue conforming to the
-// "otel.scope.name" semantic conventions. It represents the name of the
-// instrumentation scope - (`InstrumentationScope.Name` in OTLP).
-func OTelScopeName(val string) attribute.KeyValue {
- return OTelScopeNameKey.String(val)
-}
-
-// OTelScopeSchemaURL returns an attribute KeyValue conforming to the
-// "otel.scope.schema_url" semantic conventions. It represents the schema URL of
-// the instrumentation scope.
-func OTelScopeSchemaURL(val string) attribute.KeyValue {
- return OTelScopeSchemaURLKey.String(val)
-}
-
-// OTelScopeVersion returns an attribute KeyValue conforming to the
-// "otel.scope.version" semantic conventions. It represents the version of the
-// instrumentation scope - (`InstrumentationScope.Version` in OTLP).
-func OTelScopeVersion(val string) attribute.KeyValue {
- return OTelScopeVersionKey.String(val)
-}
-
-// OTelStatusDescription returns an attribute KeyValue conforming to the
-// "otel.status_description" semantic conventions. It represents the description
-// of the Status if it has a value, otherwise not set.
-func OTelStatusDescription(val string) attribute.KeyValue {
- return OTelStatusDescriptionKey.String(val)
-}
-
-// Enum values for otel.component.type
-var (
- // The builtin SDK batching span processor
- //
- // Stability: development
- OTelComponentTypeBatchingSpanProcessor = OTelComponentTypeKey.String("batching_span_processor")
- // The builtin SDK simple span processor
- //
- // Stability: development
- OTelComponentTypeSimpleSpanProcessor = OTelComponentTypeKey.String("simple_span_processor")
- // The builtin SDK batching log record processor
- //
- // Stability: development
- OTelComponentTypeBatchingLogProcessor = OTelComponentTypeKey.String("batching_log_processor")
- // The builtin SDK simple log record processor
- //
- // Stability: development
- OTelComponentTypeSimpleLogProcessor = OTelComponentTypeKey.String("simple_log_processor")
- // OTLP span exporter over gRPC with protobuf serialization
- //
- // Stability: development
- OTelComponentTypeOtlpGRPCSpanExporter = OTelComponentTypeKey.String("otlp_grpc_span_exporter")
- // OTLP span exporter over HTTP with protobuf serialization
- //
- // Stability: development
- OTelComponentTypeOtlpHTTPSpanExporter = OTelComponentTypeKey.String("otlp_http_span_exporter")
- // OTLP span exporter over HTTP with JSON serialization
- //
- // Stability: development
- OTelComponentTypeOtlpHTTPJSONSpanExporter = OTelComponentTypeKey.String("otlp_http_json_span_exporter")
- // Zipkin span exporter over HTTP
- //
- // Stability: development
- OTelComponentTypeZipkinHTTPSpanExporter = OTelComponentTypeKey.String("zipkin_http_span_exporter")
- // OTLP log record exporter over gRPC with protobuf serialization
- //
- // Stability: development
- OTelComponentTypeOtlpGRPCLogExporter = OTelComponentTypeKey.String("otlp_grpc_log_exporter")
- // OTLP log record exporter over HTTP with protobuf serialization
- //
- // Stability: development
- OTelComponentTypeOtlpHTTPLogExporter = OTelComponentTypeKey.String("otlp_http_log_exporter")
- // OTLP log record exporter over HTTP with JSON serialization
- //
- // Stability: development
- OTelComponentTypeOtlpHTTPJSONLogExporter = OTelComponentTypeKey.String("otlp_http_json_log_exporter")
- // The builtin SDK periodically exporting metric reader
- //
- // Stability: development
- OTelComponentTypePeriodicMetricReader = OTelComponentTypeKey.String("periodic_metric_reader")
- // OTLP metric exporter over gRPC with protobuf serialization
- //
- // Stability: development
- OTelComponentTypeOtlpGRPCMetricExporter = OTelComponentTypeKey.String("otlp_grpc_metric_exporter")
- // OTLP metric exporter over HTTP with protobuf serialization
- //
- // Stability: development
- OTelComponentTypeOtlpHTTPMetricExporter = OTelComponentTypeKey.String("otlp_http_metric_exporter")
- // OTLP metric exporter over HTTP with JSON serialization
- //
- // Stability: development
- OTelComponentTypeOtlpHTTPJSONMetricExporter = OTelComponentTypeKey.String("otlp_http_json_metric_exporter")
- // Prometheus metric exporter over HTTP with the default text-based format
- //
- // Stability: development
- OTelComponentTypePrometheusHTTPTextMetricExporter = OTelComponentTypeKey.String("prometheus_http_text_metric_exporter")
-)
-
-// Enum values for otel.span.parent.origin
-var (
- // The span does not have a parent, it is a root span
- // Stability: development
- OTelSpanParentOriginNone = OTelSpanParentOriginKey.String("none")
- // The span has a parent and the parent's span context [isRemote()] is false
- // Stability: development
- //
- // [isRemote()]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote
- OTelSpanParentOriginLocal = OTelSpanParentOriginKey.String("local")
- // The span has a parent and the parent's span context [isRemote()] is true
- // Stability: development
- //
- // [isRemote()]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote
- OTelSpanParentOriginRemote = OTelSpanParentOriginKey.String("remote")
-)
-
-// Enum values for otel.span.sampling_result
-var (
- // The span is not sampled and not recording
- // Stability: development
- OTelSpanSamplingResultDrop = OTelSpanSamplingResultKey.String("DROP")
- // The span is not sampled, but recording
- // Stability: development
- OTelSpanSamplingResultRecordOnly = OTelSpanSamplingResultKey.String("RECORD_ONLY")
- // The span is sampled and recording
- // Stability: development
- OTelSpanSamplingResultRecordAndSample = OTelSpanSamplingResultKey.String("RECORD_AND_SAMPLE")
-)
-
-// Enum values for otel.status_code
-var (
- // The operation has been validated by an Application developer or Operator to
- // have completed successfully.
- // Stability: stable
- OTelStatusCodeOk = OTelStatusCodeKey.String("OK")
- // The operation contains an error.
- // Stability: stable
- OTelStatusCodeError = OTelStatusCodeKey.String("ERROR")
-)
-
-// Namespace: pprof
-const (
- // PprofLocationIsFoldedKey is the attribute Key conforming to the
- // "pprof.location.is_folded" semantic conventions. It represents the provides
- // an indication that multiple symbols map to this location's address, for
- // example due to identical code folding by the linker. In that case the line
- // information represents one of the multiple symbols. This field must be
- // recomputed when the symbolization state of the profile changes.
- //
- // Type: boolean
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- PprofLocationIsFoldedKey = attribute.Key("pprof.location.is_folded")
-
- // PprofMappingHasFilenamesKey is the attribute Key conforming to the
- // "pprof.mapping.has_filenames" semantic conventions. It represents the
- // indicates that there are filenames related to this mapping.
- //
- // Type: boolean
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- PprofMappingHasFilenamesKey = attribute.Key("pprof.mapping.has_filenames")
-
- // PprofMappingHasFunctionsKey is the attribute Key conforming to the
- // "pprof.mapping.has_functions" semantic conventions. It represents the
- // indicates that there are functions related to this mapping.
- //
- // Type: boolean
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- PprofMappingHasFunctionsKey = attribute.Key("pprof.mapping.has_functions")
-
- // PprofMappingHasInlineFramesKey is the attribute Key conforming to the
- // "pprof.mapping.has_inline_frames" semantic conventions. It represents the
- // indicates that there are inline frames related to this mapping.
- //
- // Type: boolean
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- PprofMappingHasInlineFramesKey = attribute.Key("pprof.mapping.has_inline_frames")
-
- // PprofMappingHasLineNumbersKey is the attribute Key conforming to the
- // "pprof.mapping.has_line_numbers" semantic conventions. It represents the
- // indicates that there are line numbers related to this mapping.
- //
- // Type: boolean
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- PprofMappingHasLineNumbersKey = attribute.Key("pprof.mapping.has_line_numbers")
-
- // PprofProfileCommentKey is the attribute Key conforming to the
- // "pprof.profile.comment" semantic conventions. It represents the free-form
- // text associated with the profile. This field should not be used to store any
- // machine-readable information, it is only for human-friendly content.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "hello world", "bazinga"
- PprofProfileCommentKey = attribute.Key("pprof.profile.comment")
-
- // PprofProfileDocURLKey is the attribute Key conforming to the
- // "pprof.profile.doc_url" semantic conventions. It represents the documentation
- // link for this profile type.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "http://pprof.example.com/cpu-profile.html"
- // Note: The URL must be absolute and may be missing if the profile was
- // generated by code that did not supply a link
- PprofProfileDocURLKey = attribute.Key("pprof.profile.doc_url")
-
- // PprofProfileDropFramesKey is the attribute Key conforming to the
- // "pprof.profile.drop_frames" semantic conventions. It represents the frames
- // with Function.function_name fully matching the regexp will be dropped from
- // the samples, along with their successors.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "/foobar/"
- PprofProfileDropFramesKey = attribute.Key("pprof.profile.drop_frames")
-
- // PprofProfileKeepFramesKey is the attribute Key conforming to the
- // "pprof.profile.keep_frames" semantic conventions. It represents the frames
- // with Function.function_name fully matching the regexp will be kept, even if
- // it matches drop_frames.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "/bazinga/"
- PprofProfileKeepFramesKey = attribute.Key("pprof.profile.keep_frames")
-)
-
-// PprofLocationIsFolded returns an attribute KeyValue conforming to the
-// "pprof.location.is_folded" semantic conventions. It represents the provides an
-// indication that multiple symbols map to this location's address, for example
-// due to identical code folding by the linker. In that case the line information
-// represents one of the multiple symbols. This field must be recomputed when the
-// symbolization state of the profile changes.
-func PprofLocationIsFolded(val bool) attribute.KeyValue {
- return PprofLocationIsFoldedKey.Bool(val)
-}
-
-// PprofMappingHasFilenames returns an attribute KeyValue conforming to the
-// "pprof.mapping.has_filenames" semantic conventions. It represents the
-// indicates that there are filenames related to this mapping.
-func PprofMappingHasFilenames(val bool) attribute.KeyValue {
- return PprofMappingHasFilenamesKey.Bool(val)
-}
-
-// PprofMappingHasFunctions returns an attribute KeyValue conforming to the
-// "pprof.mapping.has_functions" semantic conventions. It represents the
-// indicates that there are functions related to this mapping.
-func PprofMappingHasFunctions(val bool) attribute.KeyValue {
- return PprofMappingHasFunctionsKey.Bool(val)
-}
-
-// PprofMappingHasInlineFrames returns an attribute KeyValue conforming to the
-// "pprof.mapping.has_inline_frames" semantic conventions. It represents the
-// indicates that there are inline frames related to this mapping.
-func PprofMappingHasInlineFrames(val bool) attribute.KeyValue {
- return PprofMappingHasInlineFramesKey.Bool(val)
-}
-
-// PprofMappingHasLineNumbers returns an attribute KeyValue conforming to the
-// "pprof.mapping.has_line_numbers" semantic conventions. It represents the
-// indicates that there are line numbers related to this mapping.
-func PprofMappingHasLineNumbers(val bool) attribute.KeyValue {
- return PprofMappingHasLineNumbersKey.Bool(val)
-}
-
-// PprofProfileComment returns an attribute KeyValue conforming to the
-// "pprof.profile.comment" semantic conventions. It represents the free-form text
-// associated with the profile. This field should not be used to store any
-// machine-readable information, it is only for human-friendly content.
-func PprofProfileComment(val ...string) attribute.KeyValue {
- return PprofProfileCommentKey.StringSlice(val)
-}
-
-// PprofProfileDocURL returns an attribute KeyValue conforming to the
-// "pprof.profile.doc_url" semantic conventions. It represents the documentation
-// link for this profile type.
-func PprofProfileDocURL(val string) attribute.KeyValue {
- return PprofProfileDocURLKey.String(val)
-}
-
-// PprofProfileDropFrames returns an attribute KeyValue conforming to the
-// "pprof.profile.drop_frames" semantic conventions. It represents the frames
-// with Function.function_name fully matching the regexp will be dropped from the
-// samples, along with their successors.
-func PprofProfileDropFrames(val string) attribute.KeyValue {
- return PprofProfileDropFramesKey.String(val)
-}
-
-// PprofProfileKeepFrames returns an attribute KeyValue conforming to the
-// "pprof.profile.keep_frames" semantic conventions. It represents the frames
-// with Function.function_name fully matching the regexp will be kept, even if it
-// matches drop_frames.
-func PprofProfileKeepFrames(val string) attribute.KeyValue {
- return PprofProfileKeepFramesKey.String(val)
-}
-
-// Namespace: process
-const (
- // ProcessArgsCountKey is the attribute Key conforming to the
- // "process.args_count" semantic conventions. It represents the length of the
- // process.command_args array.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 4
- // Note: This field can be useful for querying or performing bucket analysis on
- // how many arguments were provided to start a process. More arguments may be an
- // indication of suspicious activity.
- ProcessArgsCountKey = attribute.Key("process.args_count")
-
- // ProcessCommandKey is the attribute Key conforming to the "process.command"
- // semantic conventions. It represents the command used to launch the process
- // (i.e. the command name). On Linux based systems, can be set to the zeroth
- // string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter
- // extracted from `GetCommandLineW`.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "cmd/otelcol"
- ProcessCommandKey = attribute.Key("process.command")
-
- // ProcessCommandArgsKey is the attribute Key conforming to the
- // "process.command_args" semantic conventions. It represents the all the
- // command arguments (including the command/executable itself) as received by
- // the process. On Linux-based systems (and some other Unixoid systems
- // supporting procfs), can be set according to the list of null-delimited
- // strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this
- // would be the full argv vector passed to `main`. SHOULD NOT be collected by
- // default unless there is sanitization that excludes sensitive data.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "cmd/otecol", "--config=config.yaml"
- ProcessCommandArgsKey = attribute.Key("process.command_args")
-
- // ProcessCommandLineKey is the attribute Key conforming to the
- // "process.command_line" semantic conventions. It represents the full command
- // used to launch the process as a single string representing the full command.
- // On Windows, can be set to the result of `GetCommandLineW`. Do not set this if
- // you have to assemble it just for monitoring; use `process.command_args`
- // instead. SHOULD NOT be collected by default unless there is sanitization that
- // excludes sensitive data.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "C:\cmd\otecol --config="my directory\config.yaml""
- ProcessCommandLineKey = attribute.Key("process.command_line")
-
- // ProcessContextSwitchTypeKey is the attribute Key conforming to the
- // "process.context_switch.type" semantic conventions. It represents the
- // specifies whether the context switches for this data point were voluntary or
- // involuntary.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- ProcessContextSwitchTypeKey = attribute.Key("process.context_switch.type")
-
- // ProcessCreationTimeKey is the attribute Key conforming to the
- // "process.creation.time" semantic conventions. It represents the date and time
- // the process was created, in ISO 8601 format.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "2023-11-21T09:25:34.853Z"
- ProcessCreationTimeKey = attribute.Key("process.creation.time")
-
- // ProcessExecutableBuildIDGNUKey is the attribute Key conforming to the
- // "process.executable.build_id.gnu" semantic conventions. It represents the GNU
- // build ID as found in the `.note.gnu.build-id` ELF section (hex string).
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "c89b11207f6479603b0d49bf291c092c2b719293"
- ProcessExecutableBuildIDGNUKey = attribute.Key("process.executable.build_id.gnu")
-
- // ProcessExecutableBuildIDGoKey is the attribute Key conforming to the
- // "process.executable.build_id.go" semantic conventions. It represents the Go
- // build ID as retrieved by `go tool buildid `.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // "foh3mEXu7BLZjsN9pOwG/kATcXlYVCDEFouRMQed_/WwRFB1hPo9LBkekthSPG/x8hMC8emW2cCjXD0_1aY"
- ProcessExecutableBuildIDGoKey = attribute.Key("process.executable.build_id.go")
-
- // ProcessExecutableBuildIDHtlhashKey is the attribute Key conforming to the
- // "process.executable.build_id.htlhash" semantic conventions. It represents the
- // profiling specific build ID for executables. See the OTel specification for
- // Profiles for more information.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "600DCAFE4A110000F2BF38C493F5FB92"
- ProcessExecutableBuildIDHtlhashKey = attribute.Key("process.executable.build_id.htlhash")
-
- // ProcessExecutableNameKey is the attribute Key conforming to the
- // "process.executable.name" semantic conventions. It represents the name of the
- // process executable. On Linux based systems, this SHOULD be set to the base
- // name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to
- // the base name of `GetProcessImageFileNameW`.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "otelcol"
- ProcessExecutableNameKey = attribute.Key("process.executable.name")
-
- // ProcessExecutablePathKey is the attribute Key conforming to the
- // "process.executable.path" semantic conventions. It represents the full path
- // to the process executable. On Linux based systems, can be set to the target
- // of `proc/[pid]/exe`. On Windows, can be set to the result of
- // `GetProcessImageFileNameW`.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "/usr/bin/cmd/otelcol"
- ProcessExecutablePathKey = attribute.Key("process.executable.path")
-
- // ProcessExitCodeKey is the attribute Key conforming to the "process.exit.code"
- // semantic conventions. It represents the exit code of the process.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 127
- ProcessExitCodeKey = attribute.Key("process.exit.code")
-
- // ProcessExitTimeKey is the attribute Key conforming to the "process.exit.time"
- // semantic conventions. It represents the date and time the process exited, in
- // ISO 8601 format.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "2023-11-21T09:26:12.315Z"
- ProcessExitTimeKey = attribute.Key("process.exit.time")
-
- // ProcessGroupLeaderPIDKey is the attribute Key conforming to the
- // "process.group_leader.pid" semantic conventions. It represents the PID of the
- // process's group leader. This is also the process group ID (PGID) of the
- // process.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 23
- ProcessGroupLeaderPIDKey = attribute.Key("process.group_leader.pid")
-
- // ProcessInteractiveKey is the attribute Key conforming to the
- // "process.interactive" semantic conventions. It represents the whether the
- // process is connected to an interactive shell.
- //
- // Type: boolean
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- ProcessInteractiveKey = attribute.Key("process.interactive")
-
- // ProcessLinuxCgroupKey is the attribute Key conforming to the
- // "process.linux.cgroup" semantic conventions. It represents the control group
- // associated with the process.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "1:name=systemd:/user.slice/user-1000.slice/session-3.scope",
- // "0::/user.slice/user-1000.slice/user@1000.service/tmux-spawn-0267755b-4639-4a27-90ed-f19f88e53748.scope"
- // Note: Control groups (cgroups) are a kernel feature used to organize and
- // manage process resources. This attribute provides the path(s) to the
- // cgroup(s) associated with the process, which should match the contents of the
- // [/proc/[PID]/cgroup] file.
- //
- // [/proc/[PID]/cgroup]: https://man7.org/linux/man-pages/man7/cgroups.7.html
- ProcessLinuxCgroupKey = attribute.Key("process.linux.cgroup")
-
- // ProcessOwnerKey is the attribute Key conforming to the "process.owner"
- // semantic conventions. It represents the username of the user that owns the
- // process.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "root"
- ProcessOwnerKey = attribute.Key("process.owner")
-
- // ProcessParentPIDKey is the attribute Key conforming to the
- // "process.parent_pid" semantic conventions. It represents the parent Process
- // identifier (PPID).
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 111
- ProcessParentPIDKey = attribute.Key("process.parent_pid")
-
- // ProcessPIDKey is the attribute Key conforming to the "process.pid" semantic
- // conventions. It represents the process identifier (PID).
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 1234
- ProcessPIDKey = attribute.Key("process.pid")
-
- // ProcessRealUserIDKey is the attribute Key conforming to the
- // "process.real_user.id" semantic conventions. It represents the real user ID
- // (RUID) of the process.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 1000
- ProcessRealUserIDKey = attribute.Key("process.real_user.id")
-
- // ProcessRealUserNameKey is the attribute Key conforming to the
- // "process.real_user.name" semantic conventions. It represents the username of
- // the real user of the process.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "operator"
- ProcessRealUserNameKey = attribute.Key("process.real_user.name")
-
- // ProcessRuntimeDescriptionKey is the attribute Key conforming to the
- // "process.runtime.description" semantic conventions. It represents an
- // additional description about the runtime of the process, for example a
- // specific vendor customization of the runtime environment.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0
- ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description")
-
- // ProcessRuntimeNameKey is the attribute Key conforming to the
- // "process.runtime.name" semantic conventions. It represents the name of the
- // runtime of this process.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "OpenJDK Runtime Environment"
- ProcessRuntimeNameKey = attribute.Key("process.runtime.name")
-
- // ProcessRuntimeVersionKey is the attribute Key conforming to the
- // "process.runtime.version" semantic conventions. It represents the version of
- // the runtime of this process, as returned by the runtime without modification.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 14.0.2
- ProcessRuntimeVersionKey = attribute.Key("process.runtime.version")
-
- // ProcessSavedUserIDKey is the attribute Key conforming to the
- // "process.saved_user.id" semantic conventions. It represents the saved user ID
- // (SUID) of the process.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 1002
- ProcessSavedUserIDKey = attribute.Key("process.saved_user.id")
-
- // ProcessSavedUserNameKey is the attribute Key conforming to the
- // "process.saved_user.name" semantic conventions. It represents the username of
- // the saved user.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "operator"
- ProcessSavedUserNameKey = attribute.Key("process.saved_user.name")
-
- // ProcessSessionLeaderPIDKey is the attribute Key conforming to the
- // "process.session_leader.pid" semantic conventions. It represents the PID of
- // the process's session leader. This is also the session ID (SID) of the
- // process.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 14
- ProcessSessionLeaderPIDKey = attribute.Key("process.session_leader.pid")
-
- // ProcessStateKey is the attribute Key conforming to the "process.state"
- // semantic conventions. It represents the process state, e.g.,
- // [Linux Process State Codes].
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "running"
- //
- // [Linux Process State Codes]: https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES
- ProcessStateKey = attribute.Key("process.state")
-
- // ProcessTitleKey is the attribute Key conforming to the "process.title"
- // semantic conventions. It represents the process title (proctitle).
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "cat /etc/hostname", "xfce4-session", "bash"
- // Note: In many Unix-like systems, process title (proctitle), is the string
- // that represents the name or command line of a running process, displayed by
- // system monitoring tools like ps, top, and htop.
- ProcessTitleKey = attribute.Key("process.title")
-
- // ProcessUserIDKey is the attribute Key conforming to the "process.user.id"
- // semantic conventions. It represents the effective user ID (EUID) of the
- // process.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 1001
- ProcessUserIDKey = attribute.Key("process.user.id")
-
- // ProcessUserNameKey is the attribute Key conforming to the "process.user.name"
- // semantic conventions. It represents the username of the effective user of the
- // process.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "root"
- ProcessUserNameKey = attribute.Key("process.user.name")
-
- // ProcessVpidKey is the attribute Key conforming to the "process.vpid" semantic
- // conventions. It represents the virtual process identifier.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 12
- // Note: The process ID within a PID namespace. This is not necessarily unique
- // across all processes on the host but it is unique within the process
- // namespace that the process exists within.
- ProcessVpidKey = attribute.Key("process.vpid")
-
- // ProcessWorkingDirectoryKey is the attribute Key conforming to the
- // "process.working_directory" semantic conventions. It represents the working
- // directory of the process.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "/root"
- ProcessWorkingDirectoryKey = attribute.Key("process.working_directory")
-)
-
-// ProcessArgsCount returns an attribute KeyValue conforming to the
-// "process.args_count" semantic conventions. It represents the length of the
-// process.command_args array.
-func ProcessArgsCount(val int) attribute.KeyValue {
- return ProcessArgsCountKey.Int(val)
-}
-
-// ProcessCommand returns an attribute KeyValue conforming to the
-// "process.command" semantic conventions. It represents the command used to
-// launch the process (i.e. the command name). On Linux based systems, can be set
-// to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the
-// first parameter extracted from `GetCommandLineW`.
-func ProcessCommand(val string) attribute.KeyValue {
- return ProcessCommandKey.String(val)
-}
-
-// ProcessCommandArgs returns an attribute KeyValue conforming to the
-// "process.command_args" semantic conventions. It represents the all the command
-// arguments (including the command/executable itself) as received by the
-// process. On Linux-based systems (and some other Unixoid systems supporting
-// procfs), can be set according to the list of null-delimited strings extracted
-// from `proc/[pid]/cmdline`. For libc-based executables, this would be the full
-// argv vector passed to `main`. SHOULD NOT be collected by default unless there
-// is sanitization that excludes sensitive data.
-func ProcessCommandArgs(val ...string) attribute.KeyValue {
- return ProcessCommandArgsKey.StringSlice(val)
-}
-
-// ProcessCommandLine returns an attribute KeyValue conforming to the
-// "process.command_line" semantic conventions. It represents the full command
-// used to launch the process as a single string representing the full command.
-// On Windows, can be set to the result of `GetCommandLineW`. Do not set this if
-// you have to assemble it just for monitoring; use `process.command_args`
-// instead. SHOULD NOT be collected by default unless there is sanitization that
-// excludes sensitive data.
-func ProcessCommandLine(val string) attribute.KeyValue {
- return ProcessCommandLineKey.String(val)
-}
-
-// ProcessCreationTime returns an attribute KeyValue conforming to the
-// "process.creation.time" semantic conventions. It represents the date and time
-// the process was created, in ISO 8601 format.
-func ProcessCreationTime(val string) attribute.KeyValue {
- return ProcessCreationTimeKey.String(val)
-}
-
-// ProcessEnvironmentVariable returns an attribute KeyValue conforming to the
-// "process.environment_variable" semantic conventions. It represents the process
-// environment variables, `` being the environment variable name, the value
-// being the environment variable value.
-func ProcessEnvironmentVariable(key string, val string) attribute.KeyValue {
- return attribute.String("process.environment_variable."+key, val)
-}
-
-// ProcessExecutableBuildIDGNU returns an attribute KeyValue conforming to the
-// "process.executable.build_id.gnu" semantic conventions. It represents the GNU
-// build ID as found in the `.note.gnu.build-id` ELF section (hex string).
-func ProcessExecutableBuildIDGNU(val string) attribute.KeyValue {
- return ProcessExecutableBuildIDGNUKey.String(val)
-}
-
-// ProcessExecutableBuildIDGo returns an attribute KeyValue conforming to the
-// "process.executable.build_id.go" semantic conventions. It represents the Go
-// build ID as retrieved by `go tool buildid `.
-func ProcessExecutableBuildIDGo(val string) attribute.KeyValue {
- return ProcessExecutableBuildIDGoKey.String(val)
-}
-
-// ProcessExecutableBuildIDHtlhash returns an attribute KeyValue conforming to
-// the "process.executable.build_id.htlhash" semantic conventions. It represents
-// the profiling specific build ID for executables. See the OTel specification
-// for Profiles for more information.
-func ProcessExecutableBuildIDHtlhash(val string) attribute.KeyValue {
- return ProcessExecutableBuildIDHtlhashKey.String(val)
-}
-
-// ProcessExecutableName returns an attribute KeyValue conforming to the
-// "process.executable.name" semantic conventions. It represents the name of the
-// process executable. On Linux based systems, this SHOULD be set to the base
-// name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the
-// base name of `GetProcessImageFileNameW`.
-func ProcessExecutableName(val string) attribute.KeyValue {
- return ProcessExecutableNameKey.String(val)
-}
-
-// ProcessExecutablePath returns an attribute KeyValue conforming to the
-// "process.executable.path" semantic conventions. It represents the full path to
-// the process executable. On Linux based systems, can be set to the target of
-// `proc/[pid]/exe`. On Windows, can be set to the result of
-// `GetProcessImageFileNameW`.
-func ProcessExecutablePath(val string) attribute.KeyValue {
- return ProcessExecutablePathKey.String(val)
-}
-
-// ProcessExitCode returns an attribute KeyValue conforming to the
-// "process.exit.code" semantic conventions. It represents the exit code of the
-// process.
-func ProcessExitCode(val int) attribute.KeyValue {
- return ProcessExitCodeKey.Int(val)
-}
-
-// ProcessExitTime returns an attribute KeyValue conforming to the
-// "process.exit.time" semantic conventions. It represents the date and time the
-// process exited, in ISO 8601 format.
-func ProcessExitTime(val string) attribute.KeyValue {
- return ProcessExitTimeKey.String(val)
-}
-
-// ProcessGroupLeaderPID returns an attribute KeyValue conforming to the
-// "process.group_leader.pid" semantic conventions. It represents the PID of the
-// process's group leader. This is also the process group ID (PGID) of the
-// process.
-func ProcessGroupLeaderPID(val int) attribute.KeyValue {
- return ProcessGroupLeaderPIDKey.Int(val)
-}
-
-// ProcessInteractive returns an attribute KeyValue conforming to the
-// "process.interactive" semantic conventions. It represents the whether the
-// process is connected to an interactive shell.
-func ProcessInteractive(val bool) attribute.KeyValue {
- return ProcessInteractiveKey.Bool(val)
-}
-
-// ProcessLinuxCgroup returns an attribute KeyValue conforming to the
-// "process.linux.cgroup" semantic conventions. It represents the control group
-// associated with the process.
-func ProcessLinuxCgroup(val string) attribute.KeyValue {
- return ProcessLinuxCgroupKey.String(val)
-}
-
-// ProcessOwner returns an attribute KeyValue conforming to the "process.owner"
-// semantic conventions. It represents the username of the user that owns the
-// process.
-func ProcessOwner(val string) attribute.KeyValue {
- return ProcessOwnerKey.String(val)
-}
-
-// ProcessParentPID returns an attribute KeyValue conforming to the
-// "process.parent_pid" semantic conventions. It represents the parent Process
-// identifier (PPID).
-func ProcessParentPID(val int) attribute.KeyValue {
- return ProcessParentPIDKey.Int(val)
-}
-
-// ProcessPID returns an attribute KeyValue conforming to the "process.pid"
-// semantic conventions. It represents the process identifier (PID).
-func ProcessPID(val int) attribute.KeyValue {
- return ProcessPIDKey.Int(val)
-}
-
-// ProcessRealUserID returns an attribute KeyValue conforming to the
-// "process.real_user.id" semantic conventions. It represents the real user ID
-// (RUID) of the process.
-func ProcessRealUserID(val int) attribute.KeyValue {
- return ProcessRealUserIDKey.Int(val)
-}
-
-// ProcessRealUserName returns an attribute KeyValue conforming to the
-// "process.real_user.name" semantic conventions. It represents the username of
-// the real user of the process.
-func ProcessRealUserName(val string) attribute.KeyValue {
- return ProcessRealUserNameKey.String(val)
-}
-
-// ProcessRuntimeDescription returns an attribute KeyValue conforming to the
-// "process.runtime.description" semantic conventions. It represents an
-// additional description about the runtime of the process, for example a
-// specific vendor customization of the runtime environment.
-func ProcessRuntimeDescription(val string) attribute.KeyValue {
- return ProcessRuntimeDescriptionKey.String(val)
-}
-
-// ProcessRuntimeName returns an attribute KeyValue conforming to the
-// "process.runtime.name" semantic conventions. It represents the name of the
-// runtime of this process.
-func ProcessRuntimeName(val string) attribute.KeyValue {
- return ProcessRuntimeNameKey.String(val)
-}
-
-// ProcessRuntimeVersion returns an attribute KeyValue conforming to the
-// "process.runtime.version" semantic conventions. It represents the version of
-// the runtime of this process, as returned by the runtime without modification.
-func ProcessRuntimeVersion(val string) attribute.KeyValue {
- return ProcessRuntimeVersionKey.String(val)
-}
-
-// ProcessSavedUserID returns an attribute KeyValue conforming to the
-// "process.saved_user.id" semantic conventions. It represents the saved user ID
-// (SUID) of the process.
-func ProcessSavedUserID(val int) attribute.KeyValue {
- return ProcessSavedUserIDKey.Int(val)
-}
-
-// ProcessSavedUserName returns an attribute KeyValue conforming to the
-// "process.saved_user.name" semantic conventions. It represents the username of
-// the saved user.
-func ProcessSavedUserName(val string) attribute.KeyValue {
- return ProcessSavedUserNameKey.String(val)
-}
-
-// ProcessSessionLeaderPID returns an attribute KeyValue conforming to the
-// "process.session_leader.pid" semantic conventions. It represents the PID of
-// the process's session leader. This is also the session ID (SID) of the
-// process.
-func ProcessSessionLeaderPID(val int) attribute.KeyValue {
- return ProcessSessionLeaderPIDKey.Int(val)
-}
-
-// ProcessTitle returns an attribute KeyValue conforming to the "process.title"
-// semantic conventions. It represents the process title (proctitle).
-func ProcessTitle(val string) attribute.KeyValue {
- return ProcessTitleKey.String(val)
-}
-
-// ProcessUserID returns an attribute KeyValue conforming to the
-// "process.user.id" semantic conventions. It represents the effective user ID
-// (EUID) of the process.
-func ProcessUserID(val int) attribute.KeyValue {
- return ProcessUserIDKey.Int(val)
-}
-
-// ProcessUserName returns an attribute KeyValue conforming to the
-// "process.user.name" semantic conventions. It represents the username of the
-// effective user of the process.
-func ProcessUserName(val string) attribute.KeyValue {
- return ProcessUserNameKey.String(val)
-}
-
-// ProcessVpid returns an attribute KeyValue conforming to the "process.vpid"
-// semantic conventions. It represents the virtual process identifier.
-func ProcessVpid(val int) attribute.KeyValue {
- return ProcessVpidKey.Int(val)
-}
-
-// ProcessWorkingDirectory returns an attribute KeyValue conforming to the
-// "process.working_directory" semantic conventions. It represents the working
-// directory of the process.
-func ProcessWorkingDirectory(val string) attribute.KeyValue {
- return ProcessWorkingDirectoryKey.String(val)
-}
-
-// Enum values for process.context_switch.type
-var (
- // voluntary
- // Stability: development
- ProcessContextSwitchTypeVoluntary = ProcessContextSwitchTypeKey.String("voluntary")
- // involuntary
- // Stability: development
- ProcessContextSwitchTypeInvoluntary = ProcessContextSwitchTypeKey.String("involuntary")
-)
-
-// Enum values for process.state
-var (
- // running
- // Stability: development
- ProcessStateRunning = ProcessStateKey.String("running")
- // sleeping
- // Stability: development
- ProcessStateSleeping = ProcessStateKey.String("sleeping")
- // stopped
- // Stability: development
- ProcessStateStopped = ProcessStateKey.String("stopped")
- // defunct
- // Stability: development
- ProcessStateDefunct = ProcessStateKey.String("defunct")
-)
-
-// Namespace: profile
-const (
- // ProfileFrameTypeKey is the attribute Key conforming to the
- // "profile.frame.type" semantic conventions. It represents the describes the
- // interpreter or compiler of a single frame.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "cpython"
- ProfileFrameTypeKey = attribute.Key("profile.frame.type")
-)
-
-// Enum values for profile.frame.type
-var (
- // [.NET]
- //
- // Stability: development
- //
- // [.NET]: https://wikipedia.org/wiki/.NET
- ProfileFrameTypeDotnet = ProfileFrameTypeKey.String("dotnet")
- // [JVM]
- //
- // Stability: development
- //
- // [JVM]: https://wikipedia.org/wiki/Java_virtual_machine
- ProfileFrameTypeJVM = ProfileFrameTypeKey.String("jvm")
- // [Kernel]
- //
- // Stability: development
- //
- // [Kernel]: https://wikipedia.org/wiki/Kernel_(operating_system)
- ProfileFrameTypeKernel = ProfileFrameTypeKey.String("kernel")
- // Can be one of but not limited to [C], [C++], [Go] or [Rust]. If possible, a
- // more precise value MUST be used.
- //
- // Stability: development
- //
- // [C]: https://wikipedia.org/wiki/C_(programming_language)
- // [C++]: https://wikipedia.org/wiki/C%2B%2B
- // [Go]: https://wikipedia.org/wiki/Go_(programming_language)
- // [Rust]: https://wikipedia.org/wiki/Rust_(programming_language)
- ProfileFrameTypeNative = ProfileFrameTypeKey.String("native")
- // [Perl]
- //
- // Stability: development
- //
- // [Perl]: https://wikipedia.org/wiki/Perl
- ProfileFrameTypePerl = ProfileFrameTypeKey.String("perl")
- // [PHP]
- //
- // Stability: development
- //
- // [PHP]: https://wikipedia.org/wiki/PHP
- ProfileFrameTypePHP = ProfileFrameTypeKey.String("php")
- // [Python]
- //
- // Stability: development
- //
- // [Python]: https://wikipedia.org/wiki/Python_(programming_language)
- ProfileFrameTypeCpython = ProfileFrameTypeKey.String("cpython")
- // [Ruby]
- //
- // Stability: development
- //
- // [Ruby]: https://wikipedia.org/wiki/Ruby_(programming_language)
- ProfileFrameTypeRuby = ProfileFrameTypeKey.String("ruby")
- // [V8JS]
- //
- // Stability: development
- //
- // [V8JS]: https://wikipedia.org/wiki/V8_(JavaScript_engine)
- ProfileFrameTypeV8JS = ProfileFrameTypeKey.String("v8js")
- // [Erlang]
- //
- // Stability: development
- //
- // [Erlang]: https://en.wikipedia.org/wiki/BEAM_(Erlang_virtual_machine)
- ProfileFrameTypeBeam = ProfileFrameTypeKey.String("beam")
- // [Go],
- //
- // Stability: development
- //
- // [Go]: https://wikipedia.org/wiki/Go_(programming_language)
- ProfileFrameTypeGo = ProfileFrameTypeKey.String("go")
- // [Rust]
- //
- // Stability: development
- //
- // [Rust]: https://wikipedia.org/wiki/Rust_(programming_language)
- ProfileFrameTypeRust = ProfileFrameTypeKey.String("rust")
-)
-
-// Namespace: rpc
-const (
- // RPCMessageCompressedSizeKey is the attribute Key conforming to the
- // "rpc.message.compressed_size" semantic conventions. It represents the
- // compressed size of the message in bytes.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- RPCMessageCompressedSizeKey = attribute.Key("rpc.message.compressed_size")
-
- // RPCMessageIDKey is the attribute Key conforming to the "rpc.message.id"
- // semantic conventions. It MUST be calculated as two different counters
- // starting from `1` one for sent messages and one for received message..
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // Note: This way we guarantee that the values will be consistent between
- // different implementations.
- RPCMessageIDKey = attribute.Key("rpc.message.id")
-
- // RPCMessageTypeKey is the attribute Key conforming to the "rpc.message.type"
- // semantic conventions. It represents the whether this is a received or sent
- // message.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- RPCMessageTypeKey = attribute.Key("rpc.message.type")
-
- // RPCMessageUncompressedSizeKey is the attribute Key conforming to the
- // "rpc.message.uncompressed_size" semantic conventions. It represents the
- // uncompressed size of the message in bytes.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- RPCMessageUncompressedSizeKey = attribute.Key("rpc.message.uncompressed_size")
-
- // RPCMethodKey is the attribute Key conforming to the "rpc.method" semantic
- // conventions. It represents the fully-qualified logical name of the method
- // from the RPC interface perspective.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "com.example.ExampleService/exampleMethod", "EchoService/Echo",
- // "_OTHER"
- // Note: The method name MAY have unbounded cardinality in edge or error cases.
- //
- // Some RPC frameworks or libraries provide a fixed set of recognized methods
- // for client stubs and server implementations. Instrumentations for such
- // frameworks MUST set this attribute to the original method name only
- // when the method is recognized by the framework or library.
- //
- // When the method is not recognized, for example, when the server receives
- // a request for a method that is not predefined on the server, or when
- // instrumentation is not able to reliably detect if the method is predefined,
- // the attribute MUST be set to `_OTHER`. In such cases, tracing
- // instrumentations MUST also set `rpc.method_original` attribute to
- // the original method value.
- //
- // If the RPC instrumentation could end up converting valid RPC methods to
- // `_OTHER`, then it SHOULD provide a way to configure the list of recognized
- // RPC methods.
- //
- // The `rpc.method` can be different from the name of any implementing
- // method/function.
- // The `code.function.name` attribute may be used to record the fully-qualified
- // method actually executing the call on the server side, or the
- // RPC client stub method on the client side.
- RPCMethodKey = attribute.Key("rpc.method")
-
- // RPCMethodOriginalKey is the attribute Key conforming to the
- // "rpc.method_original" semantic conventions. It represents the original name
- // of the method used by the client.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "com.myservice.EchoService/catchAll",
- // "com.myservice.EchoService/unknownMethod", "InvalidMethod"
- RPCMethodOriginalKey = attribute.Key("rpc.method_original")
-
- // RPCResponseStatusCodeKey is the attribute Key conforming to the
- // "rpc.response.status_code" semantic conventions. It represents the status
- // code of the RPC returned by the RPC server or generated by the client.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "OK", "DEADLINE_EXCEEDED", "-32602"
- // Note: Usually it represents an error code, but may also represent partial
- // success, warning, or differentiate between various types of successful
- // outcomes.
- // Semantic conventions for individual RPC frameworks SHOULD document what
- // `rpc.response.status_code` means in the context of that system and which
- // values are considered to represent errors.
- RPCResponseStatusCodeKey = attribute.Key("rpc.response.status_code")
-
- // RPCSystemNameKey is the attribute Key conforming to the "rpc.system.name"
- // semantic conventions. It represents the Remote Procedure Call (RPC) system.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // Note: The client and server RPC systems may differ for the same RPC
- // interaction. For example, a client may use Apache Dubbo or Connect RPC to
- // communicate with a server that uses gRPC since both protocols provide
- // compatibility with gRPC.
- RPCSystemNameKey = attribute.Key("rpc.system.name")
-)
-
-// RPCMessageCompressedSize returns an attribute KeyValue conforming to the
-// "rpc.message.compressed_size" semantic conventions. It represents the
-// compressed size of the message in bytes.
-func RPCMessageCompressedSize(val int) attribute.KeyValue {
- return RPCMessageCompressedSizeKey.Int(val)
-}
-
-// RPCMessageID returns an attribute KeyValue conforming to the "rpc.message.id"
-// semantic conventions. It MUST be calculated as two different counters starting
-// from `1` one for sent messages and one for received message..
-func RPCMessageID(val int) attribute.KeyValue {
- return RPCMessageIDKey.Int(val)
-}
-
-// RPCMessageUncompressedSize returns an attribute KeyValue conforming to the
-// "rpc.message.uncompressed_size" semantic conventions. It represents the
-// uncompressed size of the message in bytes.
-func RPCMessageUncompressedSize(val int) attribute.KeyValue {
- return RPCMessageUncompressedSizeKey.Int(val)
-}
-
-// RPCMethod returns an attribute KeyValue conforming to the "rpc.method"
-// semantic conventions. It represents the fully-qualified logical name of the
-// method from the RPC interface perspective.
-func RPCMethod(val string) attribute.KeyValue {
- return RPCMethodKey.String(val)
-}
-
-// RPCMethodOriginal returns an attribute KeyValue conforming to the
-// "rpc.method_original" semantic conventions. It represents the original name of
-// the method used by the client.
-func RPCMethodOriginal(val string) attribute.KeyValue {
- return RPCMethodOriginalKey.String(val)
-}
-
-// RPCRequestMetadata returns an attribute KeyValue conforming to the
-// "rpc.request.metadata" semantic conventions. It represents the RPC request
-// metadata, `` being the normalized RPC metadata key (lowercase), the value
-// being the metadata values.
-func RPCRequestMetadata(key string, val ...string) attribute.KeyValue {
- return attribute.StringSlice("rpc.request.metadata."+key, val)
-}
-
-// RPCResponseMetadata returns an attribute KeyValue conforming to the
-// "rpc.response.metadata" semantic conventions. It represents the RPC response
-// metadata, `` being the normalized RPC metadata key (lowercase), the value
-// being the metadata values.
-func RPCResponseMetadata(key string, val ...string) attribute.KeyValue {
- return attribute.StringSlice("rpc.response.metadata."+key, val)
-}
-
-// RPCResponseStatusCode returns an attribute KeyValue conforming to the
-// "rpc.response.status_code" semantic conventions. It represents the status code
-// of the RPC returned by the RPC server or generated by the client.
-func RPCResponseStatusCode(val string) attribute.KeyValue {
- return RPCResponseStatusCodeKey.String(val)
-}
-
-// Enum values for rpc.message.type
-var (
- // sent
- // Stability: development
- RPCMessageTypeSent = RPCMessageTypeKey.String("SENT")
- // received
- // Stability: development
- RPCMessageTypeReceived = RPCMessageTypeKey.String("RECEIVED")
-)
-
-// Enum values for rpc.system.name
-var (
- // [gRPC]
- // Stability: development
- //
- // [gRPC]: https://grpc.io/
- RPCSystemNameGRPC = RPCSystemNameKey.String("grpc")
- // [Apache Dubbo]
- // Stability: development
- //
- // [Apache Dubbo]: https://dubbo.apache.org/
- RPCSystemNameDubbo = RPCSystemNameKey.String("dubbo")
- // [Connect RPC]
- // Stability: development
- //
- // [Connect RPC]: https://connectrpc.com/
- RPCSystemNameConnectrpc = RPCSystemNameKey.String("connectrpc")
- // [JSON-RPC]
- // Stability: development
- //
- // [JSON-RPC]: https://www.jsonrpc.org/
- RPCSystemNameJSONRPC = RPCSystemNameKey.String("jsonrpc")
-)
-
-// Namespace: security_rule
-const (
- // SecurityRuleCategoryKey is the attribute Key conforming to the
- // "security_rule.category" semantic conventions. It represents a categorization
- // value keyword used by the entity using the rule for detection of this event.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Attempted Information Leak"
- SecurityRuleCategoryKey = attribute.Key("security_rule.category")
-
- // SecurityRuleDescriptionKey is the attribute Key conforming to the
- // "security_rule.description" semantic conventions. It represents the
- // description of the rule generating the event.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Block requests to public DNS over HTTPS / TLS protocols"
- SecurityRuleDescriptionKey = attribute.Key("security_rule.description")
-
- // SecurityRuleLicenseKey is the attribute Key conforming to the
- // "security_rule.license" semantic conventions. It represents the name of the
- // license under which the rule used to generate this event is made available.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Apache 2.0"
- SecurityRuleLicenseKey = attribute.Key("security_rule.license")
-
- // SecurityRuleNameKey is the attribute Key conforming to the
- // "security_rule.name" semantic conventions. It represents the name of the rule
- // or signature generating the event.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "BLOCK_DNS_over_TLS"
- SecurityRuleNameKey = attribute.Key("security_rule.name")
-
- // SecurityRuleReferenceKey is the attribute Key conforming to the
- // "security_rule.reference" semantic conventions. It represents the reference
- // URL to additional information about the rule used to generate this event.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "https://en.wikipedia.org/wiki/DNS_over_TLS"
- // Note: The URL can point to the vendor’s documentation about the rule. If
- // that’s not available, it can also be a link to a more general page
- // describing this type of alert.
- SecurityRuleReferenceKey = attribute.Key("security_rule.reference")
-
- // SecurityRuleRulesetNameKey is the attribute Key conforming to the
- // "security_rule.ruleset.name" semantic conventions. It represents the name of
- // the ruleset, policy, group, or parent category in which the rule used to
- // generate this event is a member.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Standard_Protocol_Filters"
- SecurityRuleRulesetNameKey = attribute.Key("security_rule.ruleset.name")
-
- // SecurityRuleUUIDKey is the attribute Key conforming to the
- // "security_rule.uuid" semantic conventions. It represents a rule ID that is
- // unique within the scope of a set or group of agents, observers, or other
- // entities using the rule for detection of this event.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "550e8400-e29b-41d4-a716-446655440000", "1100110011"
- SecurityRuleUUIDKey = attribute.Key("security_rule.uuid")
-
- // SecurityRuleVersionKey is the attribute Key conforming to the
- // "security_rule.version" semantic conventions. It represents the version /
- // revision of the rule being used for analysis.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "1.0.0"
- SecurityRuleVersionKey = attribute.Key("security_rule.version")
-)
-
-// SecurityRuleCategory returns an attribute KeyValue conforming to the
-// "security_rule.category" semantic conventions. It represents a categorization
-// value keyword used by the entity using the rule for detection of this event.
-func SecurityRuleCategory(val string) attribute.KeyValue {
- return SecurityRuleCategoryKey.String(val)
-}
-
-// SecurityRuleDescription returns an attribute KeyValue conforming to the
-// "security_rule.description" semantic conventions. It represents the
-// description of the rule generating the event.
-func SecurityRuleDescription(val string) attribute.KeyValue {
- return SecurityRuleDescriptionKey.String(val)
-}
-
-// SecurityRuleLicense returns an attribute KeyValue conforming to the
-// "security_rule.license" semantic conventions. It represents the name of the
-// license under which the rule used to generate this event is made available.
-func SecurityRuleLicense(val string) attribute.KeyValue {
- return SecurityRuleLicenseKey.String(val)
-}
-
-// SecurityRuleName returns an attribute KeyValue conforming to the
-// "security_rule.name" semantic conventions. It represents the name of the rule
-// or signature generating the event.
-func SecurityRuleName(val string) attribute.KeyValue {
- return SecurityRuleNameKey.String(val)
-}
-
-// SecurityRuleReference returns an attribute KeyValue conforming to the
-// "security_rule.reference" semantic conventions. It represents the reference
-// URL to additional information about the rule used to generate this event.
-func SecurityRuleReference(val string) attribute.KeyValue {
- return SecurityRuleReferenceKey.String(val)
-}
-
-// SecurityRuleRulesetName returns an attribute KeyValue conforming to the
-// "security_rule.ruleset.name" semantic conventions. It represents the name of
-// the ruleset, policy, group, or parent category in which the rule used to
-// generate this event is a member.
-func SecurityRuleRulesetName(val string) attribute.KeyValue {
- return SecurityRuleRulesetNameKey.String(val)
-}
-
-// SecurityRuleUUID returns an attribute KeyValue conforming to the
-// "security_rule.uuid" semantic conventions. It represents a rule ID that is
-// unique within the scope of a set or group of agents, observers, or other
-// entities using the rule for detection of this event.
-func SecurityRuleUUID(val string) attribute.KeyValue {
- return SecurityRuleUUIDKey.String(val)
-}
-
-// SecurityRuleVersion returns an attribute KeyValue conforming to the
-// "security_rule.version" semantic conventions. It represents the version /
-// revision of the rule being used for analysis.
-func SecurityRuleVersion(val string) attribute.KeyValue {
- return SecurityRuleVersionKey.String(val)
-}
-
-// Namespace: server
-const (
- // ServerAddressKey is the attribute Key conforming to the "server.address"
- // semantic conventions. It represents the server domain name if available
- // without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "example.com", "10.1.2.80", "/tmp/my.sock"
- // Note: When observed from the client side, and when communicating through an
- // intermediary, `server.address` SHOULD represent the server address behind any
- // intermediaries, for example proxies, if it's available.
- ServerAddressKey = attribute.Key("server.address")
-
- // ServerPortKey is the attribute Key conforming to the "server.port" semantic
- // conventions. It represents the server port number.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: 80, 8080, 443
- // Note: When observed from the client side, and when communicating through an
- // intermediary, `server.port` SHOULD represent the server port behind any
- // intermediaries, for example proxies, if it's available.
- ServerPortKey = attribute.Key("server.port")
-)
-
-// ServerAddress returns an attribute KeyValue conforming to the "server.address"
-// semantic conventions. It represents the server domain name if available
-// without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
-func ServerAddress(val string) attribute.KeyValue {
- return ServerAddressKey.String(val)
-}
-
-// ServerPort returns an attribute KeyValue conforming to the "server.port"
-// semantic conventions. It represents the server port number.
-func ServerPort(val int) attribute.KeyValue {
- return ServerPortKey.Int(val)
-}
-
-// Namespace: service
-const (
- // ServiceInstanceIDKey is the attribute Key conforming to the
- // "service.instance.id" semantic conventions. It represents the string ID of
- // the service instance.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "627cc493-f310-47de-96bd-71410b7dec09"
- // Note: MUST be unique for each instance of the same
- // `service.namespace,service.name` pair (in other words
- // `service.namespace,service.name,service.instance.id` triplet MUST be globally
- // unique). The ID helps to
- // distinguish instances of the same service that exist at the same time (e.g.
- // instances of a horizontally scaled
- // service).
- //
- // Implementations, such as SDKs, are recommended to generate a random Version 1
- // or Version 4 [RFC
- // 4122] UUID, but are free to use an inherent unique ID as
- // the source of
- // this value if stability is desirable. In that case, the ID SHOULD be used as
- // source of a UUID Version 5 and
- // SHOULD use the following UUID as the namespace:
- // `4d63009a-8d0f-11ee-aad7-4c796ed8e320`.
- //
- // UUIDs are typically recommended, as only an opaque value for the purposes of
- // identifying a service instance is
- // needed. Similar to what can be seen in the man page for the
- // [`/etc/machine-id`] file, the underlying
- // data, such as pod name and namespace should be treated as confidential, being
- // the user's choice to expose it
- // or not via another resource attribute.
- //
- // For applications running behind an application server (like unicorn), we do
- // not recommend using one identifier
- // for all processes participating in the application. Instead, it's recommended
- // each division (e.g. a worker
- // thread in unicorn) to have its own instance.id.
- //
- // It's not recommended for a Collector to set `service.instance.id` if it can't
- // unambiguously determine the
- // service instance that is generating that telemetry. For instance, creating an
- // UUID based on `pod.name` will
- // likely be wrong, as the Collector might not know from which container within
- // that pod the telemetry originated.
- // However, Collectors can set the `service.instance.id` if they can
- // unambiguously determine the service instance
- // for that telemetry. This is typically the case for scraping receivers, as
- // they know the target address and
- // port.
- //
- // [RFC
- // 4122]: https://www.ietf.org/rfc/rfc4122.txt
- // [`/etc/machine-id`]: https://www.freedesktop.org/software/systemd/man/latest/machine-id.html
- ServiceInstanceIDKey = attribute.Key("service.instance.id")
-
- // ServiceNameKey is the attribute Key conforming to the "service.name" semantic
- // conventions. It represents the logical name of the service.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "shoppingcart"
- // Note: MUST be the same for all instances of horizontally scaled services. If
- // the value was not specified, SDKs MUST fallback to `unknown_service:`
- // concatenated with [`process.executable.name`], e.g. `unknown_service:bash`.
- // If `process.executable.name` is not available, the value MUST be set to
- // `unknown_service`.
- //
- // [`process.executable.name`]: process.md
- ServiceNameKey = attribute.Key("service.name")
-
- // ServiceNamespaceKey is the attribute Key conforming to the
- // "service.namespace" semantic conventions. It represents a namespace for
- // `service.name`.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Shop"
- // Note: A string value having a meaning that helps to distinguish a group of
- // services, for example the team name that owns a group of services.
- // `service.name` is expected to be unique within the same namespace. If
- // `service.namespace` is not specified in the Resource then `service.name` is
- // expected to be unique for all services that have no explicit namespace
- // defined (so the empty/unspecified namespace is simply one more valid
- // namespace). Zero-length namespace string is assumed equal to unspecified
- // namespace.
- ServiceNamespaceKey = attribute.Key("service.namespace")
-
- // ServicePeerNameKey is the attribute Key conforming to the "service.peer.name"
- // semantic conventions. It represents the logical name of the service on the
- // other side of the connection. SHOULD be equal to the actual [`service.name`]
- // resource attribute of the remote service if any.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "shoppingcart"
- //
- // [`service.name`]: /docs/resource/README.md#service
- ServicePeerNameKey = attribute.Key("service.peer.name")
-
- // ServicePeerNamespaceKey is the attribute Key conforming to the
- // "service.peer.namespace" semantic conventions. It represents the logical
- // namespace of the service on the other side of the connection. SHOULD be equal
- // to the actual [`service.namespace`] resource attribute of the remote service
- // if any.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Shop"
- //
- // [`service.namespace`]: /docs/resource/README.md#service
- ServicePeerNamespaceKey = attribute.Key("service.peer.namespace")
-
- // ServiceVersionKey is the attribute Key conforming to the "service.version"
- // semantic conventions. It represents the version string of the service
- // component. The format is not defined by these conventions.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "2.0.0", "a01dbef8a"
- ServiceVersionKey = attribute.Key("service.version")
-)
-
-// ServiceInstanceID returns an attribute KeyValue conforming to the
-// "service.instance.id" semantic conventions. It represents the string ID of the
-// service instance.
-func ServiceInstanceID(val string) attribute.KeyValue {
- return ServiceInstanceIDKey.String(val)
-}
-
-// ServiceName returns an attribute KeyValue conforming to the "service.name"
-// semantic conventions. It represents the logical name of the service.
-func ServiceName(val string) attribute.KeyValue {
- return ServiceNameKey.String(val)
-}
-
-// ServiceNamespace returns an attribute KeyValue conforming to the
-// "service.namespace" semantic conventions. It represents a namespace for
-// `service.name`.
-func ServiceNamespace(val string) attribute.KeyValue {
- return ServiceNamespaceKey.String(val)
-}
-
-// ServicePeerName returns an attribute KeyValue conforming to the
-// "service.peer.name" semantic conventions. It represents the logical name of
-// the service on the other side of the connection. SHOULD be equal to the actual
-// [`service.name`] resource attribute of the remote service if any.
-//
-// [`service.name`]: /docs/resource/README.md#service
-func ServicePeerName(val string) attribute.KeyValue {
- return ServicePeerNameKey.String(val)
-}
-
-// ServicePeerNamespace returns an attribute KeyValue conforming to the
-// "service.peer.namespace" semantic conventions. It represents the logical
-// namespace of the service on the other side of the connection. SHOULD be equal
-// to the actual [`service.namespace`] resource attribute of the remote service
-// if any.
-//
-// [`service.namespace`]: /docs/resource/README.md#service
-func ServicePeerNamespace(val string) attribute.KeyValue {
- return ServicePeerNamespaceKey.String(val)
-}
-
-// ServiceVersion returns an attribute KeyValue conforming to the
-// "service.version" semantic conventions. It represents the version string of
-// the service component. The format is not defined by these conventions.
-func ServiceVersion(val string) attribute.KeyValue {
- return ServiceVersionKey.String(val)
-}
-
-// Namespace: session
-const (
- // SessionIDKey is the attribute Key conforming to the "session.id" semantic
- // conventions. It represents a unique id to identify a session.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 00112233-4455-6677-8899-aabbccddeeff
- SessionIDKey = attribute.Key("session.id")
-
- // SessionPreviousIDKey is the attribute Key conforming to the
- // "session.previous_id" semantic conventions. It represents the previous
- // `session.id` for this user, when known.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 00112233-4455-6677-8899-aabbccddeeff
- SessionPreviousIDKey = attribute.Key("session.previous_id")
-)
-
-// SessionID returns an attribute KeyValue conforming to the "session.id"
-// semantic conventions. It represents a unique id to identify a session.
-func SessionID(val string) attribute.KeyValue {
- return SessionIDKey.String(val)
-}
-
-// SessionPreviousID returns an attribute KeyValue conforming to the
-// "session.previous_id" semantic conventions. It represents the previous
-// `session.id` for this user, when known.
-func SessionPreviousID(val string) attribute.KeyValue {
- return SessionPreviousIDKey.String(val)
-}
-
-// Namespace: signalr
-const (
- // SignalRConnectionStatusKey is the attribute Key conforming to the
- // "signalr.connection.status" semantic conventions. It represents the signalR
- // HTTP connection closure status.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "app_shutdown", "timeout"
- SignalRConnectionStatusKey = attribute.Key("signalr.connection.status")
-
- // SignalRTransportKey is the attribute Key conforming to the
- // "signalr.transport" semantic conventions. It represents the
- // [SignalR transport type].
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "web_sockets", "long_polling"
- //
- // [SignalR transport type]: https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md
- SignalRTransportKey = attribute.Key("signalr.transport")
-)
-
-// Enum values for signalr.connection.status
-var (
- // The connection was closed normally.
- // Stability: stable
- SignalRConnectionStatusNormalClosure = SignalRConnectionStatusKey.String("normal_closure")
- // The connection was closed due to a timeout.
- // Stability: stable
- SignalRConnectionStatusTimeout = SignalRConnectionStatusKey.String("timeout")
- // The connection was closed because the app is shutting down.
- // Stability: stable
- SignalRConnectionStatusAppShutdown = SignalRConnectionStatusKey.String("app_shutdown")
-)
-
-// Enum values for signalr.transport
-var (
- // ServerSentEvents protocol
- // Stability: stable
- SignalRTransportServerSentEvents = SignalRTransportKey.String("server_sent_events")
- // LongPolling protocol
- // Stability: stable
- SignalRTransportLongPolling = SignalRTransportKey.String("long_polling")
- // WebSockets protocol
- // Stability: stable
- SignalRTransportWebSockets = SignalRTransportKey.String("web_sockets")
-)
-
-// Namespace: source
-const (
- // SourceAddressKey is the attribute Key conforming to the "source.address"
- // semantic conventions. It represents the source address - domain name if
- // available without reverse DNS lookup; otherwise, IP address or Unix domain
- // socket name.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "source.example.com", "10.1.2.80", "/tmp/my.sock"
- // Note: When observed from the destination side, and when communicating through
- // an intermediary, `source.address` SHOULD represent the source address behind
- // any intermediaries, for example proxies, if it's available.
- SourceAddressKey = attribute.Key("source.address")
-
- // SourcePortKey is the attribute Key conforming to the "source.port" semantic
- // conventions. It represents the source port number.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 3389, 2888
- SourcePortKey = attribute.Key("source.port")
-)
-
-// SourceAddress returns an attribute KeyValue conforming to the "source.address"
-// semantic conventions. It represents the source address - domain name if
-// available without reverse DNS lookup; otherwise, IP address or Unix domain
-// socket name.
-func SourceAddress(val string) attribute.KeyValue {
- return SourceAddressKey.String(val)
-}
-
-// SourcePort returns an attribute KeyValue conforming to the "source.port"
-// semantic conventions. It represents the source port number.
-func SourcePort(val int) attribute.KeyValue {
- return SourcePortKey.Int(val)
-}
-
-// Namespace: system
-const (
- // SystemDeviceKey is the attribute Key conforming to the "system.device"
- // semantic conventions. It represents the device identifier.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "(identifier)"
- SystemDeviceKey = attribute.Key("system.device")
-
- // SystemFilesystemModeKey is the attribute Key conforming to the
- // "system.filesystem.mode" semantic conventions. It represents the filesystem
- // mode.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "rw, ro"
- SystemFilesystemModeKey = attribute.Key("system.filesystem.mode")
-
- // SystemFilesystemMountpointKey is the attribute Key conforming to the
- // "system.filesystem.mountpoint" semantic conventions. It represents the
- // filesystem mount path.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "/mnt/data"
- SystemFilesystemMountpointKey = attribute.Key("system.filesystem.mountpoint")
-
- // SystemFilesystemStateKey is the attribute Key conforming to the
- // "system.filesystem.state" semantic conventions. It represents the filesystem
- // state.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "used"
- SystemFilesystemStateKey = attribute.Key("system.filesystem.state")
-
- // SystemFilesystemTypeKey is the attribute Key conforming to the
- // "system.filesystem.type" semantic conventions. It represents the filesystem
- // type.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "ext4"
- SystemFilesystemTypeKey = attribute.Key("system.filesystem.type")
-
- // SystemMemoryLinuxSlabStateKey is the attribute Key conforming to the
- // "system.memory.linux.slab.state" semantic conventions. It represents the
- // Linux Slab memory state.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "reclaimable", "unreclaimable"
- SystemMemoryLinuxSlabStateKey = attribute.Key("system.memory.linux.slab.state")
-
- // SystemMemoryStateKey is the attribute Key conforming to the
- // "system.memory.state" semantic conventions. It represents the memory state.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "free", "cached"
- SystemMemoryStateKey = attribute.Key("system.memory.state")
-
- // SystemPagingDirectionKey is the attribute Key conforming to the
- // "system.paging.direction" semantic conventions. It represents the paging
- // access direction.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "in"
- SystemPagingDirectionKey = attribute.Key("system.paging.direction")
-
- // SystemPagingFaultTypeKey is the attribute Key conforming to the
- // "system.paging.fault.type" semantic conventions. It represents the paging
- // fault type.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "minor"
- SystemPagingFaultTypeKey = attribute.Key("system.paging.fault.type")
-
- // SystemPagingStateKey is the attribute Key conforming to the
- // "system.paging.state" semantic conventions. It represents the memory paging
- // state.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "free"
- SystemPagingStateKey = attribute.Key("system.paging.state")
-)
-
-// SystemDevice returns an attribute KeyValue conforming to the "system.device"
-// semantic conventions. It represents the device identifier.
-func SystemDevice(val string) attribute.KeyValue {
- return SystemDeviceKey.String(val)
-}
-
-// SystemFilesystemMode returns an attribute KeyValue conforming to the
-// "system.filesystem.mode" semantic conventions. It represents the filesystem
-// mode.
-func SystemFilesystemMode(val string) attribute.KeyValue {
- return SystemFilesystemModeKey.String(val)
-}
-
-// SystemFilesystemMountpoint returns an attribute KeyValue conforming to the
-// "system.filesystem.mountpoint" semantic conventions. It represents the
-// filesystem mount path.
-func SystemFilesystemMountpoint(val string) attribute.KeyValue {
- return SystemFilesystemMountpointKey.String(val)
-}
-
-// Enum values for system.filesystem.state
-var (
- // used
- // Stability: development
- SystemFilesystemStateUsed = SystemFilesystemStateKey.String("used")
- // free
- // Stability: development
- SystemFilesystemStateFree = SystemFilesystemStateKey.String("free")
- // reserved
- // Stability: development
- SystemFilesystemStateReserved = SystemFilesystemStateKey.String("reserved")
-)
-
-// Enum values for system.filesystem.type
-var (
- // fat32
- // Stability: development
- SystemFilesystemTypeFat32 = SystemFilesystemTypeKey.String("fat32")
- // exfat
- // Stability: development
- SystemFilesystemTypeExfat = SystemFilesystemTypeKey.String("exfat")
- // ntfs
- // Stability: development
- SystemFilesystemTypeNtfs = SystemFilesystemTypeKey.String("ntfs")
- // refs
- // Stability: development
- SystemFilesystemTypeRefs = SystemFilesystemTypeKey.String("refs")
- // hfsplus
- // Stability: development
- SystemFilesystemTypeHfsplus = SystemFilesystemTypeKey.String("hfsplus")
- // ext4
- // Stability: development
- SystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String("ext4")
-)
-
-// Enum values for system.memory.linux.slab.state
-var (
- // reclaimable
- // Stability: development
- SystemMemoryLinuxSlabStateReclaimable = SystemMemoryLinuxSlabStateKey.String("reclaimable")
- // unreclaimable
- // Stability: development
- SystemMemoryLinuxSlabStateUnreclaimable = SystemMemoryLinuxSlabStateKey.String("unreclaimable")
-)
-
-// Enum values for system.memory.state
-var (
- // Actual used virtual memory in bytes.
- // Stability: development
- SystemMemoryStateUsed = SystemMemoryStateKey.String("used")
- // free
- // Stability: development
- SystemMemoryStateFree = SystemMemoryStateKey.String("free")
- // buffers
- // Stability: development
- SystemMemoryStateBuffers = SystemMemoryStateKey.String("buffers")
- // cached
- // Stability: development
- SystemMemoryStateCached = SystemMemoryStateKey.String("cached")
-)
-
-// Enum values for system.paging.direction
-var (
- // in
- // Stability: development
- SystemPagingDirectionIn = SystemPagingDirectionKey.String("in")
- // out
- // Stability: development
- SystemPagingDirectionOut = SystemPagingDirectionKey.String("out")
-)
-
-// Enum values for system.paging.fault.type
-var (
- // major
- // Stability: development
- SystemPagingFaultTypeMajor = SystemPagingFaultTypeKey.String("major")
- // minor
- // Stability: development
- SystemPagingFaultTypeMinor = SystemPagingFaultTypeKey.String("minor")
-)
-
-// Enum values for system.paging.state
-var (
- // used
- // Stability: development
- SystemPagingStateUsed = SystemPagingStateKey.String("used")
- // free
- // Stability: development
- SystemPagingStateFree = SystemPagingStateKey.String("free")
-)
-
-// Namespace: telemetry
-const (
- // TelemetryDistroNameKey is the attribute Key conforming to the
- // "telemetry.distro.name" semantic conventions. It represents the name of the
- // auto instrumentation agent or distribution, if used.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "parts-unlimited-java"
- // Note: Official auto instrumentation agents and distributions SHOULD set the
- // `telemetry.distro.name` attribute to
- // a string starting with `opentelemetry-`, e.g.
- // `opentelemetry-java-instrumentation`.
- TelemetryDistroNameKey = attribute.Key("telemetry.distro.name")
-
- // TelemetryDistroVersionKey is the attribute Key conforming to the
- // "telemetry.distro.version" semantic conventions. It represents the version
- // string of the auto instrumentation agent or distribution, if used.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "1.2.3"
- TelemetryDistroVersionKey = attribute.Key("telemetry.distro.version")
-
- // TelemetrySDKLanguageKey is the attribute Key conforming to the
- // "telemetry.sdk.language" semantic conventions. It represents the language of
- // the telemetry SDK.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples:
- TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language")
-
- // TelemetrySDKNameKey is the attribute Key conforming to the
- // "telemetry.sdk.name" semantic conventions. It represents the name of the
- // telemetry SDK as defined above.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "opentelemetry"
- // Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute to
- // `opentelemetry`.
- // If another SDK, like a fork or a vendor-provided implementation, is used,
- // this SDK MUST set the
- // `telemetry.sdk.name` attribute to the fully-qualified class or module name of
- // this SDK's main entry point
- // or another suitable identifier depending on the language.
- // The identifier `opentelemetry` is reserved and MUST NOT be used in this case.
- // All custom identifiers SHOULD be stable across different versions of an
- // implementation.
- TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name")
-
- // TelemetrySDKVersionKey is the attribute Key conforming to the
- // "telemetry.sdk.version" semantic conventions. It represents the version
- // string of the telemetry SDK.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "1.2.3"
- TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version")
-)
-
-// TelemetryDistroName returns an attribute KeyValue conforming to the
-// "telemetry.distro.name" semantic conventions. It represents the name of the
-// auto instrumentation agent or distribution, if used.
-func TelemetryDistroName(val string) attribute.KeyValue {
- return TelemetryDistroNameKey.String(val)
-}
-
-// TelemetryDistroVersion returns an attribute KeyValue conforming to the
-// "telemetry.distro.version" semantic conventions. It represents the version
-// string of the auto instrumentation agent or distribution, if used.
-func TelemetryDistroVersion(val string) attribute.KeyValue {
- return TelemetryDistroVersionKey.String(val)
-}
-
-// TelemetrySDKName returns an attribute KeyValue conforming to the
-// "telemetry.sdk.name" semantic conventions. It represents the name of the
-// telemetry SDK as defined above.
-func TelemetrySDKName(val string) attribute.KeyValue {
- return TelemetrySDKNameKey.String(val)
-}
-
-// TelemetrySDKVersion returns an attribute KeyValue conforming to the
-// "telemetry.sdk.version" semantic conventions. It represents the version string
-// of the telemetry SDK.
-func TelemetrySDKVersion(val string) attribute.KeyValue {
- return TelemetrySDKVersionKey.String(val)
-}
-
-// Enum values for telemetry.sdk.language
-var (
- // cpp
- // Stability: stable
- TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp")
- // dotnet
- // Stability: stable
- TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet")
- // erlang
- // Stability: stable
- TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang")
- // go
- // Stability: stable
- TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go")
- // java
- // Stability: stable
- TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java")
- // nodejs
- // Stability: stable
- TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs")
- // php
- // Stability: stable
- TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php")
- // python
- // Stability: stable
- TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python")
- // ruby
- // Stability: stable
- TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby")
- // rust
- // Stability: stable
- TelemetrySDKLanguageRust = TelemetrySDKLanguageKey.String("rust")
- // swift
- // Stability: stable
- TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift")
- // webjs
- // Stability: stable
- TelemetrySDKLanguageWebJS = TelemetrySDKLanguageKey.String("webjs")
-)
-
-// Namespace: test
-const (
- // TestCaseNameKey is the attribute Key conforming to the "test.case.name"
- // semantic conventions. It represents the fully qualified human readable name
- // of the [test case].
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "org.example.TestCase1.test1", "example/tests/TestCase1.test1",
- // "ExampleTestCase1_test1"
- //
- // [test case]: https://wikipedia.org/wiki/Test_case
- TestCaseNameKey = attribute.Key("test.case.name")
-
- // TestCaseResultStatusKey is the attribute Key conforming to the
- // "test.case.result.status" semantic conventions. It represents the status of
- // the actual test case result from test execution.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "pass", "fail"
- TestCaseResultStatusKey = attribute.Key("test.case.result.status")
-
- // TestSuiteNameKey is the attribute Key conforming to the "test.suite.name"
- // semantic conventions. It represents the human readable name of a [test suite]
- // .
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "TestSuite1"
- //
- // [test suite]: https://wikipedia.org/wiki/Test_suite
- TestSuiteNameKey = attribute.Key("test.suite.name")
-
- // TestSuiteRunStatusKey is the attribute Key conforming to the
- // "test.suite.run.status" semantic conventions. It represents the status of the
- // test suite run.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "success", "failure", "skipped", "aborted", "timed_out",
- // "in_progress"
- TestSuiteRunStatusKey = attribute.Key("test.suite.run.status")
-)
-
-// TestCaseName returns an attribute KeyValue conforming to the "test.case.name"
-// semantic conventions. It represents the fully qualified human readable name of
-// the [test case].
-//
-// [test case]: https://wikipedia.org/wiki/Test_case
-func TestCaseName(val string) attribute.KeyValue {
- return TestCaseNameKey.String(val)
-}
-
-// TestSuiteName returns an attribute KeyValue conforming to the
-// "test.suite.name" semantic conventions. It represents the human readable name
-// of a [test suite].
-//
-// [test suite]: https://wikipedia.org/wiki/Test_suite
-func TestSuiteName(val string) attribute.KeyValue {
- return TestSuiteNameKey.String(val)
-}
-
-// Enum values for test.case.result.status
-var (
- // pass
- // Stability: development
- TestCaseResultStatusPass = TestCaseResultStatusKey.String("pass")
- // fail
- // Stability: development
- TestCaseResultStatusFail = TestCaseResultStatusKey.String("fail")
-)
-
-// Enum values for test.suite.run.status
-var (
- // success
- // Stability: development
- TestSuiteRunStatusSuccess = TestSuiteRunStatusKey.String("success")
- // failure
- // Stability: development
- TestSuiteRunStatusFailure = TestSuiteRunStatusKey.String("failure")
- // skipped
- // Stability: development
- TestSuiteRunStatusSkipped = TestSuiteRunStatusKey.String("skipped")
- // aborted
- // Stability: development
- TestSuiteRunStatusAborted = TestSuiteRunStatusKey.String("aborted")
- // timed_out
- // Stability: development
- TestSuiteRunStatusTimedOut = TestSuiteRunStatusKey.String("timed_out")
- // in_progress
- // Stability: development
- TestSuiteRunStatusInProgress = TestSuiteRunStatusKey.String("in_progress")
-)
-
-// Namespace: thread
-const (
- // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic
- // conventions. It represents the current "managed" thread ID (as opposed to OS
- // thread ID).
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Note:
- // Examples of where the value can be extracted from:
- //
- // | Language or platform | Source |
- // | --- | --- |
- // | JVM | `Thread.currentThread().threadId()` |
- // | .NET | `Thread.CurrentThread.ManagedThreadId` |
- // | Python | `threading.current_thread().ident` |
- // | Ruby | `Thread.current.object_id` |
- // | C++ | `std::this_thread::get_id()` |
- // | Erlang | `erlang:self()` |
- ThreadIDKey = attribute.Key("thread.id")
-
- // ThreadNameKey is the attribute Key conforming to the "thread.name" semantic
- // conventions. It represents the current thread name.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: main
- // Note:
- // Examples of where the value can be extracted from:
- //
- // | Language or platform | Source |
- // | --- | --- |
- // | JVM | `Thread.currentThread().getName()` |
- // | .NET | `Thread.CurrentThread.Name` |
- // | Python | `threading.current_thread().name` |
- // | Ruby | `Thread.current.name` |
- // | Erlang | `erlang:process_info(self(), registered_name)` |
- ThreadNameKey = attribute.Key("thread.name")
-)
-
-// ThreadID returns an attribute KeyValue conforming to the "thread.id" semantic
-// conventions. It represents the current "managed" thread ID (as opposed to OS
-// thread ID).
-func ThreadID(val int) attribute.KeyValue {
- return ThreadIDKey.Int(val)
-}
-
-// ThreadName returns an attribute KeyValue conforming to the "thread.name"
-// semantic conventions. It represents the current thread name.
-func ThreadName(val string) attribute.KeyValue {
- return ThreadNameKey.String(val)
-}
-
-// Namespace: tls
-const (
- // TLSCipherKey is the attribute Key conforming to the "tls.cipher" semantic
- // conventions. It represents the string indicating the [cipher] used during the
- // current connection.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "TLS_RSA_WITH_3DES_EDE_CBC_SHA",
- // "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"
- // Note: The values allowed for `tls.cipher` MUST be one of the `Descriptions`
- // of the [registered TLS Cipher Suits].
- //
- // [cipher]: https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5
- // [registered TLS Cipher Suits]: https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4
- TLSCipherKey = attribute.Key("tls.cipher")
-
- // TLSClientCertificateKey is the attribute Key conforming to the
- // "tls.client.certificate" semantic conventions. It represents the PEM-encoded
- // stand-alone certificate offered by the client. This is usually
- // mutually-exclusive of `client.certificate_chain` since this value also exists
- // in that list.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "MII..."
- TLSClientCertificateKey = attribute.Key("tls.client.certificate")
-
- // TLSClientCertificateChainKey is the attribute Key conforming to the
- // "tls.client.certificate_chain" semantic conventions. It represents the array
- // of PEM-encoded certificates that make up the certificate chain offered by the
- // client. This is usually mutually-exclusive of `client.certificate` since that
- // value should be the first certificate in the chain.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "MII...", "MI..."
- TLSClientCertificateChainKey = attribute.Key("tls.client.certificate_chain")
-
- // TLSClientHashMd5Key is the attribute Key conforming to the
- // "tls.client.hash.md5" semantic conventions. It represents the certificate
- // fingerprint using the MD5 digest of DER-encoded version of certificate
- // offered by the client. For consistency with other hash values, this value
- // should be formatted as an uppercase hash.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC"
- TLSClientHashMd5Key = attribute.Key("tls.client.hash.md5")
-
- // TLSClientHashSha1Key is the attribute Key conforming to the
- // "tls.client.hash.sha1" semantic conventions. It represents the certificate
- // fingerprint using the SHA1 digest of DER-encoded version of certificate
- // offered by the client. For consistency with other hash values, this value
- // should be formatted as an uppercase hash.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "9E393D93138888D288266C2D915214D1D1CCEB2A"
- TLSClientHashSha1Key = attribute.Key("tls.client.hash.sha1")
-
- // TLSClientHashSha256Key is the attribute Key conforming to the
- // "tls.client.hash.sha256" semantic conventions. It represents the certificate
- // fingerprint using the SHA256 digest of DER-encoded version of certificate
- // offered by the client. For consistency with other hash values, this value
- // should be formatted as an uppercase hash.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0"
- TLSClientHashSha256Key = attribute.Key("tls.client.hash.sha256")
-
- // TLSClientIssuerKey is the attribute Key conforming to the "tls.client.issuer"
- // semantic conventions. It represents the distinguished name of [subject] of
- // the issuer of the x.509 certificate presented by the client.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com"
- //
- // [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6
- TLSClientIssuerKey = attribute.Key("tls.client.issuer")
-
- // TLSClientJa3Key is the attribute Key conforming to the "tls.client.ja3"
- // semantic conventions. It represents a hash that identifies clients based on
- // how they perform an SSL/TLS handshake.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "d4e5b18d6b55c71272893221c96ba240"
- TLSClientJa3Key = attribute.Key("tls.client.ja3")
-
- // TLSClientNotAfterKey is the attribute Key conforming to the
- // "tls.client.not_after" semantic conventions. It represents the date/Time
- // indicating when client certificate is no longer considered valid.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "2021-01-01T00:00:00.000Z"
- TLSClientNotAfterKey = attribute.Key("tls.client.not_after")
-
- // TLSClientNotBeforeKey is the attribute Key conforming to the
- // "tls.client.not_before" semantic conventions. It represents the date/Time
- // indicating when client certificate is first considered valid.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "1970-01-01T00:00:00.000Z"
- TLSClientNotBeforeKey = attribute.Key("tls.client.not_before")
-
- // TLSClientSubjectKey is the attribute Key conforming to the
- // "tls.client.subject" semantic conventions. It represents the distinguished
- // name of subject of the x.509 certificate presented by the client.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "CN=myclient, OU=Documentation Team, DC=example, DC=com"
- TLSClientSubjectKey = attribute.Key("tls.client.subject")
-
- // TLSClientSupportedCiphersKey is the attribute Key conforming to the
- // "tls.client.supported_ciphers" semantic conventions. It represents the array
- // of ciphers offered by the client during the client hello.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
- // "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"
- TLSClientSupportedCiphersKey = attribute.Key("tls.client.supported_ciphers")
-
- // TLSCurveKey is the attribute Key conforming to the "tls.curve" semantic
- // conventions. It represents the string indicating the curve used for the given
- // cipher, when applicable.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "secp256r1"
- TLSCurveKey = attribute.Key("tls.curve")
-
- // TLSEstablishedKey is the attribute Key conforming to the "tls.established"
- // semantic conventions. It represents the boolean flag indicating if the TLS
- // negotiation was successful and transitioned to an encrypted tunnel.
- //
- // Type: boolean
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: true
- TLSEstablishedKey = attribute.Key("tls.established")
-
- // TLSNextProtocolKey is the attribute Key conforming to the "tls.next_protocol"
- // semantic conventions. It represents the string indicating the protocol being
- // tunneled. Per the values in the [IANA registry], this string should be lower
- // case.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "http/1.1"
- //
- // [IANA registry]: https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
- TLSNextProtocolKey = attribute.Key("tls.next_protocol")
-
- // TLSProtocolNameKey is the attribute Key conforming to the "tls.protocol.name"
- // semantic conventions. It represents the normalized lowercase protocol name
- // parsed from original string of the negotiated [SSL/TLS protocol version].
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- //
- // [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values
- TLSProtocolNameKey = attribute.Key("tls.protocol.name")
-
- // TLSProtocolVersionKey is the attribute Key conforming to the
- // "tls.protocol.version" semantic conventions. It represents the numeric part
- // of the version parsed from the original string of the negotiated
- // [SSL/TLS protocol version].
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "1.2", "3"
- //
- // [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values
- TLSProtocolVersionKey = attribute.Key("tls.protocol.version")
-
- // TLSResumedKey is the attribute Key conforming to the "tls.resumed" semantic
- // conventions. It represents the boolean flag indicating if this TLS connection
- // was resumed from an existing TLS negotiation.
- //
- // Type: boolean
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: true
- TLSResumedKey = attribute.Key("tls.resumed")
-
- // TLSServerCertificateKey is the attribute Key conforming to the
- // "tls.server.certificate" semantic conventions. It represents the PEM-encoded
- // stand-alone certificate offered by the server. This is usually
- // mutually-exclusive of `server.certificate_chain` since this value also exists
- // in that list.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "MII..."
- TLSServerCertificateKey = attribute.Key("tls.server.certificate")
-
- // TLSServerCertificateChainKey is the attribute Key conforming to the
- // "tls.server.certificate_chain" semantic conventions. It represents the array
- // of PEM-encoded certificates that make up the certificate chain offered by the
- // server. This is usually mutually-exclusive of `server.certificate` since that
- // value should be the first certificate in the chain.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "MII...", "MI..."
- TLSServerCertificateChainKey = attribute.Key("tls.server.certificate_chain")
-
- // TLSServerHashMd5Key is the attribute Key conforming to the
- // "tls.server.hash.md5" semantic conventions. It represents the certificate
- // fingerprint using the MD5 digest of DER-encoded version of certificate
- // offered by the server. For consistency with other hash values, this value
- // should be formatted as an uppercase hash.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC"
- TLSServerHashMd5Key = attribute.Key("tls.server.hash.md5")
-
- // TLSServerHashSha1Key is the attribute Key conforming to the
- // "tls.server.hash.sha1" semantic conventions. It represents the certificate
- // fingerprint using the SHA1 digest of DER-encoded version of certificate
- // offered by the server. For consistency with other hash values, this value
- // should be formatted as an uppercase hash.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "9E393D93138888D288266C2D915214D1D1CCEB2A"
- TLSServerHashSha1Key = attribute.Key("tls.server.hash.sha1")
-
- // TLSServerHashSha256Key is the attribute Key conforming to the
- // "tls.server.hash.sha256" semantic conventions. It represents the certificate
- // fingerprint using the SHA256 digest of DER-encoded version of certificate
- // offered by the server. For consistency with other hash values, this value
- // should be formatted as an uppercase hash.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0"
- TLSServerHashSha256Key = attribute.Key("tls.server.hash.sha256")
-
- // TLSServerIssuerKey is the attribute Key conforming to the "tls.server.issuer"
- // semantic conventions. It represents the distinguished name of [subject] of
- // the issuer of the x.509 certificate presented by the client.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com"
- //
- // [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6
- TLSServerIssuerKey = attribute.Key("tls.server.issuer")
-
- // TLSServerJa3sKey is the attribute Key conforming to the "tls.server.ja3s"
- // semantic conventions. It represents a hash that identifies servers based on
- // how they perform an SSL/TLS handshake.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "d4e5b18d6b55c71272893221c96ba240"
- TLSServerJa3sKey = attribute.Key("tls.server.ja3s")
-
- // TLSServerNotAfterKey is the attribute Key conforming to the
- // "tls.server.not_after" semantic conventions. It represents the date/Time
- // indicating when server certificate is no longer considered valid.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "2021-01-01T00:00:00.000Z"
- TLSServerNotAfterKey = attribute.Key("tls.server.not_after")
-
- // TLSServerNotBeforeKey is the attribute Key conforming to the
- // "tls.server.not_before" semantic conventions. It represents the date/Time
- // indicating when server certificate is first considered valid.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "1970-01-01T00:00:00.000Z"
- TLSServerNotBeforeKey = attribute.Key("tls.server.not_before")
-
- // TLSServerSubjectKey is the attribute Key conforming to the
- // "tls.server.subject" semantic conventions. It represents the distinguished
- // name of subject of the x.509 certificate presented by the server.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "CN=myserver, OU=Documentation Team, DC=example, DC=com"
- TLSServerSubjectKey = attribute.Key("tls.server.subject")
-)
-
-// TLSCipher returns an attribute KeyValue conforming to the "tls.cipher"
-// semantic conventions. It represents the string indicating the [cipher] used
-// during the current connection.
-//
-// [cipher]: https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5
-func TLSCipher(val string) attribute.KeyValue {
- return TLSCipherKey.String(val)
-}
-
-// TLSClientCertificate returns an attribute KeyValue conforming to the
-// "tls.client.certificate" semantic conventions. It represents the PEM-encoded
-// stand-alone certificate offered by the client. This is usually
-// mutually-exclusive of `client.certificate_chain` since this value also exists
-// in that list.
-func TLSClientCertificate(val string) attribute.KeyValue {
- return TLSClientCertificateKey.String(val)
-}
-
-// TLSClientCertificateChain returns an attribute KeyValue conforming to the
-// "tls.client.certificate_chain" semantic conventions. It represents the array
-// of PEM-encoded certificates that make up the certificate chain offered by the
-// client. This is usually mutually-exclusive of `client.certificate` since that
-// value should be the first certificate in the chain.
-func TLSClientCertificateChain(val ...string) attribute.KeyValue {
- return TLSClientCertificateChainKey.StringSlice(val)
-}
-
-// TLSClientHashMd5 returns an attribute KeyValue conforming to the
-// "tls.client.hash.md5" semantic conventions. It represents the certificate
-// fingerprint using the MD5 digest of DER-encoded version of certificate offered
-// by the client. For consistency with other hash values, this value should be
-// formatted as an uppercase hash.
-func TLSClientHashMd5(val string) attribute.KeyValue {
- return TLSClientHashMd5Key.String(val)
-}
-
-// TLSClientHashSha1 returns an attribute KeyValue conforming to the
-// "tls.client.hash.sha1" semantic conventions. It represents the certificate
-// fingerprint using the SHA1 digest of DER-encoded version of certificate
-// offered by the client. For consistency with other hash values, this value
-// should be formatted as an uppercase hash.
-func TLSClientHashSha1(val string) attribute.KeyValue {
- return TLSClientHashSha1Key.String(val)
-}
-
-// TLSClientHashSha256 returns an attribute KeyValue conforming to the
-// "tls.client.hash.sha256" semantic conventions. It represents the certificate
-// fingerprint using the SHA256 digest of DER-encoded version of certificate
-// offered by the client. For consistency with other hash values, this value
-// should be formatted as an uppercase hash.
-func TLSClientHashSha256(val string) attribute.KeyValue {
- return TLSClientHashSha256Key.String(val)
-}
-
-// TLSClientIssuer returns an attribute KeyValue conforming to the
-// "tls.client.issuer" semantic conventions. It represents the distinguished name
-// of [subject] of the issuer of the x.509 certificate presented by the client.
-//
-// [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6
-func TLSClientIssuer(val string) attribute.KeyValue {
- return TLSClientIssuerKey.String(val)
-}
-
-// TLSClientJa3 returns an attribute KeyValue conforming to the "tls.client.ja3"
-// semantic conventions. It represents a hash that identifies clients based on
-// how they perform an SSL/TLS handshake.
-func TLSClientJa3(val string) attribute.KeyValue {
- return TLSClientJa3Key.String(val)
-}
-
-// TLSClientNotAfter returns an attribute KeyValue conforming to the
-// "tls.client.not_after" semantic conventions. It represents the date/Time
-// indicating when client certificate is no longer considered valid.
-func TLSClientNotAfter(val string) attribute.KeyValue {
- return TLSClientNotAfterKey.String(val)
-}
-
-// TLSClientNotBefore returns an attribute KeyValue conforming to the
-// "tls.client.not_before" semantic conventions. It represents the date/Time
-// indicating when client certificate is first considered valid.
-func TLSClientNotBefore(val string) attribute.KeyValue {
- return TLSClientNotBeforeKey.String(val)
-}
-
-// TLSClientSubject returns an attribute KeyValue conforming to the
-// "tls.client.subject" semantic conventions. It represents the distinguished
-// name of subject of the x.509 certificate presented by the client.
-func TLSClientSubject(val string) attribute.KeyValue {
- return TLSClientSubjectKey.String(val)
-}
-
-// TLSClientSupportedCiphers returns an attribute KeyValue conforming to the
-// "tls.client.supported_ciphers" semantic conventions. It represents the array
-// of ciphers offered by the client during the client hello.
-func TLSClientSupportedCiphers(val ...string) attribute.KeyValue {
- return TLSClientSupportedCiphersKey.StringSlice(val)
-}
-
-// TLSCurve returns an attribute KeyValue conforming to the "tls.curve" semantic
-// conventions. It represents the string indicating the curve used for the given
-// cipher, when applicable.
-func TLSCurve(val string) attribute.KeyValue {
- return TLSCurveKey.String(val)
-}
-
-// TLSEstablished returns an attribute KeyValue conforming to the
-// "tls.established" semantic conventions. It represents the boolean flag
-// indicating if the TLS negotiation was successful and transitioned to an
-// encrypted tunnel.
-func TLSEstablished(val bool) attribute.KeyValue {
- return TLSEstablishedKey.Bool(val)
-}
-
-// TLSNextProtocol returns an attribute KeyValue conforming to the
-// "tls.next_protocol" semantic conventions. It represents the string indicating
-// the protocol being tunneled. Per the values in the [IANA registry], this
-// string should be lower case.
-//
-// [IANA registry]: https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
-func TLSNextProtocol(val string) attribute.KeyValue {
- return TLSNextProtocolKey.String(val)
-}
-
-// TLSProtocolVersion returns an attribute KeyValue conforming to the
-// "tls.protocol.version" semantic conventions. It represents the numeric part of
-// the version parsed from the original string of the negotiated
-// [SSL/TLS protocol version].
-//
-// [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values
-func TLSProtocolVersion(val string) attribute.KeyValue {
- return TLSProtocolVersionKey.String(val)
-}
-
-// TLSResumed returns an attribute KeyValue conforming to the "tls.resumed"
-// semantic conventions. It represents the boolean flag indicating if this TLS
-// connection was resumed from an existing TLS negotiation.
-func TLSResumed(val bool) attribute.KeyValue {
- return TLSResumedKey.Bool(val)
-}
-
-// TLSServerCertificate returns an attribute KeyValue conforming to the
-// "tls.server.certificate" semantic conventions. It represents the PEM-encoded
-// stand-alone certificate offered by the server. This is usually
-// mutually-exclusive of `server.certificate_chain` since this value also exists
-// in that list.
-func TLSServerCertificate(val string) attribute.KeyValue {
- return TLSServerCertificateKey.String(val)
-}
-
-// TLSServerCertificateChain returns an attribute KeyValue conforming to the
-// "tls.server.certificate_chain" semantic conventions. It represents the array
-// of PEM-encoded certificates that make up the certificate chain offered by the
-// server. This is usually mutually-exclusive of `server.certificate` since that
-// value should be the first certificate in the chain.
-func TLSServerCertificateChain(val ...string) attribute.KeyValue {
- return TLSServerCertificateChainKey.StringSlice(val)
-}
-
-// TLSServerHashMd5 returns an attribute KeyValue conforming to the
-// "tls.server.hash.md5" semantic conventions. It represents the certificate
-// fingerprint using the MD5 digest of DER-encoded version of certificate offered
-// by the server. For consistency with other hash values, this value should be
-// formatted as an uppercase hash.
-func TLSServerHashMd5(val string) attribute.KeyValue {
- return TLSServerHashMd5Key.String(val)
-}
-
-// TLSServerHashSha1 returns an attribute KeyValue conforming to the
-// "tls.server.hash.sha1" semantic conventions. It represents the certificate
-// fingerprint using the SHA1 digest of DER-encoded version of certificate
-// offered by the server. For consistency with other hash values, this value
-// should be formatted as an uppercase hash.
-func TLSServerHashSha1(val string) attribute.KeyValue {
- return TLSServerHashSha1Key.String(val)
-}
-
-// TLSServerHashSha256 returns an attribute KeyValue conforming to the
-// "tls.server.hash.sha256" semantic conventions. It represents the certificate
-// fingerprint using the SHA256 digest of DER-encoded version of certificate
-// offered by the server. For consistency with other hash values, this value
-// should be formatted as an uppercase hash.
-func TLSServerHashSha256(val string) attribute.KeyValue {
- return TLSServerHashSha256Key.String(val)
-}
-
-// TLSServerIssuer returns an attribute KeyValue conforming to the
-// "tls.server.issuer" semantic conventions. It represents the distinguished name
-// of [subject] of the issuer of the x.509 certificate presented by the client.
-//
-// [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6
-func TLSServerIssuer(val string) attribute.KeyValue {
- return TLSServerIssuerKey.String(val)
-}
-
-// TLSServerJa3s returns an attribute KeyValue conforming to the
-// "tls.server.ja3s" semantic conventions. It represents a hash that identifies
-// servers based on how they perform an SSL/TLS handshake.
-func TLSServerJa3s(val string) attribute.KeyValue {
- return TLSServerJa3sKey.String(val)
-}
-
-// TLSServerNotAfter returns an attribute KeyValue conforming to the
-// "tls.server.not_after" semantic conventions. It represents the date/Time
-// indicating when server certificate is no longer considered valid.
-func TLSServerNotAfter(val string) attribute.KeyValue {
- return TLSServerNotAfterKey.String(val)
-}
-
-// TLSServerNotBefore returns an attribute KeyValue conforming to the
-// "tls.server.not_before" semantic conventions. It represents the date/Time
-// indicating when server certificate is first considered valid.
-func TLSServerNotBefore(val string) attribute.KeyValue {
- return TLSServerNotBeforeKey.String(val)
-}
-
-// TLSServerSubject returns an attribute KeyValue conforming to the
-// "tls.server.subject" semantic conventions. It represents the distinguished
-// name of subject of the x.509 certificate presented by the server.
-func TLSServerSubject(val string) attribute.KeyValue {
- return TLSServerSubjectKey.String(val)
-}
-
-// Enum values for tls.protocol.name
-var (
- // ssl
- // Stability: development
- TLSProtocolNameSsl = TLSProtocolNameKey.String("ssl")
- // tls
- // Stability: development
- TLSProtocolNameTLS = TLSProtocolNameKey.String("tls")
-)
-
-// Namespace: url
-const (
- // URLDomainKey is the attribute Key conforming to the "url.domain" semantic
- // conventions. It represents the domain extracted from the `url.full`, such as
- // "opentelemetry.io".
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "www.foo.bar", "opentelemetry.io", "3.12.167.2",
- // "[1080:0:0:0:8:800:200C:417A]"
- // Note: In some cases a URL may refer to an IP and/or port directly, without a
- // domain name. In this case, the IP address would go to the domain field. If
- // the URL contains a [literal IPv6 address] enclosed by `[` and `]`, the `[`
- // and `]` characters should also be captured in the domain field.
- //
- // [literal IPv6 address]: https://www.rfc-editor.org/rfc/rfc2732#section-2
- URLDomainKey = attribute.Key("url.domain")
-
- // URLExtensionKey is the attribute Key conforming to the "url.extension"
- // semantic conventions. It represents the file extension extracted from the
- // `url.full`, excluding the leading dot.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "png", "gz"
- // Note: The file extension is only set if it exists, as not every url has a
- // file extension. When the file name has multiple extensions `example.tar.gz`,
- // only the last one should be captured `gz`, not `tar.gz`.
- URLExtensionKey = attribute.Key("url.extension")
-
- // URLFragmentKey is the attribute Key conforming to the "url.fragment" semantic
- // conventions. It represents the [URI fragment] component.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "SemConv"
- //
- // [URI fragment]: https://www.rfc-editor.org/rfc/rfc3986#section-3.5
- URLFragmentKey = attribute.Key("url.fragment")
-
- // URLFullKey is the attribute Key conforming to the "url.full" semantic
- // conventions. It represents the absolute URL describing a network resource
- // according to [RFC3986].
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "https://www.foo.bar/search?q=OpenTelemetry#SemConv", "//localhost"
- // Note: For network calls, URL usually has
- // `scheme://host[:port][path][?query][#fragment]` format, where the fragment
- // is not transmitted over HTTP, but if it is known, it SHOULD be included
- // nevertheless.
- //
- // `url.full` MUST NOT contain credentials passed via URL in form of
- // `https://username:password@www.example.com/`.
- // In such case username and password SHOULD be redacted and attribute's value
- // SHOULD be `https://REDACTED:REDACTED@www.example.com/`.
- //
- // `url.full` SHOULD capture the absolute URL when it is available (or can be
- // reconstructed).
- //
- // Sensitive content provided in `url.full` SHOULD be scrubbed when
- // instrumentations can identify it.
- //
- //
- // Query string values for the following keys SHOULD be redacted by default and
- // replaced by the
- // value `REDACTED`:
- //
- // - [`AWSAccessKeyId`]
- // - [`Signature`]
- // - [`sig`]
- // - [`X-Goog-Signature`]
- //
- // This list is subject to change over time.
- //
- // When a query string value is redacted, the query string key SHOULD still be
- // preserved, e.g.
- // `https://www.example.com/path?color=blue&sig=REDACTED`.
- //
- // [RFC3986]: https://www.rfc-editor.org/rfc/rfc3986
- // [`AWSAccessKeyId`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth
- // [`Signature`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth
- // [`sig`]: https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token
- // [`X-Goog-Signature`]: https://cloud.google.com/storage/docs/access-control/signed-urls
- URLFullKey = attribute.Key("url.full")
-
- // URLOriginalKey is the attribute Key conforming to the "url.original" semantic
- // conventions. It represents the unmodified original URL as seen in the event
- // source.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "https://www.foo.bar/search?q=OpenTelemetry#SemConv",
- // "search?q=OpenTelemetry"
- // Note: In network monitoring, the observed URL may be a full URL, whereas in
- // access logs, the URL is often just represented as a path. This field is meant
- // to represent the URL as it was observed, complete or not.
- // `url.original` might contain credentials passed via URL in form of
- // `https://username:password@www.example.com/`. In such case password and
- // username SHOULD NOT be redacted and attribute's value SHOULD remain the same.
- URLOriginalKey = attribute.Key("url.original")
-
- // URLPathKey is the attribute Key conforming to the "url.path" semantic
- // conventions. It represents the [URI path] component.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "/search"
- // Note: Sensitive content provided in `url.path` SHOULD be scrubbed when
- // instrumentations can identify it.
- //
- // [URI path]: https://www.rfc-editor.org/rfc/rfc3986#section-3.3
- URLPathKey = attribute.Key("url.path")
-
- // URLPortKey is the attribute Key conforming to the "url.port" semantic
- // conventions. It represents the port extracted from the `url.full`.
- //
- // Type: int
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: 443
- URLPortKey = attribute.Key("url.port")
-
- // URLQueryKey is the attribute Key conforming to the "url.query" semantic
- // conventions. It represents the [URI query] component.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "q=OpenTelemetry"
- // Note: Sensitive content provided in `url.query` SHOULD be scrubbed when
- // instrumentations can identify it.
- //
- //
- // Query string values for the following keys SHOULD be redacted by default and
- // replaced by the value `REDACTED`:
- //
- // - [`AWSAccessKeyId`]
- // - [`Signature`]
- // - [`sig`]
- // - [`X-Goog-Signature`]
- //
- // This list is subject to change over time.
- //
- // When a query string value is redacted, the query string key SHOULD still be
- // preserved, e.g.
- // `q=OpenTelemetry&sig=REDACTED`.
- //
- // [URI query]: https://www.rfc-editor.org/rfc/rfc3986#section-3.4
- // [`AWSAccessKeyId`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth
- // [`Signature`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth
- // [`sig`]: https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token
- // [`X-Goog-Signature`]: https://cloud.google.com/storage/docs/access-control/signed-urls
- URLQueryKey = attribute.Key("url.query")
-
- // URLRegisteredDomainKey is the attribute Key conforming to the
- // "url.registered_domain" semantic conventions. It represents the highest
- // registered url domain, stripped of the subdomain.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "example.com", "foo.co.uk"
- // Note: This value can be determined precisely with the [public suffix list].
- // For example, the registered domain for `foo.example.com` is `example.com`.
- // Trying to approximate this by simply taking the last two labels will not work
- // well for TLDs such as `co.uk`.
- //
- // [public suffix list]: https://publicsuffix.org/
- URLRegisteredDomainKey = attribute.Key("url.registered_domain")
-
- // URLSchemeKey is the attribute Key conforming to the "url.scheme" semantic
- // conventions. It represents the [URI scheme] component identifying the used
- // protocol.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "https", "ftp", "telnet"
- //
- // [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1
- URLSchemeKey = attribute.Key("url.scheme")
-
- // URLSubdomainKey is the attribute Key conforming to the "url.subdomain"
- // semantic conventions. It represents the subdomain portion of a fully
- // qualified domain name includes all of the names except the host name under
- // the registered_domain. In a partially qualified domain, or if the
- // qualification level of the full name cannot be determined, subdomain contains
- // all of the names below the registered domain.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "east", "sub2.sub1"
- // Note: The subdomain portion of `www.east.mydomain.co.uk` is `east`. If the
- // domain has multiple levels of subdomain, such as `sub2.sub1.example.com`, the
- // subdomain field should contain `sub2.sub1`, with no trailing period.
- URLSubdomainKey = attribute.Key("url.subdomain")
-
- // URLTemplateKey is the attribute Key conforming to the "url.template" semantic
- // conventions. It represents the low-cardinality template of an
- // [absolute path reference].
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "/users/{id}", "/users/:id", "/users?id={id}"
- //
- // [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2
- URLTemplateKey = attribute.Key("url.template")
-
- // URLTopLevelDomainKey is the attribute Key conforming to the
- // "url.top_level_domain" semantic conventions. It represents the effective top
- // level domain (eTLD), also known as the domain suffix, is the last part of the
- // domain name. For example, the top level domain for example.com is `com`.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "com", "co.uk"
- // Note: This value can be determined precisely with the [public suffix list].
- //
- // [public suffix list]: https://publicsuffix.org/
- URLTopLevelDomainKey = attribute.Key("url.top_level_domain")
-)
-
-// URLDomain returns an attribute KeyValue conforming to the "url.domain"
-// semantic conventions. It represents the domain extracted from the `url.full`,
-// such as "opentelemetry.io".
-func URLDomain(val string) attribute.KeyValue {
- return URLDomainKey.String(val)
-}
-
-// URLExtension returns an attribute KeyValue conforming to the "url.extension"
-// semantic conventions. It represents the file extension extracted from the
-// `url.full`, excluding the leading dot.
-func URLExtension(val string) attribute.KeyValue {
- return URLExtensionKey.String(val)
-}
-
-// URLFragment returns an attribute KeyValue conforming to the "url.fragment"
-// semantic conventions. It represents the [URI fragment] component.
-//
-// [URI fragment]: https://www.rfc-editor.org/rfc/rfc3986#section-3.5
-func URLFragment(val string) attribute.KeyValue {
- return URLFragmentKey.String(val)
-}
-
-// URLFull returns an attribute KeyValue conforming to the "url.full" semantic
-// conventions. It represents the absolute URL describing a network resource
-// according to [RFC3986].
-//
-// [RFC3986]: https://www.rfc-editor.org/rfc/rfc3986
-func URLFull(val string) attribute.KeyValue {
- return URLFullKey.String(val)
-}
-
-// URLOriginal returns an attribute KeyValue conforming to the "url.original"
-// semantic conventions. It represents the unmodified original URL as seen in the
-// event source.
-func URLOriginal(val string) attribute.KeyValue {
- return URLOriginalKey.String(val)
-}
-
-// URLPath returns an attribute KeyValue conforming to the "url.path" semantic
-// conventions. It represents the [URI path] component.
-//
-// [URI path]: https://www.rfc-editor.org/rfc/rfc3986#section-3.3
-func URLPath(val string) attribute.KeyValue {
- return URLPathKey.String(val)
-}
-
-// URLPort returns an attribute KeyValue conforming to the "url.port" semantic
-// conventions. It represents the port extracted from the `url.full`.
-func URLPort(val int) attribute.KeyValue {
- return URLPortKey.Int(val)
-}
-
-// URLQuery returns an attribute KeyValue conforming to the "url.query" semantic
-// conventions. It represents the [URI query] component.
-//
-// [URI query]: https://www.rfc-editor.org/rfc/rfc3986#section-3.4
-func URLQuery(val string) attribute.KeyValue {
- return URLQueryKey.String(val)
-}
-
-// URLRegisteredDomain returns an attribute KeyValue conforming to the
-// "url.registered_domain" semantic conventions. It represents the highest
-// registered url domain, stripped of the subdomain.
-func URLRegisteredDomain(val string) attribute.KeyValue {
- return URLRegisteredDomainKey.String(val)
-}
-
-// URLScheme returns an attribute KeyValue conforming to the "url.scheme"
-// semantic conventions. It represents the [URI scheme] component identifying the
-// used protocol.
-//
-// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1
-func URLScheme(val string) attribute.KeyValue {
- return URLSchemeKey.String(val)
-}
-
-// URLSubdomain returns an attribute KeyValue conforming to the "url.subdomain"
-// semantic conventions. It represents the subdomain portion of a fully qualified
-// domain name includes all of the names except the host name under the
-// registered_domain. In a partially qualified domain, or if the qualification
-// level of the full name cannot be determined, subdomain contains all of the
-// names below the registered domain.
-func URLSubdomain(val string) attribute.KeyValue {
- return URLSubdomainKey.String(val)
-}
-
-// URLTemplate returns an attribute KeyValue conforming to the "url.template"
-// semantic conventions. It represents the low-cardinality template of an
-// [absolute path reference].
-//
-// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2
-func URLTemplate(val string) attribute.KeyValue {
- return URLTemplateKey.String(val)
-}
-
-// URLTopLevelDomain returns an attribute KeyValue conforming to the
-// "url.top_level_domain" semantic conventions. It represents the effective top
-// level domain (eTLD), also known as the domain suffix, is the last part of the
-// domain name. For example, the top level domain for example.com is `com`.
-func URLTopLevelDomain(val string) attribute.KeyValue {
- return URLTopLevelDomainKey.String(val)
-}
-
-// Namespace: user
-const (
- // UserEmailKey is the attribute Key conforming to the "user.email" semantic
- // conventions. It represents the user email address.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "a.einstein@example.com"
- UserEmailKey = attribute.Key("user.email")
-
- // UserFullNameKey is the attribute Key conforming to the "user.full_name"
- // semantic conventions. It represents the user's full name.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Albert Einstein"
- UserFullNameKey = attribute.Key("user.full_name")
-
- // UserHashKey is the attribute Key conforming to the "user.hash" semantic
- // conventions. It represents the unique user hash to correlate information for
- // a user in anonymized form.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "364fc68eaf4c8acec74a4e52d7d1feaa"
- // Note: Useful if `user.id` or `user.name` contain confidential information and
- // cannot be used.
- UserHashKey = attribute.Key("user.hash")
-
- // UserIDKey is the attribute Key conforming to the "user.id" semantic
- // conventions. It represents the unique identifier of the user.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "S-1-5-21-202424912787-2692429404-2351956786-1000"
- UserIDKey = attribute.Key("user.id")
-
- // UserNameKey is the attribute Key conforming to the "user.name" semantic
- // conventions. It represents the short name or login/username of the user.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "a.einstein"
- UserNameKey = attribute.Key("user.name")
-
- // UserRolesKey is the attribute Key conforming to the "user.roles" semantic
- // conventions. It represents the array of user roles at the time of the event.
- //
- // Type: string[]
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "admin", "reporting_user"
- UserRolesKey = attribute.Key("user.roles")
-)
-
-// UserEmail returns an attribute KeyValue conforming to the "user.email"
-// semantic conventions. It represents the user email address.
-func UserEmail(val string) attribute.KeyValue {
- return UserEmailKey.String(val)
-}
-
-// UserFullName returns an attribute KeyValue conforming to the "user.full_name"
-// semantic conventions. It represents the user's full name.
-func UserFullName(val string) attribute.KeyValue {
- return UserFullNameKey.String(val)
-}
-
-// UserHash returns an attribute KeyValue conforming to the "user.hash" semantic
-// conventions. It represents the unique user hash to correlate information for a
-// user in anonymized form.
-func UserHash(val string) attribute.KeyValue {
- return UserHashKey.String(val)
-}
-
-// UserID returns an attribute KeyValue conforming to the "user.id" semantic
-// conventions. It represents the unique identifier of the user.
-func UserID(val string) attribute.KeyValue {
- return UserIDKey.String(val)
-}
-
-// UserName returns an attribute KeyValue conforming to the "user.name" semantic
-// conventions. It represents the short name or login/username of the user.
-func UserName(val string) attribute.KeyValue {
- return UserNameKey.String(val)
-}
-
-// UserRoles returns an attribute KeyValue conforming to the "user.roles"
-// semantic conventions. It represents the array of user roles at the time of the
-// event.
-func UserRoles(val ...string) attribute.KeyValue {
- return UserRolesKey.StringSlice(val)
-}
-
-// Namespace: user_agent
-const (
- // UserAgentNameKey is the attribute Key conforming to the "user_agent.name"
- // semantic conventions. It represents the name of the user-agent extracted from
- // original. Usually refers to the browser's name.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Safari", "YourApp"
- // Note: [Example] of extracting browser's name from original string. In the
- // case of using a user-agent for non-browser products, such as microservices
- // with multiple names/versions inside the `user_agent.original`, the most
- // significant name SHOULD be selected. In such a scenario it should align with
- // `user_agent.version`
- //
- // [Example]: https://uaparser.dev/#demo
- UserAgentNameKey = attribute.Key("user_agent.name")
-
- // UserAgentOriginalKey is the attribute Key conforming to the
- // "user_agent.original" semantic conventions. It represents the value of the
- // [HTTP User-Agent] header sent by the client.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Stable
- //
- // Examples: "CERN-LineMode/2.15 libwww/2.17b3", "Mozilla/5.0 (iPhone; CPU
- // iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko)
- // Version/14.1.2 Mobile/15E148 Safari/604.1", "YourApp/1.0.0
- // grpc-java-okhttp/1.27.2"
- //
- // [HTTP User-Agent]: https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent
- UserAgentOriginalKey = attribute.Key("user_agent.original")
-
- // UserAgentOSNameKey is the attribute Key conforming to the
- // "user_agent.os.name" semantic conventions. It represents the human readable
- // operating system name.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "iOS", "Android", "Ubuntu"
- // Note: For mapping user agent strings to OS names, libraries such as
- // [ua-parser] can be utilized.
- //
- // [ua-parser]: https://github.com/ua-parser
- UserAgentOSNameKey = attribute.Key("user_agent.os.name")
-
- // UserAgentOSVersionKey is the attribute Key conforming to the
- // "user_agent.os.version" semantic conventions. It represents the version
- // string of the operating system as defined in [Version Attributes].
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "14.2.1", "18.04.1"
- // Note: For mapping user agent strings to OS versions, libraries such as
- // [ua-parser] can be utilized.
- //
- // [Version Attributes]: /docs/resource/README.md#version-attributes
- // [ua-parser]: https://github.com/ua-parser
- UserAgentOSVersionKey = attribute.Key("user_agent.os.version")
-
- // UserAgentSyntheticTypeKey is the attribute Key conforming to the
- // "user_agent.synthetic.type" semantic conventions. It represents the specifies
- // the category of synthetic traffic, such as tests or bots.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // Note: This attribute MAY be derived from the contents of the
- // `user_agent.original` attribute. Components that populate the attribute are
- // responsible for determining what they consider to be synthetic bot or test
- // traffic. This attribute can either be set for self-identification purposes,
- // or on telemetry detected to be generated as a result of a synthetic request.
- // This attribute is useful for distinguishing between genuine client traffic
- // and synthetic traffic generated by bots or tests.
- UserAgentSyntheticTypeKey = attribute.Key("user_agent.synthetic.type")
-
- // UserAgentVersionKey is the attribute Key conforming to the
- // "user_agent.version" semantic conventions. It represents the version of the
- // user-agent extracted from original. Usually refers to the browser's version.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "14.1.2", "1.0.0"
- // Note: [Example] of extracting browser's version from original string. In the
- // case of using a user-agent for non-browser products, such as microservices
- // with multiple names/versions inside the `user_agent.original`, the most
- // significant version SHOULD be selected. In such a scenario it should align
- // with `user_agent.name`
- //
- // [Example]: https://uaparser.dev/#demo
- UserAgentVersionKey = attribute.Key("user_agent.version")
-)
-
-// UserAgentName returns an attribute KeyValue conforming to the
-// "user_agent.name" semantic conventions. It represents the name of the
-// user-agent extracted from original. Usually refers to the browser's name.
-func UserAgentName(val string) attribute.KeyValue {
- return UserAgentNameKey.String(val)
-}
-
-// UserAgentOriginal returns an attribute KeyValue conforming to the
-// "user_agent.original" semantic conventions. It represents the value of the
-// [HTTP User-Agent] header sent by the client.
-//
-// [HTTP User-Agent]: https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent
-func UserAgentOriginal(val string) attribute.KeyValue {
- return UserAgentOriginalKey.String(val)
-}
-
-// UserAgentOSName returns an attribute KeyValue conforming to the
-// "user_agent.os.name" semantic conventions. It represents the human readable
-// operating system name.
-func UserAgentOSName(val string) attribute.KeyValue {
- return UserAgentOSNameKey.String(val)
-}
-
-// UserAgentOSVersion returns an attribute KeyValue conforming to the
-// "user_agent.os.version" semantic conventions. It represents the version string
-// of the operating system as defined in [Version Attributes].
-//
-// [Version Attributes]: /docs/resource/README.md#version-attributes
-func UserAgentOSVersion(val string) attribute.KeyValue {
- return UserAgentOSVersionKey.String(val)
-}
-
-// UserAgentVersion returns an attribute KeyValue conforming to the
-// "user_agent.version" semantic conventions. It represents the version of the
-// user-agent extracted from original. Usually refers to the browser's version.
-func UserAgentVersion(val string) attribute.KeyValue {
- return UserAgentVersionKey.String(val)
-}
-
-// Enum values for user_agent.synthetic.type
-var (
- // Bot source.
- // Stability: development
- UserAgentSyntheticTypeBot = UserAgentSyntheticTypeKey.String("bot")
- // Synthetic test source.
- // Stability: development
- UserAgentSyntheticTypeTest = UserAgentSyntheticTypeKey.String("test")
-)
-
-// Namespace: vcs
-const (
- // VCSChangeIDKey is the attribute Key conforming to the "vcs.change.id"
- // semantic conventions. It represents the ID of the change (pull request/merge
- // request/changelist) if applicable. This is usually a unique (within
- // repository) identifier generated by the VCS system.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "123"
- VCSChangeIDKey = attribute.Key("vcs.change.id")
-
- // VCSChangeStateKey is the attribute Key conforming to the "vcs.change.state"
- // semantic conventions. It represents the state of the change (pull
- // request/merge request/changelist).
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "open", "closed", "merged"
- VCSChangeStateKey = attribute.Key("vcs.change.state")
-
- // VCSChangeTitleKey is the attribute Key conforming to the "vcs.change.title"
- // semantic conventions. It represents the human readable title of the change
- // (pull request/merge request/changelist). This title is often a brief summary
- // of the change and may get merged in to a ref as the commit summary.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "Fixes broken thing", "feat: add my new feature", "[chore] update
- // dependency"
- VCSChangeTitleKey = attribute.Key("vcs.change.title")
-
- // VCSLineChangeTypeKey is the attribute Key conforming to the
- // "vcs.line_change.type" semantic conventions. It represents the type of line
- // change being measured on a branch or change.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "added", "removed"
- VCSLineChangeTypeKey = attribute.Key("vcs.line_change.type")
-
- // VCSOwnerNameKey is the attribute Key conforming to the "vcs.owner.name"
- // semantic conventions. It represents the group owner within the version
- // control system.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "my-org", "myteam", "business-unit"
- VCSOwnerNameKey = attribute.Key("vcs.owner.name")
-
- // VCSProviderNameKey is the attribute Key conforming to the "vcs.provider.name"
- // semantic conventions. It represents the name of the version control system
- // provider.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "github", "gitlab", "gitea", "bitbucket"
- VCSProviderNameKey = attribute.Key("vcs.provider.name")
-
- // VCSRefBaseNameKey is the attribute Key conforming to the "vcs.ref.base.name"
- // semantic conventions. It represents the name of the [reference] such as
- // **branch** or **tag** in the repository.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "my-feature-branch", "tag-1-test"
- // Note: `base` refers to the starting point of a change. For example, `main`
- // would be the base reference of type branch if you've created a new
- // reference of type branch from it and created new commits.
- //
- // [reference]: https://git-scm.com/docs/gitglossary#def_ref
- VCSRefBaseNameKey = attribute.Key("vcs.ref.base.name")
-
- // VCSRefBaseRevisionKey is the attribute Key conforming to the
- // "vcs.ref.base.revision" semantic conventions. It represents the revision,
- // literally [revised version], The revision most often refers to a commit
- // object in Git, or a revision number in SVN.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc",
- // "main", "123", "HEAD"
- // Note: `base` refers to the starting point of a change. For example, `main`
- // would be the base reference of type branch if you've created a new
- // reference of type branch from it and created new commits. The
- // revision can be a full [hash value (see
- // glossary)],
- // of the recorded change to a ref within a repository pointing to a
- // commit [commit] object. It does
- // not necessarily have to be a hash; it can simply define a [revision
- // number]
- // which is an integer that is monotonically increasing. In cases where
- // it is identical to the `ref.base.name`, it SHOULD still be included.
- // It is up to the implementer to decide which value to set as the
- // revision based on the VCS system and situational context.
- //
- // [revised version]: https://www.merriam-webster.com/dictionary/revision
- // [hash value (see
- // glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
- // [commit]: https://git-scm.com/docs/git-commit
- // [revision
- // number]: https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html
- VCSRefBaseRevisionKey = attribute.Key("vcs.ref.base.revision")
-
- // VCSRefBaseTypeKey is the attribute Key conforming to the "vcs.ref.base.type"
- // semantic conventions. It represents the type of the [reference] in the
- // repository.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "branch", "tag"
- // Note: `base` refers to the starting point of a change. For example, `main`
- // would be the base reference of type branch if you've created a new
- // reference of type branch from it and created new commits.
- //
- // [reference]: https://git-scm.com/docs/gitglossary#def_ref
- VCSRefBaseTypeKey = attribute.Key("vcs.ref.base.type")
-
- // VCSRefHeadNameKey is the attribute Key conforming to the "vcs.ref.head.name"
- // semantic conventions. It represents the name of the [reference] such as
- // **branch** or **tag** in the repository.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "my-feature-branch", "tag-1-test"
- // Note: `head` refers to where you are right now; the current reference at a
- // given time.
- //
- // [reference]: https://git-scm.com/docs/gitglossary#def_ref
- VCSRefHeadNameKey = attribute.Key("vcs.ref.head.name")
-
- // VCSRefHeadRevisionKey is the attribute Key conforming to the
- // "vcs.ref.head.revision" semantic conventions. It represents the revision,
- // literally [revised version], The revision most often refers to a commit
- // object in Git, or a revision number in SVN.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc",
- // "main", "123", "HEAD"
- // Note: `head` refers to where you are right now; the current reference at a
- // given time.The revision can be a full [hash value (see
- // glossary)],
- // of the recorded change to a ref within a repository pointing to a
- // commit [commit] object. It does
- // not necessarily have to be a hash; it can simply define a [revision
- // number]
- // which is an integer that is monotonically increasing. In cases where
- // it is identical to the `ref.head.name`, it SHOULD still be included.
- // It is up to the implementer to decide which value to set as the
- // revision based on the VCS system and situational context.
- //
- // [revised version]: https://www.merriam-webster.com/dictionary/revision
- // [hash value (see
- // glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
- // [commit]: https://git-scm.com/docs/git-commit
- // [revision
- // number]: https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html
- VCSRefHeadRevisionKey = attribute.Key("vcs.ref.head.revision")
-
- // VCSRefHeadTypeKey is the attribute Key conforming to the "vcs.ref.head.type"
- // semantic conventions. It represents the type of the [reference] in the
- // repository.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "branch", "tag"
- // Note: `head` refers to where you are right now; the current reference at a
- // given time.
- //
- // [reference]: https://git-scm.com/docs/gitglossary#def_ref
- VCSRefHeadTypeKey = attribute.Key("vcs.ref.head.type")
-
- // VCSRefTypeKey is the attribute Key conforming to the "vcs.ref.type" semantic
- // conventions. It represents the type of the [reference] in the repository.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "branch", "tag"
- //
- // [reference]: https://git-scm.com/docs/gitglossary#def_ref
- VCSRefTypeKey = attribute.Key("vcs.ref.type")
-
- // VCSRepositoryNameKey is the attribute Key conforming to the
- // "vcs.repository.name" semantic conventions. It represents the human readable
- // name of the repository. It SHOULD NOT include any additional identifier like
- // Group/SubGroup in GitLab or organization in GitHub.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "semantic-conventions", "my-cool-repo"
- // Note: Due to it only being the name, it can clash with forks of the same
- // repository if collecting telemetry across multiple orgs or groups in
- // the same backends.
- VCSRepositoryNameKey = attribute.Key("vcs.repository.name")
-
- // VCSRepositoryURLFullKey is the attribute Key conforming to the
- // "vcs.repository.url.full" semantic conventions. It represents the
- // [canonical URL] of the repository providing the complete HTTP(S) address in
- // order to locate and identify the repository through a browser.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples:
- // "https://github.com/opentelemetry/open-telemetry-collector-contrib",
- // "https://gitlab.com/my-org/my-project/my-projects-project/repo"
- // Note: In Git Version Control Systems, the canonical URL SHOULD NOT include
- // the `.git` extension.
- //
- // [canonical URL]: https://support.google.com/webmasters/answer/10347851
- VCSRepositoryURLFullKey = attribute.Key("vcs.repository.url.full")
-
- // VCSRevisionDeltaDirectionKey is the attribute Key conforming to the
- // "vcs.revision_delta.direction" semantic conventions. It represents the type
- // of revision comparison.
- //
- // Type: Enum
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "ahead", "behind"
- VCSRevisionDeltaDirectionKey = attribute.Key("vcs.revision_delta.direction")
-)
-
-// VCSChangeID returns an attribute KeyValue conforming to the "vcs.change.id"
-// semantic conventions. It represents the ID of the change (pull request/merge
-// request/changelist) if applicable. This is usually a unique (within
-// repository) identifier generated by the VCS system.
-func VCSChangeID(val string) attribute.KeyValue {
- return VCSChangeIDKey.String(val)
-}
-
-// VCSChangeTitle returns an attribute KeyValue conforming to the
-// "vcs.change.title" semantic conventions. It represents the human readable
-// title of the change (pull request/merge request/changelist). This title is
-// often a brief summary of the change and may get merged in to a ref as the
-// commit summary.
-func VCSChangeTitle(val string) attribute.KeyValue {
- return VCSChangeTitleKey.String(val)
-}
-
-// VCSOwnerName returns an attribute KeyValue conforming to the "vcs.owner.name"
-// semantic conventions. It represents the group owner within the version control
-// system.
-func VCSOwnerName(val string) attribute.KeyValue {
- return VCSOwnerNameKey.String(val)
-}
-
-// VCSRefBaseName returns an attribute KeyValue conforming to the
-// "vcs.ref.base.name" semantic conventions. It represents the name of the
-// [reference] such as **branch** or **tag** in the repository.
-//
-// [reference]: https://git-scm.com/docs/gitglossary#def_ref
-func VCSRefBaseName(val string) attribute.KeyValue {
- return VCSRefBaseNameKey.String(val)
-}
-
-// VCSRefBaseRevision returns an attribute KeyValue conforming to the
-// "vcs.ref.base.revision" semantic conventions. It represents the revision,
-// literally [revised version], The revision most often refers to a commit object
-// in Git, or a revision number in SVN.
-//
-// [revised version]: https://www.merriam-webster.com/dictionary/revision
-func VCSRefBaseRevision(val string) attribute.KeyValue {
- return VCSRefBaseRevisionKey.String(val)
-}
-
-// VCSRefHeadName returns an attribute KeyValue conforming to the
-// "vcs.ref.head.name" semantic conventions. It represents the name of the
-// [reference] such as **branch** or **tag** in the repository.
-//
-// [reference]: https://git-scm.com/docs/gitglossary#def_ref
-func VCSRefHeadName(val string) attribute.KeyValue {
- return VCSRefHeadNameKey.String(val)
-}
-
-// VCSRefHeadRevision returns an attribute KeyValue conforming to the
-// "vcs.ref.head.revision" semantic conventions. It represents the revision,
-// literally [revised version], The revision most often refers to a commit object
-// in Git, or a revision number in SVN.
-//
-// [revised version]: https://www.merriam-webster.com/dictionary/revision
-func VCSRefHeadRevision(val string) attribute.KeyValue {
- return VCSRefHeadRevisionKey.String(val)
-}
-
-// VCSRepositoryName returns an attribute KeyValue conforming to the
-// "vcs.repository.name" semantic conventions. It represents the human readable
-// name of the repository. It SHOULD NOT include any additional identifier like
-// Group/SubGroup in GitLab or organization in GitHub.
-func VCSRepositoryName(val string) attribute.KeyValue {
- return VCSRepositoryNameKey.String(val)
-}
-
-// VCSRepositoryURLFull returns an attribute KeyValue conforming to the
-// "vcs.repository.url.full" semantic conventions. It represents the
-// [canonical URL] of the repository providing the complete HTTP(S) address in
-// order to locate and identify the repository through a browser.
-//
-// [canonical URL]: https://support.google.com/webmasters/answer/10347851
-func VCSRepositoryURLFull(val string) attribute.KeyValue {
- return VCSRepositoryURLFullKey.String(val)
-}
-
-// Enum values for vcs.change.state
-var (
- // Open means the change is currently active and under review. It hasn't been
- // merged into the target branch yet, and it's still possible to make changes or
- // add comments.
- // Stability: development
- VCSChangeStateOpen = VCSChangeStateKey.String("open")
- // WIP (work-in-progress, draft) means the change is still in progress and not
- // yet ready for a full review. It might still undergo significant changes.
- // Stability: development
- VCSChangeStateWip = VCSChangeStateKey.String("wip")
- // Closed means the merge request has been closed without merging. This can
- // happen for various reasons, such as the changes being deemed unnecessary, the
- // issue being resolved in another way, or the author deciding to withdraw the
- // request.
- // Stability: development
- VCSChangeStateClosed = VCSChangeStateKey.String("closed")
- // Merged indicates that the change has been successfully integrated into the
- // target codebase.
- // Stability: development
- VCSChangeStateMerged = VCSChangeStateKey.String("merged")
-)
-
-// Enum values for vcs.line_change.type
-var (
- // How many lines were added.
- // Stability: development
- VCSLineChangeTypeAdded = VCSLineChangeTypeKey.String("added")
- // How many lines were removed.
- // Stability: development
- VCSLineChangeTypeRemoved = VCSLineChangeTypeKey.String("removed")
-)
-
-// Enum values for vcs.provider.name
-var (
- // [GitHub]
- // Stability: development
- //
- // [GitHub]: https://github.com
- VCSProviderNameGithub = VCSProviderNameKey.String("github")
- // [GitLab]
- // Stability: development
- //
- // [GitLab]: https://gitlab.com
- VCSProviderNameGitlab = VCSProviderNameKey.String("gitlab")
- // [Gitea]
- // Stability: development
- //
- // [Gitea]: https://gitea.io
- VCSProviderNameGitea = VCSProviderNameKey.String("gitea")
- // [Bitbucket]
- // Stability: development
- //
- // [Bitbucket]: https://bitbucket.org
- VCSProviderNameBitbucket = VCSProviderNameKey.String("bitbucket")
-)
-
-// Enum values for vcs.ref.base.type
-var (
- // [branch]
- // Stability: development
- //
- // [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch
- VCSRefBaseTypeBranch = VCSRefBaseTypeKey.String("branch")
- // [tag]
- // Stability: development
- //
- // [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag
- VCSRefBaseTypeTag = VCSRefBaseTypeKey.String("tag")
-)
-
-// Enum values for vcs.ref.head.type
-var (
- // [branch]
- // Stability: development
- //
- // [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch
- VCSRefHeadTypeBranch = VCSRefHeadTypeKey.String("branch")
- // [tag]
- // Stability: development
- //
- // [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag
- VCSRefHeadTypeTag = VCSRefHeadTypeKey.String("tag")
-)
-
-// Enum values for vcs.ref.type
-var (
- // [branch]
- // Stability: development
- //
- // [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch
- VCSRefTypeBranch = VCSRefTypeKey.String("branch")
- // [tag]
- // Stability: development
- //
- // [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag
- VCSRefTypeTag = VCSRefTypeKey.String("tag")
-)
-
-// Enum values for vcs.revision_delta.direction
-var (
- // How many revisions the change is behind the target ref.
- // Stability: development
- VCSRevisionDeltaDirectionBehind = VCSRevisionDeltaDirectionKey.String("behind")
- // How many revisions the change is ahead of the target ref.
- // Stability: development
- VCSRevisionDeltaDirectionAhead = VCSRevisionDeltaDirectionKey.String("ahead")
-)
-
-// Namespace: webengine
-const (
- // WebEngineDescriptionKey is the attribute Key conforming to the
- // "webengine.description" semantic conventions. It represents the additional
- // description of the web engine (e.g. detailed version and edition
- // information).
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) -
- // 2.2.2.Final"
- WebEngineDescriptionKey = attribute.Key("webengine.description")
-
- // WebEngineNameKey is the attribute Key conforming to the "webengine.name"
- // semantic conventions. It represents the name of the web engine.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "WildFly"
- WebEngineNameKey = attribute.Key("webengine.name")
-
- // WebEngineVersionKey is the attribute Key conforming to the
- // "webengine.version" semantic conventions. It represents the version of the
- // web engine.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "21.0.0"
- WebEngineVersionKey = attribute.Key("webengine.version")
-)
-
-// WebEngineDescription returns an attribute KeyValue conforming to the
-// "webengine.description" semantic conventions. It represents the additional
-// description of the web engine (e.g. detailed version and edition information).
-func WebEngineDescription(val string) attribute.KeyValue {
- return WebEngineDescriptionKey.String(val)
-}
-
-// WebEngineName returns an attribute KeyValue conforming to the "webengine.name"
-// semantic conventions. It represents the name of the web engine.
-func WebEngineName(val string) attribute.KeyValue {
- return WebEngineNameKey.String(val)
-}
-
-// WebEngineVersion returns an attribute KeyValue conforming to the
-// "webengine.version" semantic conventions. It represents the version of the web
-// engine.
-func WebEngineVersion(val string) attribute.KeyValue {
- return WebEngineVersionKey.String(val)
-}
-
-// Namespace: zos
-const (
- // ZOSSmfIDKey is the attribute Key conforming to the "zos.smf.id" semantic
- // conventions. It represents the System Management Facility (SMF) Identifier
- // uniquely identified a z/OS system within a SYSPLEX or mainframe environment
- // and is used for system and performance analysis.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "SYS1"
- ZOSSmfIDKey = attribute.Key("zos.smf.id")
-
- // ZOSSysplexNameKey is the attribute Key conforming to the "zos.sysplex.name"
- // semantic conventions. It represents the name of the SYSPLEX to which the z/OS
- // system belongs too.
- //
- // Type: string
- // RequirementLevel: Recommended
- // Stability: Development
- //
- // Examples: "SYSPLEX1"
- ZOSSysplexNameKey = attribute.Key("zos.sysplex.name")
-)
-
-// ZOSSmfID returns an attribute KeyValue conforming to the "zos.smf.id" semantic
-// conventions. It represents the System Management Facility (SMF) Identifier
-// uniquely identified a z/OS system within a SYSPLEX or mainframe environment
-// and is used for system and performance analysis.
-func ZOSSmfID(val string) attribute.KeyValue {
- return ZOSSmfIDKey.String(val)
-}
-
-// ZOSSysplexName returns an attribute KeyValue conforming to the
-// "zos.sysplex.name" semantic conventions. It represents the name of the SYSPLEX
-// to which the z/OS system belongs too.
-func ZOSSysplexName(val string) attribute.KeyValue {
- return ZOSSysplexNameKey.String(val)
-}
\ No newline at end of file
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/doc.go b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/doc.go
deleted file mode 100644
index 852362ef7703..000000000000
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/doc.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright The OpenTelemetry Authors
-// SPDX-License-Identifier: Apache-2.0
-
-// Package semconv implements OpenTelemetry semantic conventions.
-//
-// OpenTelemetry semantic conventions are agreed standardized naming
-// patterns for OpenTelemetry things. This package represents the v1.39.0
-// version of the OpenTelemetry semantic conventions.
-package semconv // import "go.opentelemetry.io/otel/semconv/v1.39.0"
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/error_type.go b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/error_type.go
deleted file mode 100644
index 84cf636a7273..000000000000
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/error_type.go
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright The OpenTelemetry Authors
-// SPDX-License-Identifier: Apache-2.0
-
-package semconv // import "go.opentelemetry.io/otel/semconv/v1.39.0"
-
-import (
- "reflect"
-
- "go.opentelemetry.io/otel/attribute"
-)
-
-// ErrorType returns an [attribute.KeyValue] identifying the error type of err.
-//
-// If err is nil, the returned attribute has the default value
-// [ErrorTypeOther].
-//
-// If err's type has the method
-//
-// ErrorType() string
-//
-// then the returned attribute has the value of err.ErrorType(). Otherwise, the
-// returned attribute has a value derived from the concrete type of err.
-//
-// The key of the returned attribute is [ErrorTypeKey].
-func ErrorType(err error) attribute.KeyValue {
- if err == nil {
- return ErrorTypeOther
- }
-
- return ErrorTypeKey.String(errorType(err))
-}
-
-func errorType(err error) string {
- var s string
- if et, ok := err.(interface{ ErrorType() string }); ok {
- // Prioritize the ErrorType method if available.
- s = et.ErrorType()
- }
- if s == "" {
- // Fallback to reflection if the ErrorType method is not supported or
- // returns an empty value.
-
- t := reflect.TypeOf(err)
- pkg, name := t.PkgPath(), t.Name()
- if pkg != "" && name != "" {
- s = pkg + "." + name
- } else {
- // The type has no package path or name (predeclared, not-defined,
- // or alias for a not-defined type).
- //
- // This is not guaranteed to be unique, but is a best effort.
- s = t.String()
- }
- }
- return s
-}
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/exception.go b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/exception.go
deleted file mode 100644
index 7b688ecc33dc..000000000000
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/exception.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright The OpenTelemetry Authors
-// SPDX-License-Identifier: Apache-2.0
-
-package semconv // import "go.opentelemetry.io/otel/semconv/v1.39.0"
-
-const (
- // ExceptionEventName is the name of the Span event representing an exception.
- ExceptionEventName = "exception"
-)
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/otelconv/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/otelconv/metric.go
deleted file mode 100644
index 901da86985cc..000000000000
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/otelconv/metric.go
+++ /dev/null
@@ -1,2222 +0,0 @@
-// Code generated from semantic convention specification. DO NOT EDIT.
-
-// Copyright The OpenTelemetry Authors
-// SPDX-License-Identifier: Apache-2.0
-
-// Package otelconv provides types and functionality for OpenTelemetry semantic
-// conventions in the "otel" namespace.
-package otelconv
-
-import (
- "context"
- "sync"
-
- "go.opentelemetry.io/otel/attribute"
- "go.opentelemetry.io/otel/metric"
- "go.opentelemetry.io/otel/metric/noop"
-)
-
-var (
- addOptPool = &sync.Pool{New: func() any { return &[]metric.AddOption{} }}
- recOptPool = &sync.Pool{New: func() any { return &[]metric.RecordOption{} }}
-)
-
-// ErrorTypeAttr is an attribute conforming to the error.type semantic
-// conventions. It represents the describes a class of error the operation ended
-// with.
-type ErrorTypeAttr string
-
-var (
- // ErrorTypeOther is a fallback error value to be used when the instrumentation
- // doesn't define a custom value.
- ErrorTypeOther ErrorTypeAttr = "_OTHER"
-)
-
-// ComponentTypeAttr is an attribute conforming to the otel.component.type
-// semantic conventions. It represents a name identifying the type of the
-// OpenTelemetry component.
-type ComponentTypeAttr string
-
-var (
- // ComponentTypeBatchingSpanProcessor is the builtin SDK batching span
- // processor.
- ComponentTypeBatchingSpanProcessor ComponentTypeAttr = "batching_span_processor"
- // ComponentTypeSimpleSpanProcessor is the builtin SDK simple span processor.
- ComponentTypeSimpleSpanProcessor ComponentTypeAttr = "simple_span_processor"
- // ComponentTypeBatchingLogProcessor is the builtin SDK batching log record
- // processor.
- ComponentTypeBatchingLogProcessor ComponentTypeAttr = "batching_log_processor"
- // ComponentTypeSimpleLogProcessor is the builtin SDK simple log record
- // processor.
- ComponentTypeSimpleLogProcessor ComponentTypeAttr = "simple_log_processor"
- // ComponentTypeOtlpGRPCSpanExporter is the OTLP span exporter over gRPC with
- // protobuf serialization.
- ComponentTypeOtlpGRPCSpanExporter ComponentTypeAttr = "otlp_grpc_span_exporter"
- // ComponentTypeOtlpHTTPSpanExporter is the OTLP span exporter over HTTP with
- // protobuf serialization.
- ComponentTypeOtlpHTTPSpanExporter ComponentTypeAttr = "otlp_http_span_exporter"
- // ComponentTypeOtlpHTTPJSONSpanExporter is the OTLP span exporter over HTTP
- // with JSON serialization.
- ComponentTypeOtlpHTTPJSONSpanExporter ComponentTypeAttr = "otlp_http_json_span_exporter"
- // ComponentTypeZipkinHTTPSpanExporter is the zipkin span exporter over HTTP.
- ComponentTypeZipkinHTTPSpanExporter ComponentTypeAttr = "zipkin_http_span_exporter"
- // ComponentTypeOtlpGRPCLogExporter is the OTLP log record exporter over gRPC
- // with protobuf serialization.
- ComponentTypeOtlpGRPCLogExporter ComponentTypeAttr = "otlp_grpc_log_exporter"
- // ComponentTypeOtlpHTTPLogExporter is the OTLP log record exporter over HTTP
- // with protobuf serialization.
- ComponentTypeOtlpHTTPLogExporter ComponentTypeAttr = "otlp_http_log_exporter"
- // ComponentTypeOtlpHTTPJSONLogExporter is the OTLP log record exporter over
- // HTTP with JSON serialization.
- ComponentTypeOtlpHTTPJSONLogExporter ComponentTypeAttr = "otlp_http_json_log_exporter"
- // ComponentTypePeriodicMetricReader is the builtin SDK periodically exporting
- // metric reader.
- ComponentTypePeriodicMetricReader ComponentTypeAttr = "periodic_metric_reader"
- // ComponentTypeOtlpGRPCMetricExporter is the OTLP metric exporter over gRPC
- // with protobuf serialization.
- ComponentTypeOtlpGRPCMetricExporter ComponentTypeAttr = "otlp_grpc_metric_exporter"
- // ComponentTypeOtlpHTTPMetricExporter is the OTLP metric exporter over HTTP
- // with protobuf serialization.
- ComponentTypeOtlpHTTPMetricExporter ComponentTypeAttr = "otlp_http_metric_exporter"
- // ComponentTypeOtlpHTTPJSONMetricExporter is the OTLP metric exporter over HTTP
- // with JSON serialization.
- ComponentTypeOtlpHTTPJSONMetricExporter ComponentTypeAttr = "otlp_http_json_metric_exporter"
- // ComponentTypePrometheusHTTPTextMetricExporter is the prometheus metric
- // exporter over HTTP with the default text-based format.
- ComponentTypePrometheusHTTPTextMetricExporter ComponentTypeAttr = "prometheus_http_text_metric_exporter"
-)
-
-// SpanParentOriginAttr is an attribute conforming to the otel.span.parent.origin
-// semantic conventions. It represents the determines whether the span has a
-// parent span, and if so, [whether it is a remote parent].
-//
-// [whether it is a remote parent]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote
-type SpanParentOriginAttr string
-
-var (
- // SpanParentOriginNone is the span does not have a parent, it is a root span.
- SpanParentOriginNone SpanParentOriginAttr = "none"
- // SpanParentOriginLocal is the span has a parent and the parent's span context
- // [isRemote()] is false.
- //
- // [isRemote()]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote
- SpanParentOriginLocal SpanParentOriginAttr = "local"
- // SpanParentOriginRemote is the span has a parent and the parent's span context
- // [isRemote()] is true.
- //
- // [isRemote()]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote
- SpanParentOriginRemote SpanParentOriginAttr = "remote"
-)
-
-// SpanSamplingResultAttr is an attribute conforming to the
-// otel.span.sampling_result semantic conventions. It represents the result value
-// of the sampler for this span.
-type SpanSamplingResultAttr string
-
-var (
- // SpanSamplingResultDrop is the span is not sampled and not recording.
- SpanSamplingResultDrop SpanSamplingResultAttr = "DROP"
- // SpanSamplingResultRecordOnly is the span is not sampled, but recording.
- SpanSamplingResultRecordOnly SpanSamplingResultAttr = "RECORD_ONLY"
- // SpanSamplingResultRecordAndSample is the span is sampled and recording.
- SpanSamplingResultRecordAndSample SpanSamplingResultAttr = "RECORD_AND_SAMPLE"
-)
-
-// SDKExporterLogExported is an instrument used to record metric values
-// conforming to the "otel.sdk.exporter.log.exported" semantic conventions. It
-// represents the number of log records for which the export has finished, either
-// successful or failed.
-type SDKExporterLogExported struct {
- metric.Int64Counter
-}
-
-var newSDKExporterLogExportedOpts = []metric.Int64CounterOption{
- metric.WithDescription("The number of log records for which the export has finished, either successful or failed."),
- metric.WithUnit("{log_record}"),
-}
-
-// NewSDKExporterLogExported returns a new SDKExporterLogExported instrument.
-func NewSDKExporterLogExported(
- m metric.Meter,
- opt ...metric.Int64CounterOption,
-) (SDKExporterLogExported, error) {
- // Check if the meter is nil.
- if m == nil {
- return SDKExporterLogExported{noop.Int64Counter{}}, nil
- }
-
- if len(opt) == 0 {
- opt = newSDKExporterLogExportedOpts
- } else {
- opt = append(opt, newSDKExporterLogExportedOpts...)
- }
-
- i, err := m.Int64Counter(
- "otel.sdk.exporter.log.exported",
- opt...,
- )
- if err != nil {
- return SDKExporterLogExported{noop.Int64Counter{}}, err
- }
- return SDKExporterLogExported{i}, nil
-}
-
-// Inst returns the underlying metric instrument.
-func (m SDKExporterLogExported) Inst() metric.Int64Counter {
- return m.Int64Counter
-}
-
-// Name returns the semantic convention name of the instrument.
-func (SDKExporterLogExported) Name() string {
- return "otel.sdk.exporter.log.exported"
-}
-
-// Unit returns the semantic convention unit of the instrument
-func (SDKExporterLogExported) Unit() string {
- return "{log_record}"
-}
-
-// Description returns the semantic convention description of the instrument
-func (SDKExporterLogExported) Description() string {
- return "The number of log records for which the export has finished, either successful or failed."
-}
-
-// Add adds incr to the existing count for attrs.
-//
-// All additional attrs passed are included in the recorded value.
-//
-// For successful exports, `error.type` MUST NOT be set. For failed exports,
-// `error.type` MUST contain the failure cause.
-// For exporters with partial success semantics (e.g. OTLP with
-// `rejected_log_records`), rejected log records MUST count as failed and only
-// non-rejected log records count as success.
-// If no rejection reason is available, `rejected` SHOULD be used as value for
-// `error.type`.
-func (m SDKExporterLogExported) Add(
- ctx context.Context,
- incr int64,
- attrs ...attribute.KeyValue,
-) {
- if len(attrs) == 0 {
- m.Int64Counter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(
- *o,
- metric.WithAttributes(
- attrs...,
- ),
- )
-
- m.Int64Counter.Add(ctx, incr, *o...)
-}
-
-// AddSet adds incr to the existing count for set.
-//
-// For successful exports, `error.type` MUST NOT be set. For failed exports,
-// `error.type` MUST contain the failure cause.
-// For exporters with partial success semantics (e.g. OTLP with
-// `rejected_log_records`), rejected log records MUST count as failed and only
-// non-rejected log records count as success.
-// If no rejection reason is available, `rejected` SHOULD be used as value for
-// `error.type`.
-func (m SDKExporterLogExported) AddSet(ctx context.Context, incr int64, set attribute.Set) {
- if set.Len() == 0 {
- m.Int64Counter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(*o, metric.WithAttributeSet(set))
- m.Int64Counter.Add(ctx, incr, *o...)
-}
-
-// AttrErrorType returns an optional attribute for the "error.type" semantic
-// convention. It represents the describes a class of error the operation ended
-// with.
-func (SDKExporterLogExported) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
- return attribute.String("error.type", string(val))
-}
-
-// AttrComponentName returns an optional attribute for the "otel.component.name"
-// semantic convention. It represents a name uniquely identifying the instance of
-// the OpenTelemetry component within its containing SDK instance.
-func (SDKExporterLogExported) AttrComponentName(val string) attribute.KeyValue {
- return attribute.String("otel.component.name", val)
-}
-
-// AttrComponentType returns an optional attribute for the "otel.component.type"
-// semantic convention. It represents a name identifying the type of the
-// OpenTelemetry component.
-func (SDKExporterLogExported) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
- return attribute.String("otel.component.type", string(val))
-}
-
-// AttrServerAddress returns an optional attribute for the "server.address"
-// semantic convention. It represents the server domain name if available without
-// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
-func (SDKExporterLogExported) AttrServerAddress(val string) attribute.KeyValue {
- return attribute.String("server.address", val)
-}
-
-// AttrServerPort returns an optional attribute for the "server.port" semantic
-// convention. It represents the server port number.
-func (SDKExporterLogExported) AttrServerPort(val int) attribute.KeyValue {
- return attribute.Int("server.port", val)
-}
-
-// SDKExporterLogInflight is an instrument used to record metric values
-// conforming to the "otel.sdk.exporter.log.inflight" semantic conventions. It
-// represents the number of log records which were passed to the exporter, but
-// that have not been exported yet (neither successful, nor failed).
-type SDKExporterLogInflight struct {
- metric.Int64UpDownCounter
-}
-
-var newSDKExporterLogInflightOpts = []metric.Int64UpDownCounterOption{
- metric.WithDescription("The number of log records which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."),
- metric.WithUnit("{log_record}"),
-}
-
-// NewSDKExporterLogInflight returns a new SDKExporterLogInflight instrument.
-func NewSDKExporterLogInflight(
- m metric.Meter,
- opt ...metric.Int64UpDownCounterOption,
-) (SDKExporterLogInflight, error) {
- // Check if the meter is nil.
- if m == nil {
- return SDKExporterLogInflight{noop.Int64UpDownCounter{}}, nil
- }
-
- if len(opt) == 0 {
- opt = newSDKExporterLogInflightOpts
- } else {
- opt = append(opt, newSDKExporterLogInflightOpts...)
- }
-
- i, err := m.Int64UpDownCounter(
- "otel.sdk.exporter.log.inflight",
- opt...,
- )
- if err != nil {
- return SDKExporterLogInflight{noop.Int64UpDownCounter{}}, err
- }
- return SDKExporterLogInflight{i}, nil
-}
-
-// Inst returns the underlying metric instrument.
-func (m SDKExporterLogInflight) Inst() metric.Int64UpDownCounter {
- return m.Int64UpDownCounter
-}
-
-// Name returns the semantic convention name of the instrument.
-func (SDKExporterLogInflight) Name() string {
- return "otel.sdk.exporter.log.inflight"
-}
-
-// Unit returns the semantic convention unit of the instrument
-func (SDKExporterLogInflight) Unit() string {
- return "{log_record}"
-}
-
-// Description returns the semantic convention description of the instrument
-func (SDKExporterLogInflight) Description() string {
- return "The number of log records which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."
-}
-
-// Add adds incr to the existing count for attrs.
-//
-// All additional attrs passed are included in the recorded value.
-//
-// For successful exports, `error.type` MUST NOT be set. For failed exports,
-// `error.type` MUST contain the failure cause.
-func (m SDKExporterLogInflight) Add(
- ctx context.Context,
- incr int64,
- attrs ...attribute.KeyValue,
-) {
- if len(attrs) == 0 {
- m.Int64UpDownCounter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(
- *o,
- metric.WithAttributes(
- attrs...,
- ),
- )
-
- m.Int64UpDownCounter.Add(ctx, incr, *o...)
-}
-
-// AddSet adds incr to the existing count for set.
-//
-// For successful exports, `error.type` MUST NOT be set. For failed exports,
-// `error.type` MUST contain the failure cause.
-func (m SDKExporterLogInflight) AddSet(ctx context.Context, incr int64, set attribute.Set) {
- if set.Len() == 0 {
- m.Int64UpDownCounter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(*o, metric.WithAttributeSet(set))
- m.Int64UpDownCounter.Add(ctx, incr, *o...)
-}
-
-// AttrComponentName returns an optional attribute for the "otel.component.name"
-// semantic convention. It represents a name uniquely identifying the instance of
-// the OpenTelemetry component within its containing SDK instance.
-func (SDKExporterLogInflight) AttrComponentName(val string) attribute.KeyValue {
- return attribute.String("otel.component.name", val)
-}
-
-// AttrComponentType returns an optional attribute for the "otel.component.type"
-// semantic convention. It represents a name identifying the type of the
-// OpenTelemetry component.
-func (SDKExporterLogInflight) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
- return attribute.String("otel.component.type", string(val))
-}
-
-// AttrServerAddress returns an optional attribute for the "server.address"
-// semantic convention. It represents the server domain name if available without
-// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
-func (SDKExporterLogInflight) AttrServerAddress(val string) attribute.KeyValue {
- return attribute.String("server.address", val)
-}
-
-// AttrServerPort returns an optional attribute for the "server.port" semantic
-// convention. It represents the server port number.
-func (SDKExporterLogInflight) AttrServerPort(val int) attribute.KeyValue {
- return attribute.Int("server.port", val)
-}
-
-// SDKExporterMetricDataPointExported is an instrument used to record metric
-// values conforming to the "otel.sdk.exporter.metric_data_point.exported"
-// semantic conventions. It represents the number of metric data points for which
-// the export has finished, either successful or failed.
-type SDKExporterMetricDataPointExported struct {
- metric.Int64Counter
-}
-
-var newSDKExporterMetricDataPointExportedOpts = []metric.Int64CounterOption{
- metric.WithDescription("The number of metric data points for which the export has finished, either successful or failed."),
- metric.WithUnit("{data_point}"),
-}
-
-// NewSDKExporterMetricDataPointExported returns a new
-// SDKExporterMetricDataPointExported instrument.
-func NewSDKExporterMetricDataPointExported(
- m metric.Meter,
- opt ...metric.Int64CounterOption,
-) (SDKExporterMetricDataPointExported, error) {
- // Check if the meter is nil.
- if m == nil {
- return SDKExporterMetricDataPointExported{noop.Int64Counter{}}, nil
- }
-
- if len(opt) == 0 {
- opt = newSDKExporterMetricDataPointExportedOpts
- } else {
- opt = append(opt, newSDKExporterMetricDataPointExportedOpts...)
- }
-
- i, err := m.Int64Counter(
- "otel.sdk.exporter.metric_data_point.exported",
- opt...,
- )
- if err != nil {
- return SDKExporterMetricDataPointExported{noop.Int64Counter{}}, err
- }
- return SDKExporterMetricDataPointExported{i}, nil
-}
-
-// Inst returns the underlying metric instrument.
-func (m SDKExporterMetricDataPointExported) Inst() metric.Int64Counter {
- return m.Int64Counter
-}
-
-// Name returns the semantic convention name of the instrument.
-func (SDKExporterMetricDataPointExported) Name() string {
- return "otel.sdk.exporter.metric_data_point.exported"
-}
-
-// Unit returns the semantic convention unit of the instrument
-func (SDKExporterMetricDataPointExported) Unit() string {
- return "{data_point}"
-}
-
-// Description returns the semantic convention description of the instrument
-func (SDKExporterMetricDataPointExported) Description() string {
- return "The number of metric data points for which the export has finished, either successful or failed."
-}
-
-// Add adds incr to the existing count for attrs.
-//
-// All additional attrs passed are included in the recorded value.
-//
-// For successful exports, `error.type` MUST NOT be set. For failed exports,
-// `error.type` MUST contain the failure cause.
-// For exporters with partial success semantics (e.g. OTLP with
-// `rejected_data_points`), rejected data points MUST count as failed and only
-// non-rejected data points count as success.
-// If no rejection reason is available, `rejected` SHOULD be used as value for
-// `error.type`.
-func (m SDKExporterMetricDataPointExported) Add(
- ctx context.Context,
- incr int64,
- attrs ...attribute.KeyValue,
-) {
- if len(attrs) == 0 {
- m.Int64Counter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(
- *o,
- metric.WithAttributes(
- attrs...,
- ),
- )
-
- m.Int64Counter.Add(ctx, incr, *o...)
-}
-
-// AddSet adds incr to the existing count for set.
-//
-// For successful exports, `error.type` MUST NOT be set. For failed exports,
-// `error.type` MUST contain the failure cause.
-// For exporters with partial success semantics (e.g. OTLP with
-// `rejected_data_points`), rejected data points MUST count as failed and only
-// non-rejected data points count as success.
-// If no rejection reason is available, `rejected` SHOULD be used as value for
-// `error.type`.
-func (m SDKExporterMetricDataPointExported) AddSet(ctx context.Context, incr int64, set attribute.Set) {
- if set.Len() == 0 {
- m.Int64Counter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(*o, metric.WithAttributeSet(set))
- m.Int64Counter.Add(ctx, incr, *o...)
-}
-
-// AttrErrorType returns an optional attribute for the "error.type" semantic
-// convention. It represents the describes a class of error the operation ended
-// with.
-func (SDKExporterMetricDataPointExported) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
- return attribute.String("error.type", string(val))
-}
-
-// AttrComponentName returns an optional attribute for the "otel.component.name"
-// semantic convention. It represents a name uniquely identifying the instance of
-// the OpenTelemetry component within its containing SDK instance.
-func (SDKExporterMetricDataPointExported) AttrComponentName(val string) attribute.KeyValue {
- return attribute.String("otel.component.name", val)
-}
-
-// AttrComponentType returns an optional attribute for the "otel.component.type"
-// semantic convention. It represents a name identifying the type of the
-// OpenTelemetry component.
-func (SDKExporterMetricDataPointExported) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
- return attribute.String("otel.component.type", string(val))
-}
-
-// AttrServerAddress returns an optional attribute for the "server.address"
-// semantic convention. It represents the server domain name if available without
-// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
-func (SDKExporterMetricDataPointExported) AttrServerAddress(val string) attribute.KeyValue {
- return attribute.String("server.address", val)
-}
-
-// AttrServerPort returns an optional attribute for the "server.port" semantic
-// convention. It represents the server port number.
-func (SDKExporterMetricDataPointExported) AttrServerPort(val int) attribute.KeyValue {
- return attribute.Int("server.port", val)
-}
-
-// SDKExporterMetricDataPointInflight is an instrument used to record metric
-// values conforming to the "otel.sdk.exporter.metric_data_point.inflight"
-// semantic conventions. It represents the number of metric data points which
-// were passed to the exporter, but that have not been exported yet (neither
-// successful, nor failed).
-type SDKExporterMetricDataPointInflight struct {
- metric.Int64UpDownCounter
-}
-
-var newSDKExporterMetricDataPointInflightOpts = []metric.Int64UpDownCounterOption{
- metric.WithDescription("The number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."),
- metric.WithUnit("{data_point}"),
-}
-
-// NewSDKExporterMetricDataPointInflight returns a new
-// SDKExporterMetricDataPointInflight instrument.
-func NewSDKExporterMetricDataPointInflight(
- m metric.Meter,
- opt ...metric.Int64UpDownCounterOption,
-) (SDKExporterMetricDataPointInflight, error) {
- // Check if the meter is nil.
- if m == nil {
- return SDKExporterMetricDataPointInflight{noop.Int64UpDownCounter{}}, nil
- }
-
- if len(opt) == 0 {
- opt = newSDKExporterMetricDataPointInflightOpts
- } else {
- opt = append(opt, newSDKExporterMetricDataPointInflightOpts...)
- }
-
- i, err := m.Int64UpDownCounter(
- "otel.sdk.exporter.metric_data_point.inflight",
- opt...,
- )
- if err != nil {
- return SDKExporterMetricDataPointInflight{noop.Int64UpDownCounter{}}, err
- }
- return SDKExporterMetricDataPointInflight{i}, nil
-}
-
-// Inst returns the underlying metric instrument.
-func (m SDKExporterMetricDataPointInflight) Inst() metric.Int64UpDownCounter {
- return m.Int64UpDownCounter
-}
-
-// Name returns the semantic convention name of the instrument.
-func (SDKExporterMetricDataPointInflight) Name() string {
- return "otel.sdk.exporter.metric_data_point.inflight"
-}
-
-// Unit returns the semantic convention unit of the instrument
-func (SDKExporterMetricDataPointInflight) Unit() string {
- return "{data_point}"
-}
-
-// Description returns the semantic convention description of the instrument
-func (SDKExporterMetricDataPointInflight) Description() string {
- return "The number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."
-}
-
-// Add adds incr to the existing count for attrs.
-//
-// All additional attrs passed are included in the recorded value.
-//
-// For successful exports, `error.type` MUST NOT be set. For failed exports,
-// `error.type` MUST contain the failure cause.
-func (m SDKExporterMetricDataPointInflight) Add(
- ctx context.Context,
- incr int64,
- attrs ...attribute.KeyValue,
-) {
- if len(attrs) == 0 {
- m.Int64UpDownCounter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(
- *o,
- metric.WithAttributes(
- attrs...,
- ),
- )
-
- m.Int64UpDownCounter.Add(ctx, incr, *o...)
-}
-
-// AddSet adds incr to the existing count for set.
-//
-// For successful exports, `error.type` MUST NOT be set. For failed exports,
-// `error.type` MUST contain the failure cause.
-func (m SDKExporterMetricDataPointInflight) AddSet(ctx context.Context, incr int64, set attribute.Set) {
- if set.Len() == 0 {
- m.Int64UpDownCounter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(*o, metric.WithAttributeSet(set))
- m.Int64UpDownCounter.Add(ctx, incr, *o...)
-}
-
-// AttrComponentName returns an optional attribute for the "otel.component.name"
-// semantic convention. It represents a name uniquely identifying the instance of
-// the OpenTelemetry component within its containing SDK instance.
-func (SDKExporterMetricDataPointInflight) AttrComponentName(val string) attribute.KeyValue {
- return attribute.String("otel.component.name", val)
-}
-
-// AttrComponentType returns an optional attribute for the "otel.component.type"
-// semantic convention. It represents a name identifying the type of the
-// OpenTelemetry component.
-func (SDKExporterMetricDataPointInflight) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
- return attribute.String("otel.component.type", string(val))
-}
-
-// AttrServerAddress returns an optional attribute for the "server.address"
-// semantic convention. It represents the server domain name if available without
-// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
-func (SDKExporterMetricDataPointInflight) AttrServerAddress(val string) attribute.KeyValue {
- return attribute.String("server.address", val)
-}
-
-// AttrServerPort returns an optional attribute for the "server.port" semantic
-// convention. It represents the server port number.
-func (SDKExporterMetricDataPointInflight) AttrServerPort(val int) attribute.KeyValue {
- return attribute.Int("server.port", val)
-}
-
-// SDKExporterOperationDuration is an instrument used to record metric values
-// conforming to the "otel.sdk.exporter.operation.duration" semantic conventions.
-// It represents the duration of exporting a batch of telemetry records.
-type SDKExporterOperationDuration struct {
- metric.Float64Histogram
-}
-
-var newSDKExporterOperationDurationOpts = []metric.Float64HistogramOption{
- metric.WithDescription("The duration of exporting a batch of telemetry records."),
- metric.WithUnit("s"),
-}
-
-// NewSDKExporterOperationDuration returns a new SDKExporterOperationDuration
-// instrument.
-func NewSDKExporterOperationDuration(
- m metric.Meter,
- opt ...metric.Float64HistogramOption,
-) (SDKExporterOperationDuration, error) {
- // Check if the meter is nil.
- if m == nil {
- return SDKExporterOperationDuration{noop.Float64Histogram{}}, nil
- }
-
- if len(opt) == 0 {
- opt = newSDKExporterOperationDurationOpts
- } else {
- opt = append(opt, newSDKExporterOperationDurationOpts...)
- }
-
- i, err := m.Float64Histogram(
- "otel.sdk.exporter.operation.duration",
- opt...,
- )
- if err != nil {
- return SDKExporterOperationDuration{noop.Float64Histogram{}}, err
- }
- return SDKExporterOperationDuration{i}, nil
-}
-
-// Inst returns the underlying metric instrument.
-func (m SDKExporterOperationDuration) Inst() metric.Float64Histogram {
- return m.Float64Histogram
-}
-
-// Name returns the semantic convention name of the instrument.
-func (SDKExporterOperationDuration) Name() string {
- return "otel.sdk.exporter.operation.duration"
-}
-
-// Unit returns the semantic convention unit of the instrument
-func (SDKExporterOperationDuration) Unit() string {
- return "s"
-}
-
-// Description returns the semantic convention description of the instrument
-func (SDKExporterOperationDuration) Description() string {
- return "The duration of exporting a batch of telemetry records."
-}
-
-// Record records val to the current distribution for attrs.
-//
-// All additional attrs passed are included in the recorded value.
-//
-// This metric defines successful operations using the full success definitions
-// for [http]
-// and [grpc]. Anything else is defined as an unsuccessful operation. For
-// successful
-// operations, `error.type` MUST NOT be set. For unsuccessful export operations,
-// `error.type` MUST contain a relevant failure cause.
-//
-// [http]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success-1
-// [grpc]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success
-func (m SDKExporterOperationDuration) Record(
- ctx context.Context,
- val float64,
- attrs ...attribute.KeyValue,
-) {
- if len(attrs) == 0 {
- m.Float64Histogram.Record(ctx, val)
- return
- }
-
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
-
- *o = append(
- *o,
- metric.WithAttributes(
- attrs...,
- ),
- )
-
- m.Float64Histogram.Record(ctx, val, *o...)
-}
-
-// RecordSet records val to the current distribution for set.
-//
-// This metric defines successful operations using the full success definitions
-// for [http]
-// and [grpc]. Anything else is defined as an unsuccessful operation. For
-// successful
-// operations, `error.type` MUST NOT be set. For unsuccessful export operations,
-// `error.type` MUST contain a relevant failure cause.
-//
-// [http]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success-1
-// [grpc]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success
-func (m SDKExporterOperationDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) {
- if set.Len() == 0 {
- m.Float64Histogram.Record(ctx, val)
- return
- }
-
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
-
- *o = append(*o, metric.WithAttributeSet(set))
- m.Float64Histogram.Record(ctx, val, *o...)
-}
-
-// AttrErrorType returns an optional attribute for the "error.type" semantic
-// convention. It represents the describes a class of error the operation ended
-// with.
-func (SDKExporterOperationDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
- return attribute.String("error.type", string(val))
-}
-
-// AttrHTTPResponseStatusCode returns an optional attribute for the
-// "http.response.status_code" semantic convention. It represents the HTTP status
-// code of the last HTTP request performed in scope of this export call.
-func (SDKExporterOperationDuration) AttrHTTPResponseStatusCode(val int) attribute.KeyValue {
- return attribute.Int("http.response.status_code", val)
-}
-
-// AttrComponentName returns an optional attribute for the "otel.component.name"
-// semantic convention. It represents a name uniquely identifying the instance of
-// the OpenTelemetry component within its containing SDK instance.
-func (SDKExporterOperationDuration) AttrComponentName(val string) attribute.KeyValue {
- return attribute.String("otel.component.name", val)
-}
-
-// AttrComponentType returns an optional attribute for the "otel.component.type"
-// semantic convention. It represents a name identifying the type of the
-// OpenTelemetry component.
-func (SDKExporterOperationDuration) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
- return attribute.String("otel.component.type", string(val))
-}
-
-// AttrRPCResponseStatusCode returns an optional attribute for the
-// "rpc.response.status_code" semantic convention. It represents the gRPC status
-// code of the last gRPC request performed in scope of this export call.
-func (SDKExporterOperationDuration) AttrRPCResponseStatusCode(val string) attribute.KeyValue {
- return attribute.String("rpc.response.status_code", val)
-}
-
-// AttrServerAddress returns an optional attribute for the "server.address"
-// semantic convention. It represents the server domain name if available without
-// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
-func (SDKExporterOperationDuration) AttrServerAddress(val string) attribute.KeyValue {
- return attribute.String("server.address", val)
-}
-
-// AttrServerPort returns an optional attribute for the "server.port" semantic
-// convention. It represents the server port number.
-func (SDKExporterOperationDuration) AttrServerPort(val int) attribute.KeyValue {
- return attribute.Int("server.port", val)
-}
-
-// SDKExporterSpanExported is an instrument used to record metric values
-// conforming to the "otel.sdk.exporter.span.exported" semantic conventions. It
-// represents the number of spans for which the export has finished, either
-// successful or failed.
-type SDKExporterSpanExported struct {
- metric.Int64Counter
-}
-
-var newSDKExporterSpanExportedOpts = []metric.Int64CounterOption{
- metric.WithDescription("The number of spans for which the export has finished, either successful or failed."),
- metric.WithUnit("{span}"),
-}
-
-// NewSDKExporterSpanExported returns a new SDKExporterSpanExported instrument.
-func NewSDKExporterSpanExported(
- m metric.Meter,
- opt ...metric.Int64CounterOption,
-) (SDKExporterSpanExported, error) {
- // Check if the meter is nil.
- if m == nil {
- return SDKExporterSpanExported{noop.Int64Counter{}}, nil
- }
-
- if len(opt) == 0 {
- opt = newSDKExporterSpanExportedOpts
- } else {
- opt = append(opt, newSDKExporterSpanExportedOpts...)
- }
-
- i, err := m.Int64Counter(
- "otel.sdk.exporter.span.exported",
- opt...,
- )
- if err != nil {
- return SDKExporterSpanExported{noop.Int64Counter{}}, err
- }
- return SDKExporterSpanExported{i}, nil
-}
-
-// Inst returns the underlying metric instrument.
-func (m SDKExporterSpanExported) Inst() metric.Int64Counter {
- return m.Int64Counter
-}
-
-// Name returns the semantic convention name of the instrument.
-func (SDKExporterSpanExported) Name() string {
- return "otel.sdk.exporter.span.exported"
-}
-
-// Unit returns the semantic convention unit of the instrument
-func (SDKExporterSpanExported) Unit() string {
- return "{span}"
-}
-
-// Description returns the semantic convention description of the instrument
-func (SDKExporterSpanExported) Description() string {
- return "The number of spans for which the export has finished, either successful or failed."
-}
-
-// Add adds incr to the existing count for attrs.
-//
-// All additional attrs passed are included in the recorded value.
-//
-// For successful exports, `error.type` MUST NOT be set. For failed exports,
-// `error.type` MUST contain the failure cause.
-// For exporters with partial success semantics (e.g. OTLP with `rejected_spans`
-// ), rejected spans MUST count as failed and only non-rejected spans count as
-// success.
-// If no rejection reason is available, `rejected` SHOULD be used as value for
-// `error.type`.
-func (m SDKExporterSpanExported) Add(
- ctx context.Context,
- incr int64,
- attrs ...attribute.KeyValue,
-) {
- if len(attrs) == 0 {
- m.Int64Counter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(
- *o,
- metric.WithAttributes(
- attrs...,
- ),
- )
-
- m.Int64Counter.Add(ctx, incr, *o...)
-}
-
-// AddSet adds incr to the existing count for set.
-//
-// For successful exports, `error.type` MUST NOT be set. For failed exports,
-// `error.type` MUST contain the failure cause.
-// For exporters with partial success semantics (e.g. OTLP with `rejected_spans`
-// ), rejected spans MUST count as failed and only non-rejected spans count as
-// success.
-// If no rejection reason is available, `rejected` SHOULD be used as value for
-// `error.type`.
-func (m SDKExporterSpanExported) AddSet(ctx context.Context, incr int64, set attribute.Set) {
- if set.Len() == 0 {
- m.Int64Counter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(*o, metric.WithAttributeSet(set))
- m.Int64Counter.Add(ctx, incr, *o...)
-}
-
-// AttrErrorType returns an optional attribute for the "error.type" semantic
-// convention. It represents the describes a class of error the operation ended
-// with.
-func (SDKExporterSpanExported) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
- return attribute.String("error.type", string(val))
-}
-
-// AttrComponentName returns an optional attribute for the "otel.component.name"
-// semantic convention. It represents a name uniquely identifying the instance of
-// the OpenTelemetry component within its containing SDK instance.
-func (SDKExporterSpanExported) AttrComponentName(val string) attribute.KeyValue {
- return attribute.String("otel.component.name", val)
-}
-
-// AttrComponentType returns an optional attribute for the "otel.component.type"
-// semantic convention. It represents a name identifying the type of the
-// OpenTelemetry component.
-func (SDKExporterSpanExported) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
- return attribute.String("otel.component.type", string(val))
-}
-
-// AttrServerAddress returns an optional attribute for the "server.address"
-// semantic convention. It represents the server domain name if available without
-// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
-func (SDKExporterSpanExported) AttrServerAddress(val string) attribute.KeyValue {
- return attribute.String("server.address", val)
-}
-
-// AttrServerPort returns an optional attribute for the "server.port" semantic
-// convention. It represents the server port number.
-func (SDKExporterSpanExported) AttrServerPort(val int) attribute.KeyValue {
- return attribute.Int("server.port", val)
-}
-
-// SDKExporterSpanInflight is an instrument used to record metric values
-// conforming to the "otel.sdk.exporter.span.inflight" semantic conventions. It
-// represents the number of spans which were passed to the exporter, but that
-// have not been exported yet (neither successful, nor failed).
-type SDKExporterSpanInflight struct {
- metric.Int64UpDownCounter
-}
-
-var newSDKExporterSpanInflightOpts = []metric.Int64UpDownCounterOption{
- metric.WithDescription("The number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."),
- metric.WithUnit("{span}"),
-}
-
-// NewSDKExporterSpanInflight returns a new SDKExporterSpanInflight instrument.
-func NewSDKExporterSpanInflight(
- m metric.Meter,
- opt ...metric.Int64UpDownCounterOption,
-) (SDKExporterSpanInflight, error) {
- // Check if the meter is nil.
- if m == nil {
- return SDKExporterSpanInflight{noop.Int64UpDownCounter{}}, nil
- }
-
- if len(opt) == 0 {
- opt = newSDKExporterSpanInflightOpts
- } else {
- opt = append(opt, newSDKExporterSpanInflightOpts...)
- }
-
- i, err := m.Int64UpDownCounter(
- "otel.sdk.exporter.span.inflight",
- opt...,
- )
- if err != nil {
- return SDKExporterSpanInflight{noop.Int64UpDownCounter{}}, err
- }
- return SDKExporterSpanInflight{i}, nil
-}
-
-// Inst returns the underlying metric instrument.
-func (m SDKExporterSpanInflight) Inst() metric.Int64UpDownCounter {
- return m.Int64UpDownCounter
-}
-
-// Name returns the semantic convention name of the instrument.
-func (SDKExporterSpanInflight) Name() string {
- return "otel.sdk.exporter.span.inflight"
-}
-
-// Unit returns the semantic convention unit of the instrument
-func (SDKExporterSpanInflight) Unit() string {
- return "{span}"
-}
-
-// Description returns the semantic convention description of the instrument
-func (SDKExporterSpanInflight) Description() string {
- return "The number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."
-}
-
-// Add adds incr to the existing count for attrs.
-//
-// All additional attrs passed are included in the recorded value.
-//
-// For successful exports, `error.type` MUST NOT be set. For failed exports,
-// `error.type` MUST contain the failure cause.
-func (m SDKExporterSpanInflight) Add(
- ctx context.Context,
- incr int64,
- attrs ...attribute.KeyValue,
-) {
- if len(attrs) == 0 {
- m.Int64UpDownCounter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(
- *o,
- metric.WithAttributes(
- attrs...,
- ),
- )
-
- m.Int64UpDownCounter.Add(ctx, incr, *o...)
-}
-
-// AddSet adds incr to the existing count for set.
-//
-// For successful exports, `error.type` MUST NOT be set. For failed exports,
-// `error.type` MUST contain the failure cause.
-func (m SDKExporterSpanInflight) AddSet(ctx context.Context, incr int64, set attribute.Set) {
- if set.Len() == 0 {
- m.Int64UpDownCounter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(*o, metric.WithAttributeSet(set))
- m.Int64UpDownCounter.Add(ctx, incr, *o...)
-}
-
-// AttrComponentName returns an optional attribute for the "otel.component.name"
-// semantic convention. It represents a name uniquely identifying the instance of
-// the OpenTelemetry component within its containing SDK instance.
-func (SDKExporterSpanInflight) AttrComponentName(val string) attribute.KeyValue {
- return attribute.String("otel.component.name", val)
-}
-
-// AttrComponentType returns an optional attribute for the "otel.component.type"
-// semantic convention. It represents a name identifying the type of the
-// OpenTelemetry component.
-func (SDKExporterSpanInflight) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
- return attribute.String("otel.component.type", string(val))
-}
-
-// AttrServerAddress returns an optional attribute for the "server.address"
-// semantic convention. It represents the server domain name if available without
-// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
-func (SDKExporterSpanInflight) AttrServerAddress(val string) attribute.KeyValue {
- return attribute.String("server.address", val)
-}
-
-// AttrServerPort returns an optional attribute for the "server.port" semantic
-// convention. It represents the server port number.
-func (SDKExporterSpanInflight) AttrServerPort(val int) attribute.KeyValue {
- return attribute.Int("server.port", val)
-}
-
-// SDKLogCreated is an instrument used to record metric values conforming to the
-// "otel.sdk.log.created" semantic conventions. It represents the number of logs
-// submitted to enabled SDK Loggers.
-type SDKLogCreated struct {
- metric.Int64Counter
-}
-
-var newSDKLogCreatedOpts = []metric.Int64CounterOption{
- metric.WithDescription("The number of logs submitted to enabled SDK Loggers."),
- metric.WithUnit("{log_record}"),
-}
-
-// NewSDKLogCreated returns a new SDKLogCreated instrument.
-func NewSDKLogCreated(
- m metric.Meter,
- opt ...metric.Int64CounterOption,
-) (SDKLogCreated, error) {
- // Check if the meter is nil.
- if m == nil {
- return SDKLogCreated{noop.Int64Counter{}}, nil
- }
-
- if len(opt) == 0 {
- opt = newSDKLogCreatedOpts
- } else {
- opt = append(opt, newSDKLogCreatedOpts...)
- }
-
- i, err := m.Int64Counter(
- "otel.sdk.log.created",
- opt...,
- )
- if err != nil {
- return SDKLogCreated{noop.Int64Counter{}}, err
- }
- return SDKLogCreated{i}, nil
-}
-
-// Inst returns the underlying metric instrument.
-func (m SDKLogCreated) Inst() metric.Int64Counter {
- return m.Int64Counter
-}
-
-// Name returns the semantic convention name of the instrument.
-func (SDKLogCreated) Name() string {
- return "otel.sdk.log.created"
-}
-
-// Unit returns the semantic convention unit of the instrument
-func (SDKLogCreated) Unit() string {
- return "{log_record}"
-}
-
-// Description returns the semantic convention description of the instrument
-func (SDKLogCreated) Description() string {
- return "The number of logs submitted to enabled SDK Loggers."
-}
-
-// Add adds incr to the existing count for attrs.
-func (m SDKLogCreated) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue) {
- if len(attrs) == 0 {
- m.Int64Counter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(*o, metric.WithAttributes(attrs...))
- m.Int64Counter.Add(ctx, incr, *o...)
-}
-
-// AddSet adds incr to the existing count for set.
-func (m SDKLogCreated) AddSet(ctx context.Context, incr int64, set attribute.Set) {
- if set.Len() == 0 {
- m.Int64Counter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(*o, metric.WithAttributeSet(set))
- m.Int64Counter.Add(ctx, incr, *o...)
-}
-
-// SDKMetricReaderCollectionDuration is an instrument used to record metric
-// values conforming to the "otel.sdk.metric_reader.collection.duration" semantic
-// conventions. It represents the duration of the collect operation of the metric
-// reader.
-type SDKMetricReaderCollectionDuration struct {
- metric.Float64Histogram
-}
-
-var newSDKMetricReaderCollectionDurationOpts = []metric.Float64HistogramOption{
- metric.WithDescription("The duration of the collect operation of the metric reader."),
- metric.WithUnit("s"),
-}
-
-// NewSDKMetricReaderCollectionDuration returns a new
-// SDKMetricReaderCollectionDuration instrument.
-func NewSDKMetricReaderCollectionDuration(
- m metric.Meter,
- opt ...metric.Float64HistogramOption,
-) (SDKMetricReaderCollectionDuration, error) {
- // Check if the meter is nil.
- if m == nil {
- return SDKMetricReaderCollectionDuration{noop.Float64Histogram{}}, nil
- }
-
- if len(opt) == 0 {
- opt = newSDKMetricReaderCollectionDurationOpts
- } else {
- opt = append(opt, newSDKMetricReaderCollectionDurationOpts...)
- }
-
- i, err := m.Float64Histogram(
- "otel.sdk.metric_reader.collection.duration",
- opt...,
- )
- if err != nil {
- return SDKMetricReaderCollectionDuration{noop.Float64Histogram{}}, err
- }
- return SDKMetricReaderCollectionDuration{i}, nil
-}
-
-// Inst returns the underlying metric instrument.
-func (m SDKMetricReaderCollectionDuration) Inst() metric.Float64Histogram {
- return m.Float64Histogram
-}
-
-// Name returns the semantic convention name of the instrument.
-func (SDKMetricReaderCollectionDuration) Name() string {
- return "otel.sdk.metric_reader.collection.duration"
-}
-
-// Unit returns the semantic convention unit of the instrument
-func (SDKMetricReaderCollectionDuration) Unit() string {
- return "s"
-}
-
-// Description returns the semantic convention description of the instrument
-func (SDKMetricReaderCollectionDuration) Description() string {
- return "The duration of the collect operation of the metric reader."
-}
-
-// Record records val to the current distribution for attrs.
-//
-// All additional attrs passed are included in the recorded value.
-//
-// For successful collections, `error.type` MUST NOT be set. For failed
-// collections, `error.type` SHOULD contain the failure cause.
-// It can happen that metrics collection is successful for some MetricProducers,
-// while others fail. In that case `error.type` SHOULD be set to any of the
-// failure causes.
-func (m SDKMetricReaderCollectionDuration) Record(
- ctx context.Context,
- val float64,
- attrs ...attribute.KeyValue,
-) {
- if len(attrs) == 0 {
- m.Float64Histogram.Record(ctx, val)
- return
- }
-
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
-
- *o = append(
- *o,
- metric.WithAttributes(
- attrs...,
- ),
- )
-
- m.Float64Histogram.Record(ctx, val, *o...)
-}
-
-// RecordSet records val to the current distribution for set.
-//
-// For successful collections, `error.type` MUST NOT be set. For failed
-// collections, `error.type` SHOULD contain the failure cause.
-// It can happen that metrics collection is successful for some MetricProducers,
-// while others fail. In that case `error.type` SHOULD be set to any of the
-// failure causes.
-func (m SDKMetricReaderCollectionDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) {
- if set.Len() == 0 {
- m.Float64Histogram.Record(ctx, val)
- return
- }
-
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
-
- *o = append(*o, metric.WithAttributeSet(set))
- m.Float64Histogram.Record(ctx, val, *o...)
-}
-
-// AttrErrorType returns an optional attribute for the "error.type" semantic
-// convention. It represents the describes a class of error the operation ended
-// with.
-func (SDKMetricReaderCollectionDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
- return attribute.String("error.type", string(val))
-}
-
-// AttrComponentName returns an optional attribute for the "otel.component.name"
-// semantic convention. It represents a name uniquely identifying the instance of
-// the OpenTelemetry component within its containing SDK instance.
-func (SDKMetricReaderCollectionDuration) AttrComponentName(val string) attribute.KeyValue {
- return attribute.String("otel.component.name", val)
-}
-
-// AttrComponentType returns an optional attribute for the "otel.component.type"
-// semantic convention. It represents a name identifying the type of the
-// OpenTelemetry component.
-func (SDKMetricReaderCollectionDuration) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
- return attribute.String("otel.component.type", string(val))
-}
-
-// SDKProcessorLogProcessed is an instrument used to record metric values
-// conforming to the "otel.sdk.processor.log.processed" semantic conventions. It
-// represents the number of log records for which the processing has finished,
-// either successful or failed.
-type SDKProcessorLogProcessed struct {
- metric.Int64Counter
-}
-
-var newSDKProcessorLogProcessedOpts = []metric.Int64CounterOption{
- metric.WithDescription("The number of log records for which the processing has finished, either successful or failed."),
- metric.WithUnit("{log_record}"),
-}
-
-// NewSDKProcessorLogProcessed returns a new SDKProcessorLogProcessed instrument.
-func NewSDKProcessorLogProcessed(
- m metric.Meter,
- opt ...metric.Int64CounterOption,
-) (SDKProcessorLogProcessed, error) {
- // Check if the meter is nil.
- if m == nil {
- return SDKProcessorLogProcessed{noop.Int64Counter{}}, nil
- }
-
- if len(opt) == 0 {
- opt = newSDKProcessorLogProcessedOpts
- } else {
- opt = append(opt, newSDKProcessorLogProcessedOpts...)
- }
-
- i, err := m.Int64Counter(
- "otel.sdk.processor.log.processed",
- opt...,
- )
- if err != nil {
- return SDKProcessorLogProcessed{noop.Int64Counter{}}, err
- }
- return SDKProcessorLogProcessed{i}, nil
-}
-
-// Inst returns the underlying metric instrument.
-func (m SDKProcessorLogProcessed) Inst() metric.Int64Counter {
- return m.Int64Counter
-}
-
-// Name returns the semantic convention name of the instrument.
-func (SDKProcessorLogProcessed) Name() string {
- return "otel.sdk.processor.log.processed"
-}
-
-// Unit returns the semantic convention unit of the instrument
-func (SDKProcessorLogProcessed) Unit() string {
- return "{log_record}"
-}
-
-// Description returns the semantic convention description of the instrument
-func (SDKProcessorLogProcessed) Description() string {
- return "The number of log records for which the processing has finished, either successful or failed."
-}
-
-// Add adds incr to the existing count for attrs.
-//
-// All additional attrs passed are included in the recorded value.
-//
-// For successful processing, `error.type` MUST NOT be set. For failed
-// processing, `error.type` MUST contain the failure cause.
-// For the SDK Simple and Batching Log Record Processor a log record is
-// considered to be processed already when it has been submitted to the exporter,
-// not when the corresponding export call has finished.
-func (m SDKProcessorLogProcessed) Add(
- ctx context.Context,
- incr int64,
- attrs ...attribute.KeyValue,
-) {
- if len(attrs) == 0 {
- m.Int64Counter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(
- *o,
- metric.WithAttributes(
- attrs...,
- ),
- )
-
- m.Int64Counter.Add(ctx, incr, *o...)
-}
-
-// AddSet adds incr to the existing count for set.
-//
-// For successful processing, `error.type` MUST NOT be set. For failed
-// processing, `error.type` MUST contain the failure cause.
-// For the SDK Simple and Batching Log Record Processor a log record is
-// considered to be processed already when it has been submitted to the exporter,
-// not when the corresponding export call has finished.
-func (m SDKProcessorLogProcessed) AddSet(ctx context.Context, incr int64, set attribute.Set) {
- if set.Len() == 0 {
- m.Int64Counter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(*o, metric.WithAttributeSet(set))
- m.Int64Counter.Add(ctx, incr, *o...)
-}
-
-// AttrErrorType returns an optional attribute for the "error.type" semantic
-// convention. It represents a low-cardinality description of the failure reason.
-// SDK Batching Log Record Processors MUST use `queue_full` for log records
-// dropped due to a full queue.
-func (SDKProcessorLogProcessed) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
- return attribute.String("error.type", string(val))
-}
-
-// AttrComponentName returns an optional attribute for the "otel.component.name"
-// semantic convention. It represents a name uniquely identifying the instance of
-// the OpenTelemetry component within its containing SDK instance.
-func (SDKProcessorLogProcessed) AttrComponentName(val string) attribute.KeyValue {
- return attribute.String("otel.component.name", val)
-}
-
-// AttrComponentType returns an optional attribute for the "otel.component.type"
-// semantic convention. It represents a name identifying the type of the
-// OpenTelemetry component.
-func (SDKProcessorLogProcessed) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
- return attribute.String("otel.component.type", string(val))
-}
-
-// SDKProcessorLogQueueCapacity is an instrument used to record metric values
-// conforming to the "otel.sdk.processor.log.queue.capacity" semantic
-// conventions. It represents the maximum number of log records the queue of a
-// given instance of an SDK Log Record processor can hold.
-type SDKProcessorLogQueueCapacity struct {
- metric.Int64ObservableUpDownCounter
-}
-
-var newSDKProcessorLogQueueCapacityOpts = []metric.Int64ObservableUpDownCounterOption{
- metric.WithDescription("The maximum number of log records the queue of a given instance of an SDK Log Record processor can hold."),
- metric.WithUnit("{log_record}"),
-}
-
-// NewSDKProcessorLogQueueCapacity returns a new SDKProcessorLogQueueCapacity
-// instrument.
-func NewSDKProcessorLogQueueCapacity(
- m metric.Meter,
- opt ...metric.Int64ObservableUpDownCounterOption,
-) (SDKProcessorLogQueueCapacity, error) {
- // Check if the meter is nil.
- if m == nil {
- return SDKProcessorLogQueueCapacity{noop.Int64ObservableUpDownCounter{}}, nil
- }
-
- if len(opt) == 0 {
- opt = newSDKProcessorLogQueueCapacityOpts
- } else {
- opt = append(opt, newSDKProcessorLogQueueCapacityOpts...)
- }
-
- i, err := m.Int64ObservableUpDownCounter(
- "otel.sdk.processor.log.queue.capacity",
- opt...,
- )
- if err != nil {
- return SDKProcessorLogQueueCapacity{noop.Int64ObservableUpDownCounter{}}, err
- }
- return SDKProcessorLogQueueCapacity{i}, nil
-}
-
-// Inst returns the underlying metric instrument.
-func (m SDKProcessorLogQueueCapacity) Inst() metric.Int64ObservableUpDownCounter {
- return m.Int64ObservableUpDownCounter
-}
-
-// Name returns the semantic convention name of the instrument.
-func (SDKProcessorLogQueueCapacity) Name() string {
- return "otel.sdk.processor.log.queue.capacity"
-}
-
-// Unit returns the semantic convention unit of the instrument
-func (SDKProcessorLogQueueCapacity) Unit() string {
- return "{log_record}"
-}
-
-// Description returns the semantic convention description of the instrument
-func (SDKProcessorLogQueueCapacity) Description() string {
- return "The maximum number of log records the queue of a given instance of an SDK Log Record processor can hold."
-}
-
-// AttrComponentName returns an optional attribute for the "otel.component.name"
-// semantic convention. It represents a name uniquely identifying the instance of
-// the OpenTelemetry component within its containing SDK instance.
-func (SDKProcessorLogQueueCapacity) AttrComponentName(val string) attribute.KeyValue {
- return attribute.String("otel.component.name", val)
-}
-
-// AttrComponentType returns an optional attribute for the "otel.component.type"
-// semantic convention. It represents a name identifying the type of the
-// OpenTelemetry component.
-func (SDKProcessorLogQueueCapacity) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
- return attribute.String("otel.component.type", string(val))
-}
-
-// SDKProcessorLogQueueSize is an instrument used to record metric values
-// conforming to the "otel.sdk.processor.log.queue.size" semantic conventions. It
-// represents the number of log records in the queue of a given instance of an
-// SDK log processor.
-type SDKProcessorLogQueueSize struct {
- metric.Int64ObservableUpDownCounter
-}
-
-var newSDKProcessorLogQueueSizeOpts = []metric.Int64ObservableUpDownCounterOption{
- metric.WithDescription("The number of log records in the queue of a given instance of an SDK log processor."),
- metric.WithUnit("{log_record}"),
-}
-
-// NewSDKProcessorLogQueueSize returns a new SDKProcessorLogQueueSize instrument.
-func NewSDKProcessorLogQueueSize(
- m metric.Meter,
- opt ...metric.Int64ObservableUpDownCounterOption,
-) (SDKProcessorLogQueueSize, error) {
- // Check if the meter is nil.
- if m == nil {
- return SDKProcessorLogQueueSize{noop.Int64ObservableUpDownCounter{}}, nil
- }
-
- if len(opt) == 0 {
- opt = newSDKProcessorLogQueueSizeOpts
- } else {
- opt = append(opt, newSDKProcessorLogQueueSizeOpts...)
- }
-
- i, err := m.Int64ObservableUpDownCounter(
- "otel.sdk.processor.log.queue.size",
- opt...,
- )
- if err != nil {
- return SDKProcessorLogQueueSize{noop.Int64ObservableUpDownCounter{}}, err
- }
- return SDKProcessorLogQueueSize{i}, nil
-}
-
-// Inst returns the underlying metric instrument.
-func (m SDKProcessorLogQueueSize) Inst() metric.Int64ObservableUpDownCounter {
- return m.Int64ObservableUpDownCounter
-}
-
-// Name returns the semantic convention name of the instrument.
-func (SDKProcessorLogQueueSize) Name() string {
- return "otel.sdk.processor.log.queue.size"
-}
-
-// Unit returns the semantic convention unit of the instrument
-func (SDKProcessorLogQueueSize) Unit() string {
- return "{log_record}"
-}
-
-// Description returns the semantic convention description of the instrument
-func (SDKProcessorLogQueueSize) Description() string {
- return "The number of log records in the queue of a given instance of an SDK log processor."
-}
-
-// AttrComponentName returns an optional attribute for the "otel.component.name"
-// semantic convention. It represents a name uniquely identifying the instance of
-// the OpenTelemetry component within its containing SDK instance.
-func (SDKProcessorLogQueueSize) AttrComponentName(val string) attribute.KeyValue {
- return attribute.String("otel.component.name", val)
-}
-
-// AttrComponentType returns an optional attribute for the "otel.component.type"
-// semantic convention. It represents a name identifying the type of the
-// OpenTelemetry component.
-func (SDKProcessorLogQueueSize) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
- return attribute.String("otel.component.type", string(val))
-}
-
-// SDKProcessorSpanProcessed is an instrument used to record metric values
-// conforming to the "otel.sdk.processor.span.processed" semantic conventions. It
-// represents the number of spans for which the processing has finished, either
-// successful or failed.
-type SDKProcessorSpanProcessed struct {
- metric.Int64Counter
-}
-
-var newSDKProcessorSpanProcessedOpts = []metric.Int64CounterOption{
- metric.WithDescription("The number of spans for which the processing has finished, either successful or failed."),
- metric.WithUnit("{span}"),
-}
-
-// NewSDKProcessorSpanProcessed returns a new SDKProcessorSpanProcessed
-// instrument.
-func NewSDKProcessorSpanProcessed(
- m metric.Meter,
- opt ...metric.Int64CounterOption,
-) (SDKProcessorSpanProcessed, error) {
- // Check if the meter is nil.
- if m == nil {
- return SDKProcessorSpanProcessed{noop.Int64Counter{}}, nil
- }
-
- if len(opt) == 0 {
- opt = newSDKProcessorSpanProcessedOpts
- } else {
- opt = append(opt, newSDKProcessorSpanProcessedOpts...)
- }
-
- i, err := m.Int64Counter(
- "otel.sdk.processor.span.processed",
- opt...,
- )
- if err != nil {
- return SDKProcessorSpanProcessed{noop.Int64Counter{}}, err
- }
- return SDKProcessorSpanProcessed{i}, nil
-}
-
-// Inst returns the underlying metric instrument.
-func (m SDKProcessorSpanProcessed) Inst() metric.Int64Counter {
- return m.Int64Counter
-}
-
-// Name returns the semantic convention name of the instrument.
-func (SDKProcessorSpanProcessed) Name() string {
- return "otel.sdk.processor.span.processed"
-}
-
-// Unit returns the semantic convention unit of the instrument
-func (SDKProcessorSpanProcessed) Unit() string {
- return "{span}"
-}
-
-// Description returns the semantic convention description of the instrument
-func (SDKProcessorSpanProcessed) Description() string {
- return "The number of spans for which the processing has finished, either successful or failed."
-}
-
-// Add adds incr to the existing count for attrs.
-//
-// All additional attrs passed are included in the recorded value.
-//
-// For successful processing, `error.type` MUST NOT be set. For failed
-// processing, `error.type` MUST contain the failure cause.
-// For the SDK Simple and Batching Span Processor a span is considered to be
-// processed already when it has been submitted to the exporter, not when the
-// corresponding export call has finished.
-func (m SDKProcessorSpanProcessed) Add(
- ctx context.Context,
- incr int64,
- attrs ...attribute.KeyValue,
-) {
- if len(attrs) == 0 {
- m.Int64Counter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(
- *o,
- metric.WithAttributes(
- attrs...,
- ),
- )
-
- m.Int64Counter.Add(ctx, incr, *o...)
-}
-
-// AddSet adds incr to the existing count for set.
-//
-// For successful processing, `error.type` MUST NOT be set. For failed
-// processing, `error.type` MUST contain the failure cause.
-// For the SDK Simple and Batching Span Processor a span is considered to be
-// processed already when it has been submitted to the exporter, not when the
-// corresponding export call has finished.
-func (m SDKProcessorSpanProcessed) AddSet(ctx context.Context, incr int64, set attribute.Set) {
- if set.Len() == 0 {
- m.Int64Counter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(*o, metric.WithAttributeSet(set))
- m.Int64Counter.Add(ctx, incr, *o...)
-}
-
-// AttrErrorType returns an optional attribute for the "error.type" semantic
-// convention. It represents a low-cardinality description of the failure reason.
-// SDK Batching Span Processors MUST use `queue_full` for spans dropped due to a
-// full queue.
-func (SDKProcessorSpanProcessed) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
- return attribute.String("error.type", string(val))
-}
-
-// AttrComponentName returns an optional attribute for the "otel.component.name"
-// semantic convention. It represents a name uniquely identifying the instance of
-// the OpenTelemetry component within its containing SDK instance.
-func (SDKProcessorSpanProcessed) AttrComponentName(val string) attribute.KeyValue {
- return attribute.String("otel.component.name", val)
-}
-
-// AttrComponentType returns an optional attribute for the "otel.component.type"
-// semantic convention. It represents a name identifying the type of the
-// OpenTelemetry component.
-func (SDKProcessorSpanProcessed) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
- return attribute.String("otel.component.type", string(val))
-}
-
-// SDKProcessorSpanQueueCapacity is an instrument used to record metric values
-// conforming to the "otel.sdk.processor.span.queue.capacity" semantic
-// conventions. It represents the maximum number of spans the queue of a given
-// instance of an SDK span processor can hold.
-type SDKProcessorSpanQueueCapacity struct {
- metric.Int64ObservableUpDownCounter
-}
-
-var newSDKProcessorSpanQueueCapacityOpts = []metric.Int64ObservableUpDownCounterOption{
- metric.WithDescription("The maximum number of spans the queue of a given instance of an SDK span processor can hold."),
- metric.WithUnit("{span}"),
-}
-
-// NewSDKProcessorSpanQueueCapacity returns a new SDKProcessorSpanQueueCapacity
-// instrument.
-func NewSDKProcessorSpanQueueCapacity(
- m metric.Meter,
- opt ...metric.Int64ObservableUpDownCounterOption,
-) (SDKProcessorSpanQueueCapacity, error) {
- // Check if the meter is nil.
- if m == nil {
- return SDKProcessorSpanQueueCapacity{noop.Int64ObservableUpDownCounter{}}, nil
- }
-
- if len(opt) == 0 {
- opt = newSDKProcessorSpanQueueCapacityOpts
- } else {
- opt = append(opt, newSDKProcessorSpanQueueCapacityOpts...)
- }
-
- i, err := m.Int64ObservableUpDownCounter(
- "otel.sdk.processor.span.queue.capacity",
- opt...,
- )
- if err != nil {
- return SDKProcessorSpanQueueCapacity{noop.Int64ObservableUpDownCounter{}}, err
- }
- return SDKProcessorSpanQueueCapacity{i}, nil
-}
-
-// Inst returns the underlying metric instrument.
-func (m SDKProcessorSpanQueueCapacity) Inst() metric.Int64ObservableUpDownCounter {
- return m.Int64ObservableUpDownCounter
-}
-
-// Name returns the semantic convention name of the instrument.
-func (SDKProcessorSpanQueueCapacity) Name() string {
- return "otel.sdk.processor.span.queue.capacity"
-}
-
-// Unit returns the semantic convention unit of the instrument
-func (SDKProcessorSpanQueueCapacity) Unit() string {
- return "{span}"
-}
-
-// Description returns the semantic convention description of the instrument
-func (SDKProcessorSpanQueueCapacity) Description() string {
- return "The maximum number of spans the queue of a given instance of an SDK span processor can hold."
-}
-
-// AttrComponentName returns an optional attribute for the "otel.component.name"
-// semantic convention. It represents a name uniquely identifying the instance of
-// the OpenTelemetry component within its containing SDK instance.
-func (SDKProcessorSpanQueueCapacity) AttrComponentName(val string) attribute.KeyValue {
- return attribute.String("otel.component.name", val)
-}
-
-// AttrComponentType returns an optional attribute for the "otel.component.type"
-// semantic convention. It represents a name identifying the type of the
-// OpenTelemetry component.
-func (SDKProcessorSpanQueueCapacity) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
- return attribute.String("otel.component.type", string(val))
-}
-
-// SDKProcessorSpanQueueSize is an instrument used to record metric values
-// conforming to the "otel.sdk.processor.span.queue.size" semantic conventions.
-// It represents the number of spans in the queue of a given instance of an SDK
-// span processor.
-type SDKProcessorSpanQueueSize struct {
- metric.Int64ObservableUpDownCounter
-}
-
-var newSDKProcessorSpanQueueSizeOpts = []metric.Int64ObservableUpDownCounterOption{
- metric.WithDescription("The number of spans in the queue of a given instance of an SDK span processor."),
- metric.WithUnit("{span}"),
-}
-
-// NewSDKProcessorSpanQueueSize returns a new SDKProcessorSpanQueueSize
-// instrument.
-func NewSDKProcessorSpanQueueSize(
- m metric.Meter,
- opt ...metric.Int64ObservableUpDownCounterOption,
-) (SDKProcessorSpanQueueSize, error) {
- // Check if the meter is nil.
- if m == nil {
- return SDKProcessorSpanQueueSize{noop.Int64ObservableUpDownCounter{}}, nil
- }
-
- if len(opt) == 0 {
- opt = newSDKProcessorSpanQueueSizeOpts
- } else {
- opt = append(opt, newSDKProcessorSpanQueueSizeOpts...)
- }
-
- i, err := m.Int64ObservableUpDownCounter(
- "otel.sdk.processor.span.queue.size",
- opt...,
- )
- if err != nil {
- return SDKProcessorSpanQueueSize{noop.Int64ObservableUpDownCounter{}}, err
- }
- return SDKProcessorSpanQueueSize{i}, nil
-}
-
-// Inst returns the underlying metric instrument.
-func (m SDKProcessorSpanQueueSize) Inst() metric.Int64ObservableUpDownCounter {
- return m.Int64ObservableUpDownCounter
-}
-
-// Name returns the semantic convention name of the instrument.
-func (SDKProcessorSpanQueueSize) Name() string {
- return "otel.sdk.processor.span.queue.size"
-}
-
-// Unit returns the semantic convention unit of the instrument
-func (SDKProcessorSpanQueueSize) Unit() string {
- return "{span}"
-}
-
-// Description returns the semantic convention description of the instrument
-func (SDKProcessorSpanQueueSize) Description() string {
- return "The number of spans in the queue of a given instance of an SDK span processor."
-}
-
-// AttrComponentName returns an optional attribute for the "otel.component.name"
-// semantic convention. It represents a name uniquely identifying the instance of
-// the OpenTelemetry component within its containing SDK instance.
-func (SDKProcessorSpanQueueSize) AttrComponentName(val string) attribute.KeyValue {
- return attribute.String("otel.component.name", val)
-}
-
-// AttrComponentType returns an optional attribute for the "otel.component.type"
-// semantic convention. It represents a name identifying the type of the
-// OpenTelemetry component.
-func (SDKProcessorSpanQueueSize) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
- return attribute.String("otel.component.type", string(val))
-}
-
-// SDKSpanLive is an instrument used to record metric values conforming to the
-// "otel.sdk.span.live" semantic conventions. It represents the number of created
-// spans with `recording=true` for which the end operation has not been called
-// yet.
-type SDKSpanLive struct {
- metric.Int64UpDownCounter
-}
-
-var newSDKSpanLiveOpts = []metric.Int64UpDownCounterOption{
- metric.WithDescription("The number of created spans with `recording=true` for which the end operation has not been called yet."),
- metric.WithUnit("{span}"),
-}
-
-// NewSDKSpanLive returns a new SDKSpanLive instrument.
-func NewSDKSpanLive(
- m metric.Meter,
- opt ...metric.Int64UpDownCounterOption,
-) (SDKSpanLive, error) {
- // Check if the meter is nil.
- if m == nil {
- return SDKSpanLive{noop.Int64UpDownCounter{}}, nil
- }
-
- if len(opt) == 0 {
- opt = newSDKSpanLiveOpts
- } else {
- opt = append(opt, newSDKSpanLiveOpts...)
- }
-
- i, err := m.Int64UpDownCounter(
- "otel.sdk.span.live",
- opt...,
- )
- if err != nil {
- return SDKSpanLive{noop.Int64UpDownCounter{}}, err
- }
- return SDKSpanLive{i}, nil
-}
-
-// Inst returns the underlying metric instrument.
-func (m SDKSpanLive) Inst() metric.Int64UpDownCounter {
- return m.Int64UpDownCounter
-}
-
-// Name returns the semantic convention name of the instrument.
-func (SDKSpanLive) Name() string {
- return "otel.sdk.span.live"
-}
-
-// Unit returns the semantic convention unit of the instrument
-func (SDKSpanLive) Unit() string {
- return "{span}"
-}
-
-// Description returns the semantic convention description of the instrument
-func (SDKSpanLive) Description() string {
- return "The number of created spans with `recording=true` for which the end operation has not been called yet."
-}
-
-// Add adds incr to the existing count for attrs.
-//
-// All additional attrs passed are included in the recorded value.
-func (m SDKSpanLive) Add(
- ctx context.Context,
- incr int64,
- attrs ...attribute.KeyValue,
-) {
- if len(attrs) == 0 {
- m.Int64UpDownCounter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(
- *o,
- metric.WithAttributes(
- attrs...,
- ),
- )
-
- m.Int64UpDownCounter.Add(ctx, incr, *o...)
-}
-
-// AddSet adds incr to the existing count for set.
-func (m SDKSpanLive) AddSet(ctx context.Context, incr int64, set attribute.Set) {
- if set.Len() == 0 {
- m.Int64UpDownCounter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(*o, metric.WithAttributeSet(set))
- m.Int64UpDownCounter.Add(ctx, incr, *o...)
-}
-
-// AttrSpanSamplingResult returns an optional attribute for the
-// "otel.span.sampling_result" semantic convention. It represents the result
-// value of the sampler for this span.
-func (SDKSpanLive) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.KeyValue {
- return attribute.String("otel.span.sampling_result", string(val))
-}
-
-// SDKSpanStarted is an instrument used to record metric values conforming to the
-// "otel.sdk.span.started" semantic conventions. It represents the number of
-// created spans.
-type SDKSpanStarted struct {
- metric.Int64Counter
-}
-
-var newSDKSpanStartedOpts = []metric.Int64CounterOption{
- metric.WithDescription("The number of created spans."),
- metric.WithUnit("{span}"),
-}
-
-// NewSDKSpanStarted returns a new SDKSpanStarted instrument.
-func NewSDKSpanStarted(
- m metric.Meter,
- opt ...metric.Int64CounterOption,
-) (SDKSpanStarted, error) {
- // Check if the meter is nil.
- if m == nil {
- return SDKSpanStarted{noop.Int64Counter{}}, nil
- }
-
- if len(opt) == 0 {
- opt = newSDKSpanStartedOpts
- } else {
- opt = append(opt, newSDKSpanStartedOpts...)
- }
-
- i, err := m.Int64Counter(
- "otel.sdk.span.started",
- opt...,
- )
- if err != nil {
- return SDKSpanStarted{noop.Int64Counter{}}, err
- }
- return SDKSpanStarted{i}, nil
-}
-
-// Inst returns the underlying metric instrument.
-func (m SDKSpanStarted) Inst() metric.Int64Counter {
- return m.Int64Counter
-}
-
-// Name returns the semantic convention name of the instrument.
-func (SDKSpanStarted) Name() string {
- return "otel.sdk.span.started"
-}
-
-// Unit returns the semantic convention unit of the instrument
-func (SDKSpanStarted) Unit() string {
- return "{span}"
-}
-
-// Description returns the semantic convention description of the instrument
-func (SDKSpanStarted) Description() string {
- return "The number of created spans."
-}
-
-// Add adds incr to the existing count for attrs.
-//
-// All additional attrs passed are included in the recorded value.
-//
-// Implementations MUST record this metric for all spans, even for non-recording
-// ones.
-func (m SDKSpanStarted) Add(
- ctx context.Context,
- incr int64,
- attrs ...attribute.KeyValue,
-) {
- if len(attrs) == 0 {
- m.Int64Counter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(
- *o,
- metric.WithAttributes(
- attrs...,
- ),
- )
-
- m.Int64Counter.Add(ctx, incr, *o...)
-}
-
-// AddSet adds incr to the existing count for set.
-//
-// Implementations MUST record this metric for all spans, even for non-recording
-// ones.
-func (m SDKSpanStarted) AddSet(ctx context.Context, incr int64, set attribute.Set) {
- if set.Len() == 0 {
- m.Int64Counter.Add(ctx, incr)
- return
- }
-
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
-
- *o = append(*o, metric.WithAttributeSet(set))
- m.Int64Counter.Add(ctx, incr, *o...)
-}
-
-// AttrSpanParentOrigin returns an optional attribute for the
-// "otel.span.parent.origin" semantic convention. It represents the determines
-// whether the span has a parent span, and if so, [whether it is a remote parent]
-// .
-//
-// [whether it is a remote parent]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote
-func (SDKSpanStarted) AttrSpanParentOrigin(val SpanParentOriginAttr) attribute.KeyValue {
- return attribute.String("otel.span.parent.origin", string(val))
-}
-
-// AttrSpanSamplingResult returns an optional attribute for the
-// "otel.span.sampling_result" semantic convention. It represents the result
-// value of the sampler for this span.
-func (SDKSpanStarted) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.KeyValue {
- return attribute.String("otel.span.sampling_result", string(val))
-}
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/schema.go b/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/schema.go
deleted file mode 100644
index e1a199d89bfe..000000000000
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/schema.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright The OpenTelemetry Authors
-// SPDX-License-Identifier: Apache-2.0
-
-package semconv // import "go.opentelemetry.io/otel/semconv/v1.39.0"
-
-// SchemaURL is the schema URL that matches the version of the semantic conventions
-// that this package defines. Semconv packages starting from v1.4.0 must declare
-// non-empty schema URL in the form https://opentelemetry.io/schemas/
-const SchemaURL = "https://opentelemetry.io/schemas/1.39.0"
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/README.md b/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/README.md
deleted file mode 100644
index c51b7fb7b07b..000000000000
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Semconv v1.40.0
-
-[](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.40.0)
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/MIGRATION.md b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/MIGRATION.md
similarity index 63%
rename from vendor/go.opentelemetry.io/otel/semconv/v1.40.0/MIGRATION.md
rename to vendor/go.opentelemetry.io/otel/semconv/v1.41.0/MIGRATION.md
index e246b1692d6c..ba52cadf7185 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/MIGRATION.md
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/MIGRATION.md
@@ -1,7 +1,7 @@
-# Migration from v1.39.0 to v1.40.0
+# Migration from v1.40.0 to v1.41.0
-The `go.opentelemetry.io/otel/semconv/v1.40.0` package should be a drop-in replacement for `go.opentelemetry.io/otel/semconv/v1.39.0` with the following exceptions.
+The `go.opentelemetry.io/otel/semconv/v1.41.0` package should be a drop-in replacement for `go.opentelemetry.io/otel/semconv/v1.40.0` with the following exceptions.
## Removed
@@ -11,17 +11,7 @@ Refer to the [OpenTelemetry Semantic Conventions documentation] for deprecation
If the type is not listed in the documentation as deprecated, it has been removed in this version due to lack of applicability or use.
If you use any of these non-deprecated declarations in your Go application, please [open an issue] describing your use-case.
-- `ErrorMessage`
-- `ErrorMessageKey`
-- `RPCMessageCompressedSize`
-- `RPCMessageCompressedSizeKey`
-- `RPCMessageID`
-- `RPCMessageIDKey`
-- `RPCMessageTypeKey`
-- `RPCMessageTypeReceived`
-- `RPCMessageTypeSent`
-- `RPCMessageUncompressedSize`
-- `RPCMessageUncompressedSizeKey`
+- `DeploymentEnvironmentName`
[OpenTelemetry Semantic Conventions documentation]: https://github.com/open-telemetry/semantic-conventions
[open an issue]: https://github.com/open-telemetry/opentelemetry-go/issues/new?template=Blank+issue
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/README.md b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/README.md
new file mode 100644
index 000000000000..8353bb7152ac
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/README.md
@@ -0,0 +1,3 @@
+# Semconv v1.41.0
+
+[](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.41.0)
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/attribute_group.go b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/attribute_group.go
similarity index 96%
rename from vendor/go.opentelemetry.io/otel/semconv/v1.40.0/attribute_group.go
rename to vendor/go.opentelemetry.io/otel/semconv/v1.41.0/attribute_group.go
index ee6b1f79d626..7cee086802af 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/attribute_group.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/attribute_group.go
@@ -3,7 +3,7 @@
// Code generated from semantic convention specification. DO NOT EDIT.
-package semconv // import "go.opentelemetry.io/otel/semconv/v1.40.0"
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.41.0"
import "go.opentelemetry.io/otel/attribute"
@@ -950,7 +950,7 @@ const (
// of the [AWS Lambda EvenSource Mapping]. An event source is mapped to a lambda
// function. It's contents are read by Lambda and used to trigger a function.
// This isn't available in the lambda execution context or the lambda runtime
- // environtment. This is going to be populated by the AWS SDK for each language
+ // environment. This is going to be populated by the AWS SDK for each language
// when that UUID is present. Some of these operations are
// Create/Delete/Get/List/Update EventSourceMapping.
//
@@ -1186,7 +1186,7 @@ const (
// AWSSecretsmanagerSecretARNKey is the attribute Key conforming to the
// "aws.secretsmanager.secret.arn" semantic conventions. It represents the ARN
- // of the Secret stored in the Secrets Mangger.
+ // of the Secret stored in the Secrets Manager.
//
// Type: string
// RequirementLevel: Recommended
@@ -1515,7 +1515,7 @@ func AWSLambdaInvokedARN(val string) attribute.KeyValue {
// of the [AWS Lambda EvenSource Mapping]. An event source is mapped to a lambda
// function. It's contents are read by Lambda and used to trigger a function.
// This isn't available in the lambda execution context or the lambda runtime
-// environtment. This is going to be populated by the AWS SDK for each language
+// environment. This is going to be populated by the AWS SDK for each language
// when that UUID is present. Some of these operations are
// Create/Delete/Get/List/Update EventSourceMapping.
//
@@ -1609,7 +1609,7 @@ func AWSS3UploadID(val string) attribute.KeyValue {
// AWSSecretsmanagerSecretARN returns an attribute KeyValue conforming to the
// "aws.secretsmanager.secret.arn" semantic conventions. It represents the ARN of
-// the Secret stored in the Secrets Mangger.
+// the Secret stored in the Secrets Manager.
func AWSSecretsmanagerSecretARN(val string) attribute.KeyValue {
return AWSSecretsmanagerSecretARNKey.String(val)
}
@@ -2196,6 +2196,11 @@ const (
// Stability: Development
//
// Examples: "12097"
+ // Note: For a given pipeline run and task, the `cicd.pipeline.task.run.id` MUST
+ // be unique within that run. For the same task across different runs of the
+ // same pipeline, the `cicd.pipeline.task.run.id` MAY remain the same, enabling
+ // correlation of `cicd.pipeline.task.run.result` values across multiple
+ // pipeline runs.
CICDPipelineTaskRunIDKey = attribute.Key("cicd.pipeline.task.run.id")
// CICDPipelineTaskRunResultKey is the attribute Key conforming to the
@@ -3431,7 +3436,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "a3bf90e006b2"
//
@@ -3467,7 +3472,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "gcr.io/opentelemetry/operator"
ContainerImageNameKey = attribute.Key("container.image.name")
@@ -3478,7 +3483,7 @@ const (
//
// Type: string[]
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples:
// "example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb",
@@ -3497,7 +3502,7 @@ const (
//
// Type: string[]
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "v1.27.1", "3.5.7-0"
//
@@ -3518,7 +3523,7 @@ const (
// ContainerRuntimeDescriptionKey is the attribute Key conforming to the
// "container.runtime.description" semantic conventions. It represents a
// description about the runtime which could include, for example details about
- // the CRI/API version being used or other customisations.
+ // the CRI/API version being used or other customizations.
//
// Type: string
// RequirementLevel: Recommended
@@ -3649,7 +3654,7 @@ func ContainerName(val string) attribute.KeyValue {
// ContainerRuntimeDescription returns an attribute KeyValue conforming to the
// "container.runtime.description" semantic conventions. It represents a
// description about the runtime which could include, for example details about
-// the CRI/API version being used or other customisations.
+// the CRI/API version being used or other customizations.
func ContainerRuntimeDescription(val string) attribute.KeyValue {
return ContainerRuntimeDescriptionKey.String(val)
}
@@ -4260,9 +4265,9 @@ const (
// "deployment.environment.name" semantic conventions. It represents the name of
// the [deployment environment] (aka deployment tier).
//
- // Type: string
+ // Type: Enum
// RequirementLevel: Recommended
- // Stability: Development
+ // Stability: Stable
//
// Examples: "staging", "production"
// Note: `deployment.environment.name` does not affect the uniqueness
@@ -4312,15 +4317,6 @@ const (
DeploymentStatusKey = attribute.Key("deployment.status")
)
-// DeploymentEnvironmentName returns an attribute KeyValue conforming to the
-// "deployment.environment.name" semantic conventions. It represents the name of
-// the [deployment environment] (aka deployment tier).
-//
-// [deployment environment]: https://wikipedia.org/wiki/Deployment_environment
-func DeploymentEnvironmentName(val string) attribute.KeyValue {
- return DeploymentEnvironmentNameKey.String(val)
-}
-
// DeploymentID returns an attribute KeyValue conforming to the "deployment.id"
// semantic conventions. It represents the id of the deployment.
func DeploymentID(val string) attribute.KeyValue {
@@ -4334,6 +4330,22 @@ func DeploymentName(val string) attribute.KeyValue {
return DeploymentNameKey.String(val)
}
+// Enum values for deployment.environment.name
+var (
+ // Production environment
+ // Stability: stable
+ DeploymentEnvironmentNameProduction = DeploymentEnvironmentNameKey.String("production")
+ // Staging environment
+ // Stability: stable
+ DeploymentEnvironmentNameStaging = DeploymentEnvironmentNameKey.String("staging")
+ // Testing environment
+ // Stability: stable
+ DeploymentEnvironmentNameTest = DeploymentEnvironmentNameKey.String("test")
+ // Development environment
+ // Stability: stable
+ DeploymentEnvironmentNameDevelopment = DeploymentEnvironmentNameKey.String("development")
+)
+
// Enum values for deployment.status
var (
// failed
@@ -4645,6 +4657,12 @@ const (
// When `error.type` is set to a type (e.g., an exception type), its
// canonical class name identifying the type within the artifact SHOULD be used.
//
+ // If the recorded error type is a wrapper that is not meaningful for
+ // failure classification, instrumentation MAY use the type of the inner
+ // error instead. For example, in Go, errors created with `fmt.Errorf`
+ // using `%w` MAY be unwrapped when the wrapper type does not help
+ // classify the failure.
+ //
// Instrumentations SHOULD document the list of errors they report.
//
// The cardinality of `error.type` within one instrumentation library SHOULD be
@@ -4718,6 +4736,11 @@ const (
// Stability: Stable
//
// Examples: "java.net.ConnectException", "OSError"
+ // Note: If the recorded exception type is a wrapper that is not meaningful for
+ // failure classification, instrumentation MAY use the type of the inner
+ // exception instead. For example, in Go, errors created with `fmt.Errorf`
+ // using `%w` MAY be unwrapped when the wrapper type does not help
+ // classify the failure.
ExceptionTypeKey = attribute.Key("exception.type")
)
@@ -6667,6 +6690,17 @@ const (
// Examples: "forest", "lived"
GenAIRequestStopSequencesKey = attribute.Key("gen_ai.request.stop_sequences")
+ // GenAIRequestStreamKey is the attribute Key conforming to the
+ // "gen_ai.request.stream" semantic conventions. It represents the indicates
+ // whether the GenAI request was made in streaming mode.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ GenAIRequestStreamKey = attribute.Key("gen_ai.request.stream")
+
// GenAIRequestTemperatureKey is the attribute Key conforming to the
// "gen_ai.request.temperature" semantic conventions. It represents the
// temperature setting for the GenAI request.
@@ -6734,6 +6768,19 @@ const (
// Examples: "gpt-4-0613"
GenAIResponseModelKey = attribute.Key("gen_ai.response.model")
+ // GenAIResponseTimeToFirstChunkKey is the attribute Key conforming to the
+ // "gen_ai.response.time_to_first_chunk" semantic conventions. It represents the
+ // time to first chunk in a streaming response, measured from request issuance,
+ // in seconds. The value is measured from when the client issues the generation
+ // request to when the first chunk is received in the response stream.
+ //
+ // Type: double
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 0.5, 1.2
+ GenAIResponseTimeToFirstChunkKey = attribute.Key("gen_ai.response.time_to_first_chunk")
+
// GenAIRetrievalDocumentsKey is the attribute Key conforming to the
// "gen_ai.retrieval.documents" semantic conventions. It represents the
// documents retrieved.
@@ -6875,7 +6922,7 @@ const (
// GenAIToolDefinitionsKey is the attribute Key conforming to the
// "gen_ai.tool.definitions" semantic conventions. It represents the list of
- // source system tool definitions available to the GenAI agent or model.
+ // tool definitions available to the GenAI agent or model.
//
// Type: any
// RequirementLevel: Recommended
@@ -6887,19 +6934,18 @@ const (
// "description": "The city and state, e.g. San Francisco, CA"\n },\n "unit":
// {\n "type": "string",\n "enum": [\n "celsius",\n "fahrenheit"\n ]\n }\n },\n
// "required": [\n "location",\n "unit"\n ]\n }\n }\n]\n"
- // Note: The value of this attribute matches source system tool definition
- // format.
+ // Note: Instrumentations MUST follow [Tool Definitions JSON Schema].
//
- // It's expected to be an array of objects where each object represents a tool
- // definition. In case a serialized string is available
- // to the instrumentation, the instrumentation SHOULD do the best effort to
- // deserialize it to an array. When recorded on spans, it MAY be recorded as a
- // JSON string if structured format is not supported and SHOULD be recorded in
- // structured form otherwise.
+ // When the attribute is recorded on events, it MUST be recorded in structured
+ // form. When recorded on spans, it MAY be recorded as a JSON string if
+ // structured
+ // format is not supported and SHOULD be recorded in structured form otherwise.
//
// Since this attribute could be large, it's NOT RECOMMENDED to populate
- // it by default. Instrumentations MAY provide a way to enable
- // populating this attribute.
+ // non-required properties by default. Instrumentations MAY provide a way
+ // to enable populating optional properties.
+ //
+ // [Tool Definitions JSON Schema]: /docs/gen-ai/gen-ai-tool-definitions.json
GenAIToolDefinitionsKey = attribute.Key("gen_ai.tool.definitions")
// GenAIToolDescriptionKey is the attribute Key conforming to the
@@ -6997,6 +7043,32 @@ const (
//
// Examples: 180
GenAIUsageOutputTokensKey = attribute.Key("gen_ai.usage.output_tokens")
+
+ // GenAIUsageReasoningOutputTokensKey is the attribute Key conforming to the
+ // "gen_ai.usage.reasoning.output_tokens" semantic conventions. It represents
+ // the number of output tokens used for reasoning (e.g. chain-of-thought,
+ // extended thinking).
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 50
+ // Note: The value SHOULD be included in `gen_ai.usage.output_tokens`.
+ GenAIUsageReasoningOutputTokensKey = attribute.Key("gen_ai.usage.reasoning.output_tokens")
+
+ // GenAIWorkflowNameKey is the attribute Key conforming to the
+ // "gen_ai.workflow.name" semantic conventions. It represents the human-readable
+ // name of the GenAI workflow provided by the application.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "multi_agent_rag", "customer_support_pipeline"
+ // Note: This attribute can be populated in different frameworks eg: name of the
+ // first chain in LangChain OR name of the crew in CrewAI.
+ GenAIWorkflowNameKey = attribute.Key("gen_ai.workflow.name")
)
// GenAIAgentDescription returns an attribute KeyValue conforming to the
@@ -7139,6 +7211,13 @@ func GenAIRequestStopSequences(val ...string) attribute.KeyValue {
return GenAIRequestStopSequencesKey.StringSlice(val)
}
+// GenAIRequestStream returns an attribute KeyValue conforming to the
+// "gen_ai.request.stream" semantic conventions. It represents the indicates
+// whether the GenAI request was made in streaming mode.
+func GenAIRequestStream(val bool) attribute.KeyValue {
+ return GenAIRequestStreamKey.Bool(val)
+}
+
// GenAIRequestTemperature returns an attribute KeyValue conforming to the
// "gen_ai.request.temperature" semantic conventions. It represents the
// temperature setting for the GenAI request.
@@ -7182,6 +7261,15 @@ func GenAIResponseModel(val string) attribute.KeyValue {
return GenAIResponseModelKey.String(val)
}
+// GenAIResponseTimeToFirstChunk returns an attribute KeyValue conforming to the
+// "gen_ai.response.time_to_first_chunk" semantic conventions. It represents the
+// time to first chunk in a streaming response, measured from request issuance,
+// in seconds. The value is measured from when the client issues the generation
+// request to when the first chunk is received in the response stream.
+func GenAIResponseTimeToFirstChunk(val float64) attribute.KeyValue {
+ return GenAIResponseTimeToFirstChunkKey.Float64(val)
+}
+
// GenAIRetrievalQueryText returns an attribute KeyValue conforming to the
// "gen_ai.retrieval.query.text" semantic conventions. It represents the query
// text used for retrieval.
@@ -7245,6 +7333,21 @@ func GenAIUsageOutputTokens(val int) attribute.KeyValue {
return GenAIUsageOutputTokensKey.Int(val)
}
+// GenAIUsageReasoningOutputTokens returns an attribute KeyValue conforming to
+// the "gen_ai.usage.reasoning.output_tokens" semantic conventions. It represents
+// the number of output tokens used for reasoning (e.g. chain-of-thought,
+// extended thinking).
+func GenAIUsageReasoningOutputTokens(val int) attribute.KeyValue {
+ return GenAIUsageReasoningOutputTokensKey.Int(val)
+}
+
+// GenAIWorkflowName returns an attribute KeyValue conforming to the
+// "gen_ai.workflow.name" semantic conventions. It represents the human-readable
+// name of the GenAI workflow provided by the application.
+func GenAIWorkflowName(val string) attribute.KeyValue {
+ return GenAIWorkflowNameKey.String(val)
+}
+
// Enum values for gen_ai.operation.name
var (
// Chat completion operation such as [OpenAI Chat API]
@@ -7281,6 +7384,9 @@ var (
// Execute a tool
// Stability: development
GenAIOperationNameExecuteTool = GenAIOperationNameKey.String("execute_tool")
+ // Invoke GenAI workflow
+ // Stability: development
+ GenAIOperationNameInvokeWorkflow = GenAIOperationNameKey.String("invoke_workflow")
)
// Enum values for gen_ai.output.type
@@ -7335,7 +7441,7 @@ var (
// [Azure OpenAI]
// Stability: development
//
- // [Azure OpenAI]: https://azure.microsoft.com/products/ai-services/openai-service/
+ // [Azure OpenAI]: https://learn.microsoft.com/en-us/azure/ai-services/openai/overview
GenAIProviderNameAzureAIOpenAI = GenAIProviderNameKey.String("azure.ai.openai")
// [IBM Watsonx AI]
// Stability: development
@@ -7551,6 +7657,44 @@ var (
// Namespace: go
const (
+ // GoCPUDetailedStateKey is the attribute Key conforming to the
+ // "go.cpu.detailed_state" semantic conventions. It represents the detailed
+ // state of the CPU.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "gc/pause", "gc/mark/assist"
+ // Note: Value SHOULD match the specific CPU class reported by the Go runtime
+ // under `/cpu/classes/...`. The list of possible values is subject to change
+ // with the Go version used.
+ GoCPUDetailedStateKey = attribute.Key("go.cpu.detailed_state")
+
+ // GoCPUStateKey is the attribute Key conforming to the "go.cpu.state" semantic
+ // conventions. It represents the state of the CPU.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "user", "gc"
+ GoCPUStateKey = attribute.Key("go.cpu.state")
+
+ // GoMemoryDetailedTypeKey is the attribute Key conforming to the
+ // "go.memory.detailed_type" semantic conventions. It represents the detailed
+ // type of memory.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "heap/objects", "heap/free"
+ // Note: Value SHOULD match the specific memory class reported by the Go runtime
+ // under `/memory/classes/...`. The list of possible values is subject to change
+ // with the Go version used.
+ GoMemoryDetailedTypeKey = attribute.Key("go.memory.detailed_type")
+
// GoMemoryTypeKey is the attribute Key conforming to the "go.memory.type"
// semantic conventions. It represents the type of memory.
//
@@ -7562,6 +7706,36 @@ const (
GoMemoryTypeKey = attribute.Key("go.memory.type")
)
+// GoCPUDetailedState returns an attribute KeyValue conforming to the
+// "go.cpu.detailed_state" semantic conventions. It represents the detailed state
+// of the CPU.
+func GoCPUDetailedState(val string) attribute.KeyValue {
+ return GoCPUDetailedStateKey.String(val)
+}
+
+// GoMemoryDetailedType returns an attribute KeyValue conforming to the
+// "go.memory.detailed_type" semantic conventions. It represents the detailed
+// type of memory.
+func GoMemoryDetailedType(val string) attribute.KeyValue {
+ return GoMemoryDetailedTypeKey.String(val)
+}
+
+// Enum values for go.cpu.state
+var (
+ // CPU time spent running user Go code.
+ // Stability: development
+ GoCPUStateUser = GoCPUStateKey.String("user")
+ // CPU time spent performing garbage collection tasks.
+ // Stability: development
+ GoCPUStateGC = GoCPUStateKey.String("gc")
+ // CPU time spent returning unused memory to the underlying platform.
+ // Stability: development
+ GoCPUStateScavenge = GoCPUStateKey.String("scavenge")
+ // Available CPU time not spent executing any Go or Go runtime code.
+ // Stability: development
+ GoCPUStateIdle = GoCPUStateKey.String("idle")
+)
+
// Enum values for go.memory.type
var (
// Memory allocated from the heap that is reserved for stack space, whether or
@@ -7584,7 +7758,8 @@ const (
// Stability: Development
//
// Examples: query findBookById { bookById(id: ?) { name } }
- // Note: The value may be sanitized to exclude sensitive information.
+ // Note: If instrumentation can reliably identify and redact sensitive
+ // information it SHOULD do it.
GraphQLDocumentKey = attribute.Key("graphql.document")
// GraphQLOperationNameKey is the attribute Key conforming to the
@@ -8335,7 +8510,7 @@ var (
const (
// HwBatteryCapacityKey is the attribute Key conforming to the
// "hw.battery.capacity" semantic conventions. It represents the design capacity
- // in Watts-hours or Amper-hours.
+ // in Watts-hours or Ampere-hours.
//
// Type: string
// RequirementLevel: Recommended
@@ -8637,7 +8812,7 @@ const (
// HwBatteryCapacity returns an attribute KeyValue conforming to the
// "hw.battery.capacity" semantic conventions. It represents the design capacity
-// in Watts-hours or Amper-hours.
+// in Watts-hours or Ampere-hours.
func HwBatteryCapacity(val string) attribute.KeyValue {
return HwBatteryCapacityKey.String(val)
}
@@ -9026,7 +9201,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "opentelemetry-cluster"
K8SClusterNameKey = attribute.Key("k8s.cluster.name")
@@ -9037,7 +9212,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d"
// Note: K8s doesn't have support for obtaining a cluster ID. If this is ever
@@ -9073,7 +9248,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "redis"
K8SContainerNameKey = attribute.Key("k8s.container.name")
@@ -9085,7 +9260,7 @@ const (
//
// Type: int
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples:
K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count")
@@ -9136,7 +9311,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "opentelemetry"
K8SCronJobNameKey = attribute.Key("k8s.cronjob.name")
@@ -9146,7 +9321,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid")
@@ -9157,7 +9332,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "opentelemetry"
K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name")
@@ -9167,7 +9342,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid")
@@ -9178,7 +9353,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "opentelemetry"
K8SDeploymentNameKey = attribute.Key("k8s.deployment.name")
@@ -9189,7 +9364,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid")
@@ -9279,7 +9454,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "opentelemetry"
K8SJobNameKey = attribute.Key("k8s.job.name")
@@ -9289,7 +9464,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
K8SJobUIDKey = attribute.Key("k8s.job.uid")
@@ -9300,7 +9475,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "default"
K8SNamespaceNameKey = attribute.Key("k8s.namespace.name")
@@ -9365,27 +9540,128 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "node-1"
K8SNodeNameKey = attribute.Key("k8s.node.name")
+ // K8SNodeSystemContainerNameKey is the attribute Key conforming to the
+ // "k8s.node.system_container.name" semantic conventions. It represents the name
+ // of the system container running on the K8s Node.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "kubelet", "runtime", "pods", "misc"
+ K8SNodeSystemContainerNameKey = attribute.Key("k8s.node.system_container.name")
+
// K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid" semantic
// conventions. It represents the UID of the Node.
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2"
K8SNodeUIDKey = attribute.Key("k8s.node.uid")
+ // K8SPersistentvolumeNameKey is the attribute Key conforming to the
+ // "k8s.persistentvolume.name" semantic conventions. It represents the name of
+ // the PersistentVolume.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "pv-data-01"
+ K8SPersistentvolumeNameKey = attribute.Key("k8s.persistentvolume.name")
+
+ // K8SPersistentvolumeReclaimPolicyKey is the attribute Key conforming to the
+ // "k8s.persistentvolume.reclaim_policy" semantic conventions. It represents the
+ // reclaim policy of the PersistentVolume.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Delete", "Retain", "Recycle"
+ // Note: This attribute aligns with the `persistentVolumeReclaimPolicy` field of
+ // the
+ // [K8s PersistentVolumeSpec].
+ //
+ // [K8s PersistentVolumeSpec]: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-v1/#PersistentVolumeSpec
+ K8SPersistentvolumeReclaimPolicyKey = attribute.Key("k8s.persistentvolume.reclaim_policy")
+
+ // K8SPersistentvolumeStatusPhaseKey is the attribute Key conforming to the
+ // "k8s.persistentvolume.status.phase" semantic conventions. It represents the
+ // phase of the PersistentVolume.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Pending", "Available", "Bound", "Released", "Failed"
+ // Note: This attribute aligns with the `phase` field of the
+ // [K8s PersistentVolumeStatus].
+ //
+ // [K8s PersistentVolumeStatus]: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-v1/#PersistentVolumeStatus
+ K8SPersistentvolumeStatusPhaseKey = attribute.Key("k8s.persistentvolume.status.phase")
+
+ // K8SPersistentvolumeUIDKey is the attribute Key conforming to the
+ // "k8s.persistentvolume.uid" semantic conventions. It represents the UID of the
+ // PersistentVolume.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SPersistentvolumeUIDKey = attribute.Key("k8s.persistentvolume.uid")
+
+ // K8SPersistentvolumeclaimNameKey is the attribute Key conforming to the
+ // "k8s.persistentvolumeclaim.name" semantic conventions. It represents the name
+ // of the PersistentVolumeClaim.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "pvc-data-01"
+ K8SPersistentvolumeclaimNameKey = attribute.Key("k8s.persistentvolumeclaim.name")
+
+ // K8SPersistentvolumeclaimStatusPhaseKey is the attribute Key conforming to the
+ // "k8s.persistentvolumeclaim.status.phase" semantic conventions. It represents
+ // the phase of the PersistentVolumeClaim.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Pending", "Bound", "Lost"
+ // Note: This attribute aligns with the `phase` field of the
+ // [K8s PersistentVolumeClaimStatus].
+ //
+ // [K8s PersistentVolumeClaimStatus]: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#PersistentVolumeClaimStatus
+ K8SPersistentvolumeclaimStatusPhaseKey = attribute.Key("k8s.persistentvolumeclaim.status.phase")
+
+ // K8SPersistentvolumeclaimUIDKey is the attribute Key conforming to the
+ // "k8s.persistentvolumeclaim.uid" semantic conventions. It represents the UID
+ // of the PersistentVolumeClaim.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SPersistentvolumeclaimUIDKey = attribute.Key("k8s.persistentvolumeclaim.uid")
+
// K8SPodHostnameKey is the attribute Key conforming to the "k8s.pod.hostname"
// semantic conventions. It represents the specifies the hostname of the Pod.
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "collector-gateway"
// Note: The K8s Pod spec has an optional hostname field, which can be used to
@@ -9405,7 +9681,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "172.18.0.2"
// Note: This attribute aligns with the `podIP` field of the
@@ -9419,7 +9695,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "opentelemetry-pod-autoconf"
K8SPodNameKey = attribute.Key("k8s.pod.name")
@@ -9430,7 +9706,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "2025-12-04T08:41:03Z"
// Note: Date and time at which the object was acknowledged by the Kubelet.
@@ -9474,7 +9750,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
K8SPodUIDKey = attribute.Key("k8s.pod.uid")
@@ -9485,7 +9761,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "opentelemetry"
K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name")
@@ -9496,7 +9772,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid")
@@ -9709,7 +9985,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "opentelemetry"
K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name")
@@ -9720,7 +9996,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Beta
+ // Stability: Release_Candidate
//
// Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid")
@@ -10005,12 +10281,80 @@ func K8SNodeName(val string) attribute.KeyValue {
return K8SNodeNameKey.String(val)
}
+// K8SNodeSystemContainerName returns an attribute KeyValue conforming to the
+// "k8s.node.system_container.name" semantic conventions. It represents the name
+// of the system container running on the K8s Node.
+func K8SNodeSystemContainerName(val string) attribute.KeyValue {
+ return K8SNodeSystemContainerNameKey.String(val)
+}
+
// K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid"
// semantic conventions. It represents the UID of the Node.
func K8SNodeUID(val string) attribute.KeyValue {
return K8SNodeUIDKey.String(val)
}
+// K8SPersistentvolumeAnnotation returns an attribute KeyValue conforming to the
+// "k8s.persistentvolume.annotation" semantic conventions. It represents the
+// annotation placed on the PersistentVolume, the `` being the annotation
+// name, the value being the annotation value, even if the value is empty.
+func K8SPersistentvolumeAnnotation(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.persistentvolume.annotation."+key, val)
+}
+
+// K8SPersistentvolumeLabel returns an attribute KeyValue conforming to the
+// "k8s.persistentvolume.label" semantic conventions. It represents the label
+// placed on the PersistentVolume, the `` being the label name, the value
+// being the label value, even if the value is empty.
+func K8SPersistentvolumeLabel(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.persistentvolume.label."+key, val)
+}
+
+// K8SPersistentvolumeName returns an attribute KeyValue conforming to the
+// "k8s.persistentvolume.name" semantic conventions. It represents the name of
+// the PersistentVolume.
+func K8SPersistentvolumeName(val string) attribute.KeyValue {
+ return K8SPersistentvolumeNameKey.String(val)
+}
+
+// K8SPersistentvolumeUID returns an attribute KeyValue conforming to the
+// "k8s.persistentvolume.uid" semantic conventions. It represents the UID of the
+// PersistentVolume.
+func K8SPersistentvolumeUID(val string) attribute.KeyValue {
+ return K8SPersistentvolumeUIDKey.String(val)
+}
+
+// K8SPersistentvolumeclaimAnnotation returns an attribute KeyValue conforming to
+// the "k8s.persistentvolumeclaim.annotation" semantic conventions. It represents
+// the annotation placed on the PersistentVolumeClaim, the `` being the
+// annotation name, the value being the annotation value, even if the value is
+// empty.
+func K8SPersistentvolumeclaimAnnotation(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.persistentvolumeclaim.annotation."+key, val)
+}
+
+// K8SPersistentvolumeclaimLabel returns an attribute KeyValue conforming to the
+// "k8s.persistentvolumeclaim.label" semantic conventions. It represents the
+// label placed on the PersistentVolumeClaim, the `` being the label name,
+// the value being the label value, even if the value is empty.
+func K8SPersistentvolumeclaimLabel(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.persistentvolumeclaim.label."+key, val)
+}
+
+// K8SPersistentvolumeclaimName returns an attribute KeyValue conforming to the
+// "k8s.persistentvolumeclaim.name" semantic conventions. It represents the name
+// of the PersistentVolumeClaim.
+func K8SPersistentvolumeclaimName(val string) attribute.KeyValue {
+ return K8SPersistentvolumeclaimNameKey.String(val)
+}
+
+// K8SPersistentvolumeclaimUID returns an attribute KeyValue conforming to the
+// "k8s.persistentvolumeclaim.uid" semantic conventions. It represents the UID of
+// the PersistentVolumeClaim.
+func K8SPersistentvolumeclaimUID(val string) attribute.KeyValue {
+ return K8SPersistentvolumeclaimUIDKey.String(val)
+}
+
// K8SPodAnnotation returns an attribute KeyValue conforming to the
// "k8s.pod.annotation" semantic conventions. It represents the annotation placed
// on the Pod, the `` being the annotation name, the value being the
@@ -10318,6 +10662,51 @@ var (
K8SNodeConditionTypeNetworkUnavailable = K8SNodeConditionTypeKey.String("NetworkUnavailable")
)
+// Enum values for k8s.persistentvolume.reclaim_policy
+var (
+ // The volume will be deleted when released from its claim.
+ // Stability: development
+ K8SPersistentvolumeReclaimPolicyDelete = K8SPersistentvolumeReclaimPolicyKey.String("Delete")
+ // The volume will be recycled (basic scrub) when released from its claim.
+ // Stability: development
+ K8SPersistentvolumeReclaimPolicyRecycle = K8SPersistentvolumeReclaimPolicyKey.String("Recycle")
+ // The volume will be retained when released from its claim.
+ // Stability: development
+ K8SPersistentvolumeReclaimPolicyRetain = K8SPersistentvolumeReclaimPolicyKey.String("Retain")
+)
+
+// Enum values for k8s.persistentvolume.status.phase
+var (
+ // The volume is available and not yet bound to a claim.
+ // Stability: development
+ K8SPersistentvolumeStatusPhaseAvailable = K8SPersistentvolumeStatusPhaseKey.String("Available")
+ // The volume is bound to a claim.
+ // Stability: development
+ K8SPersistentvolumeStatusPhaseBound = K8SPersistentvolumeStatusPhaseKey.String("Bound")
+ // The volume has failed its automatic reclamation.
+ // Stability: development
+ K8SPersistentvolumeStatusPhaseFailed = K8SPersistentvolumeStatusPhaseKey.String("Failed")
+ // The volume is being provisioned.
+ // Stability: development
+ K8SPersistentvolumeStatusPhasePending = K8SPersistentvolumeStatusPhaseKey.String("Pending")
+ // The claim has been deleted but the volume is not yet available.
+ // Stability: development
+ K8SPersistentvolumeStatusPhaseReleased = K8SPersistentvolumeStatusPhaseKey.String("Released")
+)
+
+// Enum values for k8s.persistentvolumeclaim.status.phase
+var (
+ // The claim is bound to a volume.
+ // Stability: development
+ K8SPersistentvolumeclaimStatusPhaseBound = K8SPersistentvolumeclaimStatusPhaseKey.String("Bound")
+ // The claim has lost its underlying volume (the volume does not exist anymore).
+ // Stability: development
+ K8SPersistentvolumeclaimStatusPhaseLost = K8SPersistentvolumeclaimStatusPhaseKey.String("Lost")
+ // The claim has not yet been bound to a volume.
+ // Stability: development
+ K8SPersistentvolumeclaimStatusPhasePending = K8SPersistentvolumeclaimStatusPhaseKey.String("Pending")
+)
+
// Enum values for k8s.pod.status.phase
var (
// The pod has been accepted by the system, but one or more of the containers
@@ -12669,7 +13058,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Development
+ // Stability: Stable
//
// Examples: "browser.mouse.click", "device.app.lifecycle"
// Note: This attribute SHOULD be used by non-OTLP exporters when destination
@@ -13240,14 +13629,27 @@ const (
// ProcessExecutableBuildIDHtlhashKey is the attribute Key conforming to the
// "process.executable.build_id.htlhash" semantic conventions. It represents the
- // profiling specific build ID for executables. See the OTel specification for
- // Profiles for more information.
+ // deterministic build ID for executables.
//
// Type: string
// RequirementLevel: Recommended
// Stability: Development
//
// Examples: "600DCAFE4A110000F2BF38C493F5FB92"
+ // Note: GNU and Go build IDs may be stripped or unavailable in some
+ // environments
+ // (e.g., Alpine Linux, Docker images). This attribute provides a deterministic
+ // build ID computed by hashing the first and last 4096 bytes of the file
+ // along with its length:
+ //
+ // ```
+ // Input ← Concat(File[:4096], File[-4096:], BigEndianUInt64(Len(File)))
+ // Digest ← SHA256(Input)
+ // BuildID ← Digest[:16]
+ // ```
+ //
+ // The result is the first 16 bytes (128 bits) of the SHA256 digest,
+ // represented as a hex string.
ProcessExecutableBuildIDHtlhashKey = attribute.Key("process.executable.build_id.htlhash")
// ProcessExecutableNameKey is the attribute Key conforming to the
@@ -13603,8 +14005,7 @@ func ProcessExecutableBuildIDGo(val string) attribute.KeyValue {
// ProcessExecutableBuildIDHtlhash returns an attribute KeyValue conforming to
// the "process.executable.build_id.htlhash" semantic conventions. It represents
-// the profiling specific build ID for executables. See the OTel specification
-// for Profiles for more information.
+// the deterministic build ID for executables.
func ProcessExecutableBuildIDHtlhash(val string) attribute.KeyValue {
return ProcessExecutableBuildIDHtlhashKey.String(val)
}
@@ -14317,9 +14718,11 @@ const (
// Examples: "shoppingcart"
// Note: MUST be the same for all instances of horizontally scaled services. If
// the value was not specified, SDKs MUST fallback to `unknown_service:`
- // concatenated with [`process.executable.name`], e.g. `unknown_service:bash`.
- // If `process.executable.name` is not available, the value MUST be set to
+ // concatenated with the process executable name, e.g. `unknown_service:bash`.
+ // If the process executable name is not available, the value MUST be set to
// `unknown_service`.
+ // The process executable name is the name of the process executable, the same
+ // value as described by the [`process.executable.name`] resource attribute.
//
// [`process.executable.name`]: process.md
ServiceNameKey = attribute.Key("service.name")
@@ -14643,6 +15046,17 @@ const (
// Examples: "ext4"
SystemFilesystemTypeKey = attribute.Key("system.filesystem.type")
+ // SystemMemoryLinuxHugepagesStateKey is the attribute Key conforming to the
+ // "system.memory.linux.hugepages.state" semantic conventions. It represents the
+ // Linux HugePages memory state.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "free", "used"
+ SystemMemoryLinuxHugepagesStateKey = attribute.Key("system.memory.linux.hugepages.state")
+
// SystemMemoryLinuxSlabStateKey is the attribute Key conforming to the
// "system.memory.linux.slab.state" semantic conventions. It represents the
// Linux Slab memory state.
@@ -14753,6 +15167,16 @@ var (
SystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String("ext4")
)
+// Enum values for system.memory.linux.hugepages.state
+var (
+ // free
+ // Stability: development
+ SystemMemoryLinuxHugepagesStateFree = SystemMemoryLinuxHugepagesStateKey.String("free")
+ // used
+ // Stability: development
+ SystemMemoryLinuxHugepagesStateUsed = SystemMemoryLinuxHugepagesStateKey.String("used")
+)
+
// Enum values for system.memory.linux.slab.state
var (
// reclaimable
@@ -14817,7 +15241,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Development
+ // Stability: Stable
//
// Examples: "parts-unlimited-java"
// Note: Official auto instrumentation agents and distributions SHOULD set the
@@ -14832,7 +15256,7 @@ const (
//
// Type: string
// RequirementLevel: Recommended
- // Stability: Development
+ // Stability: Stable
//
// Examples: "1.2.3"
TelemetryDistroVersionKey = attribute.Key("telemetry.distro.version")
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/doc.go b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/doc.go
similarity index 82%
rename from vendor/go.opentelemetry.io/otel/semconv/v1.40.0/doc.go
rename to vendor/go.opentelemetry.io/otel/semconv/v1.41.0/doc.go
index c5c41e4d276b..a45d424d8847 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/doc.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/doc.go
@@ -1,9 +1,11 @@
+// Code generated from semantic convention specification. DO NOT EDIT.
+
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
// Package semconv implements OpenTelemetry semantic conventions.
//
// OpenTelemetry semantic conventions are agreed standardized naming
-// patterns for OpenTelemetry things. This package represents the v1.40.0
+// patterns for OpenTelemetry things. This package represents the v1.41.0
// version of the OpenTelemetry semantic conventions.
-package semconv // import "go.opentelemetry.io/otel/semconv/v1.40.0"
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.41.0"
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/error_type.go b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/error_type.go
similarity index 75%
rename from vendor/go.opentelemetry.io/otel/semconv/v1.40.0/error_type.go
rename to vendor/go.opentelemetry.io/otel/semconv/v1.41.0/error_type.go
index 6d26e52821b1..0b13f0de8e67 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/error_type.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/error_type.go
@@ -1,10 +1,13 @@
+// Code generated from semantic convention specification. DO NOT EDIT.
+
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package semconv // import "go.opentelemetry.io/otel/semconv/v1.40.0"
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.41.0"
import (
"errors"
+ "fmt"
"reflect"
"go.opentelemetry.io/otel/attribute"
@@ -22,7 +25,8 @@ import (
// the returned attribute has that method's return value. If multiple errors in
// the chain implement this method, the value from the first match found by
// [errors.As] is used. Otherwise, the returned attribute has a value derived
-// from the concrete type of err.
+// from the concrete type of err after unwrapping any wrappers created with
+// [fmt.Errorf].
//
// The key of the returned attribute is [ErrorTypeKey].
func ErrorType(err error) attribute.KeyValue {
@@ -50,7 +54,7 @@ func errorType(err error) string {
// Fallback to reflection if the ErrorType method is not supported or
// returns an empty value.
- t := reflect.TypeOf(err)
+ t := reflect.TypeOf(unwrapFmtWrapped(err))
pkg, name := t.PkgPath(), t.Name()
if pkg != "" && name != "" {
s = pkg + "." + name
@@ -64,3 +68,16 @@ func errorType(err error) string {
}
return s
}
+
+var fmtWrapErrorType = reflect.TypeOf(fmt.Errorf("wrapped: %w", errors.New("err")))
+
+func unwrapFmtWrapped(err error) error {
+ for reflect.TypeOf(err) == fmtWrapErrorType {
+ u := errors.Unwrap(err)
+ if u == nil {
+ return err // When the wrapped error is nil, use the concrete type of the wrapper.
+ }
+ err = u
+ }
+ return err
+}
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/exception.go b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/exception.go
similarity index 77%
rename from vendor/go.opentelemetry.io/otel/semconv/v1.40.0/exception.go
rename to vendor/go.opentelemetry.io/otel/semconv/v1.41.0/exception.go
index 6a26231a1af5..5f0151affaba 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/exception.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/exception.go
@@ -1,7 +1,9 @@
+// Code generated from semantic convention specification. DO NOT EDIT.
+
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package semconv // import "go.opentelemetry.io/otel/semconv/v1.40.0"
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.41.0"
const (
// ExceptionEventName is the name of the Span event representing an exception.
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/httpconv/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/httpconv/metric.go
similarity index 82%
rename from vendor/go.opentelemetry.io/otel/semconv/v1.40.0/httpconv/metric.go
rename to vendor/go.opentelemetry.io/otel/semconv/v1.41.0/httpconv/metric.go
index 7264925ba9a5..1b811e2d72d9 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/httpconv/metric.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/httpconv/metric.go
@@ -159,6 +159,9 @@ func (m ClientActiveRequests) Add(
serverPort int,
attrs ...attribute.KeyValue,
) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Int64UpDownCounter.Add(ctx, incr, metric.WithAttributes(
attribute.String("server.address", serverAddress),
@@ -169,6 +172,7 @@ func (m ClientActiveRequests) Add(
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -189,6 +193,9 @@ func (m ClientActiveRequests) Add(
// AddSet adds incr to the existing count for set.
func (m ClientActiveRequests) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Int64UpDownCounter.Add(ctx, incr)
return
@@ -196,6 +203,7 @@ func (m ClientActiveRequests) AddSet(ctx context.Context, incr int64, set attrib
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -228,6 +236,102 @@ func (ClientActiveRequests) AttrURLScheme(val string) attribute.KeyValue {
return attribute.String("url.scheme", val)
}
+// ClientActiveRequestsObservable is an instrument used to record metric values
+// conforming to the "http.client.active_requests" semantic conventions. It
+// represents the number of active HTTP requests.
+type ClientActiveRequestsObservable struct {
+ metric.Int64ObservableUpDownCounter
+}
+
+var newClientActiveRequestsObservableOpts = []metric.Int64ObservableUpDownCounterOption{
+ metric.WithDescription("Number of active HTTP requests."),
+ metric.WithUnit("{request}"),
+}
+
+// NewClientActiveRequestsObservable returns a new ClientActiveRequestsObservable
+// instrument.
+func NewClientActiveRequestsObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableUpDownCounterOption,
+) (ClientActiveRequestsObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return ClientActiveRequestsObservable{noop.Int64ObservableUpDownCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newClientActiveRequestsObservableOpts
+ } else {
+ opt = append(opt, newClientActiveRequestsObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableUpDownCounter(
+ "http.client.active_requests",
+ opt...,
+ )
+ if err != nil {
+ return ClientActiveRequestsObservable{noop.Int64ObservableUpDownCounter{}}, err
+ }
+ return ClientActiveRequestsObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m ClientActiveRequestsObservable) Inst() metric.Int64ObservableUpDownCounter {
+ return m.Int64ObservableUpDownCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (ClientActiveRequestsObservable) Name() string {
+ return "http.client.active_requests"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (ClientActiveRequestsObservable) Unit() string {
+ return "{request}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (ClientActiveRequestsObservable) Description() string {
+ return "Number of active HTTP requests."
+}
+
+// AttrServerAddress returns a required attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (ClientActiveRequestsObservable) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns a required attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (ClientActiveRequestsObservable) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
+// AttrURLTemplate returns an optional attribute for the "url.template" semantic
+// convention. It represents the low-cardinality template of an
+// [absolute path reference].
+//
+// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2
+func (ClientActiveRequestsObservable) AttrURLTemplate(val string) attribute.KeyValue {
+ return attribute.String("url.template", val)
+}
+
+// AttrRequestMethod returns an optional attribute for the "http.request.method"
+// semantic convention. It represents the HTTP request method.
+func (ClientActiveRequestsObservable) AttrRequestMethod(val RequestMethodAttr) attribute.KeyValue {
+ return attribute.String("http.request.method", string(val))
+}
+
+// AttrURLScheme returns an optional attribute for the "url.scheme" semantic
+// convention. It represents the [URI scheme] component identifying the used
+// protocol.
+//
+// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1
+func (ClientActiveRequestsObservable) AttrURLScheme(val string) attribute.KeyValue {
+ return attribute.String("url.scheme", val)
+}
+
// ClientConnectionDuration is an instrument used to record metric values
// conforming to the "http.client.connection.duration" semantic conventions. It
// represents the duration of the successfully established outbound HTTP
@@ -302,6 +406,9 @@ func (m ClientConnectionDuration) Record(
serverPort int,
attrs ...attribute.KeyValue,
) {
+ if !m.Float64Histogram.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Float64Histogram.Record(ctx, val, metric.WithAttributes(
attribute.String("server.address", serverAddress),
@@ -312,6 +419,7 @@ func (m ClientConnectionDuration) Record(
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
@@ -332,6 +440,9 @@ func (m ClientConnectionDuration) Record(
// RecordSet records val to the current distribution for set.
func (m ClientConnectionDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) {
+ if !m.Float64Histogram.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Float64Histogram.Record(ctx, val)
return
@@ -339,6 +450,7 @@ func (m ClientConnectionDuration) RecordSet(ctx context.Context, val float64, se
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
@@ -448,6 +560,9 @@ func (m ClientOpenConnections) Add(
serverPort int,
attrs ...attribute.KeyValue,
) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Int64UpDownCounter.Add(ctx, incr, metric.WithAttributes(
attribute.String("http.connection.state", string(connectionState)),
@@ -459,6 +574,7 @@ func (m ClientOpenConnections) Add(
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -480,6 +596,9 @@ func (m ClientOpenConnections) Add(
// AddSet adds incr to the existing count for set.
func (m ClientOpenConnections) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Int64UpDownCounter.Add(ctx, incr)
return
@@ -487,6 +606,7 @@ func (m ClientOpenConnections) AddSet(ctx context.Context, incr int64, set attri
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -518,6 +638,109 @@ func (ClientOpenConnections) AttrURLScheme(val string) attribute.KeyValue {
return attribute.String("url.scheme", val)
}
+// ClientOpenConnectionsObservable is an instrument used to record metric values
+// conforming to the "http.client.open_connections" semantic conventions. It
+// represents the number of outbound HTTP connections that are currently active
+// or idle on the client.
+type ClientOpenConnectionsObservable struct {
+ metric.Int64ObservableUpDownCounter
+}
+
+var newClientOpenConnectionsObservableOpts = []metric.Int64ObservableUpDownCounterOption{
+ metric.WithDescription("Number of outbound HTTP connections that are currently active or idle on the client."),
+ metric.WithUnit("{connection}"),
+}
+
+// NewClientOpenConnectionsObservable returns a new
+// ClientOpenConnectionsObservable instrument.
+func NewClientOpenConnectionsObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableUpDownCounterOption,
+) (ClientOpenConnectionsObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return ClientOpenConnectionsObservable{noop.Int64ObservableUpDownCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newClientOpenConnectionsObservableOpts
+ } else {
+ opt = append(opt, newClientOpenConnectionsObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableUpDownCounter(
+ "http.client.open_connections",
+ opt...,
+ )
+ if err != nil {
+ return ClientOpenConnectionsObservable{noop.Int64ObservableUpDownCounter{}}, err
+ }
+ return ClientOpenConnectionsObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m ClientOpenConnectionsObservable) Inst() metric.Int64ObservableUpDownCounter {
+ return m.Int64ObservableUpDownCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (ClientOpenConnectionsObservable) Name() string {
+ return "http.client.open_connections"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (ClientOpenConnectionsObservable) Unit() string {
+ return "{connection}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (ClientOpenConnectionsObservable) Description() string {
+ return "Number of outbound HTTP connections that are currently active or idle on the client."
+}
+
+// AttrConnectionState returns a required attribute for the
+// "http.connection.state" semantic convention. It represents the state of the
+// HTTP connection in the HTTP connection pool.
+func (ClientOpenConnectionsObservable) AttrConnectionState(val ConnectionStateAttr) attribute.KeyValue {
+ return attribute.String("http.connection.state", string(val))
+}
+
+// AttrServerAddress returns a required attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (ClientOpenConnectionsObservable) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns a required attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (ClientOpenConnectionsObservable) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
+// AttrNetworkPeerAddress returns an optional attribute for the
+// "network.peer.address" semantic convention. It represents the peer address of
+// the network connection - IP address or Unix domain socket name.
+func (ClientOpenConnectionsObservable) AttrNetworkPeerAddress(val string) attribute.KeyValue {
+ return attribute.String("network.peer.address", val)
+}
+
+// AttrNetworkProtocolVersion returns an optional attribute for the
+// "network.protocol.version" semantic convention. It represents the actual
+// version of the protocol used for network communication.
+func (ClientOpenConnectionsObservable) AttrNetworkProtocolVersion(val string) attribute.KeyValue {
+ return attribute.String("network.protocol.version", val)
+}
+
+// AttrURLScheme returns an optional attribute for the "url.scheme" semantic
+// convention. It represents the [URI scheme] component identifying the used
+// protocol.
+//
+// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1
+func (ClientOpenConnectionsObservable) AttrURLScheme(val string) attribute.KeyValue {
+ return attribute.String("url.scheme", val)
+}
+
// ClientRequestBodySize is an instrument used to record metric values conforming
// to the "http.client.request.body.size" semantic conventions. It represents the
// size of HTTP client request bodies.
@@ -601,6 +824,9 @@ func (m ClientRequestBodySize) Record(
serverPort int,
attrs ...attribute.KeyValue,
) {
+ if !m.Int64Histogram.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Int64Histogram.Record(ctx, val, metric.WithAttributes(
attribute.String("http.request.method", string(requestMethod)),
@@ -612,6 +838,7 @@ func (m ClientRequestBodySize) Record(
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
@@ -640,6 +867,9 @@ func (m ClientRequestBodySize) Record(
//
// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length
func (m ClientRequestBodySize) RecordSet(ctx context.Context, val int64, set attribute.Set) {
+ if !m.Int64Histogram.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Int64Histogram.Record(ctx, val)
return
@@ -647,6 +877,7 @@ func (m ClientRequestBodySize) RecordSet(ctx context.Context, val int64, set att
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
@@ -715,6 +946,7 @@ type ClientRequestDuration struct {
var newClientRequestDurationOpts = []metric.Float64HistogramOption{
metric.WithDescription("Duration of HTTP client requests."),
metric.WithUnit("s"),
+ metric.WithExplicitBucketBoundaries([]float64{0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10}...),
}
// NewClientRequestDuration returns a new ClientRequestDuration instrument.
@@ -781,6 +1013,9 @@ func (m ClientRequestDuration) Record(
serverPort int,
attrs ...attribute.KeyValue,
) {
+ if !m.Float64Histogram.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Float64Histogram.Record(ctx, val, metric.WithAttributes(
attribute.String("http.request.method", string(requestMethod)),
@@ -792,6 +1027,7 @@ func (m ClientRequestDuration) Record(
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
@@ -813,6 +1049,9 @@ func (m ClientRequestDuration) Record(
// RecordSet records val to the current distribution for set.
func (m ClientRequestDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) {
+ if !m.Float64Histogram.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Float64Histogram.Record(ctx, val)
return
@@ -820,6 +1059,7 @@ func (m ClientRequestDuration) RecordSet(ctx context.Context, val float64, set a
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
@@ -961,6 +1201,9 @@ func (m ClientResponseBodySize) Record(
serverPort int,
attrs ...attribute.KeyValue,
) {
+ if !m.Int64Histogram.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Int64Histogram.Record(ctx, val, metric.WithAttributes(
attribute.String("http.request.method", string(requestMethod)),
@@ -972,6 +1215,7 @@ func (m ClientResponseBodySize) Record(
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
@@ -1000,6 +1244,9 @@ func (m ClientResponseBodySize) Record(
//
// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length
func (m ClientResponseBodySize) RecordSet(ctx context.Context, val int64, set attribute.Set) {
+ if !m.Int64Histogram.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Int64Histogram.Record(ctx, val)
return
@@ -1007,6 +1254,7 @@ func (m ClientResponseBodySize) RecordSet(ctx context.Context, val int64, set at
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
@@ -1139,6 +1387,9 @@ func (m ServerActiveRequests) Add(
urlScheme string,
attrs ...attribute.KeyValue,
) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Int64UpDownCounter.Add(ctx, incr, metric.WithAttributes(
attribute.String("http.request.method", string(requestMethod)),
@@ -1149,6 +1400,7 @@ func (m ServerActiveRequests) Add(
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -1169,6 +1421,9 @@ func (m ServerActiveRequests) Add(
// AddSet adds incr to the existing count for set.
func (m ServerActiveRequests) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Int64UpDownCounter.Add(ctx, incr)
return
@@ -1176,6 +1431,7 @@ func (m ServerActiveRequests) AddSet(ctx context.Context, incr int64, set attrib
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -1198,6 +1454,94 @@ func (ServerActiveRequests) AttrServerPort(val int) attribute.KeyValue {
return attribute.Int("server.port", val)
}
+// ServerActiveRequestsObservable is an instrument used to record metric values
+// conforming to the "http.server.active_requests" semantic conventions. It
+// represents the number of active HTTP server requests.
+type ServerActiveRequestsObservable struct {
+ metric.Int64ObservableUpDownCounter
+}
+
+var newServerActiveRequestsObservableOpts = []metric.Int64ObservableUpDownCounterOption{
+ metric.WithDescription("Number of active HTTP server requests."),
+ metric.WithUnit("{request}"),
+}
+
+// NewServerActiveRequestsObservable returns a new ServerActiveRequestsObservable
+// instrument.
+func NewServerActiveRequestsObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableUpDownCounterOption,
+) (ServerActiveRequestsObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return ServerActiveRequestsObservable{noop.Int64ObservableUpDownCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newServerActiveRequestsObservableOpts
+ } else {
+ opt = append(opt, newServerActiveRequestsObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableUpDownCounter(
+ "http.server.active_requests",
+ opt...,
+ )
+ if err != nil {
+ return ServerActiveRequestsObservable{noop.Int64ObservableUpDownCounter{}}, err
+ }
+ return ServerActiveRequestsObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m ServerActiveRequestsObservable) Inst() metric.Int64ObservableUpDownCounter {
+ return m.Int64ObservableUpDownCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (ServerActiveRequestsObservable) Name() string {
+ return "http.server.active_requests"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (ServerActiveRequestsObservable) Unit() string {
+ return "{request}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (ServerActiveRequestsObservable) Description() string {
+ return "Number of active HTTP server requests."
+}
+
+// AttrRequestMethod returns a required attribute for the "http.request.method"
+// semantic convention. It represents the HTTP request method.
+func (ServerActiveRequestsObservable) AttrRequestMethod(val RequestMethodAttr) attribute.KeyValue {
+ return attribute.String("http.request.method", string(val))
+}
+
+// AttrURLScheme returns a required attribute for the "url.scheme" semantic
+// convention. It represents the [URI scheme] component identifying the used
+// protocol.
+//
+// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1
+func (ServerActiveRequestsObservable) AttrURLScheme(val string) attribute.KeyValue {
+ return attribute.String("url.scheme", val)
+}
+
+// AttrServerAddress returns an optional attribute for the "server.address"
+// semantic convention. It represents the name of the local HTTP server that
+// received the request.
+func (ServerActiveRequestsObservable) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns an optional attribute for the "server.port" semantic
+// convention. It represents the port of the local HTTP server that received the
+// request.
+func (ServerActiveRequestsObservable) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
// ServerRequestBodySize is an instrument used to record metric values conforming
// to the "http.server.request.body.size" semantic conventions. It represents the
// size of HTTP server request bodies.
@@ -1279,6 +1623,9 @@ func (m ServerRequestBodySize) Record(
urlScheme string,
attrs ...attribute.KeyValue,
) {
+ if !m.Int64Histogram.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Int64Histogram.Record(ctx, val, metric.WithAttributes(
attribute.String("http.request.method", string(requestMethod)),
@@ -1289,6 +1636,7 @@ func (m ServerRequestBodySize) Record(
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
@@ -1316,6 +1664,9 @@ func (m ServerRequestBodySize) Record(
//
// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length
func (m ServerRequestBodySize) RecordSet(ctx context.Context, val int64, set attribute.Set) {
+ if !m.Int64Histogram.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Int64Histogram.Record(ctx, val)
return
@@ -1323,6 +1674,7 @@ func (m ServerRequestBodySize) RecordSet(ctx context.Context, val int64, set att
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
@@ -1402,6 +1754,7 @@ type ServerRequestDuration struct {
var newServerRequestDurationOpts = []metric.Float64HistogramOption{
metric.WithDescription("Duration of HTTP server requests."),
metric.WithUnit("s"),
+ metric.WithExplicitBucketBoundaries([]float64{0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10}...),
}
// NewServerRequestDuration returns a new ServerRequestDuration instrument.
@@ -1466,6 +1819,9 @@ func (m ServerRequestDuration) Record(
urlScheme string,
attrs ...attribute.KeyValue,
) {
+ if !m.Float64Histogram.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Float64Histogram.Record(ctx, val, metric.WithAttributes(
attribute.String("http.request.method", string(requestMethod)),
@@ -1476,6 +1832,7 @@ func (m ServerRequestDuration) Record(
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
@@ -1496,6 +1853,9 @@ func (m ServerRequestDuration) Record(
// RecordSet records val to the current distribution for set.
func (m ServerRequestDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) {
+ if !m.Float64Histogram.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Float64Histogram.Record(ctx, val)
return
@@ -1503,6 +1863,7 @@ func (m ServerRequestDuration) RecordSet(ctx context.Context, val float64, set a
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
@@ -1653,6 +2014,9 @@ func (m ServerResponseBodySize) Record(
urlScheme string,
attrs ...attribute.KeyValue,
) {
+ if !m.Int64Histogram.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Int64Histogram.Record(ctx, val, metric.WithAttributes(
attribute.String("http.request.method", string(requestMethod)),
@@ -1663,6 +2027,7 @@ func (m ServerResponseBodySize) Record(
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
@@ -1690,6 +2055,9 @@ func (m ServerResponseBodySize) Record(
//
// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length
func (m ServerResponseBodySize) RecordSet(ctx context.Context, val int64, set attribute.Set) {
+ if !m.Int64Histogram.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Int64Histogram.Record(ctx, val)
return
@@ -1697,6 +2065,7 @@ func (m ServerResponseBodySize) RecordSet(ctx context.Context, val int64, set at
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/otelconv/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/otelconv/metric.go
similarity index 66%
rename from vendor/go.opentelemetry.io/otel/semconv/v1.40.0/otelconv/metric.go
rename to vendor/go.opentelemetry.io/otel/semconv/v1.41.0/otelconv/metric.go
index 901da86985cc..d50e198493a4 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/otelconv/metric.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/otelconv/metric.go
@@ -197,6 +197,9 @@ func (m SDKExporterLogExported) Add(
incr int64,
attrs ...attribute.KeyValue,
) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Int64Counter.Add(ctx, incr)
return
@@ -204,6 +207,7 @@ func (m SDKExporterLogExported) Add(
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -228,6 +232,9 @@ func (m SDKExporterLogExported) Add(
// If no rejection reason is available, `rejected` SHOULD be used as value for
// `error.type`.
func (m SDKExporterLogExported) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Int64Counter.Add(ctx, incr)
return
@@ -235,6 +242,7 @@ func (m SDKExporterLogExported) AddSet(ctx context.Context, incr int64, set attr
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -277,6 +285,100 @@ func (SDKExporterLogExported) AttrServerPort(val int) attribute.KeyValue {
return attribute.Int("server.port", val)
}
+// SDKExporterLogExportedObservable is an instrument used to record metric values
+// conforming to the "otel.sdk.exporter.log.exported" semantic conventions. It
+// represents the number of log records for which the export has finished, either
+// successful or failed.
+type SDKExporterLogExportedObservable struct {
+ metric.Int64ObservableCounter
+}
+
+var newSDKExporterLogExportedObservableOpts = []metric.Int64ObservableCounterOption{
+ metric.WithDescription("The number of log records for which the export has finished, either successful or failed."),
+ metric.WithUnit("{log_record}"),
+}
+
+// NewSDKExporterLogExportedObservable returns a new
+// SDKExporterLogExportedObservable instrument.
+func NewSDKExporterLogExportedObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableCounterOption,
+) (SDKExporterLogExportedObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKExporterLogExportedObservable{noop.Int64ObservableCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKExporterLogExportedObservableOpts
+ } else {
+ opt = append(opt, newSDKExporterLogExportedObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableCounter(
+ "otel.sdk.exporter.log.exported",
+ opt...,
+ )
+ if err != nil {
+ return SDKExporterLogExportedObservable{noop.Int64ObservableCounter{}}, err
+ }
+ return SDKExporterLogExportedObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKExporterLogExportedObservable) Inst() metric.Int64ObservableCounter {
+ return m.Int64ObservableCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKExporterLogExportedObservable) Name() string {
+ return "otel.sdk.exporter.log.exported"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKExporterLogExportedObservable) Unit() string {
+ return "{log_record}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKExporterLogExportedObservable) Description() string {
+ return "The number of log records for which the export has finished, either successful or failed."
+}
+
+// AttrErrorType returns an optional attribute for the "error.type" semantic
+// convention. It represents the describes a class of error the operation ended
+// with.
+func (SDKExporterLogExportedObservable) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
+ return attribute.String("error.type", string(val))
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKExporterLogExportedObservable) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKExporterLogExportedObservable) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// AttrServerAddress returns an optional attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (SDKExporterLogExportedObservable) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns an optional attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (SDKExporterLogExportedObservable) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
// SDKExporterLogInflight is an instrument used to record metric values
// conforming to the "otel.sdk.exporter.log.inflight" semantic conventions. It
// represents the number of log records which were passed to the exporter, but
@@ -347,6 +449,9 @@ func (m SDKExporterLogInflight) Add(
incr int64,
attrs ...attribute.KeyValue,
) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Int64UpDownCounter.Add(ctx, incr)
return
@@ -354,6 +459,7 @@ func (m SDKExporterLogInflight) Add(
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -373,6 +479,9 @@ func (m SDKExporterLogInflight) Add(
// For successful exports, `error.type` MUST NOT be set. For failed exports,
// `error.type` MUST contain the failure cause.
func (m SDKExporterLogInflight) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Int64UpDownCounter.Add(ctx, incr)
return
@@ -380,6 +489,7 @@ func (m SDKExporterLogInflight) AddSet(ctx context.Context, incr int64, set attr
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -415,6 +525,93 @@ func (SDKExporterLogInflight) AttrServerPort(val int) attribute.KeyValue {
return attribute.Int("server.port", val)
}
+// SDKExporterLogInflightObservable is an instrument used to record metric values
+// conforming to the "otel.sdk.exporter.log.inflight" semantic conventions. It
+// represents the number of log records which were passed to the exporter, but
+// that have not been exported yet (neither successful, nor failed).
+type SDKExporterLogInflightObservable struct {
+ metric.Int64ObservableUpDownCounter
+}
+
+var newSDKExporterLogInflightObservableOpts = []metric.Int64ObservableUpDownCounterOption{
+ metric.WithDescription("The number of log records which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."),
+ metric.WithUnit("{log_record}"),
+}
+
+// NewSDKExporterLogInflightObservable returns a new
+// SDKExporterLogInflightObservable instrument.
+func NewSDKExporterLogInflightObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableUpDownCounterOption,
+) (SDKExporterLogInflightObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKExporterLogInflightObservable{noop.Int64ObservableUpDownCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKExporterLogInflightObservableOpts
+ } else {
+ opt = append(opt, newSDKExporterLogInflightObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableUpDownCounter(
+ "otel.sdk.exporter.log.inflight",
+ opt...,
+ )
+ if err != nil {
+ return SDKExporterLogInflightObservable{noop.Int64ObservableUpDownCounter{}}, err
+ }
+ return SDKExporterLogInflightObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKExporterLogInflightObservable) Inst() metric.Int64ObservableUpDownCounter {
+ return m.Int64ObservableUpDownCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKExporterLogInflightObservable) Name() string {
+ return "otel.sdk.exporter.log.inflight"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKExporterLogInflightObservable) Unit() string {
+ return "{log_record}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKExporterLogInflightObservable) Description() string {
+ return "The number of log records which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKExporterLogInflightObservable) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKExporterLogInflightObservable) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// AttrServerAddress returns an optional attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (SDKExporterLogInflightObservable) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns an optional attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (SDKExporterLogInflightObservable) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
// SDKExporterMetricDataPointExported is an instrument used to record metric
// values conforming to the "otel.sdk.exporter.metric_data_point.exported"
// semantic conventions. It represents the number of metric data points for which
@@ -491,6 +688,9 @@ func (m SDKExporterMetricDataPointExported) Add(
incr int64,
attrs ...attribute.KeyValue,
) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Int64Counter.Add(ctx, incr)
return
@@ -498,6 +698,7 @@ func (m SDKExporterMetricDataPointExported) Add(
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -522,6 +723,9 @@ func (m SDKExporterMetricDataPointExported) Add(
// If no rejection reason is available, `rejected` SHOULD be used as value for
// `error.type`.
func (m SDKExporterMetricDataPointExported) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Int64Counter.Add(ctx, incr)
return
@@ -529,6 +733,7 @@ func (m SDKExporterMetricDataPointExported) AddSet(ctx context.Context, incr int
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -571,6 +776,100 @@ func (SDKExporterMetricDataPointExported) AttrServerPort(val int) attribute.KeyV
return attribute.Int("server.port", val)
}
+// SDKExporterMetricDataPointExportedObservable is an instrument used to record
+// metric values conforming to the "otel.sdk.exporter.metric_data_point.exported"
+// semantic conventions. It represents the number of metric data points for which
+// the export has finished, either successful or failed.
+type SDKExporterMetricDataPointExportedObservable struct {
+ metric.Int64ObservableCounter
+}
+
+var newSDKExporterMetricDataPointExportedObservableOpts = []metric.Int64ObservableCounterOption{
+ metric.WithDescription("The number of metric data points for which the export has finished, either successful or failed."),
+ metric.WithUnit("{data_point}"),
+}
+
+// NewSDKExporterMetricDataPointExportedObservable returns a new
+// SDKExporterMetricDataPointExportedObservable instrument.
+func NewSDKExporterMetricDataPointExportedObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableCounterOption,
+) (SDKExporterMetricDataPointExportedObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKExporterMetricDataPointExportedObservable{noop.Int64ObservableCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKExporterMetricDataPointExportedObservableOpts
+ } else {
+ opt = append(opt, newSDKExporterMetricDataPointExportedObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableCounter(
+ "otel.sdk.exporter.metric_data_point.exported",
+ opt...,
+ )
+ if err != nil {
+ return SDKExporterMetricDataPointExportedObservable{noop.Int64ObservableCounter{}}, err
+ }
+ return SDKExporterMetricDataPointExportedObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKExporterMetricDataPointExportedObservable) Inst() metric.Int64ObservableCounter {
+ return m.Int64ObservableCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKExporterMetricDataPointExportedObservable) Name() string {
+ return "otel.sdk.exporter.metric_data_point.exported"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKExporterMetricDataPointExportedObservable) Unit() string {
+ return "{data_point}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKExporterMetricDataPointExportedObservable) Description() string {
+ return "The number of metric data points for which the export has finished, either successful or failed."
+}
+
+// AttrErrorType returns an optional attribute for the "error.type" semantic
+// convention. It represents the describes a class of error the operation ended
+// with.
+func (SDKExporterMetricDataPointExportedObservable) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
+ return attribute.String("error.type", string(val))
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKExporterMetricDataPointExportedObservable) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKExporterMetricDataPointExportedObservable) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// AttrServerAddress returns an optional attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (SDKExporterMetricDataPointExportedObservable) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns an optional attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (SDKExporterMetricDataPointExportedObservable) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
// SDKExporterMetricDataPointInflight is an instrument used to record metric
// values conforming to the "otel.sdk.exporter.metric_data_point.inflight"
// semantic conventions. It represents the number of metric data points which
@@ -643,6 +942,9 @@ func (m SDKExporterMetricDataPointInflight) Add(
incr int64,
attrs ...attribute.KeyValue,
) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Int64UpDownCounter.Add(ctx, incr)
return
@@ -650,6 +952,7 @@ func (m SDKExporterMetricDataPointInflight) Add(
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -669,6 +972,9 @@ func (m SDKExporterMetricDataPointInflight) Add(
// For successful exports, `error.type` MUST NOT be set. For failed exports,
// `error.type` MUST contain the failure cause.
func (m SDKExporterMetricDataPointInflight) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Int64UpDownCounter.Add(ctx, incr)
return
@@ -676,6 +982,7 @@ func (m SDKExporterMetricDataPointInflight) AddSet(ctx context.Context, incr int
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -711,6 +1018,94 @@ func (SDKExporterMetricDataPointInflight) AttrServerPort(val int) attribute.KeyV
return attribute.Int("server.port", val)
}
+// SDKExporterMetricDataPointInflightObservable is an instrument used to record
+// metric values conforming to the "otel.sdk.exporter.metric_data_point.inflight"
+// semantic conventions. It represents the number of metric data points which
+// were passed to the exporter, but that have not been exported yet (neither
+// successful, nor failed).
+type SDKExporterMetricDataPointInflightObservable struct {
+ metric.Int64ObservableUpDownCounter
+}
+
+var newSDKExporterMetricDataPointInflightObservableOpts = []metric.Int64ObservableUpDownCounterOption{
+ metric.WithDescription("The number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."),
+ metric.WithUnit("{data_point}"),
+}
+
+// NewSDKExporterMetricDataPointInflightObservable returns a new
+// SDKExporterMetricDataPointInflightObservable instrument.
+func NewSDKExporterMetricDataPointInflightObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableUpDownCounterOption,
+) (SDKExporterMetricDataPointInflightObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKExporterMetricDataPointInflightObservable{noop.Int64ObservableUpDownCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKExporterMetricDataPointInflightObservableOpts
+ } else {
+ opt = append(opt, newSDKExporterMetricDataPointInflightObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableUpDownCounter(
+ "otel.sdk.exporter.metric_data_point.inflight",
+ opt...,
+ )
+ if err != nil {
+ return SDKExporterMetricDataPointInflightObservable{noop.Int64ObservableUpDownCounter{}}, err
+ }
+ return SDKExporterMetricDataPointInflightObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKExporterMetricDataPointInflightObservable) Inst() metric.Int64ObservableUpDownCounter {
+ return m.Int64ObservableUpDownCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKExporterMetricDataPointInflightObservable) Name() string {
+ return "otel.sdk.exporter.metric_data_point.inflight"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKExporterMetricDataPointInflightObservable) Unit() string {
+ return "{data_point}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKExporterMetricDataPointInflightObservable) Description() string {
+ return "The number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKExporterMetricDataPointInflightObservable) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKExporterMetricDataPointInflightObservable) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// AttrServerAddress returns an optional attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (SDKExporterMetricDataPointInflightObservable) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns an optional attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (SDKExporterMetricDataPointInflightObservable) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
// SDKExporterOperationDuration is an instrument used to record metric values
// conforming to the "otel.sdk.exporter.operation.duration" semantic conventions.
// It represents the duration of exporting a batch of telemetry records.
@@ -788,6 +1183,9 @@ func (m SDKExporterOperationDuration) Record(
val float64,
attrs ...attribute.KeyValue,
) {
+ if !m.Float64Histogram.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Float64Histogram.Record(ctx, val)
return
@@ -795,6 +1193,7 @@ func (m SDKExporterOperationDuration) Record(
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
@@ -821,6 +1220,9 @@ func (m SDKExporterOperationDuration) Record(
// [http]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success-1
// [grpc]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success
func (m SDKExporterOperationDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) {
+ if !m.Float64Histogram.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Float64Histogram.Record(ctx, val)
return
@@ -828,6 +1230,7 @@ func (m SDKExporterOperationDuration) RecordSet(ctx context.Context, val float64
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
@@ -959,6 +1362,9 @@ func (m SDKExporterSpanExported) Add(
incr int64,
attrs ...attribute.KeyValue,
) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Int64Counter.Add(ctx, incr)
return
@@ -966,6 +1372,7 @@ func (m SDKExporterSpanExported) Add(
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -990,6 +1397,9 @@ func (m SDKExporterSpanExported) Add(
// If no rejection reason is available, `rejected` SHOULD be used as value for
// `error.type`.
func (m SDKExporterSpanExported) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Int64Counter.Add(ctx, incr)
return
@@ -997,6 +1407,7 @@ func (m SDKExporterSpanExported) AddSet(ctx context.Context, incr int64, set att
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -1039,6 +1450,100 @@ func (SDKExporterSpanExported) AttrServerPort(val int) attribute.KeyValue {
return attribute.Int("server.port", val)
}
+// SDKExporterSpanExportedObservable is an instrument used to record metric
+// values conforming to the "otel.sdk.exporter.span.exported" semantic
+// conventions. It represents the number of spans for which the export has
+// finished, either successful or failed.
+type SDKExporterSpanExportedObservable struct {
+ metric.Int64ObservableCounter
+}
+
+var newSDKExporterSpanExportedObservableOpts = []metric.Int64ObservableCounterOption{
+ metric.WithDescription("The number of spans for which the export has finished, either successful or failed."),
+ metric.WithUnit("{span}"),
+}
+
+// NewSDKExporterSpanExportedObservable returns a new
+// SDKExporterSpanExportedObservable instrument.
+func NewSDKExporterSpanExportedObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableCounterOption,
+) (SDKExporterSpanExportedObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKExporterSpanExportedObservable{noop.Int64ObservableCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKExporterSpanExportedObservableOpts
+ } else {
+ opt = append(opt, newSDKExporterSpanExportedObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableCounter(
+ "otel.sdk.exporter.span.exported",
+ opt...,
+ )
+ if err != nil {
+ return SDKExporterSpanExportedObservable{noop.Int64ObservableCounter{}}, err
+ }
+ return SDKExporterSpanExportedObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKExporterSpanExportedObservable) Inst() metric.Int64ObservableCounter {
+ return m.Int64ObservableCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKExporterSpanExportedObservable) Name() string {
+ return "otel.sdk.exporter.span.exported"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKExporterSpanExportedObservable) Unit() string {
+ return "{span}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKExporterSpanExportedObservable) Description() string {
+ return "The number of spans for which the export has finished, either successful or failed."
+}
+
+// AttrErrorType returns an optional attribute for the "error.type" semantic
+// convention. It represents the describes a class of error the operation ended
+// with.
+func (SDKExporterSpanExportedObservable) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
+ return attribute.String("error.type", string(val))
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKExporterSpanExportedObservable) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKExporterSpanExportedObservable) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// AttrServerAddress returns an optional attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (SDKExporterSpanExportedObservable) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns an optional attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (SDKExporterSpanExportedObservable) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
// SDKExporterSpanInflight is an instrument used to record metric values
// conforming to the "otel.sdk.exporter.span.inflight" semantic conventions. It
// represents the number of spans which were passed to the exporter, but that
@@ -1109,6 +1614,9 @@ func (m SDKExporterSpanInflight) Add(
incr int64,
attrs ...attribute.KeyValue,
) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Int64UpDownCounter.Add(ctx, incr)
return
@@ -1116,6 +1624,7 @@ func (m SDKExporterSpanInflight) Add(
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -1135,6 +1644,9 @@ func (m SDKExporterSpanInflight) Add(
// For successful exports, `error.type` MUST NOT be set. For failed exports,
// `error.type` MUST contain the failure cause.
func (m SDKExporterSpanInflight) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Int64UpDownCounter.Add(ctx, incr)
return
@@ -1142,6 +1654,7 @@ func (m SDKExporterSpanInflight) AddSet(ctx context.Context, incr int64, set att
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -1177,6 +1690,94 @@ func (SDKExporterSpanInflight) AttrServerPort(val int) attribute.KeyValue {
return attribute.Int("server.port", val)
}
+// SDKExporterSpanInflightObservable is an instrument used to record metric
+// values conforming to the "otel.sdk.exporter.span.inflight" semantic
+// conventions. It represents the number of spans which were passed to the
+// exporter, but that have not been exported yet (neither successful, nor
+// failed).
+type SDKExporterSpanInflightObservable struct {
+ metric.Int64ObservableUpDownCounter
+}
+
+var newSDKExporterSpanInflightObservableOpts = []metric.Int64ObservableUpDownCounterOption{
+ metric.WithDescription("The number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."),
+ metric.WithUnit("{span}"),
+}
+
+// NewSDKExporterSpanInflightObservable returns a new
+// SDKExporterSpanInflightObservable instrument.
+func NewSDKExporterSpanInflightObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableUpDownCounterOption,
+) (SDKExporterSpanInflightObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKExporterSpanInflightObservable{noop.Int64ObservableUpDownCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKExporterSpanInflightObservableOpts
+ } else {
+ opt = append(opt, newSDKExporterSpanInflightObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableUpDownCounter(
+ "otel.sdk.exporter.span.inflight",
+ opt...,
+ )
+ if err != nil {
+ return SDKExporterSpanInflightObservable{noop.Int64ObservableUpDownCounter{}}, err
+ }
+ return SDKExporterSpanInflightObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKExporterSpanInflightObservable) Inst() metric.Int64ObservableUpDownCounter {
+ return m.Int64ObservableUpDownCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKExporterSpanInflightObservable) Name() string {
+ return "otel.sdk.exporter.span.inflight"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKExporterSpanInflightObservable) Unit() string {
+ return "{span}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKExporterSpanInflightObservable) Description() string {
+ return "The number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKExporterSpanInflightObservable) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKExporterSpanInflightObservable) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// AttrServerAddress returns an optional attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (SDKExporterSpanInflightObservable) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns an optional attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (SDKExporterSpanInflightObservable) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
// SDKLogCreated is an instrument used to record metric values conforming to the
// "otel.sdk.log.created" semantic conventions. It represents the number of logs
// submitted to enabled SDK Loggers.
@@ -1237,6 +1838,9 @@ func (SDKLogCreated) Description() string {
// Add adds incr to the existing count for attrs.
func (m SDKLogCreated) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Int64Counter.Add(ctx, incr)
return
@@ -1244,29 +1848,92 @@ func (m SDKLogCreated) Add(ctx context.Context, incr int64, attrs ...attribute.K
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
- *o = append(*o, metric.WithAttributes(attrs...))
- m.Int64Counter.Add(ctx, incr, *o...)
+ *o = append(*o, metric.WithAttributes(attrs...))
+ m.Int64Counter.Add(ctx, incr, *o...)
+}
+
+// AddSet adds incr to the existing count for set.
+func (m SDKLogCreated) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
+ if set.Len() == 0 {
+ m.Int64Counter.Add(ctx, incr)
+ return
+ }
+
+ o := addOptPool.Get().(*[]metric.AddOption)
+ defer func() {
+ clear(*o)
+ *o = (*o)[:0]
+ addOptPool.Put(o)
+ }()
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Int64Counter.Add(ctx, incr, *o...)
+}
+
+// SDKLogCreatedObservable is an instrument used to record metric values
+// conforming to the "otel.sdk.log.created" semantic conventions. It represents
+// the number of logs submitted to enabled SDK Loggers.
+type SDKLogCreatedObservable struct {
+ metric.Int64ObservableCounter
+}
+
+var newSDKLogCreatedObservableOpts = []metric.Int64ObservableCounterOption{
+ metric.WithDescription("The number of logs submitted to enabled SDK Loggers."),
+ metric.WithUnit("{log_record}"),
+}
+
+// NewSDKLogCreatedObservable returns a new SDKLogCreatedObservable instrument.
+func NewSDKLogCreatedObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableCounterOption,
+) (SDKLogCreatedObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKLogCreatedObservable{noop.Int64ObservableCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKLogCreatedObservableOpts
+ } else {
+ opt = append(opt, newSDKLogCreatedObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableCounter(
+ "otel.sdk.log.created",
+ opt...,
+ )
+ if err != nil {
+ return SDKLogCreatedObservable{noop.Int64ObservableCounter{}}, err
+ }
+ return SDKLogCreatedObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKLogCreatedObservable) Inst() metric.Int64ObservableCounter {
+ return m.Int64ObservableCounter
}
-// AddSet adds incr to the existing count for set.
-func (m SDKLogCreated) AddSet(ctx context.Context, incr int64, set attribute.Set) {
- if set.Len() == 0 {
- m.Int64Counter.Add(ctx, incr)
- return
- }
+// Name returns the semantic convention name of the instrument.
+func (SDKLogCreatedObservable) Name() string {
+ return "otel.sdk.log.created"
+}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+// Unit returns the semantic convention unit of the instrument
+func (SDKLogCreatedObservable) Unit() string {
+ return "{log_record}"
+}
- *o = append(*o, metric.WithAttributeSet(set))
- m.Int64Counter.Add(ctx, incr, *o...)
+// Description returns the semantic convention description of the instrument
+func (SDKLogCreatedObservable) Description() string {
+ return "The number of logs submitted to enabled SDK Loggers."
}
// SDKMetricReaderCollectionDuration is an instrument used to record metric
@@ -1343,6 +2010,9 @@ func (m SDKMetricReaderCollectionDuration) Record(
val float64,
attrs ...attribute.KeyValue,
) {
+ if !m.Float64Histogram.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Float64Histogram.Record(ctx, val)
return
@@ -1350,6 +2020,7 @@ func (m SDKMetricReaderCollectionDuration) Record(
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
@@ -1372,6 +2043,9 @@ func (m SDKMetricReaderCollectionDuration) Record(
// while others fail. In that case `error.type` SHOULD be set to any of the
// failure causes.
func (m SDKMetricReaderCollectionDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) {
+ if !m.Float64Histogram.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Float64Histogram.Record(ctx, val)
return
@@ -1379,6 +2053,7 @@ func (m SDKMetricReaderCollectionDuration) RecordSet(ctx context.Context, val fl
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
@@ -1481,6 +2156,9 @@ func (m SDKProcessorLogProcessed) Add(
incr int64,
attrs ...attribute.KeyValue,
) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Int64Counter.Add(ctx, incr)
return
@@ -1488,6 +2166,7 @@ func (m SDKProcessorLogProcessed) Add(
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -1510,6 +2189,9 @@ func (m SDKProcessorLogProcessed) Add(
// considered to be processed already when it has been submitted to the exporter,
// not when the corresponding export call has finished.
func (m SDKProcessorLogProcessed) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Int64Counter.Add(ctx, incr)
return
@@ -1517,6 +2199,7 @@ func (m SDKProcessorLogProcessed) AddSet(ctx context.Context, incr int64, set at
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -1547,6 +2230,88 @@ func (SDKProcessorLogProcessed) AttrComponentType(val ComponentTypeAttr) attribu
return attribute.String("otel.component.type", string(val))
}
+// SDKProcessorLogProcessedObservable is an instrument used to record metric
+// values conforming to the "otel.sdk.processor.log.processed" semantic
+// conventions. It represents the number of log records for which the processing
+// has finished, either successful or failed.
+type SDKProcessorLogProcessedObservable struct {
+ metric.Int64ObservableCounter
+}
+
+var newSDKProcessorLogProcessedObservableOpts = []metric.Int64ObservableCounterOption{
+ metric.WithDescription("The number of log records for which the processing has finished, either successful or failed."),
+ metric.WithUnit("{log_record}"),
+}
+
+// NewSDKProcessorLogProcessedObservable returns a new
+// SDKProcessorLogProcessedObservable instrument.
+func NewSDKProcessorLogProcessedObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableCounterOption,
+) (SDKProcessorLogProcessedObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKProcessorLogProcessedObservable{noop.Int64ObservableCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKProcessorLogProcessedObservableOpts
+ } else {
+ opt = append(opt, newSDKProcessorLogProcessedObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableCounter(
+ "otel.sdk.processor.log.processed",
+ opt...,
+ )
+ if err != nil {
+ return SDKProcessorLogProcessedObservable{noop.Int64ObservableCounter{}}, err
+ }
+ return SDKProcessorLogProcessedObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKProcessorLogProcessedObservable) Inst() metric.Int64ObservableCounter {
+ return m.Int64ObservableCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKProcessorLogProcessedObservable) Name() string {
+ return "otel.sdk.processor.log.processed"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKProcessorLogProcessedObservable) Unit() string {
+ return "{log_record}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKProcessorLogProcessedObservable) Description() string {
+ return "The number of log records for which the processing has finished, either successful or failed."
+}
+
+// AttrErrorType returns an optional attribute for the "error.type" semantic
+// convention. It represents a low-cardinality description of the failure reason.
+// SDK Batching Log Record Processors MUST use `queue_full` for log records
+// dropped due to a full queue.
+func (SDKProcessorLogProcessedObservable) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
+ return attribute.String("error.type", string(val))
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKProcessorLogProcessedObservable) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKProcessorLogProcessedObservable) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
// SDKProcessorLogQueueCapacity is an instrument used to record metric values
// conforming to the "otel.sdk.processor.log.queue.capacity" semantic
// conventions. It represents the maximum number of log records the queue of a
@@ -1768,6 +2533,9 @@ func (m SDKProcessorSpanProcessed) Add(
incr int64,
attrs ...attribute.KeyValue,
) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Int64Counter.Add(ctx, incr)
return
@@ -1775,6 +2543,7 @@ func (m SDKProcessorSpanProcessed) Add(
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -1797,6 +2566,9 @@ func (m SDKProcessorSpanProcessed) Add(
// processed already when it has been submitted to the exporter, not when the
// corresponding export call has finished.
func (m SDKProcessorSpanProcessed) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Int64Counter.Add(ctx, incr)
return
@@ -1804,6 +2576,7 @@ func (m SDKProcessorSpanProcessed) AddSet(ctx context.Context, incr int64, set a
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -1834,6 +2607,88 @@ func (SDKProcessorSpanProcessed) AttrComponentType(val ComponentTypeAttr) attrib
return attribute.String("otel.component.type", string(val))
}
+// SDKProcessorSpanProcessedObservable is an instrument used to record metric
+// values conforming to the "otel.sdk.processor.span.processed" semantic
+// conventions. It represents the number of spans for which the processing has
+// finished, either successful or failed.
+type SDKProcessorSpanProcessedObservable struct {
+ metric.Int64ObservableCounter
+}
+
+var newSDKProcessorSpanProcessedObservableOpts = []metric.Int64ObservableCounterOption{
+ metric.WithDescription("The number of spans for which the processing has finished, either successful or failed."),
+ metric.WithUnit("{span}"),
+}
+
+// NewSDKProcessorSpanProcessedObservable returns a new
+// SDKProcessorSpanProcessedObservable instrument.
+func NewSDKProcessorSpanProcessedObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableCounterOption,
+) (SDKProcessorSpanProcessedObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKProcessorSpanProcessedObservable{noop.Int64ObservableCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKProcessorSpanProcessedObservableOpts
+ } else {
+ opt = append(opt, newSDKProcessorSpanProcessedObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableCounter(
+ "otel.sdk.processor.span.processed",
+ opt...,
+ )
+ if err != nil {
+ return SDKProcessorSpanProcessedObservable{noop.Int64ObservableCounter{}}, err
+ }
+ return SDKProcessorSpanProcessedObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKProcessorSpanProcessedObservable) Inst() metric.Int64ObservableCounter {
+ return m.Int64ObservableCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKProcessorSpanProcessedObservable) Name() string {
+ return "otel.sdk.processor.span.processed"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKProcessorSpanProcessedObservable) Unit() string {
+ return "{span}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKProcessorSpanProcessedObservable) Description() string {
+ return "The number of spans for which the processing has finished, either successful or failed."
+}
+
+// AttrErrorType returns an optional attribute for the "error.type" semantic
+// convention. It represents a low-cardinality description of the failure reason.
+// SDK Batching Span Processors MUST use `queue_full` for spans dropped due to a
+// full queue.
+func (SDKProcessorSpanProcessedObservable) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
+ return attribute.String("error.type", string(val))
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKProcessorSpanProcessedObservable) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKProcessorSpanProcessedObservable) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
// SDKProcessorSpanQueueCapacity is an instrument used to record metric values
// conforming to the "otel.sdk.processor.span.queue.capacity" semantic
// conventions. It represents the maximum number of spans the queue of a given
@@ -2049,6 +2904,9 @@ func (m SDKSpanLive) Add(
incr int64,
attrs ...attribute.KeyValue,
) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Int64UpDownCounter.Add(ctx, incr)
return
@@ -2056,6 +2914,7 @@ func (m SDKSpanLive) Add(
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -2072,6 +2931,9 @@ func (m SDKSpanLive) Add(
// AddSet adds incr to the existing count for set.
func (m SDKSpanLive) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Int64UpDownCounter.Add(ctx, incr)
return
@@ -2079,6 +2941,7 @@ func (m SDKSpanLive) AddSet(ctx context.Context, incr int64, set attribute.Set)
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -2094,6 +2957,72 @@ func (SDKSpanLive) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.
return attribute.String("otel.span.sampling_result", string(val))
}
+// SDKSpanLiveObservable is an instrument used to record metric values conforming
+// to the "otel.sdk.span.live" semantic conventions. It represents the number of
+// created spans with `recording=true` for which the end operation has not been
+// called yet.
+type SDKSpanLiveObservable struct {
+ metric.Int64ObservableUpDownCounter
+}
+
+var newSDKSpanLiveObservableOpts = []metric.Int64ObservableUpDownCounterOption{
+ metric.WithDescription("The number of created spans with `recording=true` for which the end operation has not been called yet."),
+ metric.WithUnit("{span}"),
+}
+
+// NewSDKSpanLiveObservable returns a new SDKSpanLiveObservable instrument.
+func NewSDKSpanLiveObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableUpDownCounterOption,
+) (SDKSpanLiveObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKSpanLiveObservable{noop.Int64ObservableUpDownCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKSpanLiveObservableOpts
+ } else {
+ opt = append(opt, newSDKSpanLiveObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableUpDownCounter(
+ "otel.sdk.span.live",
+ opt...,
+ )
+ if err != nil {
+ return SDKSpanLiveObservable{noop.Int64ObservableUpDownCounter{}}, err
+ }
+ return SDKSpanLiveObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKSpanLiveObservable) Inst() metric.Int64ObservableUpDownCounter {
+ return m.Int64ObservableUpDownCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKSpanLiveObservable) Name() string {
+ return "otel.sdk.span.live"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKSpanLiveObservable) Unit() string {
+ return "{span}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKSpanLiveObservable) Description() string {
+ return "The number of created spans with `recording=true` for which the end operation has not been called yet."
+}
+
+// AttrSpanSamplingResult returns an optional attribute for the
+// "otel.span.sampling_result" semantic convention. It represents the result
+// value of the sampler for this span.
+func (SDKSpanLiveObservable) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.KeyValue {
+ return attribute.String("otel.span.sampling_result", string(val))
+}
+
// SDKSpanStarted is an instrument used to record metric values conforming to the
// "otel.sdk.span.started" semantic conventions. It represents the number of
// created spans.
@@ -2163,6 +3092,9 @@ func (m SDKSpanStarted) Add(
incr int64,
attrs ...attribute.KeyValue,
) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Int64Counter.Add(ctx, incr)
return
@@ -2170,6 +3102,7 @@ func (m SDKSpanStarted) Add(
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -2189,6 +3122,9 @@ func (m SDKSpanStarted) Add(
// Implementations MUST record this metric for all spans, even for non-recording
// ones.
func (m SDKSpanStarted) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Int64Counter.Add(ctx, incr)
return
@@ -2196,6 +3132,7 @@ func (m SDKSpanStarted) AddSet(ctx context.Context, incr int64, set attribute.Se
o := addOptPool.Get().(*[]metric.AddOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
addOptPool.Put(o)
}()
@@ -2220,3 +3157,78 @@ func (SDKSpanStarted) AttrSpanParentOrigin(val SpanParentOriginAttr) attribute.K
func (SDKSpanStarted) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.KeyValue {
return attribute.String("otel.span.sampling_result", string(val))
}
+
+// SDKSpanStartedObservable is an instrument used to record metric values
+// conforming to the "otel.sdk.span.started" semantic conventions. It represents
+// the number of created spans.
+type SDKSpanStartedObservable struct {
+ metric.Int64ObservableCounter
+}
+
+var newSDKSpanStartedObservableOpts = []metric.Int64ObservableCounterOption{
+ metric.WithDescription("The number of created spans."),
+ metric.WithUnit("{span}"),
+}
+
+// NewSDKSpanStartedObservable returns a new SDKSpanStartedObservable instrument.
+func NewSDKSpanStartedObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableCounterOption,
+) (SDKSpanStartedObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKSpanStartedObservable{noop.Int64ObservableCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKSpanStartedObservableOpts
+ } else {
+ opt = append(opt, newSDKSpanStartedObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableCounter(
+ "otel.sdk.span.started",
+ opt...,
+ )
+ if err != nil {
+ return SDKSpanStartedObservable{noop.Int64ObservableCounter{}}, err
+ }
+ return SDKSpanStartedObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKSpanStartedObservable) Inst() metric.Int64ObservableCounter {
+ return m.Int64ObservableCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKSpanStartedObservable) Name() string {
+ return "otel.sdk.span.started"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKSpanStartedObservable) Unit() string {
+ return "{span}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKSpanStartedObservable) Description() string {
+ return "The number of created spans."
+}
+
+// AttrSpanParentOrigin returns an optional attribute for the
+// "otel.span.parent.origin" semantic convention. It represents the determines
+// whether the span has a parent span, and if so, [whether it is a remote parent]
+// .
+//
+// [whether it is a remote parent]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote
+func (SDKSpanStartedObservable) AttrSpanParentOrigin(val SpanParentOriginAttr) attribute.KeyValue {
+ return attribute.String("otel.span.parent.origin", string(val))
+}
+
+// AttrSpanSamplingResult returns an optional attribute for the
+// "otel.span.sampling_result" semantic convention. It represents the result
+// value of the sampler for this span.
+func (SDKSpanStartedObservable) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.KeyValue {
+ return attribute.String("otel.span.sampling_result", string(val))
+}
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/rpcconv/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/rpcconv/metric.go
similarity index 95%
rename from vendor/go.opentelemetry.io/otel/semconv/v1.40.0/rpcconv/metric.go
rename to vendor/go.opentelemetry.io/otel/semconv/v1.41.0/rpcconv/metric.go
index 2086ffce5dcc..7b4acec91132 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/rpcconv/metric.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/rpcconv/metric.go
@@ -65,6 +65,7 @@ type ClientCallDuration struct {
var newClientCallDurationOpts = []metric.Float64HistogramOption{
metric.WithDescription("Measures the duration of an outgoing Remote Procedure Call (RPC)."),
metric.WithUnit("s"),
+ metric.WithExplicitBucketBoundaries([]float64{0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10}...),
}
// NewClientCallDuration returns a new ClientCallDuration instrument.
@@ -127,6 +128,9 @@ func (m ClientCallDuration) Record(
systemName SystemNameAttr,
attrs ...attribute.KeyValue,
) {
+ if !m.Float64Histogram.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Float64Histogram.Record(ctx, val, metric.WithAttributes(
attribute.String("rpc.system.name", string(systemName)),
@@ -136,6 +140,7 @@ func (m ClientCallDuration) Record(
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
@@ -158,6 +163,9 @@ func (m ClientCallDuration) Record(
// When this metric is reported alongside an RPC client span, the metric value
// SHOULD be the same as the RPC client span duration.
func (m ClientCallDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) {
+ if !m.Float64Histogram.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Float64Histogram.Record(ctx, val)
return
@@ -165,6 +173,7 @@ func (m ClientCallDuration) RecordSet(ctx context.Context, val float64, set attr
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
@@ -217,6 +226,7 @@ type ServerCallDuration struct {
var newServerCallDurationOpts = []metric.Float64HistogramOption{
metric.WithDescription("Measures the duration of an incoming Remote Procedure Call (RPC)."),
metric.WithUnit("s"),
+ metric.WithExplicitBucketBoundaries([]float64{0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10}...),
}
// NewServerCallDuration returns a new ServerCallDuration instrument.
@@ -279,6 +289,9 @@ func (m ServerCallDuration) Record(
systemName SystemNameAttr,
attrs ...attribute.KeyValue,
) {
+ if !m.Float64Histogram.Enabled(ctx) {
+ return
+ }
if len(attrs) == 0 {
m.Float64Histogram.Record(ctx, val, metric.WithAttributes(
attribute.String("rpc.system.name", string(systemName)),
@@ -288,6 +301,7 @@ func (m ServerCallDuration) Record(
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
@@ -310,6 +324,9 @@ func (m ServerCallDuration) Record(
// When this metric is reported alongside an RPC server span, the metric value
// SHOULD be the same as the RPC server span duration.
func (m ServerCallDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) {
+ if !m.Float64Histogram.Enabled(ctx) {
+ return
+ }
if set.Len() == 0 {
m.Float64Histogram.Record(ctx, val)
return
@@ -317,6 +334,7 @@ func (m ServerCallDuration) RecordSet(ctx context.Context, val float64, set attr
o := recOptPool.Get().(*[]metric.RecordOption)
defer func() {
+ clear(*o)
*o = (*o)[:0]
recOptPool.Put(o)
}()
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/schema.go b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/schema.go
similarity index 73%
rename from vendor/go.opentelemetry.io/otel/semconv/v1.40.0/schema.go
rename to vendor/go.opentelemetry.io/otel/semconv/v1.41.0/schema.go
index a07ffa3361e5..24948a48f837 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/schema.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/schema.go
@@ -1,9 +1,11 @@
+// Code generated from semantic convention specification. DO NOT EDIT.
+
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package semconv // import "go.opentelemetry.io/otel/semconv/v1.40.0"
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.41.0"
// SchemaURL is the schema URL that matches the version of the semantic conventions
// that this package defines. Semconv packages starting from v1.4.0 must declare
// non-empty schema URL in the form https://opentelemetry.io/schemas/
-const SchemaURL = "https://opentelemetry.io/schemas/1.40.0"
+const SchemaURL = "https://opentelemetry.io/schemas/1.41.0"
diff --git a/vendor/go.opentelemetry.io/otel/trace/auto.go b/vendor/go.opentelemetry.io/otel/trace/auto.go
index 9316fd0ac45e..a75cf047d5bc 100644
--- a/vendor/go.opentelemetry.io/otel/trace/auto.go
+++ b/vendor/go.opentelemetry.io/otel/trace/auto.go
@@ -20,7 +20,7 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
- semconv "go.opentelemetry.io/otel/semconv/v1.40.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
"go.opentelemetry.io/otel/trace/embedded"
"go.opentelemetry.io/otel/trace/internal/telemetry"
)
@@ -314,6 +314,14 @@ func convAttrValue(value attribute.Value) telemetry.Value {
case attribute.STRING:
v := truncate(maxSpan.AttrValueLen, value.AsString())
return telemetry.StringValue(v)
+ case attribute.BYTESLICE:
+ // len(v.AsString()) is identical to len(v.AsByteSlice()) but
+ // avoids allocating the full slice before truncation.
+ s := value.AsString()
+ if maxSpan.AttrValueLen >= 0 && len(s) > maxSpan.AttrValueLen {
+ return telemetry.BytesValue([]byte(s[:maxSpan.AttrValueLen]))
+ }
+ return telemetry.BytesValue([]byte(s))
case attribute.BOOLSLICE:
slice := value.AsBoolSlice()
out := make([]telemetry.Value, 0, len(slice))
@@ -343,6 +351,13 @@ func convAttrValue(value attribute.Value) telemetry.Value {
out = append(out, telemetry.StringValue(v))
}
return telemetry.SliceValue(out...)
+ case attribute.SLICE:
+ slice := value.AsSlice()
+ out := make([]telemetry.Value, 0, len(slice))
+ for _, v := range slice {
+ out = append(out, convAttrValue(v))
+ }
+ return telemetry.SliceValue(out...)
}
return telemetry.Value{}
}
@@ -463,7 +478,8 @@ func (s *autoSpan) RecordError(err error, opts ...EventOption) {
cfg := NewEventConfig(opts...)
attrs := cfg.Attributes()
- attrs = append(attrs,
+ attrs = append(
+ attrs,
semconv.ExceptionType(typeStr(err)),
semconv.ExceptionMessage(err.Error()),
)
diff --git a/vendor/go.opentelemetry.io/otel/trace/config.go b/vendor/go.opentelemetry.io/otel/trace/config.go
index d9ecef1cad27..4cedba5ac734 100644
--- a/vendor/go.opentelemetry.io/otel/trace/config.go
+++ b/vendor/go.opentelemetry.io/otel/trace/config.go
@@ -34,10 +34,17 @@ func (t *TracerConfig) SchemaURL() string {
return t.schemaURL
}
+type experimentalOption interface {
+ Experimental()
+}
+
// NewTracerConfig applies all the options to a returned TracerConfig.
func NewTracerConfig(options ...TracerOption) TracerConfig {
var config TracerConfig
for _, option := range options {
+ if _, ok := option.(experimentalOption); ok {
+ continue
+ }
config = option.apply(config)
}
return config
@@ -103,6 +110,9 @@ func (cfg *SpanConfig) SpanKind() SpanKind {
func NewSpanStartConfig(options ...SpanStartOption) SpanConfig {
var c SpanConfig
for _, option := range options {
+ if _, ok := option.(experimentalOption); ok {
+ continue
+ }
c = option.applySpanStart(c)
}
return c
@@ -115,6 +125,9 @@ func NewSpanStartConfig(options ...SpanStartOption) SpanConfig {
func NewSpanEndConfig(options ...SpanEndOption) SpanConfig {
var c SpanConfig
for _, option := range options {
+ if _, ok := option.(experimentalOption); ok {
+ continue
+ }
c = option.applySpanEnd(c)
}
return c
@@ -167,6 +180,9 @@ func (cfg *EventConfig) StackTrace() bool {
func NewEventConfig(options ...EventOption) EventConfig {
var c EventConfig
for _, option := range options {
+ if _, ok := option.(experimentalOption); ok {
+ continue
+ }
c = option.applyEvent(c)
}
if c.timestamp.IsZero() {
diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/span.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/span.go
index e7ca62c660c9..61c7819a2336 100644
--- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/span.go
+++ b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/span.go
@@ -314,9 +314,9 @@ type SpanEvent struct {
}
// MarshalJSON encodes e into OTLP formatted JSON.
-func (e SpanEvent) MarshalJSON() ([]byte, error) {
- t := e.Time.UnixNano()
- if e.Time.IsZero() || t < 0 {
+func (se SpanEvent) MarshalJSON() ([]byte, error) {
+ t := se.Time.UnixNano()
+ if se.Time.IsZero() || t < 0 {
t = 0
}
@@ -325,7 +325,7 @@ func (e SpanEvent) MarshalJSON() ([]byte, error) {
Alias
Time uint64 `json:"timeUnixNano,omitempty"`
}{
- Alias: Alias(e),
+ Alias: Alias(se),
Time: uint64(t), // nolint: gosec // >0 checked above
})
}
diff --git a/vendor/go.opentelemetry.io/otel/version.go b/vendor/go.opentelemetry.io/otel/version.go
index 1db4f47e435e..72746acfdb4f 100644
--- a/vendor/go.opentelemetry.io/otel/version.go
+++ b/vendor/go.opentelemetry.io/otel/version.go
@@ -5,5 +5,5 @@ package otel // import "go.opentelemetry.io/otel"
// Version is the current release version of OpenTelemetry in use.
func Version() string {
- return "1.43.0"
+ return "1.44.0"
}
diff --git a/vendor/go.opentelemetry.io/otel/versions.yaml b/vendor/go.opentelemetry.io/otel/versions.yaml
index bcc6ee78a48a..d6dbf803ef94 100644
--- a/vendor/go.opentelemetry.io/otel/versions.yaml
+++ b/vendor/go.opentelemetry.io/otel/versions.yaml
@@ -3,7 +3,7 @@
module-sets:
stable-v1:
- version: v1.43.0
+ version: v1.44.0
modules:
- go.opentelemetry.io/otel
- go.opentelemetry.io/otel/bridge/opencensus
@@ -22,11 +22,12 @@ module-sets:
- go.opentelemetry.io/otel/sdk/metric
- go.opentelemetry.io/otel/trace
experimental-metrics:
- version: v0.65.0
+ version: v0.66.0
modules:
- go.opentelemetry.io/otel/exporters/prometheus
+ - go.opentelemetry.io/otel/metric/x
experimental-logs:
- version: v0.19.0
+ version: v0.20.0
modules:
- go.opentelemetry.io/otel/log
- go.opentelemetry.io/otel/log/logtest
@@ -36,7 +37,7 @@ module-sets:
- go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp
- go.opentelemetry.io/otel/exporters/stdout/stdoutlog
experimental-schema:
- version: v0.0.16
+ version: v0.0.17
modules:
- go.opentelemetry.io/otel/schema
excluded-modules:
@@ -55,6 +56,9 @@ modules:
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc:
version-refs:
- ./internal/version.go
+ go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp:
+ version-refs:
+ - ./internal/version.go
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc:
version-refs:
- ./internal/version.go
diff --git a/vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go b/vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go
index 1f8d49bc9837..304f64763740 100644
--- a/vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go
+++ b/vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go
@@ -53,6 +53,7 @@ type AnyValue struct {
// *AnyValue_ArrayValue
// *AnyValue_KvlistValue
// *AnyValue_BytesValue
+ // *AnyValue_StringValueStrindex
Value isAnyValue_Value `protobuf_oneof:"value"`
}
@@ -144,6 +145,13 @@ func (x *AnyValue) GetBytesValue() []byte {
return nil
}
+func (x *AnyValue) GetStringValueStrindex() int32 {
+ if x, ok := x.GetValue().(*AnyValue_StringValueStrindex); ok {
+ return x.StringValueStrindex
+ }
+ return 0
+}
+
type isAnyValue_Value interface {
isAnyValue_Value()
}
@@ -176,6 +184,20 @@ type AnyValue_BytesValue struct {
BytesValue []byte `protobuf:"bytes,7,opt,name=bytes_value,json=bytesValue,proto3,oneof"`
}
+type AnyValue_StringValueStrindex struct {
+ // Reference to the string value in ProfilesDictionary.string_table.
+ //
+ // Note: This is currently used exclusively in the Profiling signal.
+ // Implementers of OTLP receivers for signals other than Profiling should
+ // treat the presence of this value as a non-fatal issue.
+ // Log an error or warning indicating an unexpected field intended for the
+ // Profiling signal and process the data as if this value were absent or
+ // empty, ignoring its semantic content for the non-Profiling signal.
+ //
+ // Status: [Development]
+ StringValueStrindex int32 `protobuf:"varint,8,opt,name=string_value_strindex,json=stringValueStrindex,proto3,oneof"`
+}
+
func (*AnyValue_StringValue) isAnyValue_Value() {}
func (*AnyValue_BoolValue) isAnyValue_Value() {}
@@ -190,6 +212,8 @@ func (*AnyValue_KvlistValue) isAnyValue_Value() {}
func (*AnyValue_BytesValue) isAnyValue_Value() {}
+func (*AnyValue_StringValueStrindex) isAnyValue_Value() {}
+
// ArrayValue is a list of AnyValue messages. We need ArrayValue as a message
// since oneof in AnyValue does not allow repeated fields.
type ArrayValue struct {
@@ -306,9 +330,22 @@ type KeyValue struct {
unknownFields protoimpl.UnknownFields
// The key name of the pair.
+ // key_ref MUST NOT be set if key is used.
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// The value of the pair.
Value *AnyValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+ // Reference to the string key in ProfilesDictionary.string_table.
+ // key MUST NOT be set if key_strindex is used.
+ //
+ // Note: This is currently used exclusively in the Profiling signal.
+ // Implementers of OTLP receivers for signals other than Profiling should
+ // treat the presence of this key as a non-fatal issue.
+ // Log an error or warning indicating an unexpected field intended for the
+ // Profiling signal and process the data as if this value were absent or
+ // empty, ignoring its semantic content for the non-Profiling signal.
+ //
+ // Status: [Development]
+ KeyStrindex int32 `protobuf:"varint,3,opt,name=key_strindex,json=keyStrindex,proto3" json:"key_strindex,omitempty"`
}
func (x *KeyValue) Reset() {
@@ -357,6 +394,13 @@ func (x *KeyValue) GetValue() *AnyValue {
return nil
}
+func (x *KeyValue) GetKeyStrindex() int32 {
+ if x != nil {
+ return x.KeyStrindex
+ }
+ return 0
+}
+
// InstrumentationScope is a message representing the instrumentation scope information
// such as the fully qualified name and version.
type InstrumentationScope struct {
@@ -543,7 +587,7 @@ var file_opentelemetry_proto_common_v1_common_proto_rawDesc = []byte{
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f,
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x6f, 0x70,
0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x22, 0xe0, 0x02, 0x0a, 0x08,
+ 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x22, 0x96, 0x03, 0x0a, 0x08,
0x41, 0x6e, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69,
0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00,
0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a,
@@ -565,52 +609,58 @@ var file_opentelemetry_proto_common_v1_common_proto_rawDesc = []byte{
0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x6b, 0x76, 0x6c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73,
- 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4d,
- 0x0a, 0x0a, 0x41, 0x72, 0x72, 0x61, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x06,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f,
- 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x79,
- 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x4f, 0x0a,
- 0x0c, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3f, 0x0a,
- 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e,
- 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65,
- 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x5b,
- 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
- 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3d, 0x0a, 0x05,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70,
- 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x79, 0x56,
- 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xc7, 0x01, 0x0a, 0x14,
- 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53,
- 0x63, 0x6f, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73,
- 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69,
- 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73,
- 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c,
- 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d,
- 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
- 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x64,
- 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
- 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x16, 0x64,
- 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73,
- 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x82, 0x01, 0x0a, 0x09, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79,
- 0x52, 0x65, 0x66, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x75, 0x72,
- 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x55,
- 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x64, 0x5f, 0x6b, 0x65, 0x79,
- 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x12,
- 0x29, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b,
- 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x63, 0x72,
- 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x42, 0x7b, 0x0a, 0x20, 0x69, 0x6f,
- 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0b,
- 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x28, 0x67,
- 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e,
- 0x69, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x74, 0x6c, 0x70, 0x2f, 0x63, 0x6f,
- 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0xaa, 0x02, 0x1d, 0x4f, 0x70, 0x65, 0x6e, 0x54, 0x65,
- 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f,
- 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x34, 0x0a, 0x15, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08,
+ 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x13, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61,
+ 0x6c, 0x75, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x07, 0x0a, 0x05, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4d, 0x0a, 0x0a, 0x41, 0x72, 0x72, 0x61, 0x79, 0x56, 0x61, 0x6c,
+ 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74,
+ 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
+ 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x73, 0x22, 0x4f, 0x0a, 0x0c, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4c,
+ 0x69, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65,
+ 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+ 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61,
+ 0x6c, 0x75, 0x65, 0x73, 0x22, 0x7e, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
+ 0x65, 0x79, 0x12, 0x3d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72,
+ 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76,
+ 0x31, 0x2e, 0x41, 0x6e, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x64, 0x65,
+ 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6b, 0x65, 0x79, 0x53, 0x74, 0x72, 0x69,
+ 0x6e, 0x64, 0x65, 0x78, 0x22, 0xc7, 0x01, 0x0a, 0x14, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d,
+ 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x12, 0x0a,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x0a, 0x61,
+ 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e,
+ 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62,
+ 0x75, 0x74, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f,
+ 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x16, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x41,
+ 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x82,
+ 0x01, 0x0a, 0x09, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x66, 0x12, 0x1d, 0x0a, 0x0a,
+ 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x09, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x55, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x74,
+ 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12,
+ 0x17, 0x0a, 0x07, 0x69, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09,
+ 0x52, 0x06, 0x69, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x63,
+ 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, 0x03,
+ 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b,
+ 0x65, 0x79, 0x73, 0x42, 0x7b, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65,
+ 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f,
+ 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50,
+ 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x28, 0x67, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74,
+ 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x2f, 0x6f, 0x74, 0x6c, 0x70, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31,
+ 0xaa, 0x02, 0x1d, 0x4f, 0x70, 0x65, 0x6e, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79,
+ 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x56, 0x31,
+ 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -735,6 +785,7 @@ func file_opentelemetry_proto_common_v1_common_proto_init() {
(*AnyValue_ArrayValue)(nil),
(*AnyValue_KvlistValue)(nil),
(*AnyValue_BytesValue)(nil),
+ (*AnyValue_StringValueStrindex)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
diff --git a/vendor/golang.org/x/crypto/blake2b/blake2b.go b/vendor/golang.org/x/crypto/blake2b/blake2b.go
deleted file mode 100644
index d2e98d4295bd..000000000000
--- a/vendor/golang.org/x/crypto/blake2b/blake2b.go
+++ /dev/null
@@ -1,291 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package blake2b implements the BLAKE2b hash algorithm defined by RFC 7693
-// and the extendable output function (XOF) BLAKE2Xb.
-//
-// BLAKE2b is optimized for 64-bit platforms—including NEON-enabled ARMs—and
-// produces digests of any size between 1 and 64 bytes.
-// For a detailed specification of BLAKE2b see https://blake2.net/blake2.pdf
-// and for BLAKE2Xb see https://blake2.net/blake2x.pdf
-//
-// If you aren't sure which function you need, use BLAKE2b (Sum512 or New512).
-// If you need a secret-key MAC (message authentication code), use the New512
-// function with a non-nil key.
-//
-// BLAKE2X is a construction to compute hash values larger than 64 bytes. It
-// can produce hash values between 0 and 4 GiB.
-package blake2b
-
-import (
- "encoding/binary"
- "errors"
- "hash"
-)
-
-const (
- // The blocksize of BLAKE2b in bytes.
- BlockSize = 128
- // The hash size of BLAKE2b-512 in bytes.
- Size = 64
- // The hash size of BLAKE2b-384 in bytes.
- Size384 = 48
- // The hash size of BLAKE2b-256 in bytes.
- Size256 = 32
-)
-
-var (
- useAVX2 bool
- useAVX bool
- useSSE4 bool
-)
-
-var (
- errKeySize = errors.New("blake2b: invalid key size")
- errHashSize = errors.New("blake2b: invalid hash size")
-)
-
-var iv = [8]uint64{
- 0x6a09e667f3bcc908, 0xbb67ae8584caa73b, 0x3c6ef372fe94f82b, 0xa54ff53a5f1d36f1,
- 0x510e527fade682d1, 0x9b05688c2b3e6c1f, 0x1f83d9abfb41bd6b, 0x5be0cd19137e2179,
-}
-
-// Sum512 returns the BLAKE2b-512 checksum of the data.
-func Sum512(data []byte) [Size]byte {
- var sum [Size]byte
- checkSum(&sum, Size, data)
- return sum
-}
-
-// Sum384 returns the BLAKE2b-384 checksum of the data.
-func Sum384(data []byte) [Size384]byte {
- var sum [Size]byte
- var sum384 [Size384]byte
- checkSum(&sum, Size384, data)
- copy(sum384[:], sum[:Size384])
- return sum384
-}
-
-// Sum256 returns the BLAKE2b-256 checksum of the data.
-func Sum256(data []byte) [Size256]byte {
- var sum [Size]byte
- var sum256 [Size256]byte
- checkSum(&sum, Size256, data)
- copy(sum256[:], sum[:Size256])
- return sum256
-}
-
-// New512 returns a new hash.Hash computing the BLAKE2b-512 checksum. A non-nil
-// key turns the hash into a MAC. The key must be between zero and 64 bytes long.
-func New512(key []byte) (hash.Hash, error) { return newDigest(Size, key) }
-
-// New384 returns a new hash.Hash computing the BLAKE2b-384 checksum. A non-nil
-// key turns the hash into a MAC. The key must be between zero and 64 bytes long.
-func New384(key []byte) (hash.Hash, error) { return newDigest(Size384, key) }
-
-// New256 returns a new hash.Hash computing the BLAKE2b-256 checksum. A non-nil
-// key turns the hash into a MAC. The key must be between zero and 64 bytes long.
-func New256(key []byte) (hash.Hash, error) { return newDigest(Size256, key) }
-
-// New returns a new hash.Hash computing the BLAKE2b checksum with a custom length.
-// A non-nil key turns the hash into a MAC. The key must be between zero and 64 bytes long.
-// The hash size can be a value between 1 and 64 but it is highly recommended to use
-// values equal or greater than:
-// - 32 if BLAKE2b is used as a hash function (The key is zero bytes long).
-// - 16 if BLAKE2b is used as a MAC function (The key is at least 16 bytes long).
-// When the key is nil, the returned hash.Hash implements BinaryMarshaler
-// and BinaryUnmarshaler for state (de)serialization as documented by hash.Hash.
-func New(size int, key []byte) (hash.Hash, error) { return newDigest(size, key) }
-
-func newDigest(hashSize int, key []byte) (*digest, error) {
- if hashSize < 1 || hashSize > Size {
- return nil, errHashSize
- }
- if len(key) > Size {
- return nil, errKeySize
- }
- d := &digest{
- size: hashSize,
- keyLen: len(key),
- }
- copy(d.key[:], key)
- d.Reset()
- return d, nil
-}
-
-func checkSum(sum *[Size]byte, hashSize int, data []byte) {
- h := iv
- h[0] ^= uint64(hashSize) | (1 << 16) | (1 << 24)
- var c [2]uint64
-
- if length := len(data); length > BlockSize {
- n := length &^ (BlockSize - 1)
- if length == n {
- n -= BlockSize
- }
- hashBlocks(&h, &c, 0, data[:n])
- data = data[n:]
- }
-
- var block [BlockSize]byte
- offset := copy(block[:], data)
- remaining := uint64(BlockSize - offset)
- if c[0] < remaining {
- c[1]--
- }
- c[0] -= remaining
-
- hashBlocks(&h, &c, 0xFFFFFFFFFFFFFFFF, block[:])
-
- for i, v := range h[:(hashSize+7)/8] {
- binary.LittleEndian.PutUint64(sum[8*i:], v)
- }
-}
-
-type digest struct {
- h [8]uint64
- c [2]uint64
- size int
- block [BlockSize]byte
- offset int
-
- key [BlockSize]byte
- keyLen int
-}
-
-const (
- magic = "b2b"
- marshaledSize = len(magic) + 8*8 + 2*8 + 1 + BlockSize + 1
-)
-
-func (d *digest) MarshalBinary() ([]byte, error) {
- if d.keyLen != 0 {
- return nil, errors.New("crypto/blake2b: cannot marshal MACs")
- }
- b := make([]byte, 0, marshaledSize)
- b = append(b, magic...)
- for i := 0; i < 8; i++ {
- b = appendUint64(b, d.h[i])
- }
- b = appendUint64(b, d.c[0])
- b = appendUint64(b, d.c[1])
- // Maximum value for size is 64
- b = append(b, byte(d.size))
- b = append(b, d.block[:]...)
- b = append(b, byte(d.offset))
- return b, nil
-}
-
-func (d *digest) UnmarshalBinary(b []byte) error {
- if len(b) < len(magic) || string(b[:len(magic)]) != magic {
- return errors.New("crypto/blake2b: invalid hash state identifier")
- }
- if len(b) != marshaledSize {
- return errors.New("crypto/blake2b: invalid hash state size")
- }
- b = b[len(magic):]
- for i := 0; i < 8; i++ {
- b, d.h[i] = consumeUint64(b)
- }
- b, d.c[0] = consumeUint64(b)
- b, d.c[1] = consumeUint64(b)
- d.size = int(b[0])
- b = b[1:]
- copy(d.block[:], b[:BlockSize])
- b = b[BlockSize:]
- d.offset = int(b[0])
- return nil
-}
-
-func (d *digest) BlockSize() int { return BlockSize }
-
-func (d *digest) Size() int { return d.size }
-
-func (d *digest) Reset() {
- d.h = iv
- d.h[0] ^= uint64(d.size) | (uint64(d.keyLen) << 8) | (1 << 16) | (1 << 24)
- d.offset, d.c[0], d.c[1] = 0, 0, 0
- if d.keyLen > 0 {
- d.block = d.key
- d.offset = BlockSize
- }
-}
-
-func (d *digest) Write(p []byte) (n int, err error) {
- n = len(p)
-
- if d.offset > 0 {
- remaining := BlockSize - d.offset
- if n <= remaining {
- d.offset += copy(d.block[d.offset:], p)
- return
- }
- copy(d.block[d.offset:], p[:remaining])
- hashBlocks(&d.h, &d.c, 0, d.block[:])
- d.offset = 0
- p = p[remaining:]
- }
-
- if length := len(p); length > BlockSize {
- nn := length &^ (BlockSize - 1)
- if length == nn {
- nn -= BlockSize
- }
- hashBlocks(&d.h, &d.c, 0, p[:nn])
- p = p[nn:]
- }
-
- if len(p) > 0 {
- d.offset += copy(d.block[:], p)
- }
-
- return
-}
-
-func (d *digest) Sum(sum []byte) []byte {
- var hash [Size]byte
- d.finalize(&hash)
- return append(sum, hash[:d.size]...)
-}
-
-func (d *digest) finalize(hash *[Size]byte) {
- var block [BlockSize]byte
- copy(block[:], d.block[:d.offset])
- remaining := uint64(BlockSize - d.offset)
-
- c := d.c
- if c[0] < remaining {
- c[1]--
- }
- c[0] -= remaining
-
- h := d.h
- hashBlocks(&h, &c, 0xFFFFFFFFFFFFFFFF, block[:])
-
- for i, v := range h {
- binary.LittleEndian.PutUint64(hash[8*i:], v)
- }
-}
-
-func appendUint64(b []byte, x uint64) []byte {
- var a [8]byte
- binary.BigEndian.PutUint64(a[:], x)
- return append(b, a[:]...)
-}
-
-func appendUint32(b []byte, x uint32) []byte {
- var a [4]byte
- binary.BigEndian.PutUint32(a[:], x)
- return append(b, a[:]...)
-}
-
-func consumeUint64(b []byte) ([]byte, uint64) {
- x := binary.BigEndian.Uint64(b)
- return b[8:], x
-}
-
-func consumeUint32(b []byte) ([]byte, uint32) {
- x := binary.BigEndian.Uint32(b)
- return b[4:], x
-}
diff --git a/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.go b/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.go
deleted file mode 100644
index 199c21d27aad..000000000000
--- a/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build amd64 && gc && !purego
-
-package blake2b
-
-import "golang.org/x/sys/cpu"
-
-func init() {
- useAVX2 = cpu.X86.HasAVX2
- useAVX = cpu.X86.HasAVX
- useSSE4 = cpu.X86.HasSSE41
-}
-
-//go:noescape
-func hashBlocksAVX2(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
-
-//go:noescape
-func hashBlocksAVX(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
-
-//go:noescape
-func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
-
-func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) {
- switch {
- case useAVX2:
- hashBlocksAVX2(h, c, flag, blocks)
- case useAVX:
- hashBlocksAVX(h, c, flag, blocks)
- case useSSE4:
- hashBlocksSSE4(h, c, flag, blocks)
- default:
- hashBlocksGeneric(h, c, flag, blocks)
- }
-}
diff --git a/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.s b/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.s
deleted file mode 100644
index f75162e039c1..000000000000
--- a/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.s
+++ /dev/null
@@ -1,4559 +0,0 @@
-// Code generated by command: go run blake2bAVX2_amd64_asm.go -out ../../blake2bAVX2_amd64.s -pkg blake2b. DO NOT EDIT.
-
-//go:build amd64 && gc && !purego
-
-#include "textflag.h"
-
-// func hashBlocksAVX2(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
-// Requires: AVX, AVX2
-TEXT ·hashBlocksAVX2(SB), NOSPLIT, $320-48
- MOVQ h+0(FP), AX
- MOVQ c+8(FP), BX
- MOVQ flag+16(FP), CX
- MOVQ blocks_base+24(FP), SI
- MOVQ blocks_len+32(FP), DI
- MOVQ SP, DX
- ADDQ $+31, DX
- ANDQ $-32, DX
- MOVQ CX, 16(DX)
- XORQ CX, CX
- MOVQ CX, 24(DX)
- VMOVDQU ·AVX2_c40<>+0(SB), Y4
- VMOVDQU ·AVX2_c48<>+0(SB), Y5
- VMOVDQU (AX), Y8
- VMOVDQU 32(AX), Y9
- VMOVDQU ·AVX2_iv0<>+0(SB), Y6
- VMOVDQU ·AVX2_iv1<>+0(SB), Y7
- MOVQ (BX), R8
- MOVQ 8(BX), R9
- MOVQ R9, 8(DX)
-
-loop:
- ADDQ $0x80, R8
- MOVQ R8, (DX)
- CMPQ R8, $0x80
- JGE noinc
- INCQ R9
- MOVQ R9, 8(DX)
-
-noinc:
- VMOVDQA Y8, Y0
- VMOVDQA Y9, Y1
- VMOVDQA Y6, Y2
- VPXOR (DX), Y7, Y3
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x26
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x20
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x10
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x30
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y12, Y12
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x08
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x28
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x18
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x38
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y13, Y13
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x40
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x60
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x50
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x70
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y14, Y14
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x48
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x68
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x58
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x78
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y15, Y15
- VMOVDQA Y12, 32(DX)
- VMOVDQA Y13, 64(DX)
- VMOVDQA Y14, 96(DX)
- VMOVDQA Y15, 128(DX)
- VPADDQ Y12, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ Y13, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x93
- VPADDQ Y14, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ Y15, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x93
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x66
- BYTE $0x70
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x48
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x20
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x68
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y12, Y12
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x50
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x78
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x40
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x30
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y13, Y13
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x58
- VPSHUFD $0x4e, (SI), X14
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x28
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y14, Y14
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x60
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x38
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x10
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x18
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y15, Y15
- VMOVDQA Y12, 160(DX)
- VMOVDQA Y13, 192(DX)
- VMOVDQA Y14, 224(DX)
- VMOVDQA Y15, 256(DX)
- VPADDQ Y12, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ Y13, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x93
- VPADDQ Y14, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ Y15, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x93
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x28
- VMOVDQU 88(SI), X12
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x78
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y12, Y12
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x40
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x10
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x2e
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x68
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y13, Y13
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x50
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x38
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x18
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x48
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y14, Y14
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x70
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x08
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x30
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x20
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y15, Y15
- VPADDQ Y12, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ Y13, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x93
- VPADDQ Y14, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ Y15, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x93
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x66
- BYTE $0x38
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x68
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x18
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x58
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y12, Y12
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x48
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x60
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x08
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x70
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y13, Y13
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x10
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x20
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x28
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x78
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y14, Y14
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x30
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x1e
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x50
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x40
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y15, Y15
- VPADDQ Y12, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ Y13, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x93
- VPADDQ Y14, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ Y15, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x93
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x66
- BYTE $0x48
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x10
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x28
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x50
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y12, Y12
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x2e
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x20
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x38
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x78
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y13, Y13
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x70
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x30
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x58
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x18
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y14, Y14
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x08
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x40
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x60
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x68
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y15, Y15
- VPADDQ Y12, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ Y13, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x93
- VPADDQ Y14, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ Y15, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x93
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x66
- BYTE $0x10
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x1e
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x30
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x40
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y12, Y12
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x60
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x58
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x50
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x18
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y13, Y13
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x20
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x78
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x38
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x08
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y14, Y14
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x68
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x70
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x28
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x48
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y15, Y15
- VPADDQ Y12, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ Y13, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x93
- VPADDQ Y14, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ Y15, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x93
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x66
- BYTE $0x60
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x70
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x08
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x20
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y12, Y12
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x28
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x68
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x78
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x50
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y13, Y13
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x36
- VPSHUFD $0x4e, 64(SI), X11
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x30
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y14, Y14
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x38
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x10
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x18
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x58
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y15, Y15
- VPADDQ Y12, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ Y13, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x93
- VPADDQ Y14, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ Y15, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x93
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x66
- BYTE $0x68
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x60
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x38
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x18
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y12, Y12
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x58
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x08
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x70
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x48
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y13, Y13
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x28
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x40
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x78
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x10
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y14, Y14
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x3e
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x30
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x20
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x50
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y15, Y15
- VPADDQ Y12, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ Y13, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x93
- VPADDQ Y14, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ Y15, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x93
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x66
- BYTE $0x30
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x58
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x70
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x1e
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y12, Y12
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x78
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x18
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x48
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x40
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y13, Y13
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x08
- VMOVDQU 96(SI), X14
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x50
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y14, Y14
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x10
- VMOVDQU 32(SI), X11
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x38
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y15, Y15
- VPADDQ Y12, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ Y13, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x93
- VPADDQ Y14, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ Y15, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x93
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x66
- BYTE $0x50
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x38
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x40
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x08
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y12, Y12
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x10
- VPSHUFD $0x4e, 40(SI), X11
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x20
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y13, Y13
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x78
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x18
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x48
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x5e
- BYTE $0x68
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y14, Y14
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x58
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x5e
- BYTE $0x60
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x70
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0xa1
- BYTE $0x22
- BYTE $0x1e
- BYTE $0x01
- VINSERTI128 $0x01, X11, Y15, Y15
- VPADDQ Y12, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ Y13, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x93
- VPADDQ Y14, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ Y15, Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x93
- VPADDQ 32(DX), Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ 64(DX), Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x93
- VPADDQ 96(DX), Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ 128(DX), Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x93
- VPADDQ 160(DX), Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ 192(DX), Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x93
- VPADDQ 224(DX), Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFD $-79, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPSHUFB Y4, Y1, Y1
- VPADDQ 256(DX), Y0, Y0
- VPADDQ Y1, Y0, Y0
- VPXOR Y0, Y3, Y3
- VPSHUFB Y5, Y3, Y3
- VPADDQ Y3, Y2, Y2
- VPXOR Y2, Y1, Y1
- VPADDQ Y1, Y1, Y10
- VPSRLQ $0x3f, Y1, Y1
- VPXOR Y10, Y1, Y1
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xdb
- BYTE $0x39
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xd2
- BYTE $0x4e
- BYTE $0xc4
- BYTE $0xe3
- BYTE $0xfd
- BYTE $0x00
- BYTE $0xc9
- BYTE $0x93
- VPXOR Y0, Y8, Y8
- VPXOR Y1, Y9, Y9
- VPXOR Y2, Y8, Y8
- VPXOR Y3, Y9, Y9
- LEAQ 128(SI), SI
- SUBQ $0x80, DI
- JNE loop
- MOVQ R8, (BX)
- MOVQ R9, 8(BX)
- VMOVDQU Y8, (AX)
- VMOVDQU Y9, 32(AX)
- VZEROUPPER
- RET
-
-DATA ·AVX2_c40<>+0(SB)/8, $0x0201000706050403
-DATA ·AVX2_c40<>+8(SB)/8, $0x0a09080f0e0d0c0b
-DATA ·AVX2_c40<>+16(SB)/8, $0x0201000706050403
-DATA ·AVX2_c40<>+24(SB)/8, $0x0a09080f0e0d0c0b
-GLOBL ·AVX2_c40<>(SB), RODATA|NOPTR, $32
-
-DATA ·AVX2_c48<>+0(SB)/8, $0x0100070605040302
-DATA ·AVX2_c48<>+8(SB)/8, $0x09080f0e0d0c0b0a
-DATA ·AVX2_c48<>+16(SB)/8, $0x0100070605040302
-DATA ·AVX2_c48<>+24(SB)/8, $0x09080f0e0d0c0b0a
-GLOBL ·AVX2_c48<>(SB), RODATA|NOPTR, $32
-
-DATA ·AVX2_iv0<>+0(SB)/8, $0x6a09e667f3bcc908
-DATA ·AVX2_iv0<>+8(SB)/8, $0xbb67ae8584caa73b
-DATA ·AVX2_iv0<>+16(SB)/8, $0x3c6ef372fe94f82b
-DATA ·AVX2_iv0<>+24(SB)/8, $0xa54ff53a5f1d36f1
-GLOBL ·AVX2_iv0<>(SB), RODATA|NOPTR, $32
-
-DATA ·AVX2_iv1<>+0(SB)/8, $0x510e527fade682d1
-DATA ·AVX2_iv1<>+8(SB)/8, $0x9b05688c2b3e6c1f
-DATA ·AVX2_iv1<>+16(SB)/8, $0x1f83d9abfb41bd6b
-DATA ·AVX2_iv1<>+24(SB)/8, $0x5be0cd19137e2179
-GLOBL ·AVX2_iv1<>(SB), RODATA|NOPTR, $32
-
-// func hashBlocksAVX(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
-// Requires: AVX, SSE2
-TEXT ·hashBlocksAVX(SB), NOSPLIT, $288-48
- MOVQ h+0(FP), AX
- MOVQ c+8(FP), BX
- MOVQ flag+16(FP), CX
- MOVQ blocks_base+24(FP), SI
- MOVQ blocks_len+32(FP), DI
- MOVQ SP, R10
- ADDQ $0x0f, R10
- ANDQ $-16, R10
- VMOVDQU ·AVX_c40<>+0(SB), X0
- VMOVDQU ·AVX_c48<>+0(SB), X1
- VMOVDQA X0, X8
- VMOVDQA X1, X9
- VMOVDQU ·AVX_iv3<>+0(SB), X0
- VMOVDQA X0, (R10)
- XORQ CX, (R10)
- VMOVDQU (AX), X10
- VMOVDQU 16(AX), X11
- VMOVDQU 32(AX), X2
- VMOVDQU 48(AX), X3
- MOVQ (BX), R8
- MOVQ 8(BX), R9
-
-loop:
- ADDQ $0x80, R8
- CMPQ R8, $0x80
- JGE noinc
- INCQ R9
-
-noinc:
- BYTE $0xc4
- BYTE $0x41
- BYTE $0xf9
- BYTE $0x6e
- BYTE $0xf8
- BYTE $0xc4
- BYTE $0x43
- BYTE $0x81
- BYTE $0x22
- BYTE $0xf9
- BYTE $0x01
- VMOVDQA X10, X0
- VMOVDQA X11, X1
- VMOVDQU ·AVX_iv0<>+0(SB), X4
- VMOVDQU ·AVX_iv1<>+0(SB), X5
- VMOVDQU ·AVX_iv2<>+0(SB), X6
- VPXOR X15, X6, X6
- VMOVDQA (R10), X7
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x26
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x20
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x08
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x28
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x10
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x30
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x18
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x38
- BYTE $0x01
- VMOVDQA X12, 16(R10)
- VMOVDQA X13, 32(R10)
- VMOVDQA X14, 48(R10)
- VMOVDQA X15, 64(R10)
- VPADDQ X12, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X13, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ X14, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X15, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X6, X13
- VMOVDQA X2, X14
- VMOVDQA X4, X6
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x11
- BYTE $0x6c
- BYTE $0xfd
- VMOVDQA X5, X4
- VMOVDQA X6, X5
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xff
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x69
- BYTE $0x6d
- BYTE $0xd7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xdf
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x66
- BYTE $0x40
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x60
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x48
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x68
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x50
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x70
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x58
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x78
- BYTE $0x01
- VMOVDQA X12, 80(R10)
- VMOVDQA X13, 96(R10)
- VMOVDQA X14, 112(R10)
- VMOVDQA X15, 128(R10)
- VPADDQ X12, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X13, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ X14, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X15, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X2, X13
- VMOVDQA X4, X14
- BYTE $0xc5
- BYTE $0x69
- BYTE $0x6c
- BYTE $0xfa
- VMOVDQA X5, X4
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xd7
- VMOVDQA X14, X5
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- VMOVDQA X6, X14
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xdf
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x49
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xff
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x66
- BYTE $0x70
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x48
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x50
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x78
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x20
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x68
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x40
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x30
- BYTE $0x01
- VMOVDQA X12, 144(R10)
- VMOVDQA X13, 160(R10)
- VMOVDQA X14, 176(R10)
- VMOVDQA X15, 192(R10)
- VPADDQ X12, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X13, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ X14, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X15, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X6, X13
- VMOVDQA X2, X14
- VMOVDQA X4, X6
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x11
- BYTE $0x6c
- BYTE $0xfd
- VMOVDQA X5, X4
- VMOVDQA X6, X5
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xff
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x69
- BYTE $0x6d
- BYTE $0xd7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xdf
- VPSHUFD $0x4e, (SI), X12
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x58
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x60
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x38
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x28
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x10
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x18
- BYTE $0x01
- VMOVDQA X12, 208(R10)
- VMOVDQA X13, 224(R10)
- VMOVDQA X14, 240(R10)
- VMOVDQA X15, 256(R10)
- VPADDQ X12, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X13, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ X14, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X15, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X2, X13
- VMOVDQA X4, X14
- BYTE $0xc5
- BYTE $0x69
- BYTE $0x6c
- BYTE $0xfa
- VMOVDQA X5, X4
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xd7
- VMOVDQA X14, X5
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- VMOVDQA X6, X14
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xdf
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x49
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xff
- VMOVDQU 88(SI), X12
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x28
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x40
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x10
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x78
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x36
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x68
- BYTE $0x01
- VPADDQ X12, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X13, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ X14, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X15, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X6, X13
- VMOVDQA X2, X14
- VMOVDQA X4, X6
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x11
- BYTE $0x6c
- BYTE $0xfd
- VMOVDQA X5, X4
- VMOVDQA X6, X5
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xff
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x69
- BYTE $0x6d
- BYTE $0xd7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xdf
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x66
- BYTE $0x50
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x38
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x70
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x08
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x18
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x48
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x30
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x20
- BYTE $0x01
- VPADDQ X12, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X13, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ X14, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X15, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X2, X13
- VMOVDQA X4, X14
- BYTE $0xc5
- BYTE $0x69
- BYTE $0x6c
- BYTE $0xfa
- VMOVDQA X5, X4
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xd7
- VMOVDQA X14, X5
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- VMOVDQA X6, X14
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xdf
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x49
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xff
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x66
- BYTE $0x38
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x68
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x48
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x60
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x18
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x58
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x08
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x70
- BYTE $0x01
- VPADDQ X12, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X13, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ X14, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X15, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X6, X13
- VMOVDQA X2, X14
- VMOVDQA X4, X6
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x11
- BYTE $0x6c
- BYTE $0xfd
- VMOVDQA X5, X4
- VMOVDQA X6, X5
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xff
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x69
- BYTE $0x6d
- BYTE $0xd7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xdf
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x66
- BYTE $0x10
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x20
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x30
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x3e
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x28
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x78
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x50
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x40
- BYTE $0x01
- VPADDQ X12, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X13, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ X14, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X15, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X2, X13
- VMOVDQA X4, X14
- BYTE $0xc5
- BYTE $0x69
- BYTE $0x6c
- BYTE $0xfa
- VMOVDQA X5, X4
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xd7
- VMOVDQA X14, X5
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- VMOVDQA X6, X14
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xdf
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x49
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xff
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x66
- BYTE $0x48
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x10
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x36
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x20
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x28
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x50
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x38
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x78
- BYTE $0x01
- VPADDQ X12, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X13, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ X14, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X15, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X6, X13
- VMOVDQA X2, X14
- VMOVDQA X4, X6
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x11
- BYTE $0x6c
- BYTE $0xfd
- VMOVDQA X5, X4
- VMOVDQA X6, X5
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xff
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x69
- BYTE $0x6d
- BYTE $0xd7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xdf
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x66
- BYTE $0x70
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x30
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x08
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x40
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x58
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x18
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x60
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x68
- BYTE $0x01
- VPADDQ X12, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X13, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ X14, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X15, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X2, X13
- VMOVDQA X4, X14
- BYTE $0xc5
- BYTE $0x69
- BYTE $0x6c
- BYTE $0xfa
- VMOVDQA X5, X4
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xd7
- VMOVDQA X14, X5
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- VMOVDQA X6, X14
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xdf
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x49
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xff
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x66
- BYTE $0x10
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x2e
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x60
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x58
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x30
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x40
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x50
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x18
- BYTE $0x01
- VPADDQ X12, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X13, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ X14, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X15, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X6, X13
- VMOVDQA X2, X14
- VMOVDQA X4, X6
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x11
- BYTE $0x6c
- BYTE $0xfd
- VMOVDQA X5, X4
- VMOVDQA X6, X5
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xff
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x69
- BYTE $0x6d
- BYTE $0xd7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xdf
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x66
- BYTE $0x20
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x78
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x68
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x70
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x38
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x08
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x28
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x48
- BYTE $0x01
- VPADDQ X12, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X13, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ X14, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X15, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X2, X13
- VMOVDQA X4, X14
- BYTE $0xc5
- BYTE $0x69
- BYTE $0x6c
- BYTE $0xfa
- VMOVDQA X5, X4
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xd7
- VMOVDQA X14, X5
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- VMOVDQA X6, X14
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xdf
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x49
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xff
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x66
- BYTE $0x60
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x70
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x28
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x68
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x08
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x20
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x78
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x50
- BYTE $0x01
- VPADDQ X12, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X13, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ X14, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X15, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X6, X13
- VMOVDQA X2, X14
- VMOVDQA X4, X6
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x11
- BYTE $0x6c
- BYTE $0xfd
- VMOVDQA X5, X4
- VMOVDQA X6, X5
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xff
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x69
- BYTE $0x6d
- BYTE $0xd7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xdf
- MOVQ (SI), X12
- VPSHUFD $0x4e, 64(SI), X13
- MOVQ 56(SI), X14
- MOVQ 16(SI), X15
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x30
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x18
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x58
- BYTE $0x01
- VPADDQ X12, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X13, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ X14, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X15, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X2, X13
- VMOVDQA X4, X14
- BYTE $0xc5
- BYTE $0x69
- BYTE $0x6c
- BYTE $0xfa
- VMOVDQA X5, X4
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xd7
- VMOVDQA X14, X5
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- VMOVDQA X6, X14
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xdf
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x49
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xff
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x66
- BYTE $0x68
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x60
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x58
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x08
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x38
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x18
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x70
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x48
- BYTE $0x01
- VPADDQ X12, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X13, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ X14, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X15, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X6, X13
- VMOVDQA X2, X14
- VMOVDQA X4, X6
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x11
- BYTE $0x6c
- BYTE $0xfd
- VMOVDQA X5, X4
- VMOVDQA X6, X5
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xff
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x69
- BYTE $0x6d
- BYTE $0xd7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xdf
- MOVQ 40(SI), X12
- MOVQ 64(SI), X13
- MOVQ (SI), X14
- MOVQ 48(SI), X15
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x78
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x10
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x20
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x50
- BYTE $0x01
- VPADDQ X12, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X13, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ X14, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X15, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X2, X13
- VMOVDQA X4, X14
- BYTE $0xc5
- BYTE $0x69
- BYTE $0x6c
- BYTE $0xfa
- VMOVDQA X5, X4
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xd7
- VMOVDQA X14, X5
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- VMOVDQA X6, X14
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xdf
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x49
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xff
- MOVQ 48(SI), X12
- MOVQ 88(SI), X13
- MOVQ 120(SI), X14
- MOVQ 24(SI), X15
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x70
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x2e
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x48
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x40
- BYTE $0x01
- VPADDQ X12, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X13, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ X14, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X15, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X6, X13
- VMOVDQA X2, X14
- VMOVDQA X4, X6
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x11
- BYTE $0x6c
- BYTE $0xfd
- VMOVDQA X5, X4
- VMOVDQA X6, X5
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xff
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x69
- BYTE $0x6d
- BYTE $0xd7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xdf
- VMOVDQU 96(SI), X12
- MOVQ 8(SI), X13
- MOVQ 16(SI), X14
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x50
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x38
- BYTE $0x01
- VMOVDQU 32(SI), X15
- VPADDQ X12, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X13, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ X14, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X15, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X2, X13
- VMOVDQA X4, X14
- BYTE $0xc5
- BYTE $0x69
- BYTE $0x6c
- BYTE $0xfa
- VMOVDQA X5, X4
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xd7
- VMOVDQA X14, X5
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- VMOVDQA X6, X14
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xdf
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x49
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xff
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x66
- BYTE $0x50
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x6e
- BYTE $0x38
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x76
- BYTE $0x10
- BYTE $0xc5
- BYTE $0x7a
- BYTE $0x7e
- BYTE $0x7e
- BYTE $0x30
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x40
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x08
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x20
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x7e
- BYTE $0x28
- BYTE $0x01
- VPADDQ X12, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X13, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ X14, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X15, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X6, X13
- VMOVDQA X2, X14
- VMOVDQA X4, X6
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x11
- BYTE $0x6c
- BYTE $0xfd
- VMOVDQA X5, X4
- VMOVDQA X6, X5
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xff
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x69
- BYTE $0x6d
- BYTE $0xd7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xdf
- MOVQ 120(SI), X12
- MOVQ 24(SI), X13
- MOVQ 88(SI), X14
- MOVQ 96(SI), X15
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x99
- BYTE $0x22
- BYTE $0x66
- BYTE $0x48
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x91
- BYTE $0x22
- BYTE $0x6e
- BYTE $0x68
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x89
- BYTE $0x22
- BYTE $0x76
- BYTE $0x70
- BYTE $0x01
- BYTE $0xc4
- BYTE $0x63
- BYTE $0x81
- BYTE $0x22
- BYTE $0x3e
- BYTE $0x01
- VPADDQ X12, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X13, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ X14, X0, X0
- VPADDQ X2, X0, X0
- VPADDQ X15, X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X2, X13
- VMOVDQA X4, X14
- BYTE $0xc5
- BYTE $0x69
- BYTE $0x6c
- BYTE $0xfa
- VMOVDQA X5, X4
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xd7
- VMOVDQA X14, X5
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- VMOVDQA X6, X14
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xdf
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x49
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xff
- VPADDQ 16(R10), X0, X0
- VPADDQ X2, X0, X0
- VPADDQ 32(R10), X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ 48(R10), X0, X0
- VPADDQ X2, X0, X0
- VPADDQ 64(R10), X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X6, X13
- VMOVDQA X2, X14
- VMOVDQA X4, X6
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x11
- BYTE $0x6c
- BYTE $0xfd
- VMOVDQA X5, X4
- VMOVDQA X6, X5
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xff
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x69
- BYTE $0x6d
- BYTE $0xd7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xdf
- VPADDQ 80(R10), X0, X0
- VPADDQ X2, X0, X0
- VPADDQ 96(R10), X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ 112(R10), X0, X0
- VPADDQ X2, X0, X0
- VPADDQ 128(R10), X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X2, X13
- VMOVDQA X4, X14
- BYTE $0xc5
- BYTE $0x69
- BYTE $0x6c
- BYTE $0xfa
- VMOVDQA X5, X4
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xd7
- VMOVDQA X14, X5
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- VMOVDQA X6, X14
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xdf
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x49
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xff
- VPADDQ 144(R10), X0, X0
- VPADDQ X2, X0, X0
- VPADDQ 160(R10), X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ 176(R10), X0, X0
- VPADDQ X2, X0, X0
- VPADDQ 192(R10), X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X6, X13
- VMOVDQA X2, X14
- VMOVDQA X4, X6
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x11
- BYTE $0x6c
- BYTE $0xfd
- VMOVDQA X5, X4
- VMOVDQA X6, X5
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xff
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x69
- BYTE $0x6d
- BYTE $0xd7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xdf
- VPADDQ 208(R10), X0, X0
- VPADDQ X2, X0, X0
- VPADDQ 224(R10), X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFD $-79, X6, X6
- VPSHUFD $-79, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPSHUFB X8, X2, X2
- VPSHUFB X8, X3, X3
- VPADDQ 240(R10), X0, X0
- VPADDQ X2, X0, X0
- VPADDQ 256(R10), X1, X1
- VPADDQ X3, X1, X1
- VPXOR X0, X6, X6
- VPXOR X1, X7, X7
- VPSHUFB X9, X6, X6
- VPSHUFB X9, X7, X7
- VPADDQ X6, X4, X4
- VPADDQ X7, X5, X5
- VPXOR X4, X2, X2
- VPXOR X5, X3, X3
- VPADDQ X2, X2, X15
- VPSRLQ $0x3f, X2, X2
- VPXOR X15, X2, X2
- VPADDQ X3, X3, X15
- VPSRLQ $0x3f, X3, X3
- VPXOR X15, X3, X3
- VMOVDQA X2, X13
- VMOVDQA X4, X14
- BYTE $0xc5
- BYTE $0x69
- BYTE $0x6c
- BYTE $0xfa
- VMOVDQA X5, X4
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x61
- BYTE $0x6d
- BYTE $0xd7
- VMOVDQA X14, X5
- BYTE $0xc5
- BYTE $0x61
- BYTE $0x6c
- BYTE $0xfb
- VMOVDQA X6, X14
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x11
- BYTE $0x6d
- BYTE $0xdf
- BYTE $0xc5
- BYTE $0x41
- BYTE $0x6c
- BYTE $0xff
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x49
- BYTE $0x6d
- BYTE $0xf7
- BYTE $0xc4
- BYTE $0x41
- BYTE $0x09
- BYTE $0x6c
- BYTE $0xfe
- BYTE $0xc4
- BYTE $0xc1
- BYTE $0x41
- BYTE $0x6d
- BYTE $0xff
- VMOVDQU 32(AX), X14
- VMOVDQU 48(AX), X15
- VPXOR X0, X10, X10
- VPXOR X1, X11, X11
- VPXOR X2, X14, X14
- VPXOR X3, X15, X15
- VPXOR X4, X10, X10
- VPXOR X5, X11, X11
- VPXOR X6, X14, X2
- VPXOR X7, X15, X3
- VMOVDQU X2, 32(AX)
- VMOVDQU X3, 48(AX)
- LEAQ 128(SI), SI
- SUBQ $0x80, DI
- JNE loop
- VMOVDQU X10, (AX)
- VMOVDQU X11, 16(AX)
- MOVQ R8, (BX)
- MOVQ R9, 8(BX)
- VZEROUPPER
- RET
-
-DATA ·AVX_c40<>+0(SB)/8, $0x0201000706050403
-DATA ·AVX_c40<>+8(SB)/8, $0x0a09080f0e0d0c0b
-GLOBL ·AVX_c40<>(SB), RODATA|NOPTR, $16
-
-DATA ·AVX_c48<>+0(SB)/8, $0x0100070605040302
-DATA ·AVX_c48<>+8(SB)/8, $0x09080f0e0d0c0b0a
-GLOBL ·AVX_c48<>(SB), RODATA|NOPTR, $16
-
-DATA ·AVX_iv3<>+0(SB)/8, $0x1f83d9abfb41bd6b
-DATA ·AVX_iv3<>+8(SB)/8, $0x5be0cd19137e2179
-GLOBL ·AVX_iv3<>(SB), RODATA|NOPTR, $16
-
-DATA ·AVX_iv0<>+0(SB)/8, $0x6a09e667f3bcc908
-DATA ·AVX_iv0<>+8(SB)/8, $0xbb67ae8584caa73b
-GLOBL ·AVX_iv0<>(SB), RODATA|NOPTR, $16
-
-DATA ·AVX_iv1<>+0(SB)/8, $0x3c6ef372fe94f82b
-DATA ·AVX_iv1<>+8(SB)/8, $0xa54ff53a5f1d36f1
-GLOBL ·AVX_iv1<>(SB), RODATA|NOPTR, $16
-
-DATA ·AVX_iv2<>+0(SB)/8, $0x510e527fade682d1
-DATA ·AVX_iv2<>+8(SB)/8, $0x9b05688c2b3e6c1f
-GLOBL ·AVX_iv2<>(SB), RODATA|NOPTR, $16
diff --git a/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.s b/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.s
deleted file mode 100644
index 9a0ce2124462..000000000000
--- a/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.s
+++ /dev/null
@@ -1,1441 +0,0 @@
-// Code generated by command: go run blake2b_amd64_asm.go -out ../../blake2b_amd64.s -pkg blake2b. DO NOT EDIT.
-
-//go:build amd64 && gc && !purego
-
-#include "textflag.h"
-
-// func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
-// Requires: SSE2, SSE4.1, SSSE3
-TEXT ·hashBlocksSSE4(SB), NOSPLIT, $288-48
- MOVQ h+0(FP), AX
- MOVQ c+8(FP), BX
- MOVQ flag+16(FP), CX
- MOVQ blocks_base+24(FP), SI
- MOVQ blocks_len+32(FP), DI
- MOVQ SP, R10
- ADDQ $0x0f, R10
- ANDQ $-16, R10
- MOVOU ·iv3<>+0(SB), X0
- MOVO X0, (R10)
- XORQ CX, (R10)
- MOVOU ·c40<>+0(SB), X13
- MOVOU ·c48<>+0(SB), X14
- MOVOU (AX), X12
- MOVOU 16(AX), X15
- MOVQ (BX), R8
- MOVQ 8(BX), R9
-
-loop:
- ADDQ $0x80, R8
- CMPQ R8, $0x80
- JGE noinc
- INCQ R9
-
-noinc:
- MOVQ R8, X8
- PINSRQ $0x01, R9, X8
- MOVO X12, X0
- MOVO X15, X1
- MOVOU 32(AX), X2
- MOVOU 48(AX), X3
- MOVOU ·iv0<>+0(SB), X4
- MOVOU ·iv1<>+0(SB), X5
- MOVOU ·iv2<>+0(SB), X6
- PXOR X8, X6
- MOVO (R10), X7
- MOVQ (SI), X8
- PINSRQ $0x01, 16(SI), X8
- MOVQ 32(SI), X9
- PINSRQ $0x01, 48(SI), X9
- MOVQ 8(SI), X10
- PINSRQ $0x01, 24(SI), X10
- MOVQ 40(SI), X11
- PINSRQ $0x01, 56(SI), X11
- MOVO X8, 16(R10)
- MOVO X9, 32(R10)
- MOVO X10, 48(R10)
- MOVO X11, 64(R10)
- PADDQ X8, X0
- PADDQ X9, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ X10, X0
- PADDQ X11, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X6, X8
- PUNPCKLQDQ X6, X9
- PUNPCKHQDQ X7, X6
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X7, X9
- MOVO X8, X7
- MOVO X2, X8
- PUNPCKHQDQ X9, X7
- PUNPCKLQDQ X3, X9
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X3
- MOVQ 64(SI), X8
- PINSRQ $0x01, 80(SI), X8
- MOVQ 96(SI), X9
- PINSRQ $0x01, 112(SI), X9
- MOVQ 72(SI), X10
- PINSRQ $0x01, 88(SI), X10
- MOVQ 104(SI), X11
- PINSRQ $0x01, 120(SI), X11
- MOVO X8, 80(R10)
- MOVO X9, 96(R10)
- MOVO X10, 112(R10)
- MOVO X11, 128(R10)
- PADDQ X8, X0
- PADDQ X9, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ X10, X0
- PADDQ X11, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X2, X8
- PUNPCKLQDQ X2, X9
- PUNPCKHQDQ X3, X2
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X3, X9
- MOVO X8, X3
- MOVO X6, X8
- PUNPCKHQDQ X9, X3
- PUNPCKLQDQ X7, X9
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X7
- MOVQ 112(SI), X8
- PINSRQ $0x01, 32(SI), X8
- MOVQ 72(SI), X9
- PINSRQ $0x01, 104(SI), X9
- MOVQ 80(SI), X10
- PINSRQ $0x01, 64(SI), X10
- MOVQ 120(SI), X11
- PINSRQ $0x01, 48(SI), X11
- MOVO X8, 144(R10)
- MOVO X9, 160(R10)
- MOVO X10, 176(R10)
- MOVO X11, 192(R10)
- PADDQ X8, X0
- PADDQ X9, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ X10, X0
- PADDQ X11, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X6, X8
- PUNPCKLQDQ X6, X9
- PUNPCKHQDQ X7, X6
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X7, X9
- MOVO X8, X7
- MOVO X2, X8
- PUNPCKHQDQ X9, X7
- PUNPCKLQDQ X3, X9
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X3
- MOVQ 8(SI), X8
- PINSRQ $0x01, (SI), X8
- MOVQ 88(SI), X9
- PINSRQ $0x01, 40(SI), X9
- MOVQ 96(SI), X10
- PINSRQ $0x01, 16(SI), X10
- MOVQ 56(SI), X11
- PINSRQ $0x01, 24(SI), X11
- MOVO X8, 208(R10)
- MOVO X9, 224(R10)
- MOVO X10, 240(R10)
- MOVO X11, 256(R10)
- PADDQ X8, X0
- PADDQ X9, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ X10, X0
- PADDQ X11, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X2, X8
- PUNPCKLQDQ X2, X9
- PUNPCKHQDQ X3, X2
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X3, X9
- MOVO X8, X3
- MOVO X6, X8
- PUNPCKHQDQ X9, X3
- PUNPCKLQDQ X7, X9
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X7
- MOVQ 88(SI), X8
- PINSRQ $0x01, 96(SI), X8
- MOVQ 40(SI), X9
- PINSRQ $0x01, 120(SI), X9
- MOVQ 64(SI), X10
- PINSRQ $0x01, (SI), X10
- MOVQ 16(SI), X11
- PINSRQ $0x01, 104(SI), X11
- PADDQ X8, X0
- PADDQ X9, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ X10, X0
- PADDQ X11, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X6, X8
- PUNPCKLQDQ X6, X9
- PUNPCKHQDQ X7, X6
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X7, X9
- MOVO X8, X7
- MOVO X2, X8
- PUNPCKHQDQ X9, X7
- PUNPCKLQDQ X3, X9
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X3
- MOVQ 80(SI), X8
- PINSRQ $0x01, 24(SI), X8
- MOVQ 56(SI), X9
- PINSRQ $0x01, 72(SI), X9
- MOVQ 112(SI), X10
- PINSRQ $0x01, 48(SI), X10
- MOVQ 8(SI), X11
- PINSRQ $0x01, 32(SI), X11
- PADDQ X8, X0
- PADDQ X9, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ X10, X0
- PADDQ X11, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X2, X8
- PUNPCKLQDQ X2, X9
- PUNPCKHQDQ X3, X2
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X3, X9
- MOVO X8, X3
- MOVO X6, X8
- PUNPCKHQDQ X9, X3
- PUNPCKLQDQ X7, X9
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X7
- MOVQ 56(SI), X8
- PINSRQ $0x01, 24(SI), X8
- MOVQ 104(SI), X9
- PINSRQ $0x01, 88(SI), X9
- MOVQ 72(SI), X10
- PINSRQ $0x01, 8(SI), X10
- MOVQ 96(SI), X11
- PINSRQ $0x01, 112(SI), X11
- PADDQ X8, X0
- PADDQ X9, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ X10, X0
- PADDQ X11, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X6, X8
- PUNPCKLQDQ X6, X9
- PUNPCKHQDQ X7, X6
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X7, X9
- MOVO X8, X7
- MOVO X2, X8
- PUNPCKHQDQ X9, X7
- PUNPCKLQDQ X3, X9
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X3
- MOVQ 16(SI), X8
- PINSRQ $0x01, 40(SI), X8
- MOVQ 32(SI), X9
- PINSRQ $0x01, 120(SI), X9
- MOVQ 48(SI), X10
- PINSRQ $0x01, 80(SI), X10
- MOVQ (SI), X11
- PINSRQ $0x01, 64(SI), X11
- PADDQ X8, X0
- PADDQ X9, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ X10, X0
- PADDQ X11, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X2, X8
- PUNPCKLQDQ X2, X9
- PUNPCKHQDQ X3, X2
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X3, X9
- MOVO X8, X3
- MOVO X6, X8
- PUNPCKHQDQ X9, X3
- PUNPCKLQDQ X7, X9
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X7
- MOVQ 72(SI), X8
- PINSRQ $0x01, 40(SI), X8
- MOVQ 16(SI), X9
- PINSRQ $0x01, 80(SI), X9
- MOVQ (SI), X10
- PINSRQ $0x01, 56(SI), X10
- MOVQ 32(SI), X11
- PINSRQ $0x01, 120(SI), X11
- PADDQ X8, X0
- PADDQ X9, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ X10, X0
- PADDQ X11, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X6, X8
- PUNPCKLQDQ X6, X9
- PUNPCKHQDQ X7, X6
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X7, X9
- MOVO X8, X7
- MOVO X2, X8
- PUNPCKHQDQ X9, X7
- PUNPCKLQDQ X3, X9
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X3
- MOVQ 112(SI), X8
- PINSRQ $0x01, 88(SI), X8
- MOVQ 48(SI), X9
- PINSRQ $0x01, 24(SI), X9
- MOVQ 8(SI), X10
- PINSRQ $0x01, 96(SI), X10
- MOVQ 64(SI), X11
- PINSRQ $0x01, 104(SI), X11
- PADDQ X8, X0
- PADDQ X9, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ X10, X0
- PADDQ X11, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X2, X8
- PUNPCKLQDQ X2, X9
- PUNPCKHQDQ X3, X2
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X3, X9
- MOVO X8, X3
- MOVO X6, X8
- PUNPCKHQDQ X9, X3
- PUNPCKLQDQ X7, X9
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X7
- MOVQ 16(SI), X8
- PINSRQ $0x01, 48(SI), X8
- MOVQ (SI), X9
- PINSRQ $0x01, 64(SI), X9
- MOVQ 96(SI), X10
- PINSRQ $0x01, 80(SI), X10
- MOVQ 88(SI), X11
- PINSRQ $0x01, 24(SI), X11
- PADDQ X8, X0
- PADDQ X9, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ X10, X0
- PADDQ X11, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X6, X8
- PUNPCKLQDQ X6, X9
- PUNPCKHQDQ X7, X6
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X7, X9
- MOVO X8, X7
- MOVO X2, X8
- PUNPCKHQDQ X9, X7
- PUNPCKLQDQ X3, X9
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X3
- MOVQ 32(SI), X8
- PINSRQ $0x01, 56(SI), X8
- MOVQ 120(SI), X9
- PINSRQ $0x01, 8(SI), X9
- MOVQ 104(SI), X10
- PINSRQ $0x01, 40(SI), X10
- MOVQ 112(SI), X11
- PINSRQ $0x01, 72(SI), X11
- PADDQ X8, X0
- PADDQ X9, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ X10, X0
- PADDQ X11, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X2, X8
- PUNPCKLQDQ X2, X9
- PUNPCKHQDQ X3, X2
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X3, X9
- MOVO X8, X3
- MOVO X6, X8
- PUNPCKHQDQ X9, X3
- PUNPCKLQDQ X7, X9
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X7
- MOVQ 96(SI), X8
- PINSRQ $0x01, 8(SI), X8
- MOVQ 112(SI), X9
- PINSRQ $0x01, 32(SI), X9
- MOVQ 40(SI), X10
- PINSRQ $0x01, 120(SI), X10
- MOVQ 104(SI), X11
- PINSRQ $0x01, 80(SI), X11
- PADDQ X8, X0
- PADDQ X9, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ X10, X0
- PADDQ X11, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X6, X8
- PUNPCKLQDQ X6, X9
- PUNPCKHQDQ X7, X6
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X7, X9
- MOVO X8, X7
- MOVO X2, X8
- PUNPCKHQDQ X9, X7
- PUNPCKLQDQ X3, X9
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X3
- MOVQ (SI), X8
- PINSRQ $0x01, 48(SI), X8
- MOVQ 72(SI), X9
- PINSRQ $0x01, 64(SI), X9
- MOVQ 56(SI), X10
- PINSRQ $0x01, 24(SI), X10
- MOVQ 16(SI), X11
- PINSRQ $0x01, 88(SI), X11
- PADDQ X8, X0
- PADDQ X9, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ X10, X0
- PADDQ X11, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X2, X8
- PUNPCKLQDQ X2, X9
- PUNPCKHQDQ X3, X2
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X3, X9
- MOVO X8, X3
- MOVO X6, X8
- PUNPCKHQDQ X9, X3
- PUNPCKLQDQ X7, X9
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X7
- MOVQ 104(SI), X8
- PINSRQ $0x01, 56(SI), X8
- MOVQ 96(SI), X9
- PINSRQ $0x01, 24(SI), X9
- MOVQ 88(SI), X10
- PINSRQ $0x01, 112(SI), X10
- MOVQ 8(SI), X11
- PINSRQ $0x01, 72(SI), X11
- PADDQ X8, X0
- PADDQ X9, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ X10, X0
- PADDQ X11, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X6, X8
- PUNPCKLQDQ X6, X9
- PUNPCKHQDQ X7, X6
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X7, X9
- MOVO X8, X7
- MOVO X2, X8
- PUNPCKHQDQ X9, X7
- PUNPCKLQDQ X3, X9
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X3
- MOVQ 40(SI), X8
- PINSRQ $0x01, 120(SI), X8
- MOVQ 64(SI), X9
- PINSRQ $0x01, 16(SI), X9
- MOVQ (SI), X10
- PINSRQ $0x01, 32(SI), X10
- MOVQ 48(SI), X11
- PINSRQ $0x01, 80(SI), X11
- PADDQ X8, X0
- PADDQ X9, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ X10, X0
- PADDQ X11, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X2, X8
- PUNPCKLQDQ X2, X9
- PUNPCKHQDQ X3, X2
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X3, X9
- MOVO X8, X3
- MOVO X6, X8
- PUNPCKHQDQ X9, X3
- PUNPCKLQDQ X7, X9
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X7
- MOVQ 48(SI), X8
- PINSRQ $0x01, 112(SI), X8
- MOVQ 88(SI), X9
- PINSRQ $0x01, (SI), X9
- MOVQ 120(SI), X10
- PINSRQ $0x01, 72(SI), X10
- MOVQ 24(SI), X11
- PINSRQ $0x01, 64(SI), X11
- PADDQ X8, X0
- PADDQ X9, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ X10, X0
- PADDQ X11, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X6, X8
- PUNPCKLQDQ X6, X9
- PUNPCKHQDQ X7, X6
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X7, X9
- MOVO X8, X7
- MOVO X2, X8
- PUNPCKHQDQ X9, X7
- PUNPCKLQDQ X3, X9
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X3
- MOVQ 96(SI), X8
- PINSRQ $0x01, 104(SI), X8
- MOVQ 8(SI), X9
- PINSRQ $0x01, 80(SI), X9
- MOVQ 16(SI), X10
- PINSRQ $0x01, 56(SI), X10
- MOVQ 32(SI), X11
- PINSRQ $0x01, 40(SI), X11
- PADDQ X8, X0
- PADDQ X9, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ X10, X0
- PADDQ X11, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X2, X8
- PUNPCKLQDQ X2, X9
- PUNPCKHQDQ X3, X2
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X3, X9
- MOVO X8, X3
- MOVO X6, X8
- PUNPCKHQDQ X9, X3
- PUNPCKLQDQ X7, X9
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X7
- MOVQ 80(SI), X8
- PINSRQ $0x01, 64(SI), X8
- MOVQ 56(SI), X9
- PINSRQ $0x01, 8(SI), X9
- MOVQ 16(SI), X10
- PINSRQ $0x01, 32(SI), X10
- MOVQ 48(SI), X11
- PINSRQ $0x01, 40(SI), X11
- PADDQ X8, X0
- PADDQ X9, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ X10, X0
- PADDQ X11, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X6, X8
- PUNPCKLQDQ X6, X9
- PUNPCKHQDQ X7, X6
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X7, X9
- MOVO X8, X7
- MOVO X2, X8
- PUNPCKHQDQ X9, X7
- PUNPCKLQDQ X3, X9
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X3
- MOVQ 120(SI), X8
- PINSRQ $0x01, 72(SI), X8
- MOVQ 24(SI), X9
- PINSRQ $0x01, 104(SI), X9
- MOVQ 88(SI), X10
- PINSRQ $0x01, 112(SI), X10
- MOVQ 96(SI), X11
- PINSRQ $0x01, (SI), X11
- PADDQ X8, X0
- PADDQ X9, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ X10, X0
- PADDQ X11, X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X2, X8
- PUNPCKLQDQ X2, X9
- PUNPCKHQDQ X3, X2
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X3, X9
- MOVO X8, X3
- MOVO X6, X8
- PUNPCKHQDQ X9, X3
- PUNPCKLQDQ X7, X9
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X7
- PADDQ 16(R10), X0
- PADDQ 32(R10), X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ 48(R10), X0
- PADDQ 64(R10), X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X6, X8
- PUNPCKLQDQ X6, X9
- PUNPCKHQDQ X7, X6
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X7, X9
- MOVO X8, X7
- MOVO X2, X8
- PUNPCKHQDQ X9, X7
- PUNPCKLQDQ X3, X9
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X3
- PADDQ 80(R10), X0
- PADDQ 96(R10), X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ 112(R10), X0
- PADDQ 128(R10), X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X2, X8
- PUNPCKLQDQ X2, X9
- PUNPCKHQDQ X3, X2
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X3, X9
- MOVO X8, X3
- MOVO X6, X8
- PUNPCKHQDQ X9, X3
- PUNPCKLQDQ X7, X9
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X7
- PADDQ 144(R10), X0
- PADDQ 160(R10), X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ 176(R10), X0
- PADDQ 192(R10), X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X6, X8
- PUNPCKLQDQ X6, X9
- PUNPCKHQDQ X7, X6
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X7, X9
- MOVO X8, X7
- MOVO X2, X8
- PUNPCKHQDQ X9, X7
- PUNPCKLQDQ X3, X9
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X3
- PADDQ 208(R10), X0
- PADDQ 224(R10), X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFD $0xb1, X6, X6
- PSHUFD $0xb1, X7, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- PSHUFB X13, X2
- PSHUFB X13, X3
- PADDQ 240(R10), X0
- PADDQ 256(R10), X1
- PADDQ X2, X0
- PADDQ X3, X1
- PXOR X0, X6
- PXOR X1, X7
- PSHUFB X14, X6
- PSHUFB X14, X7
- PADDQ X6, X4
- PADDQ X7, X5
- PXOR X4, X2
- PXOR X5, X3
- MOVOU X2, X11
- PADDQ X2, X11
- PSRLQ $0x3f, X2
- PXOR X11, X2
- MOVOU X3, X11
- PADDQ X3, X11
- PSRLQ $0x3f, X3
- PXOR X11, X3
- MOVO X4, X8
- MOVO X5, X4
- MOVO X8, X5
- MOVO X2, X8
- PUNPCKLQDQ X2, X9
- PUNPCKHQDQ X3, X2
- PUNPCKHQDQ X9, X2
- PUNPCKLQDQ X3, X9
- MOVO X8, X3
- MOVO X6, X8
- PUNPCKHQDQ X9, X3
- PUNPCKLQDQ X7, X9
- PUNPCKHQDQ X9, X6
- PUNPCKLQDQ X8, X9
- PUNPCKHQDQ X9, X7
- MOVOU 32(AX), X10
- MOVOU 48(AX), X11
- PXOR X0, X12
- PXOR X1, X15
- PXOR X2, X10
- PXOR X3, X11
- PXOR X4, X12
- PXOR X5, X15
- PXOR X6, X10
- PXOR X7, X11
- MOVOU X10, 32(AX)
- MOVOU X11, 48(AX)
- LEAQ 128(SI), SI
- SUBQ $0x80, DI
- JNE loop
- MOVOU X12, (AX)
- MOVOU X15, 16(AX)
- MOVQ R8, (BX)
- MOVQ R9, 8(BX)
- RET
-
-DATA ·iv3<>+0(SB)/8, $0x1f83d9abfb41bd6b
-DATA ·iv3<>+8(SB)/8, $0x5be0cd19137e2179
-GLOBL ·iv3<>(SB), RODATA|NOPTR, $16
-
-DATA ·c40<>+0(SB)/8, $0x0201000706050403
-DATA ·c40<>+8(SB)/8, $0x0a09080f0e0d0c0b
-GLOBL ·c40<>(SB), RODATA|NOPTR, $16
-
-DATA ·c48<>+0(SB)/8, $0x0100070605040302
-DATA ·c48<>+8(SB)/8, $0x09080f0e0d0c0b0a
-GLOBL ·c48<>(SB), RODATA|NOPTR, $16
-
-DATA ·iv0<>+0(SB)/8, $0x6a09e667f3bcc908
-DATA ·iv0<>+8(SB)/8, $0xbb67ae8584caa73b
-GLOBL ·iv0<>(SB), RODATA|NOPTR, $16
-
-DATA ·iv1<>+0(SB)/8, $0x3c6ef372fe94f82b
-DATA ·iv1<>+8(SB)/8, $0xa54ff53a5f1d36f1
-GLOBL ·iv1<>(SB), RODATA|NOPTR, $16
-
-DATA ·iv2<>+0(SB)/8, $0x510e527fade682d1
-DATA ·iv2<>+8(SB)/8, $0x9b05688c2b3e6c1f
-GLOBL ·iv2<>(SB), RODATA|NOPTR, $16
diff --git a/vendor/golang.org/x/crypto/blake2b/blake2b_generic.go b/vendor/golang.org/x/crypto/blake2b/blake2b_generic.go
deleted file mode 100644
index 3168a8aa3c83..000000000000
--- a/vendor/golang.org/x/crypto/blake2b/blake2b_generic.go
+++ /dev/null
@@ -1,182 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package blake2b
-
-import (
- "encoding/binary"
- "math/bits"
-)
-
-// the precomputed values for BLAKE2b
-// there are 12 16-byte arrays - one for each round
-// the entries are calculated from the sigma constants.
-var precomputed = [12][16]byte{
- {0, 2, 4, 6, 1, 3, 5, 7, 8, 10, 12, 14, 9, 11, 13, 15},
- {14, 4, 9, 13, 10, 8, 15, 6, 1, 0, 11, 5, 12, 2, 7, 3},
- {11, 12, 5, 15, 8, 0, 2, 13, 10, 3, 7, 9, 14, 6, 1, 4},
- {7, 3, 13, 11, 9, 1, 12, 14, 2, 5, 4, 15, 6, 10, 0, 8},
- {9, 5, 2, 10, 0, 7, 4, 15, 14, 11, 6, 3, 1, 12, 8, 13},
- {2, 6, 0, 8, 12, 10, 11, 3, 4, 7, 15, 1, 13, 5, 14, 9},
- {12, 1, 14, 4, 5, 15, 13, 10, 0, 6, 9, 8, 7, 3, 2, 11},
- {13, 7, 12, 3, 11, 14, 1, 9, 5, 15, 8, 2, 0, 4, 6, 10},
- {6, 14, 11, 0, 15, 9, 3, 8, 12, 13, 1, 10, 2, 7, 4, 5},
- {10, 8, 7, 1, 2, 4, 6, 5, 15, 9, 3, 13, 11, 14, 12, 0},
- {0, 2, 4, 6, 1, 3, 5, 7, 8, 10, 12, 14, 9, 11, 13, 15}, // equal to the first
- {14, 4, 9, 13, 10, 8, 15, 6, 1, 0, 11, 5, 12, 2, 7, 3}, // equal to the second
-}
-
-func hashBlocksGeneric(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) {
- var m [16]uint64
- c0, c1 := c[0], c[1]
-
- for i := 0; i < len(blocks); {
- c0 += BlockSize
- if c0 < BlockSize {
- c1++
- }
-
- v0, v1, v2, v3, v4, v5, v6, v7 := h[0], h[1], h[2], h[3], h[4], h[5], h[6], h[7]
- v8, v9, v10, v11, v12, v13, v14, v15 := iv[0], iv[1], iv[2], iv[3], iv[4], iv[5], iv[6], iv[7]
- v12 ^= c0
- v13 ^= c1
- v14 ^= flag
-
- for j := range m {
- m[j] = binary.LittleEndian.Uint64(blocks[i:])
- i += 8
- }
-
- for j := range precomputed {
- s := &(precomputed[j])
-
- v0 += m[s[0]]
- v0 += v4
- v12 ^= v0
- v12 = bits.RotateLeft64(v12, -32)
- v8 += v12
- v4 ^= v8
- v4 = bits.RotateLeft64(v4, -24)
- v1 += m[s[1]]
- v1 += v5
- v13 ^= v1
- v13 = bits.RotateLeft64(v13, -32)
- v9 += v13
- v5 ^= v9
- v5 = bits.RotateLeft64(v5, -24)
- v2 += m[s[2]]
- v2 += v6
- v14 ^= v2
- v14 = bits.RotateLeft64(v14, -32)
- v10 += v14
- v6 ^= v10
- v6 = bits.RotateLeft64(v6, -24)
- v3 += m[s[3]]
- v3 += v7
- v15 ^= v3
- v15 = bits.RotateLeft64(v15, -32)
- v11 += v15
- v7 ^= v11
- v7 = bits.RotateLeft64(v7, -24)
-
- v0 += m[s[4]]
- v0 += v4
- v12 ^= v0
- v12 = bits.RotateLeft64(v12, -16)
- v8 += v12
- v4 ^= v8
- v4 = bits.RotateLeft64(v4, -63)
- v1 += m[s[5]]
- v1 += v5
- v13 ^= v1
- v13 = bits.RotateLeft64(v13, -16)
- v9 += v13
- v5 ^= v9
- v5 = bits.RotateLeft64(v5, -63)
- v2 += m[s[6]]
- v2 += v6
- v14 ^= v2
- v14 = bits.RotateLeft64(v14, -16)
- v10 += v14
- v6 ^= v10
- v6 = bits.RotateLeft64(v6, -63)
- v3 += m[s[7]]
- v3 += v7
- v15 ^= v3
- v15 = bits.RotateLeft64(v15, -16)
- v11 += v15
- v7 ^= v11
- v7 = bits.RotateLeft64(v7, -63)
-
- v0 += m[s[8]]
- v0 += v5
- v15 ^= v0
- v15 = bits.RotateLeft64(v15, -32)
- v10 += v15
- v5 ^= v10
- v5 = bits.RotateLeft64(v5, -24)
- v1 += m[s[9]]
- v1 += v6
- v12 ^= v1
- v12 = bits.RotateLeft64(v12, -32)
- v11 += v12
- v6 ^= v11
- v6 = bits.RotateLeft64(v6, -24)
- v2 += m[s[10]]
- v2 += v7
- v13 ^= v2
- v13 = bits.RotateLeft64(v13, -32)
- v8 += v13
- v7 ^= v8
- v7 = bits.RotateLeft64(v7, -24)
- v3 += m[s[11]]
- v3 += v4
- v14 ^= v3
- v14 = bits.RotateLeft64(v14, -32)
- v9 += v14
- v4 ^= v9
- v4 = bits.RotateLeft64(v4, -24)
-
- v0 += m[s[12]]
- v0 += v5
- v15 ^= v0
- v15 = bits.RotateLeft64(v15, -16)
- v10 += v15
- v5 ^= v10
- v5 = bits.RotateLeft64(v5, -63)
- v1 += m[s[13]]
- v1 += v6
- v12 ^= v1
- v12 = bits.RotateLeft64(v12, -16)
- v11 += v12
- v6 ^= v11
- v6 = bits.RotateLeft64(v6, -63)
- v2 += m[s[14]]
- v2 += v7
- v13 ^= v2
- v13 = bits.RotateLeft64(v13, -16)
- v8 += v13
- v7 ^= v8
- v7 = bits.RotateLeft64(v7, -63)
- v3 += m[s[15]]
- v3 += v4
- v14 ^= v3
- v14 = bits.RotateLeft64(v14, -16)
- v9 += v14
- v4 ^= v9
- v4 = bits.RotateLeft64(v4, -63)
-
- }
-
- h[0] ^= v0 ^ v8
- h[1] ^= v1 ^ v9
- h[2] ^= v2 ^ v10
- h[3] ^= v3 ^ v11
- h[4] ^= v4 ^ v12
- h[5] ^= v5 ^ v13
- h[6] ^= v6 ^ v14
- h[7] ^= v7 ^ v15
- }
- c[0], c[1] = c0, c1
-}
diff --git a/vendor/golang.org/x/crypto/blake2b/blake2b_ref.go b/vendor/golang.org/x/crypto/blake2b/blake2b_ref.go
deleted file mode 100644
index 6e28668cd198..000000000000
--- a/vendor/golang.org/x/crypto/blake2b/blake2b_ref.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build !amd64 || purego || !gc
-
-package blake2b
-
-func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) {
- hashBlocksGeneric(h, c, flag, blocks)
-}
diff --git a/vendor/golang.org/x/crypto/blake2b/blake2x.go b/vendor/golang.org/x/crypto/blake2b/blake2x.go
deleted file mode 100644
index 7692bb346014..000000000000
--- a/vendor/golang.org/x/crypto/blake2b/blake2x.go
+++ /dev/null
@@ -1,185 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package blake2b
-
-import (
- "encoding/binary"
- "errors"
- "io"
-)
-
-// XOF defines the interface to hash functions that
-// support arbitrary-length output.
-//
-// New callers should prefer the standard library [hash.XOF].
-type XOF interface {
- // Write absorbs more data into the hash's state. It panics if called
- // after Read.
- io.Writer
-
- // Read reads more output from the hash. It returns io.EOF if the limit
- // has been reached.
- io.Reader
-
- // Clone returns a copy of the XOF in its current state.
- Clone() XOF
-
- // Reset resets the XOF to its initial state.
- Reset()
-}
-
-// OutputLengthUnknown can be used as the size argument to NewXOF to indicate
-// the length of the output is not known in advance.
-const OutputLengthUnknown = 0
-
-// magicUnknownOutputLength is a magic value for the output size that indicates
-// an unknown number of output bytes.
-const magicUnknownOutputLength = (1 << 32) - 1
-
-// maxOutputLength is the absolute maximum number of bytes to produce when the
-// number of output bytes is unknown.
-const maxOutputLength = (1 << 32) * 64
-
-// NewXOF creates a new variable-output-length hash. The hash either produce a
-// known number of bytes (1 <= size < 2**32-1), or an unknown number of bytes
-// (size == OutputLengthUnknown). In the latter case, an absolute limit of
-// 256GiB applies.
-//
-// A non-nil key turns the hash into a MAC. The key must between
-// zero and 32 bytes long.
-//
-// The result can be safely interface-upgraded to [hash.XOF].
-func NewXOF(size uint32, key []byte) (XOF, error) {
- if len(key) > Size {
- return nil, errKeySize
- }
- if size == magicUnknownOutputLength {
- // 2^32-1 indicates an unknown number of bytes and thus isn't a
- // valid length.
- return nil, errors.New("blake2b: XOF length too large")
- }
- if size == OutputLengthUnknown {
- size = magicUnknownOutputLength
- }
- x := &xof{
- d: digest{
- size: Size,
- keyLen: len(key),
- },
- length: size,
- }
- copy(x.d.key[:], key)
- x.Reset()
- return x, nil
-}
-
-type xof struct {
- d digest
- length uint32
- remaining uint64
- cfg, root, block [Size]byte
- offset int
- nodeOffset uint32
- readMode bool
-}
-
-func (x *xof) Write(p []byte) (n int, err error) {
- if x.readMode {
- panic("blake2b: write to XOF after read")
- }
- return x.d.Write(p)
-}
-
-func (x *xof) Clone() XOF {
- clone := *x
- return &clone
-}
-
-func (x *xof) BlockSize() int {
- return x.d.BlockSize()
-}
-
-func (x *xof) Reset() {
- x.cfg[0] = byte(Size)
- binary.LittleEndian.PutUint32(x.cfg[4:], uint32(Size)) // leaf length
- binary.LittleEndian.PutUint32(x.cfg[12:], x.length) // XOF length
- x.cfg[17] = byte(Size) // inner hash size
-
- x.d.Reset()
- x.d.h[1] ^= uint64(x.length) << 32
-
- x.remaining = uint64(x.length)
- if x.remaining == magicUnknownOutputLength {
- x.remaining = maxOutputLength
- }
- x.offset, x.nodeOffset = 0, 0
- x.readMode = false
-}
-
-func (x *xof) Read(p []byte) (n int, err error) {
- if !x.readMode {
- x.d.finalize(&x.root)
- x.readMode = true
- }
-
- if x.remaining == 0 {
- return 0, io.EOF
- }
-
- n = len(p)
- if uint64(n) > x.remaining {
- n = int(x.remaining)
- p = p[:n]
- }
-
- if x.offset > 0 {
- blockRemaining := Size - x.offset
- if n < blockRemaining {
- x.offset += copy(p, x.block[x.offset:])
- x.remaining -= uint64(n)
- return
- }
- copy(p, x.block[x.offset:])
- p = p[blockRemaining:]
- x.offset = 0
- x.remaining -= uint64(blockRemaining)
- }
-
- for len(p) >= Size {
- binary.LittleEndian.PutUint32(x.cfg[8:], x.nodeOffset)
- x.nodeOffset++
-
- x.d.initConfig(&x.cfg)
- x.d.Write(x.root[:])
- x.d.finalize(&x.block)
-
- copy(p, x.block[:])
- p = p[Size:]
- x.remaining -= uint64(Size)
- }
-
- if todo := len(p); todo > 0 {
- if x.remaining < uint64(Size) {
- x.cfg[0] = byte(x.remaining)
- }
- binary.LittleEndian.PutUint32(x.cfg[8:], x.nodeOffset)
- x.nodeOffset++
-
- x.d.initConfig(&x.cfg)
- x.d.Write(x.root[:])
- x.d.finalize(&x.block)
-
- x.offset = copy(p, x.block[:todo])
- x.remaining -= uint64(todo)
- }
- return
-}
-
-func (d *digest) initConfig(cfg *[Size]byte) {
- d.offset, d.c[0], d.c[1] = 0, 0, 0
- for i := range d.h {
- d.h[i] = iv[i] ^ binary.LittleEndian.Uint64(cfg[i*8:])
- }
-}
diff --git a/vendor/golang.org/x/crypto/blake2b/register.go b/vendor/golang.org/x/crypto/blake2b/register.go
deleted file mode 100644
index 54e446e1d2ce..000000000000
--- a/vendor/golang.org/x/crypto/blake2b/register.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package blake2b
-
-import (
- "crypto"
- "hash"
-)
-
-func init() {
- newHash256 := func() hash.Hash {
- h, _ := New256(nil)
- return h
- }
- newHash384 := func() hash.Hash {
- h, _ := New384(nil)
- return h
- }
-
- newHash512 := func() hash.Hash {
- h, _ := New512(nil)
- return h
- }
-
- crypto.RegisterHash(crypto.BLAKE2b_256, newHash256)
- crypto.RegisterHash(crypto.BLAKE2b_384, newHash384)
- crypto.RegisterHash(crypto.BLAKE2b_512, newHash512)
-}
diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go
index f840481726c7..c66a41b27c34 100644
--- a/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go
+++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go
@@ -1,4 +1,4 @@
-// Copyright 2025 Google LLC
+// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
+// protoc-gen-go v1.36.11
// protoc v4.24.4
// source: google/api/client.proto
@@ -23,6 +23,7 @@ package annotations
import (
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
api "google.golang.org/genproto/googleapis/api"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
@@ -167,30 +168,86 @@ func (ClientLibraryDestination) EnumDescriptor() ([]byte, []int) {
return file_google_api_client_proto_rawDescGZIP(), []int{1}
}
+// The behavior to take when the flow control limit is exceeded.
+type FlowControlLimitExceededBehaviorProto int32
+
+const (
+ // Default behavior, system-defined.
+ FlowControlLimitExceededBehaviorProto_UNSET_BEHAVIOR FlowControlLimitExceededBehaviorProto = 0
+ // Stop operation, raise error.
+ FlowControlLimitExceededBehaviorProto_THROW_EXCEPTION FlowControlLimitExceededBehaviorProto = 1
+ // Pause operation until limit clears.
+ FlowControlLimitExceededBehaviorProto_BLOCK FlowControlLimitExceededBehaviorProto = 2
+ // Continue operation, disregard limit.
+ FlowControlLimitExceededBehaviorProto_IGNORE FlowControlLimitExceededBehaviorProto = 3
+)
+
+// Enum value maps for FlowControlLimitExceededBehaviorProto.
+var (
+ FlowControlLimitExceededBehaviorProto_name = map[int32]string{
+ 0: "UNSET_BEHAVIOR",
+ 1: "THROW_EXCEPTION",
+ 2: "BLOCK",
+ 3: "IGNORE",
+ }
+ FlowControlLimitExceededBehaviorProto_value = map[string]int32{
+ "UNSET_BEHAVIOR": 0,
+ "THROW_EXCEPTION": 1,
+ "BLOCK": 2,
+ "IGNORE": 3,
+ }
+)
+
+func (x FlowControlLimitExceededBehaviorProto) Enum() *FlowControlLimitExceededBehaviorProto {
+ p := new(FlowControlLimitExceededBehaviorProto)
+ *p = x
+ return p
+}
+
+func (x FlowControlLimitExceededBehaviorProto) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (FlowControlLimitExceededBehaviorProto) Descriptor() protoreflect.EnumDescriptor {
+ return file_google_api_client_proto_enumTypes[2].Descriptor()
+}
+
+func (FlowControlLimitExceededBehaviorProto) Type() protoreflect.EnumType {
+ return &file_google_api_client_proto_enumTypes[2]
+}
+
+func (x FlowControlLimitExceededBehaviorProto) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use FlowControlLimitExceededBehaviorProto.Descriptor instead.
+func (FlowControlLimitExceededBehaviorProto) EnumDescriptor() ([]byte, []int) {
+ return file_google_api_client_proto_rawDescGZIP(), []int{2}
+}
+
// Required information for every language.
type CommonLanguageSettings struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Link to automatically generated reference documentation. Example:
// https://cloud.google.com/nodejs/docs/reference/asset/latest
//
- // Deprecated: Do not use.
+ // Deprecated: Marked as deprecated in google/api/client.proto.
ReferenceDocsUri string `protobuf:"bytes,1,opt,name=reference_docs_uri,json=referenceDocsUri,proto3" json:"reference_docs_uri,omitempty"`
// The destination where API teams want this client library to be published.
Destinations []ClientLibraryDestination `protobuf:"varint,2,rep,packed,name=destinations,proto3,enum=google.api.ClientLibraryDestination" json:"destinations,omitempty"`
// Configuration for which RPCs should be generated in the GAPIC client.
+ //
+ // Note: This field should not be used in most cases.
SelectiveGapicGeneration *SelectiveGapicGeneration `protobuf:"bytes,3,opt,name=selective_gapic_generation,json=selectiveGapicGeneration,proto3" json:"selective_gapic_generation,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *CommonLanguageSettings) Reset() {
*x = CommonLanguageSettings{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_client_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_client_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CommonLanguageSettings) String() string {
@@ -201,7 +258,7 @@ func (*CommonLanguageSettings) ProtoMessage() {}
func (x *CommonLanguageSettings) ProtoReflect() protoreflect.Message {
mi := &file_google_api_client_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -216,7 +273,7 @@ func (*CommonLanguageSettings) Descriptor() ([]byte, []int) {
return file_google_api_client_proto_rawDescGZIP(), []int{0}
}
-// Deprecated: Do not use.
+// Deprecated: Marked as deprecated in google/api/client.proto.
func (x *CommonLanguageSettings) GetReferenceDocsUri() string {
if x != nil {
return x.ReferenceDocsUri
@@ -240,10 +297,7 @@ func (x *CommonLanguageSettings) GetSelectiveGapicGeneration() *SelectiveGapicGe
// Details about how and where to publish client libraries.
type ClientLibrarySettings struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Version of the API to apply these settings to. This is the full protobuf
// package for the API, ending in the version element.
// Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
@@ -268,16 +322,16 @@ type ClientLibrarySettings struct {
// Settings for Ruby client libraries.
RubySettings *RubySettings `protobuf:"bytes,27,opt,name=ruby_settings,json=rubySettings,proto3" json:"ruby_settings,omitempty"`
// Settings for Go client libraries.
- GoSettings *GoSettings `protobuf:"bytes,28,opt,name=go_settings,json=goSettings,proto3" json:"go_settings,omitempty"`
+ GoSettings *GoSettings `protobuf:"bytes,28,opt,name=go_settings,json=goSettings,proto3" json:"go_settings,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ClientLibrarySettings) Reset() {
*x = ClientLibrarySettings{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_client_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_client_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ClientLibrarySettings) String() string {
@@ -288,7 +342,7 @@ func (*ClientLibrarySettings) ProtoMessage() {}
func (x *ClientLibrarySettings) ProtoReflect() protoreflect.Message {
mi := &file_google_api_client_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -314,7 +368,7 @@ func (x *ClientLibrarySettings) GetLaunchStage() api.LaunchStage {
if x != nil {
return x.LaunchStage
}
- return api.LaunchStage_LAUNCH_STAGE_UNSPECIFIED
+ return api.LaunchStage(0)
}
func (x *ClientLibrarySettings) GetRestNumericEnums() bool {
@@ -384,10 +438,7 @@ func (x *ClientLibrarySettings) GetGoSettings() *GoSettings {
// libraries](https://cloud.google.com/apis/docs/cloud-client-libraries)
// generated from the service config.
type Publishing struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// A list of API method settings, e.g. the behavior for methods that use the
// long-running operation pattern.
MethodSettings []*MethodSettings `protobuf:"bytes,2,rep,name=method_settings,json=methodSettings,proto3" json:"method_settings,omitempty"`
@@ -421,15 +472,15 @@ type Publishing struct {
// Optional link to REST reference documentation. Example:
// https://cloud.google.com/pubsub/lite/docs/reference/rest
RestReferenceDocumentationUri string `protobuf:"bytes,111,opt,name=rest_reference_documentation_uri,json=restReferenceDocumentationUri,proto3" json:"rest_reference_documentation_uri,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Publishing) Reset() {
*x = Publishing{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_client_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_client_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Publishing) String() string {
@@ -440,7 +491,7 @@ func (*Publishing) ProtoMessage() {}
func (x *Publishing) ProtoReflect() protoreflect.Message {
mi := &file_google_api_client_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -534,10 +585,7 @@ func (x *Publishing) GetRestReferenceDocumentationUri() string {
// Settings for Java client libraries.
type JavaSettings struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// The package name to use in Java. Clobbers the java_package option
// set in the protobuf. This should be used **only** by APIs
// who have already set the language_settings.java.package_name" field
@@ -547,8 +595,9 @@ type JavaSettings struct {
// Example of a YAML configuration::
//
// publishing:
- // java_settings:
- // library_package: com.google.cloud.pubsub.v1
+ // library_settings:
+ // java_settings:
+ // library_package: com.google.cloud.pubsub.v1
LibraryPackage string `protobuf:"bytes,1,opt,name=library_package,json=libraryPackage,proto3" json:"library_package,omitempty"`
// Configure the Java class name to use instead of the service's for its
// corresponding generated GAPIC client. Keys are fully-qualified
@@ -564,18 +613,18 @@ type JavaSettings struct {
// service_class_names:
// - google.pubsub.v1.Publisher: TopicAdmin
// - google.pubsub.v1.Subscriber: SubscriptionAdmin
- ServiceClassNames map[string]string `protobuf:"bytes,2,rep,name=service_class_names,json=serviceClassNames,proto3" json:"service_class_names,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ ServiceClassNames map[string]string `protobuf:"bytes,2,rep,name=service_class_names,json=serviceClassNames,proto3" json:"service_class_names,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// Some settings.
- Common *CommonLanguageSettings `protobuf:"bytes,3,opt,name=common,proto3" json:"common,omitempty"`
+ Common *CommonLanguageSettings `protobuf:"bytes,3,opt,name=common,proto3" json:"common,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *JavaSettings) Reset() {
*x = JavaSettings{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_client_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_client_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *JavaSettings) String() string {
@@ -586,7 +635,7 @@ func (*JavaSettings) ProtoMessage() {}
func (x *JavaSettings) ProtoReflect() protoreflect.Message {
mi := &file_google_api_client_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -624,21 +673,18 @@ func (x *JavaSettings) GetCommon() *CommonLanguageSettings {
// Settings for C++ client libraries.
type CppSettings struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Some settings.
- Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"`
+ Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *CppSettings) Reset() {
*x = CppSettings{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_client_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_client_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CppSettings) String() string {
@@ -649,7 +695,7 @@ func (*CppSettings) ProtoMessage() {}
func (x *CppSettings) ProtoReflect() protoreflect.Message {
mi := &file_google_api_client_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -673,21 +719,31 @@ func (x *CppSettings) GetCommon() *CommonLanguageSettings {
// Settings for Php client libraries.
type PhpSettings struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Some settings.
Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"`
+ // The package name to use in Php. Clobbers the php_namespace option
+ // set in the protobuf. This should be used **only** by APIs
+ // who have already set the language_settings.php.package_name" field
+ // in gapic.yaml. API teams should use the protobuf php_namespace option
+ // where possible.
+ //
+ // Example of a YAML configuration::
+ //
+ // publishing:
+ // library_settings:
+ // php_settings:
+ // library_package: Google\Cloud\PubSub\V1
+ LibraryPackage string `protobuf:"bytes,2,opt,name=library_package,json=libraryPackage,proto3" json:"library_package,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *PhpSettings) Reset() {
*x = PhpSettings{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_client_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_client_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *PhpSettings) String() string {
@@ -698,7 +754,7 @@ func (*PhpSettings) ProtoMessage() {}
func (x *PhpSettings) ProtoReflect() protoreflect.Message {
mi := &file_google_api_client_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -720,25 +776,29 @@ func (x *PhpSettings) GetCommon() *CommonLanguageSettings {
return nil
}
+func (x *PhpSettings) GetLibraryPackage() string {
+ if x != nil {
+ return x.LibraryPackage
+ }
+ return ""
+}
+
// Settings for Python client libraries.
type PythonSettings struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Some settings.
Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"`
// Experimental features to be included during client library generation.
ExperimentalFeatures *PythonSettings_ExperimentalFeatures `protobuf:"bytes,2,opt,name=experimental_features,json=experimentalFeatures,proto3" json:"experimental_features,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *PythonSettings) Reset() {
*x = PythonSettings{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_client_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_client_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *PythonSettings) String() string {
@@ -749,7 +809,7 @@ func (*PythonSettings) ProtoMessage() {}
func (x *PythonSettings) ProtoReflect() protoreflect.Message {
mi := &file_google_api_client_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -780,21 +840,18 @@ func (x *PythonSettings) GetExperimentalFeatures() *PythonSettings_ExperimentalF
// Settings for Node client libraries.
type NodeSettings struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Some settings.
- Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"`
+ Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *NodeSettings) Reset() {
*x = NodeSettings{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_client_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_client_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *NodeSettings) String() string {
@@ -805,7 +862,7 @@ func (*NodeSettings) ProtoMessage() {}
func (x *NodeSettings) ProtoReflect() protoreflect.Message {
mi := &file_google_api_client_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -829,10 +886,7 @@ func (x *NodeSettings) GetCommon() *CommonLanguageSettings {
// Settings for Dotnet client libraries.
type DotnetSettings struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Some settings.
Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"`
// Map from original service names to renamed versions.
@@ -840,13 +894,13 @@ type DotnetSettings struct {
// would cause a naming conflict. (Neither name is
// fully-qualified.)
// Example: Subscriber to SubscriberServiceApi.
- RenamedServices map[string]string `protobuf:"bytes,2,rep,name=renamed_services,json=renamedServices,proto3" json:"renamed_services,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ RenamedServices map[string]string `protobuf:"bytes,2,rep,name=renamed_services,json=renamedServices,proto3" json:"renamed_services,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// Map from full resource types to the effective short name
// for the resource. This is used when otherwise resource
// named from different services would cause naming collisions.
// Example entry:
// "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
- RenamedResources map[string]string `protobuf:"bytes,3,rep,name=renamed_resources,json=renamedResources,proto3" json:"renamed_resources,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ RenamedResources map[string]string `protobuf:"bytes,3,rep,name=renamed_resources,json=renamedResources,proto3" json:"renamed_resources,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// List of full resource types to ignore during generation.
// This is typically used for API-specific Location resources,
// which should be handled by the generator as if they were actually
@@ -860,15 +914,15 @@ type DotnetSettings struct {
// which are provided separately, so shouldn't be generated.
// Snippets *calling* these methods are still generated, however.
HandwrittenSignatures []string `protobuf:"bytes,6,rep,name=handwritten_signatures,json=handwrittenSignatures,proto3" json:"handwritten_signatures,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *DotnetSettings) Reset() {
*x = DotnetSettings{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_client_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_client_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *DotnetSettings) String() string {
@@ -879,7 +933,7 @@ func (*DotnetSettings) ProtoMessage() {}
func (x *DotnetSettings) ProtoReflect() protoreflect.Message {
mi := &file_google_api_client_proto_msgTypes[8]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -938,21 +992,18 @@ func (x *DotnetSettings) GetHandwrittenSignatures() []string {
// Settings for Ruby client libraries.
type RubySettings struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Some settings.
- Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"`
+ Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *RubySettings) Reset() {
*x = RubySettings{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_client_proto_msgTypes[9]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_client_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *RubySettings) String() string {
@@ -963,7 +1014,7 @@ func (*RubySettings) ProtoMessage() {}
func (x *RubySettings) ProtoReflect() protoreflect.Message {
mi := &file_google_api_client_proto_msgTypes[9]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -987,31 +1038,29 @@ func (x *RubySettings) GetCommon() *CommonLanguageSettings {
// Settings for Go client libraries.
type GoSettings struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Some settings.
Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"`
// Map of service names to renamed services. Keys are the package relative
// service names and values are the name to be used for the service client
// and call options.
//
- // publishing:
+ // Example:
//
- // go_settings:
- // renamed_services:
- // Publisher: TopicAdmin
- RenamedServices map[string]string `protobuf:"bytes,2,rep,name=renamed_services,json=renamedServices,proto3" json:"renamed_services,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // publishing:
+ // go_settings:
+ // renamed_services:
+ // Publisher: TopicAdmin
+ RenamedServices map[string]string `protobuf:"bytes,2,rep,name=renamed_services,json=renamedServices,proto3" json:"renamed_services,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *GoSettings) Reset() {
*x = GoSettings{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_client_proto_msgTypes[10]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_client_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GoSettings) String() string {
@@ -1022,7 +1071,7 @@ func (*GoSettings) ProtoMessage() {}
func (x *GoSettings) ProtoReflect() protoreflect.Message {
mi := &file_google_api_client_proto_msgTypes[10]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1053,10 +1102,7 @@ func (x *GoSettings) GetRenamedServices() map[string]string {
// Describes the generator configuration for a method.
type MethodSettings struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// The fully qualified name of the method, for which the options below apply.
// This is used to find the method to apply the options.
//
@@ -1094,15 +1140,27 @@ type MethodSettings struct {
// auto_populated_fields:
// - request_id
AutoPopulatedFields []string `protobuf:"bytes,3,rep,name=auto_populated_fields,json=autoPopulatedFields,proto3" json:"auto_populated_fields,omitempty"`
+ // Batching configuration for an API method in client libraries.
+ //
+ // Example of a YAML configuration:
+ //
+ // publishing:
+ // method_settings:
+ // - selector: google.example.v1.ExampleService.BatchCreateExample
+ // batching:
+ // element_count_threshold: 1000
+ // request_byte_threshold: 100000000
+ // delay_threshold_millis: 10
+ Batching *BatchingConfigProto `protobuf:"bytes,4,opt,name=batching,proto3" json:"batching,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *MethodSettings) Reset() {
*x = MethodSettings{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_client_proto_msgTypes[11]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_client_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *MethodSettings) String() string {
@@ -1113,7 +1171,7 @@ func (*MethodSettings) ProtoMessage() {}
func (x *MethodSettings) ProtoReflect() protoreflect.Message {
mi := &file_google_api_client_proto_msgTypes[11]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1149,13 +1207,19 @@ func (x *MethodSettings) GetAutoPopulatedFields() []string {
return nil
}
+func (x *MethodSettings) GetBatching() *BatchingConfigProto {
+ if x != nil {
+ return x.Batching
+ }
+ return nil
+}
+
// This message is used to configure the generation of a subset of the RPCs in
// a service for client libraries.
+//
+// Note: This feature should not be used in most cases.
type SelectiveGapicGeneration struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// An allowlist of the fully qualified names of RPCs that should be included
// on public client surfaces.
Methods []string `protobuf:"bytes,1,rep,name=methods,proto3" json:"methods,omitempty"`
@@ -1166,15 +1230,15 @@ type SelectiveGapicGeneration struct {
// implementations to decide. Some examples may be: added annotations,
// obfuscated identifiers, or other language idiomatic patterns.
GenerateOmittedAsInternal bool `protobuf:"varint,2,opt,name=generate_omitted_as_internal,json=generateOmittedAsInternal,proto3" json:"generate_omitted_as_internal,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *SelectiveGapicGeneration) Reset() {
*x = SelectiveGapicGeneration{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_client_proto_msgTypes[12]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_client_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SelectiveGapicGeneration) String() string {
@@ -1185,7 +1249,7 @@ func (*SelectiveGapicGeneration) ProtoMessage() {}
func (x *SelectiveGapicGeneration) ProtoReflect() protoreflect.Message {
mi := &file_google_api_client_proto_msgTypes[12]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1214,14 +1278,253 @@ func (x *SelectiveGapicGeneration) GetGenerateOmittedAsInternal() bool {
return false
}
+// `BatchingConfigProto` defines the batching configuration for an API method.
+type BatchingConfigProto struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The thresholds which trigger a batched request to be sent.
+ Thresholds *BatchingSettingsProto `protobuf:"bytes,1,opt,name=thresholds,proto3" json:"thresholds,omitempty"`
+ // The request and response fields used in batching.
+ BatchDescriptor *BatchingDescriptorProto `protobuf:"bytes,2,opt,name=batch_descriptor,json=batchDescriptor,proto3" json:"batch_descriptor,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *BatchingConfigProto) Reset() {
+ *x = BatchingConfigProto{}
+ mi := &file_google_api_client_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *BatchingConfigProto) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BatchingConfigProto) ProtoMessage() {}
+
+func (x *BatchingConfigProto) ProtoReflect() protoreflect.Message {
+ mi := &file_google_api_client_proto_msgTypes[13]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BatchingConfigProto.ProtoReflect.Descriptor instead.
+func (*BatchingConfigProto) Descriptor() ([]byte, []int) {
+ return file_google_api_client_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *BatchingConfigProto) GetThresholds() *BatchingSettingsProto {
+ if x != nil {
+ return x.Thresholds
+ }
+ return nil
+}
+
+func (x *BatchingConfigProto) GetBatchDescriptor() *BatchingDescriptorProto {
+ if x != nil {
+ return x.BatchDescriptor
+ }
+ return nil
+}
+
+// `BatchingSettingsProto` specifies a set of batching thresholds, each of
+// which acts as a trigger to send a batch of messages as a request. At least
+// one threshold must be positive nonzero.
+type BatchingSettingsProto struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The number of elements of a field collected into a batch which, if
+ // exceeded, causes the batch to be sent.
+ ElementCountThreshold int32 `protobuf:"varint,1,opt,name=element_count_threshold,json=elementCountThreshold,proto3" json:"element_count_threshold,omitempty"`
+ // The aggregated size of the batched field which, if exceeded, causes the
+ // batch to be sent. This size is computed by aggregating the sizes of the
+ // request field to be batched, not of the entire request message.
+ RequestByteThreshold int64 `protobuf:"varint,2,opt,name=request_byte_threshold,json=requestByteThreshold,proto3" json:"request_byte_threshold,omitempty"`
+ // The duration after which a batch should be sent, starting from the addition
+ // of the first message to that batch.
+ DelayThreshold *durationpb.Duration `protobuf:"bytes,3,opt,name=delay_threshold,json=delayThreshold,proto3" json:"delay_threshold,omitempty"`
+ // The maximum number of elements collected in a batch that could be accepted
+ // by server.
+ ElementCountLimit int32 `protobuf:"varint,4,opt,name=element_count_limit,json=elementCountLimit,proto3" json:"element_count_limit,omitempty"`
+ // The maximum size of the request that could be accepted by server.
+ RequestByteLimit int32 `protobuf:"varint,5,opt,name=request_byte_limit,json=requestByteLimit,proto3" json:"request_byte_limit,omitempty"`
+ // The maximum number of elements allowed by flow control.
+ FlowControlElementLimit int32 `protobuf:"varint,6,opt,name=flow_control_element_limit,json=flowControlElementLimit,proto3" json:"flow_control_element_limit,omitempty"`
+ // The maximum size of data allowed by flow control.
+ FlowControlByteLimit int32 `protobuf:"varint,7,opt,name=flow_control_byte_limit,json=flowControlByteLimit,proto3" json:"flow_control_byte_limit,omitempty"`
+ // The behavior to take when the flow control limit is exceeded.
+ FlowControlLimitExceededBehavior FlowControlLimitExceededBehaviorProto `protobuf:"varint,8,opt,name=flow_control_limit_exceeded_behavior,json=flowControlLimitExceededBehavior,proto3,enum=google.api.FlowControlLimitExceededBehaviorProto" json:"flow_control_limit_exceeded_behavior,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *BatchingSettingsProto) Reset() {
+ *x = BatchingSettingsProto{}
+ mi := &file_google_api_client_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *BatchingSettingsProto) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BatchingSettingsProto) ProtoMessage() {}
+
+func (x *BatchingSettingsProto) ProtoReflect() protoreflect.Message {
+ mi := &file_google_api_client_proto_msgTypes[14]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BatchingSettingsProto.ProtoReflect.Descriptor instead.
+func (*BatchingSettingsProto) Descriptor() ([]byte, []int) {
+ return file_google_api_client_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *BatchingSettingsProto) GetElementCountThreshold() int32 {
+ if x != nil {
+ return x.ElementCountThreshold
+ }
+ return 0
+}
+
+func (x *BatchingSettingsProto) GetRequestByteThreshold() int64 {
+ if x != nil {
+ return x.RequestByteThreshold
+ }
+ return 0
+}
+
+func (x *BatchingSettingsProto) GetDelayThreshold() *durationpb.Duration {
+ if x != nil {
+ return x.DelayThreshold
+ }
+ return nil
+}
+
+func (x *BatchingSettingsProto) GetElementCountLimit() int32 {
+ if x != nil {
+ return x.ElementCountLimit
+ }
+ return 0
+}
+
+func (x *BatchingSettingsProto) GetRequestByteLimit() int32 {
+ if x != nil {
+ return x.RequestByteLimit
+ }
+ return 0
+}
+
+func (x *BatchingSettingsProto) GetFlowControlElementLimit() int32 {
+ if x != nil {
+ return x.FlowControlElementLimit
+ }
+ return 0
+}
+
+func (x *BatchingSettingsProto) GetFlowControlByteLimit() int32 {
+ if x != nil {
+ return x.FlowControlByteLimit
+ }
+ return 0
+}
+
+func (x *BatchingSettingsProto) GetFlowControlLimitExceededBehavior() FlowControlLimitExceededBehaviorProto {
+ if x != nil {
+ return x.FlowControlLimitExceededBehavior
+ }
+ return FlowControlLimitExceededBehaviorProto_UNSET_BEHAVIOR
+}
+
+// `BatchingDescriptorProto` specifies the fields of the request message to be
+// used for batching, and, optionally, the fields of the response message to be
+// used for demultiplexing.
+type BatchingDescriptorProto struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The repeated field in the request message to be aggregated by batching.
+ BatchedField string `protobuf:"bytes,1,opt,name=batched_field,json=batchedField,proto3" json:"batched_field,omitempty"`
+ // A list of the fields in the request message. Two requests will be batched
+ // together only if the values of every field specified in
+ // `request_discriminator_fields` is equal between the two requests.
+ DiscriminatorFields []string `protobuf:"bytes,2,rep,name=discriminator_fields,json=discriminatorFields,proto3" json:"discriminator_fields,omitempty"`
+ // Optional. When present, indicates the field in the response message to be
+ // used to demultiplex the response into multiple response messages, in
+ // correspondence with the multiple request messages originally batched
+ // together.
+ SubresponseField string `protobuf:"bytes,3,opt,name=subresponse_field,json=subresponseField,proto3" json:"subresponse_field,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *BatchingDescriptorProto) Reset() {
+ *x = BatchingDescriptorProto{}
+ mi := &file_google_api_client_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *BatchingDescriptorProto) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BatchingDescriptorProto) ProtoMessage() {}
+
+func (x *BatchingDescriptorProto) ProtoReflect() protoreflect.Message {
+ mi := &file_google_api_client_proto_msgTypes[15]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BatchingDescriptorProto.ProtoReflect.Descriptor instead.
+func (*BatchingDescriptorProto) Descriptor() ([]byte, []int) {
+ return file_google_api_client_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *BatchingDescriptorProto) GetBatchedField() string {
+ if x != nil {
+ return x.BatchedField
+ }
+ return ""
+}
+
+func (x *BatchingDescriptorProto) GetDiscriminatorFields() []string {
+ if x != nil {
+ return x.DiscriminatorFields
+ }
+ return nil
+}
+
+func (x *BatchingDescriptorProto) GetSubresponseField() string {
+ if x != nil {
+ return x.SubresponseField
+ }
+ return ""
+}
+
// Experimental features to be included during client library generation.
// These fields will be deprecated once the feature graduates and is enabled
// by default.
type PythonSettings_ExperimentalFeatures struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Enables generation of asynchronous REST clients if `rest` transport is
// enabled. By default, asynchronous REST clients will not be generated.
// This feature will be enabled by default 1 month after launching the
@@ -1237,15 +1540,15 @@ type PythonSettings_ExperimentalFeatures struct {
// import statements. For example `import google.cloud.library_v2` instead
// of `import google.cloud.library`.
UnversionedPackageDisabled bool `protobuf:"varint,3,opt,name=unversioned_package_disabled,json=unversionedPackageDisabled,proto3" json:"unversioned_package_disabled,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *PythonSettings_ExperimentalFeatures) Reset() {
*x = PythonSettings_ExperimentalFeatures{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_client_proto_msgTypes[14]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_client_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *PythonSettings_ExperimentalFeatures) String() string {
@@ -1255,8 +1558,8 @@ func (x *PythonSettings_ExperimentalFeatures) String() string {
func (*PythonSettings_ExperimentalFeatures) ProtoMessage() {}
func (x *PythonSettings_ExperimentalFeatures) ProtoReflect() protoreflect.Message {
- mi := &file_google_api_client_proto_msgTypes[14]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_google_api_client_proto_msgTypes[17]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1298,10 +1601,7 @@ func (x *PythonSettings_ExperimentalFeatures) GetUnversionedPackageDisabled() bo
// generators (e.g.
// [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).
type MethodSettings_LongRunning struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Initial delay after which the first poll request will be made.
// Default value: 5 seconds.
InitialPollDelay *durationpb.Duration `protobuf:"bytes,1,opt,name=initial_poll_delay,json=initialPollDelay,proto3" json:"initial_poll_delay,omitempty"`
@@ -1315,15 +1615,15 @@ type MethodSettings_LongRunning struct {
// Total polling timeout.
// Default value: 5 minutes.
TotalPollTimeout *durationpb.Duration `protobuf:"bytes,4,opt,name=total_poll_timeout,json=totalPollTimeout,proto3" json:"total_poll_timeout,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *MethodSettings_LongRunning) Reset() {
*x = MethodSettings_LongRunning{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_client_proto_msgTypes[18]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_client_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *MethodSettings_LongRunning) String() string {
@@ -1333,8 +1633,8 @@ func (x *MethodSettings_LongRunning) String() string {
func (*MethodSettings_LongRunning) ProtoMessage() {}
func (x *MethodSettings_LongRunning) ProtoReflect() protoreflect.Message {
- mi := &file_google_api_client_proto_msgTypes[18]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_google_api_client_proto_msgTypes[21]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1512,385 +1812,234 @@ var (
var File_google_api_client_proto protoreflect.FileDescriptor
-var file_google_api_client_proto_rawDesc = []byte{
- 0x0a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69,
- 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x1d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70,
- 0x69, 0x2f, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf8, 0x01, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
- 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
- 0x73, 0x12, 0x30, 0x0a, 0x12, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x64,
- 0x6f, 0x63, 0x73, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18,
- 0x01, 0x52, 0x10, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x44, 0x6f, 0x63, 0x73,
- 0x55, 0x72, 0x69, 0x12, 0x48, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62,
- 0x72, 0x61, 0x72, 0x79, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
- 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x62, 0x0a,
- 0x1a, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x67, 0x61, 0x70, 0x69, 0x63,
- 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53,
- 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x61, 0x70, 0x69, 0x63, 0x47, 0x65, 0x6e,
- 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69,
- 0x76, 0x65, 0x47, 0x61, 0x70, 0x69, 0x63, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x22, 0x93, 0x05, 0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72,
- 0x61, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76,
- 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65,
- 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x0c, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x5f,
- 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x53,
- 0x74, 0x61, 0x67, 0x65, 0x52, 0x0b, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x53, 0x74, 0x61, 0x67,
- 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69,
- 0x63, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x72,
- 0x65, 0x73, 0x74, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x45, 0x6e, 0x75, 0x6d, 0x73, 0x12,
- 0x3d, 0x0a, 0x0d, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,
- 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x61, 0x70, 0x69, 0x2e, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,
- 0x52, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a,
- 0x0a, 0x0c, 0x63, 0x70, 0x70, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x16,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70,
- 0x69, 0x2e, 0x43, 0x70, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0b, 0x63,
- 0x70, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x70, 0x68,
- 0x70, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x68,
- 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0b, 0x70, 0x68, 0x70, 0x53, 0x65,
- 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x43, 0x0a, 0x0f, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e,
- 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x79, 0x74,
- 0x68, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0e, 0x70, 0x79, 0x74,
- 0x68, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x0d, 0x6e,
- 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x19, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e,
- 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0c, 0x6e, 0x6f,
- 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x43, 0x0a, 0x0f, 0x64, 0x6f,
- 0x74, 0x6e, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x1a, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69,
- 0x2e, 0x44, 0x6f, 0x74, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52,
- 0x0e, 0x64, 0x6f, 0x74, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12,
- 0x3d, 0x0a, 0x0d, 0x72, 0x75, 0x62, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,
- 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x61, 0x70, 0x69, 0x2e, 0x52, 0x75, 0x62, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,
- 0x52, 0x0c, 0x72, 0x75, 0x62, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x37,
- 0x0a, 0x0b, 0x67, 0x6f, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x1c, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69,
- 0x2e, 0x47, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0a, 0x67, 0x6f, 0x53,
- 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xf4, 0x04, 0x0a, 0x0a, 0x50, 0x75, 0x62, 0x6c,
- 0x69, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x43, 0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64,
- 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74,
- 0x68, 0x6f, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0e, 0x6d, 0x65, 0x74,
- 0x68, 0x6f, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x6e,
- 0x65, 0x77, 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x65, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x49, 0x73, 0x73, 0x75, 0x65, 0x55, 0x72, 0x69, 0x12,
- 0x2b, 0x0a, 0x11, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x5f, 0x75, 0x72, 0x69, 0x18, 0x66, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x6f, 0x63, 0x75,
- 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x69, 0x12, 0x24, 0x0a, 0x0e,
- 0x61, 0x70, 0x69, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x67,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x70, 0x69, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x4e, 0x61,
- 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x5f, 0x6c, 0x61, 0x62,
- 0x65, 0x6c, 0x18, 0x68, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
- 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x34, 0x0a, 0x16, 0x63, 0x6f, 0x64, 0x65, 0x6f, 0x77, 0x6e,
- 0x65, 0x72, 0x5f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x18,
- 0x69, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x6f, 0x64, 0x65, 0x6f, 0x77, 0x6e, 0x65, 0x72,
- 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x64,
- 0x6f, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x6a, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x6f, 0x63, 0x54, 0x61, 0x67, 0x50, 0x72, 0x65, 0x66, 0x69,
- 0x78, 0x12, 0x49, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x18, 0x6b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61,
- 0x72, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c,
- 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x10,
- 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,
- 0x18, 0x6d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72,
- 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0f, 0x6c, 0x69, 0x62, 0x72, 0x61,
- 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x49, 0x0a, 0x21, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x6f,
- 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18,
- 0x6e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x65, 0x66, 0x65,
- 0x72, 0x65, 0x6e, 0x63, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x55, 0x72, 0x69, 0x12, 0x47, 0x0a, 0x20, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65,
- 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x6f, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x1d, 0x72, 0x65, 0x73, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x44, 0x6f,
- 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x69, 0x22, 0x9a,
- 0x02, 0x0a, 0x0c, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12,
- 0x27, 0x0a, 0x0f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61,
- 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72,
- 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x5f, 0x0a, 0x13, 0x73, 0x65, 0x72, 0x76,
- 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18,
- 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61,
- 0x70, 0x69, 0x2e, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e,
- 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65,
- 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43,
- 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d,
- 0x6d, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e,
- 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63,
- 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x1a, 0x44, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
- 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
- 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x49, 0x0a, 0x0b, 0x43,
- 0x70, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f,
- 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61,
- 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06,
- 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x49, 0x0a, 0x0b, 0x50, 0x68, 0x70, 0x53, 0x65, 0x74,
- 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61,
- 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67,
- 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
- 0x6e, 0x22, 0x87, 0x03, 0x0a, 0x0e, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74,
- 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70,
- 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65,
- 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
- 0x12, 0x64, 0x0a, 0x15, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c,
- 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x79, 0x74,
- 0x68, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x45, 0x78, 0x70, 0x65,
- 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73,
- 0x52, 0x14, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x46, 0x65,
- 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x1a, 0xd2, 0x01, 0x0a, 0x14, 0x45, 0x78, 0x70, 0x65, 0x72,
- 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12,
- 0x31, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x69, 0x6f,
- 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12,
- 0x72, 0x65, 0x73, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x49, 0x6f, 0x45, 0x6e, 0x61, 0x62, 0x6c,
- 0x65, 0x64, 0x12, 0x45, 0x0a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x70,
- 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x69, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x5f, 0x65, 0x6e,
- 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x69, 0x63, 0x54, 0x79, 0x70,
- 0x65, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x75, 0x6e, 0x76,
- 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65,
- 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
- 0x1a, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b,
- 0x61, 0x67, 0x65, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x4a, 0x0a, 0x0c, 0x4e,
- 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63,
- 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c,
- 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52,
- 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0xae, 0x04, 0x0a, 0x0e, 0x44, 0x6f, 0x74, 0x6e,
- 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f,
- 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61,
- 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06,
- 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x5a, 0x0a, 0x10, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65,
- 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f,
- 0x74, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x52, 0x65, 0x6e,
- 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72,
- 0x79, 0x52, 0x0f, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x73, 0x12, 0x5d, 0x0a, 0x11, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x72, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, 0x74, 0x6e, 0x65,
- 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65,
- 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
- 0x10, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x69, 0x67,
- 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x38,
- 0x0a, 0x18, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
- 0x63, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09,
- 0x52, 0x16, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
- 0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x16, 0x68, 0x61, 0x6e, 0x64,
- 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
- 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x68, 0x61, 0x6e, 0x64, 0x77, 0x72,
- 0x69, 0x74, 0x74, 0x65, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x1a,
- 0x42, 0x0a, 0x14, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
- 0x02, 0x38, 0x01, 0x1a, 0x43, 0x0a, 0x15, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
- 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
- 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4a, 0x0a, 0x0c, 0x52, 0x75, 0x62, 0x79,
- 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d,
- 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67,
- 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f,
- 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0xe4, 0x01, 0x0a, 0x0a, 0x47, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69,
- 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69,
- 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53,
- 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12,
- 0x56, 0x0a, 0x10, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69,
- 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
- 0x73, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x53,
- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x42, 0x0a, 0x14, 0x52, 0x65, 0x6e, 0x61, 0x6d,
- 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
- 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
- 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc2, 0x03, 0x0a, 0x0e,
- 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1a,
- 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x49, 0x0a, 0x0c, 0x6c, 0x6f,
- 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65,
- 0x74, 0x68, 0x6f, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x4c, 0x6f, 0x6e,
- 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x0b, 0x6c, 0x6f, 0x6e, 0x67, 0x52, 0x75,
- 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x0a, 0x15, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x70, 0x6f,
- 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x03,
- 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x61, 0x75, 0x74, 0x6f, 0x50, 0x6f, 0x70, 0x75, 0x6c, 0x61,
- 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x1a, 0x94, 0x02, 0x0a, 0x0b, 0x4c, 0x6f,
- 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x47, 0x0a, 0x12, 0x69, 0x6e, 0x69,
- 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x52, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x50, 0x6f, 0x6c, 0x6c, 0x44, 0x65, 0x6c,
- 0x61, 0x79, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79,
- 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x02, 0x52, 0x13, 0x70, 0x6f, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x4d, 0x75, 0x6c, 0x74,
- 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x6f,
- 0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x50, 0x6f,
- 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x47, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c,
- 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10,
- 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
- 0x22, 0x75, 0x0a, 0x18, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x61, 0x70,
- 0x69, 0x63, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07,
- 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d,
- 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x3f, 0x0a, 0x1c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
- 0x74, 0x65, 0x5f, 0x6f, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x5f, 0x69, 0x6e,
- 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x67, 0x65,
- 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4f, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x41, 0x73, 0x49,
- 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2a, 0xa3, 0x01, 0x0a, 0x19, 0x43, 0x6c, 0x69, 0x65,
- 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x27, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f,
- 0x4c, 0x49, 0x42, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41,
- 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,
- 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x4c, 0x4f, 0x55, 0x44, 0x10, 0x01, 0x12, 0x07, 0x0a,
- 0x03, 0x41, 0x44, 0x53, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x48, 0x4f, 0x54, 0x4f, 0x53,
- 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x52, 0x45, 0x45, 0x54, 0x5f, 0x56, 0x49, 0x45,
- 0x57, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x48, 0x4f, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10,
- 0x05, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x4f, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x47, 0x45,
- 0x4e, 0x45, 0x52, 0x41, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x41, 0x49, 0x10, 0x07, 0x2a, 0x67, 0x0a,
- 0x18, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x44, 0x65,
- 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x26, 0x43, 0x4c, 0x49,
- 0x45, 0x4e, 0x54, 0x5f, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x44, 0x45, 0x53, 0x54,
- 0x49, 0x4e, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
- 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x49, 0x54, 0x48, 0x55, 0x42, 0x10,
- 0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x5f, 0x4d, 0x41, 0x4e,
- 0x41, 0x47, 0x45, 0x52, 0x10, 0x14, 0x3a, 0x4a, 0x0a, 0x10, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64,
- 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74,
- 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9b, 0x08, 0x20, 0x03, 0x28,
- 0x09, 0x52, 0x0f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75,
- 0x72, 0x65, 0x3a, 0x43, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x68, 0x6f,
- 0x73, 0x74, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x18, 0x99, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x66, 0x61,
- 0x75, 0x6c, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x43, 0x0a, 0x0c, 0x6f, 0x61, 0x75, 0x74, 0x68,
- 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9a, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x0b, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x3a, 0x44, 0x0a, 0x0b,
- 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65,
- 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc1, 0xba, 0xab,
- 0xfa, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69,
- 0x6f, 0x6e, 0x42, 0x69, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74,
- 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61,
- 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61,
- 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+const file_google_api_client_proto_rawDesc = "" +
+ "\n" +
+ "\x17google/api/client.proto\x12\n" +
+ "google.api\x1a\x1dgoogle/api/launch_stage.proto\x1a google/protobuf/descriptor.proto\x1a\x1egoogle/protobuf/duration.proto\"\xf8\x01\n" +
+ "\x16CommonLanguageSettings\x120\n" +
+ "\x12reference_docs_uri\x18\x01 \x01(\tB\x02\x18\x01R\x10referenceDocsUri\x12H\n" +
+ "\fdestinations\x18\x02 \x03(\x0e2$.google.api.ClientLibraryDestinationR\fdestinations\x12b\n" +
+ "\x1aselective_gapic_generation\x18\x03 \x01(\v2$.google.api.SelectiveGapicGenerationR\x18selectiveGapicGeneration\"\x93\x05\n" +
+ "\x15ClientLibrarySettings\x12\x18\n" +
+ "\aversion\x18\x01 \x01(\tR\aversion\x12:\n" +
+ "\flaunch_stage\x18\x02 \x01(\x0e2\x17.google.api.LaunchStageR\vlaunchStage\x12,\n" +
+ "\x12rest_numeric_enums\x18\x03 \x01(\bR\x10restNumericEnums\x12=\n" +
+ "\rjava_settings\x18\x15 \x01(\v2\x18.google.api.JavaSettingsR\fjavaSettings\x12:\n" +
+ "\fcpp_settings\x18\x16 \x01(\v2\x17.google.api.CppSettingsR\vcppSettings\x12:\n" +
+ "\fphp_settings\x18\x17 \x01(\v2\x17.google.api.PhpSettingsR\vphpSettings\x12C\n" +
+ "\x0fpython_settings\x18\x18 \x01(\v2\x1a.google.api.PythonSettingsR\x0epythonSettings\x12=\n" +
+ "\rnode_settings\x18\x19 \x01(\v2\x18.google.api.NodeSettingsR\fnodeSettings\x12C\n" +
+ "\x0fdotnet_settings\x18\x1a \x01(\v2\x1a.google.api.DotnetSettingsR\x0edotnetSettings\x12=\n" +
+ "\rruby_settings\x18\x1b \x01(\v2\x18.google.api.RubySettingsR\frubySettings\x127\n" +
+ "\vgo_settings\x18\x1c \x01(\v2\x16.google.api.GoSettingsR\n" +
+ "goSettings\"\xf4\x04\n" +
+ "\n" +
+ "Publishing\x12C\n" +
+ "\x0fmethod_settings\x18\x02 \x03(\v2\x1a.google.api.MethodSettingsR\x0emethodSettings\x12\"\n" +
+ "\rnew_issue_uri\x18e \x01(\tR\vnewIssueUri\x12+\n" +
+ "\x11documentation_uri\x18f \x01(\tR\x10documentationUri\x12$\n" +
+ "\x0eapi_short_name\x18g \x01(\tR\fapiShortName\x12!\n" +
+ "\fgithub_label\x18h \x01(\tR\vgithubLabel\x124\n" +
+ "\x16codeowner_github_teams\x18i \x03(\tR\x14codeownerGithubTeams\x12$\n" +
+ "\x0edoc_tag_prefix\x18j \x01(\tR\fdocTagPrefix\x12I\n" +
+ "\forganization\x18k \x01(\x0e2%.google.api.ClientLibraryOrganizationR\forganization\x12L\n" +
+ "\x10library_settings\x18m \x03(\v2!.google.api.ClientLibrarySettingsR\x0flibrarySettings\x12I\n" +
+ "!proto_reference_documentation_uri\x18n \x01(\tR\x1eprotoReferenceDocumentationUri\x12G\n" +
+ " rest_reference_documentation_uri\x18o \x01(\tR\x1drestReferenceDocumentationUri\"\x9a\x02\n" +
+ "\fJavaSettings\x12'\n" +
+ "\x0flibrary_package\x18\x01 \x01(\tR\x0elibraryPackage\x12_\n" +
+ "\x13service_class_names\x18\x02 \x03(\v2/.google.api.JavaSettings.ServiceClassNamesEntryR\x11serviceClassNames\x12:\n" +
+ "\x06common\x18\x03 \x01(\v2\".google.api.CommonLanguageSettingsR\x06common\x1aD\n" +
+ "\x16ServiceClassNamesEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
+ "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"I\n" +
+ "\vCppSettings\x12:\n" +
+ "\x06common\x18\x01 \x01(\v2\".google.api.CommonLanguageSettingsR\x06common\"r\n" +
+ "\vPhpSettings\x12:\n" +
+ "\x06common\x18\x01 \x01(\v2\".google.api.CommonLanguageSettingsR\x06common\x12'\n" +
+ "\x0flibrary_package\x18\x02 \x01(\tR\x0elibraryPackage\"\x87\x03\n" +
+ "\x0ePythonSettings\x12:\n" +
+ "\x06common\x18\x01 \x01(\v2\".google.api.CommonLanguageSettingsR\x06common\x12d\n" +
+ "\x15experimental_features\x18\x02 \x01(\v2/.google.api.PythonSettings.ExperimentalFeaturesR\x14experimentalFeatures\x1a\xd2\x01\n" +
+ "\x14ExperimentalFeatures\x121\n" +
+ "\x15rest_async_io_enabled\x18\x01 \x01(\bR\x12restAsyncIoEnabled\x12E\n" +
+ "\x1fprotobuf_pythonic_types_enabled\x18\x02 \x01(\bR\x1cprotobufPythonicTypesEnabled\x12@\n" +
+ "\x1cunversioned_package_disabled\x18\x03 \x01(\bR\x1aunversionedPackageDisabled\"J\n" +
+ "\fNodeSettings\x12:\n" +
+ "\x06common\x18\x01 \x01(\v2\".google.api.CommonLanguageSettingsR\x06common\"\xae\x04\n" +
+ "\x0eDotnetSettings\x12:\n" +
+ "\x06common\x18\x01 \x01(\v2\".google.api.CommonLanguageSettingsR\x06common\x12Z\n" +
+ "\x10renamed_services\x18\x02 \x03(\v2/.google.api.DotnetSettings.RenamedServicesEntryR\x0frenamedServices\x12]\n" +
+ "\x11renamed_resources\x18\x03 \x03(\v20.google.api.DotnetSettings.RenamedResourcesEntryR\x10renamedResources\x12+\n" +
+ "\x11ignored_resources\x18\x04 \x03(\tR\x10ignoredResources\x128\n" +
+ "\x18forced_namespace_aliases\x18\x05 \x03(\tR\x16forcedNamespaceAliases\x125\n" +
+ "\x16handwritten_signatures\x18\x06 \x03(\tR\x15handwrittenSignatures\x1aB\n" +
+ "\x14RenamedServicesEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
+ "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1aC\n" +
+ "\x15RenamedResourcesEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
+ "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"J\n" +
+ "\fRubySettings\x12:\n" +
+ "\x06common\x18\x01 \x01(\v2\".google.api.CommonLanguageSettingsR\x06common\"\xe4\x01\n" +
+ "\n" +
+ "GoSettings\x12:\n" +
+ "\x06common\x18\x01 \x01(\v2\".google.api.CommonLanguageSettingsR\x06common\x12V\n" +
+ "\x10renamed_services\x18\x02 \x03(\v2+.google.api.GoSettings.RenamedServicesEntryR\x0frenamedServices\x1aB\n" +
+ "\x14RenamedServicesEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
+ "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xff\x03\n" +
+ "\x0eMethodSettings\x12\x1a\n" +
+ "\bselector\x18\x01 \x01(\tR\bselector\x12I\n" +
+ "\flong_running\x18\x02 \x01(\v2&.google.api.MethodSettings.LongRunningR\vlongRunning\x122\n" +
+ "\x15auto_populated_fields\x18\x03 \x03(\tR\x13autoPopulatedFields\x12;\n" +
+ "\bbatching\x18\x04 \x01(\v2\x1f.google.api.BatchingConfigProtoR\bbatching\x1a\x94\x02\n" +
+ "\vLongRunning\x12G\n" +
+ "\x12initial_poll_delay\x18\x01 \x01(\v2\x19.google.protobuf.DurationR\x10initialPollDelay\x122\n" +
+ "\x15poll_delay_multiplier\x18\x02 \x01(\x02R\x13pollDelayMultiplier\x12?\n" +
+ "\x0emax_poll_delay\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\fmaxPollDelay\x12G\n" +
+ "\x12total_poll_timeout\x18\x04 \x01(\v2\x19.google.protobuf.DurationR\x10totalPollTimeout\"u\n" +
+ "\x18SelectiveGapicGeneration\x12\x18\n" +
+ "\amethods\x18\x01 \x03(\tR\amethods\x12?\n" +
+ "\x1cgenerate_omitted_as_internal\x18\x02 \x01(\bR\x19generateOmittedAsInternal\"\xa8\x01\n" +
+ "\x13BatchingConfigProto\x12A\n" +
+ "\n" +
+ "thresholds\x18\x01 \x01(\v2!.google.api.BatchingSettingsProtoR\n" +
+ "thresholds\x12N\n" +
+ "\x10batch_descriptor\x18\x02 \x01(\v2#.google.api.BatchingDescriptorProtoR\x0fbatchDescriptor\"\x9f\x04\n" +
+ "\x15BatchingSettingsProto\x126\n" +
+ "\x17element_count_threshold\x18\x01 \x01(\x05R\x15elementCountThreshold\x124\n" +
+ "\x16request_byte_threshold\x18\x02 \x01(\x03R\x14requestByteThreshold\x12B\n" +
+ "\x0fdelay_threshold\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\x0edelayThreshold\x12.\n" +
+ "\x13element_count_limit\x18\x04 \x01(\x05R\x11elementCountLimit\x12,\n" +
+ "\x12request_byte_limit\x18\x05 \x01(\x05R\x10requestByteLimit\x12;\n" +
+ "\x1aflow_control_element_limit\x18\x06 \x01(\x05R\x17flowControlElementLimit\x125\n" +
+ "\x17flow_control_byte_limit\x18\a \x01(\x05R\x14flowControlByteLimit\x12\x81\x01\n" +
+ "$flow_control_limit_exceeded_behavior\x18\b \x01(\x0e21.google.api.FlowControlLimitExceededBehaviorProtoR flowControlLimitExceededBehavior\"\x9e\x01\n" +
+ "\x17BatchingDescriptorProto\x12#\n" +
+ "\rbatched_field\x18\x01 \x01(\tR\fbatchedField\x121\n" +
+ "\x14discriminator_fields\x18\x02 \x03(\tR\x13discriminatorFields\x12+\n" +
+ "\x11subresponse_field\x18\x03 \x01(\tR\x10subresponseField*\xa3\x01\n" +
+ "\x19ClientLibraryOrganization\x12+\n" +
+ "'CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED\x10\x00\x12\t\n" +
+ "\x05CLOUD\x10\x01\x12\a\n" +
+ "\x03ADS\x10\x02\x12\n" +
+ "\n" +
+ "\x06PHOTOS\x10\x03\x12\x0f\n" +
+ "\vSTREET_VIEW\x10\x04\x12\f\n" +
+ "\bSHOPPING\x10\x05\x12\a\n" +
+ "\x03GEO\x10\x06\x12\x11\n" +
+ "\rGENERATIVE_AI\x10\a*g\n" +
+ "\x18ClientLibraryDestination\x12*\n" +
+ "&CLIENT_LIBRARY_DESTINATION_UNSPECIFIED\x10\x00\x12\n" +
+ "\n" +
+ "\x06GITHUB\x10\n" +
+ "\x12\x13\n" +
+ "\x0fPACKAGE_MANAGER\x10\x14*g\n" +
+ "%FlowControlLimitExceededBehaviorProto\x12\x12\n" +
+ "\x0eUNSET_BEHAVIOR\x10\x00\x12\x13\n" +
+ "\x0fTHROW_EXCEPTION\x10\x01\x12\t\n" +
+ "\x05BLOCK\x10\x02\x12\n" +
+ "\n" +
+ "\x06IGNORE\x10\x03:J\n" +
+ "\x10method_signature\x12\x1e.google.protobuf.MethodOptions\x18\x9b\b \x03(\tR\x0fmethodSignature:C\n" +
+ "\fdefault_host\x12\x1f.google.protobuf.ServiceOptions\x18\x99\b \x01(\tR\vdefaultHost:C\n" +
+ "\foauth_scopes\x12\x1f.google.protobuf.ServiceOptions\x18\x9a\b \x01(\tR\voauthScopes:D\n" +
+ "\vapi_version\x12\x1f.google.protobuf.ServiceOptions\x18\xc1\xba\xab\xfa\x01 \x01(\tR\n" +
+ "apiVersionBi\n" +
+ "\x0ecom.google.apiB\vClientProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAPIb\x06proto3"
var (
file_google_api_client_proto_rawDescOnce sync.Once
- file_google_api_client_proto_rawDescData = file_google_api_client_proto_rawDesc
+ file_google_api_client_proto_rawDescData []byte
)
func file_google_api_client_proto_rawDescGZIP() []byte {
file_google_api_client_proto_rawDescOnce.Do(func() {
- file_google_api_client_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_client_proto_rawDescData)
+ file_google_api_client_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_api_client_proto_rawDesc), len(file_google_api_client_proto_rawDesc)))
})
return file_google_api_client_proto_rawDescData
}
-var file_google_api_client_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
-var file_google_api_client_proto_msgTypes = make([]protoimpl.MessageInfo, 19)
-var file_google_api_client_proto_goTypes = []interface{}{
+var file_google_api_client_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
+var file_google_api_client_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
+var file_google_api_client_proto_goTypes = []any{
(ClientLibraryOrganization)(0), // 0: google.api.ClientLibraryOrganization
(ClientLibraryDestination)(0), // 1: google.api.ClientLibraryDestination
- (*CommonLanguageSettings)(nil), // 2: google.api.CommonLanguageSettings
- (*ClientLibrarySettings)(nil), // 3: google.api.ClientLibrarySettings
- (*Publishing)(nil), // 4: google.api.Publishing
- (*JavaSettings)(nil), // 5: google.api.JavaSettings
- (*CppSettings)(nil), // 6: google.api.CppSettings
- (*PhpSettings)(nil), // 7: google.api.PhpSettings
- (*PythonSettings)(nil), // 8: google.api.PythonSettings
- (*NodeSettings)(nil), // 9: google.api.NodeSettings
- (*DotnetSettings)(nil), // 10: google.api.DotnetSettings
- (*RubySettings)(nil), // 11: google.api.RubySettings
- (*GoSettings)(nil), // 12: google.api.GoSettings
- (*MethodSettings)(nil), // 13: google.api.MethodSettings
- (*SelectiveGapicGeneration)(nil), // 14: google.api.SelectiveGapicGeneration
- nil, // 15: google.api.JavaSettings.ServiceClassNamesEntry
- (*PythonSettings_ExperimentalFeatures)(nil), // 16: google.api.PythonSettings.ExperimentalFeatures
- nil, // 17: google.api.DotnetSettings.RenamedServicesEntry
- nil, // 18: google.api.DotnetSettings.RenamedResourcesEntry
- nil, // 19: google.api.GoSettings.RenamedServicesEntry
- (*MethodSettings_LongRunning)(nil), // 20: google.api.MethodSettings.LongRunning
- (api.LaunchStage)(0), // 21: google.api.LaunchStage
- (*durationpb.Duration)(nil), // 22: google.protobuf.Duration
- (*descriptorpb.MethodOptions)(nil), // 23: google.protobuf.MethodOptions
- (*descriptorpb.ServiceOptions)(nil), // 24: google.protobuf.ServiceOptions
+ (FlowControlLimitExceededBehaviorProto)(0), // 2: google.api.FlowControlLimitExceededBehaviorProto
+ (*CommonLanguageSettings)(nil), // 3: google.api.CommonLanguageSettings
+ (*ClientLibrarySettings)(nil), // 4: google.api.ClientLibrarySettings
+ (*Publishing)(nil), // 5: google.api.Publishing
+ (*JavaSettings)(nil), // 6: google.api.JavaSettings
+ (*CppSettings)(nil), // 7: google.api.CppSettings
+ (*PhpSettings)(nil), // 8: google.api.PhpSettings
+ (*PythonSettings)(nil), // 9: google.api.PythonSettings
+ (*NodeSettings)(nil), // 10: google.api.NodeSettings
+ (*DotnetSettings)(nil), // 11: google.api.DotnetSettings
+ (*RubySettings)(nil), // 12: google.api.RubySettings
+ (*GoSettings)(nil), // 13: google.api.GoSettings
+ (*MethodSettings)(nil), // 14: google.api.MethodSettings
+ (*SelectiveGapicGeneration)(nil), // 15: google.api.SelectiveGapicGeneration
+ (*BatchingConfigProto)(nil), // 16: google.api.BatchingConfigProto
+ (*BatchingSettingsProto)(nil), // 17: google.api.BatchingSettingsProto
+ (*BatchingDescriptorProto)(nil), // 18: google.api.BatchingDescriptorProto
+ nil, // 19: google.api.JavaSettings.ServiceClassNamesEntry
+ (*PythonSettings_ExperimentalFeatures)(nil), // 20: google.api.PythonSettings.ExperimentalFeatures
+ nil, // 21: google.api.DotnetSettings.RenamedServicesEntry
+ nil, // 22: google.api.DotnetSettings.RenamedResourcesEntry
+ nil, // 23: google.api.GoSettings.RenamedServicesEntry
+ (*MethodSettings_LongRunning)(nil), // 24: google.api.MethodSettings.LongRunning
+ (api.LaunchStage)(0), // 25: google.api.LaunchStage
+ (*durationpb.Duration)(nil), // 26: google.protobuf.Duration
+ (*descriptorpb.MethodOptions)(nil), // 27: google.protobuf.MethodOptions
+ (*descriptorpb.ServiceOptions)(nil), // 28: google.protobuf.ServiceOptions
}
var file_google_api_client_proto_depIdxs = []int32{
1, // 0: google.api.CommonLanguageSettings.destinations:type_name -> google.api.ClientLibraryDestination
- 14, // 1: google.api.CommonLanguageSettings.selective_gapic_generation:type_name -> google.api.SelectiveGapicGeneration
- 21, // 2: google.api.ClientLibrarySettings.launch_stage:type_name -> google.api.LaunchStage
- 5, // 3: google.api.ClientLibrarySettings.java_settings:type_name -> google.api.JavaSettings
- 6, // 4: google.api.ClientLibrarySettings.cpp_settings:type_name -> google.api.CppSettings
- 7, // 5: google.api.ClientLibrarySettings.php_settings:type_name -> google.api.PhpSettings
- 8, // 6: google.api.ClientLibrarySettings.python_settings:type_name -> google.api.PythonSettings
- 9, // 7: google.api.ClientLibrarySettings.node_settings:type_name -> google.api.NodeSettings
- 10, // 8: google.api.ClientLibrarySettings.dotnet_settings:type_name -> google.api.DotnetSettings
- 11, // 9: google.api.ClientLibrarySettings.ruby_settings:type_name -> google.api.RubySettings
- 12, // 10: google.api.ClientLibrarySettings.go_settings:type_name -> google.api.GoSettings
- 13, // 11: google.api.Publishing.method_settings:type_name -> google.api.MethodSettings
+ 15, // 1: google.api.CommonLanguageSettings.selective_gapic_generation:type_name -> google.api.SelectiveGapicGeneration
+ 25, // 2: google.api.ClientLibrarySettings.launch_stage:type_name -> google.api.LaunchStage
+ 6, // 3: google.api.ClientLibrarySettings.java_settings:type_name -> google.api.JavaSettings
+ 7, // 4: google.api.ClientLibrarySettings.cpp_settings:type_name -> google.api.CppSettings
+ 8, // 5: google.api.ClientLibrarySettings.php_settings:type_name -> google.api.PhpSettings
+ 9, // 6: google.api.ClientLibrarySettings.python_settings:type_name -> google.api.PythonSettings
+ 10, // 7: google.api.ClientLibrarySettings.node_settings:type_name -> google.api.NodeSettings
+ 11, // 8: google.api.ClientLibrarySettings.dotnet_settings:type_name -> google.api.DotnetSettings
+ 12, // 9: google.api.ClientLibrarySettings.ruby_settings:type_name -> google.api.RubySettings
+ 13, // 10: google.api.ClientLibrarySettings.go_settings:type_name -> google.api.GoSettings
+ 14, // 11: google.api.Publishing.method_settings:type_name -> google.api.MethodSettings
0, // 12: google.api.Publishing.organization:type_name -> google.api.ClientLibraryOrganization
- 3, // 13: google.api.Publishing.library_settings:type_name -> google.api.ClientLibrarySettings
- 15, // 14: google.api.JavaSettings.service_class_names:type_name -> google.api.JavaSettings.ServiceClassNamesEntry
- 2, // 15: google.api.JavaSettings.common:type_name -> google.api.CommonLanguageSettings
- 2, // 16: google.api.CppSettings.common:type_name -> google.api.CommonLanguageSettings
- 2, // 17: google.api.PhpSettings.common:type_name -> google.api.CommonLanguageSettings
- 2, // 18: google.api.PythonSettings.common:type_name -> google.api.CommonLanguageSettings
- 16, // 19: google.api.PythonSettings.experimental_features:type_name -> google.api.PythonSettings.ExperimentalFeatures
- 2, // 20: google.api.NodeSettings.common:type_name -> google.api.CommonLanguageSettings
- 2, // 21: google.api.DotnetSettings.common:type_name -> google.api.CommonLanguageSettings
- 17, // 22: google.api.DotnetSettings.renamed_services:type_name -> google.api.DotnetSettings.RenamedServicesEntry
- 18, // 23: google.api.DotnetSettings.renamed_resources:type_name -> google.api.DotnetSettings.RenamedResourcesEntry
- 2, // 24: google.api.RubySettings.common:type_name -> google.api.CommonLanguageSettings
- 2, // 25: google.api.GoSettings.common:type_name -> google.api.CommonLanguageSettings
- 19, // 26: google.api.GoSettings.renamed_services:type_name -> google.api.GoSettings.RenamedServicesEntry
- 20, // 27: google.api.MethodSettings.long_running:type_name -> google.api.MethodSettings.LongRunning
- 22, // 28: google.api.MethodSettings.LongRunning.initial_poll_delay:type_name -> google.protobuf.Duration
- 22, // 29: google.api.MethodSettings.LongRunning.max_poll_delay:type_name -> google.protobuf.Duration
- 22, // 30: google.api.MethodSettings.LongRunning.total_poll_timeout:type_name -> google.protobuf.Duration
- 23, // 31: google.api.method_signature:extendee -> google.protobuf.MethodOptions
- 24, // 32: google.api.default_host:extendee -> google.protobuf.ServiceOptions
- 24, // 33: google.api.oauth_scopes:extendee -> google.protobuf.ServiceOptions
- 24, // 34: google.api.api_version:extendee -> google.protobuf.ServiceOptions
- 35, // [35:35] is the sub-list for method output_type
- 35, // [35:35] is the sub-list for method input_type
- 35, // [35:35] is the sub-list for extension type_name
- 31, // [31:35] is the sub-list for extension extendee
- 0, // [0:31] is the sub-list for field type_name
+ 4, // 13: google.api.Publishing.library_settings:type_name -> google.api.ClientLibrarySettings
+ 19, // 14: google.api.JavaSettings.service_class_names:type_name -> google.api.JavaSettings.ServiceClassNamesEntry
+ 3, // 15: google.api.JavaSettings.common:type_name -> google.api.CommonLanguageSettings
+ 3, // 16: google.api.CppSettings.common:type_name -> google.api.CommonLanguageSettings
+ 3, // 17: google.api.PhpSettings.common:type_name -> google.api.CommonLanguageSettings
+ 3, // 18: google.api.PythonSettings.common:type_name -> google.api.CommonLanguageSettings
+ 20, // 19: google.api.PythonSettings.experimental_features:type_name -> google.api.PythonSettings.ExperimentalFeatures
+ 3, // 20: google.api.NodeSettings.common:type_name -> google.api.CommonLanguageSettings
+ 3, // 21: google.api.DotnetSettings.common:type_name -> google.api.CommonLanguageSettings
+ 21, // 22: google.api.DotnetSettings.renamed_services:type_name -> google.api.DotnetSettings.RenamedServicesEntry
+ 22, // 23: google.api.DotnetSettings.renamed_resources:type_name -> google.api.DotnetSettings.RenamedResourcesEntry
+ 3, // 24: google.api.RubySettings.common:type_name -> google.api.CommonLanguageSettings
+ 3, // 25: google.api.GoSettings.common:type_name -> google.api.CommonLanguageSettings
+ 23, // 26: google.api.GoSettings.renamed_services:type_name -> google.api.GoSettings.RenamedServicesEntry
+ 24, // 27: google.api.MethodSettings.long_running:type_name -> google.api.MethodSettings.LongRunning
+ 16, // 28: google.api.MethodSettings.batching:type_name -> google.api.BatchingConfigProto
+ 17, // 29: google.api.BatchingConfigProto.thresholds:type_name -> google.api.BatchingSettingsProto
+ 18, // 30: google.api.BatchingConfigProto.batch_descriptor:type_name -> google.api.BatchingDescriptorProto
+ 26, // 31: google.api.BatchingSettingsProto.delay_threshold:type_name -> google.protobuf.Duration
+ 2, // 32: google.api.BatchingSettingsProto.flow_control_limit_exceeded_behavior:type_name -> google.api.FlowControlLimitExceededBehaviorProto
+ 26, // 33: google.api.MethodSettings.LongRunning.initial_poll_delay:type_name -> google.protobuf.Duration
+ 26, // 34: google.api.MethodSettings.LongRunning.max_poll_delay:type_name -> google.protobuf.Duration
+ 26, // 35: google.api.MethodSettings.LongRunning.total_poll_timeout:type_name -> google.protobuf.Duration
+ 27, // 36: google.api.method_signature:extendee -> google.protobuf.MethodOptions
+ 28, // 37: google.api.default_host:extendee -> google.protobuf.ServiceOptions
+ 28, // 38: google.api.oauth_scopes:extendee -> google.protobuf.ServiceOptions
+ 28, // 39: google.api.api_version:extendee -> google.protobuf.ServiceOptions
+ 40, // [40:40] is the sub-list for method output_type
+ 40, // [40:40] is the sub-list for method input_type
+ 40, // [40:40] is the sub-list for extension type_name
+ 36, // [36:40] is the sub-list for extension extendee
+ 0, // [0:36] is the sub-list for field type_name
}
func init() { file_google_api_client_proto_init() }
@@ -1898,195 +2047,13 @@ func file_google_api_client_proto_init() {
if File_google_api_client_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_google_api_client_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CommonLanguageSettings); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_google_api_client_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ClientLibrarySettings); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_google_api_client_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Publishing); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_google_api_client_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*JavaSettings); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_google_api_client_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CppSettings); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_google_api_client_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PhpSettings); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_google_api_client_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PythonSettings); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_google_api_client_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*NodeSettings); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_google_api_client_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DotnetSettings); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_google_api_client_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RubySettings); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_google_api_client_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GoSettings); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_google_api_client_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*MethodSettings); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_google_api_client_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SelectiveGapicGeneration); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_google_api_client_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PythonSettings_ExperimentalFeatures); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_google_api_client_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*MethodSettings_LongRunning); 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_google_api_client_proto_rawDesc,
- NumEnums: 2,
- NumMessages: 19,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_api_client_proto_rawDesc), len(file_google_api_client_proto_rawDesc)),
+ NumEnums: 3,
+ NumMessages: 22,
NumExtensions: 4,
NumServices: 0,
},
@@ -2097,7 +2064,6 @@ func file_google_api_client_proto_init() {
ExtensionInfos: file_google_api_client_proto_extTypes,
}.Build()
File_google_api_client_proto = out.File
- file_google_api_client_proto_rawDesc = nil
file_google_api_client_proto_goTypes = nil
file_google_api_client_proto_depIdxs = nil
}
diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/field_behavior.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/field_behavior.pb.go
index 5d583b866006..fc6d27b4abc9 100644
--- a/vendor/google.golang.org/genproto/googleapis/api/annotations/field_behavior.pb.go
+++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/field_behavior.pb.go
@@ -1,4 +1,4 @@
-// Copyright 2025 Google LLC
+// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/field_info.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/field_info.pb.go
index 53e9dd1e9982..b660d02c12c4 100644
--- a/vendor/google.golang.org/genproto/googleapis/api/annotations/field_info.pb.go
+++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/field_info.pb.go
@@ -1,4 +1,4 @@
-// Copyright 2025 Google LLC
+// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go
index d30fcee4ce94..998205e18084 100644
--- a/vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go
+++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go
@@ -1,4 +1,4 @@
-// Copyright 2025 Google LLC
+// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go
index 175974a8698b..ad2a3fbf8b10 100644
--- a/vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go
+++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go
@@ -1,4 +1,4 @@
-// Copyright 2025 Google LLC
+// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/routing.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/routing.pb.go
index b8c4aa71f22e..9a83b9636bbe 100644
--- a/vendor/google.golang.org/genproto/googleapis/api/annotations/routing.pb.go
+++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/routing.pb.go
@@ -1,4 +1,4 @@
-// Copyright 2025 Google LLC
+// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -66,9 +66,13 @@ const (
// app_profile_id: profiles/prof_qux
// }
//
-// The routing header consists of one or multiple key-value pairs. Every key
-// and value must be percent-encoded, and joined together in the format of
-// `key1=value1&key2=value2`.
+// The routing header consists of one or multiple key-value pairs. The order of
+// the key-value pairs is undefined, the order of the `routing_parameters` in
+// the `RoutingRule` only matters for the evaluation order of the path
+// templates when `field` is the same. See the examples below for more details.
+//
+// Every key and value in the routing header must be percent-encoded,
+// and joined together in the following format: `key1=value1&key2=value2`.
// The examples below skip the percent-encoding for readability.
//
// # Example 1
diff --git a/vendor/google.golang.org/genproto/googleapis/api/expr/v1alpha1/checked.pb.go b/vendor/google.golang.org/genproto/googleapis/api/expr/v1alpha1/checked.pb.go
index af9c44d93e23..c197b1a6798e 100644
--- a/vendor/google.golang.org/genproto/googleapis/api/expr/v1alpha1/checked.pb.go
+++ b/vendor/google.golang.org/genproto/googleapis/api/expr/v1alpha1/checked.pb.go
@@ -1,4 +1,4 @@
-// Copyright 2025 Google LLC
+// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
+// protoc-gen-go v1.36.11
// protoc v4.24.4
// source: google/api/expr/v1alpha1/checked.proto
@@ -23,6 +23,7 @@ package expr
import (
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
@@ -175,10 +176,7 @@ func (Type_WellKnownType) EnumDescriptor() ([]byte, []int) {
// A CEL expression which has been successfully type checked.
type CheckedExpr struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// A map from expression ids to resolved references.
//
// The following entries are in this table:
@@ -194,13 +192,13 @@ type CheckedExpr struct {
// called.
// - Every CreateStruct expression for a message has an entry, identifying
// the message.
- ReferenceMap map[int64]*Reference `protobuf:"bytes,2,rep,name=reference_map,json=referenceMap,proto3" json:"reference_map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ ReferenceMap map[int64]*Reference `protobuf:"bytes,2,rep,name=reference_map,json=referenceMap,proto3" json:"reference_map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// A map from expression ids to types.
//
// Every expression node which has a type different than DYN has a mapping
// here. If an expression has type DYN, it is omitted from this map to save
// space.
- TypeMap map[int64]*Type `protobuf:"bytes,3,rep,name=type_map,json=typeMap,proto3" json:"type_map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ TypeMap map[int64]*Type `protobuf:"bytes,3,rep,name=type_map,json=typeMap,proto3" json:"type_map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// The source info derived from input that generated the parsed `expr` and
// any optimizations made during the type-checking pass.
SourceInfo *SourceInfo `protobuf:"bytes,5,opt,name=source_info,json=sourceInfo,proto3" json:"source_info,omitempty"`
@@ -214,16 +212,16 @@ type CheckedExpr struct {
ExprVersion string `protobuf:"bytes,6,opt,name=expr_version,json=exprVersion,proto3" json:"expr_version,omitempty"`
// The checked expression. Semantically equivalent to the parsed `expr`, but
// may have structural differences.
- Expr *Expr `protobuf:"bytes,4,opt,name=expr,proto3" json:"expr,omitempty"`
+ Expr *Expr `protobuf:"bytes,4,opt,name=expr,proto3" json:"expr,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *CheckedExpr) Reset() {
*x = CheckedExpr{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CheckedExpr) String() string {
@@ -234,7 +232,7 @@ func (*CheckedExpr) ProtoMessage() {}
func (x *CheckedExpr) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -286,13 +284,10 @@ func (x *CheckedExpr) GetExpr() *Expr {
// Represents a CEL type.
type Type struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// The kind of type.
//
- // Types that are assignable to TypeKind:
+ // Types that are valid to be assigned to TypeKind:
//
// *Type_Dyn
// *Type_Null
@@ -307,16 +302,16 @@ type Type struct {
// *Type_Type
// *Type_Error
// *Type_AbstractType_
- TypeKind isType_TypeKind `protobuf_oneof:"type_kind"`
+ TypeKind isType_TypeKind `protobuf_oneof:"type_kind"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Type) Reset() {
*x = Type{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Type) String() string {
@@ -327,7 +322,7 @@ func (*Type) ProtoMessage() {}
func (x *Type) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -342,100 +337,126 @@ func (*Type) Descriptor() ([]byte, []int) {
return file_google_api_expr_v1alpha1_checked_proto_rawDescGZIP(), []int{1}
}
-func (m *Type) GetTypeKind() isType_TypeKind {
- if m != nil {
- return m.TypeKind
+func (x *Type) GetTypeKind() isType_TypeKind {
+ if x != nil {
+ return x.TypeKind
}
return nil
}
func (x *Type) GetDyn() *emptypb.Empty {
- if x, ok := x.GetTypeKind().(*Type_Dyn); ok {
- return x.Dyn
+ if x != nil {
+ if x, ok := x.TypeKind.(*Type_Dyn); ok {
+ return x.Dyn
+ }
}
return nil
}
func (x *Type) GetNull() structpb.NullValue {
- if x, ok := x.GetTypeKind().(*Type_Null); ok {
- return x.Null
+ if x != nil {
+ if x, ok := x.TypeKind.(*Type_Null); ok {
+ return x.Null
+ }
}
- return structpb.NullValue_NULL_VALUE
+ return structpb.NullValue(0)
}
func (x *Type) GetPrimitive() Type_PrimitiveType {
- if x, ok := x.GetTypeKind().(*Type_Primitive); ok {
- return x.Primitive
+ if x != nil {
+ if x, ok := x.TypeKind.(*Type_Primitive); ok {
+ return x.Primitive
+ }
}
return Type_PRIMITIVE_TYPE_UNSPECIFIED
}
func (x *Type) GetWrapper() Type_PrimitiveType {
- if x, ok := x.GetTypeKind().(*Type_Wrapper); ok {
- return x.Wrapper
+ if x != nil {
+ if x, ok := x.TypeKind.(*Type_Wrapper); ok {
+ return x.Wrapper
+ }
}
return Type_PRIMITIVE_TYPE_UNSPECIFIED
}
func (x *Type) GetWellKnown() Type_WellKnownType {
- if x, ok := x.GetTypeKind().(*Type_WellKnown); ok {
- return x.WellKnown
+ if x != nil {
+ if x, ok := x.TypeKind.(*Type_WellKnown); ok {
+ return x.WellKnown
+ }
}
return Type_WELL_KNOWN_TYPE_UNSPECIFIED
}
func (x *Type) GetListType() *Type_ListType {
- if x, ok := x.GetTypeKind().(*Type_ListType_); ok {
- return x.ListType
+ if x != nil {
+ if x, ok := x.TypeKind.(*Type_ListType_); ok {
+ return x.ListType
+ }
}
return nil
}
func (x *Type) GetMapType() *Type_MapType {
- if x, ok := x.GetTypeKind().(*Type_MapType_); ok {
- return x.MapType
+ if x != nil {
+ if x, ok := x.TypeKind.(*Type_MapType_); ok {
+ return x.MapType
+ }
}
return nil
}
func (x *Type) GetFunction() *Type_FunctionType {
- if x, ok := x.GetTypeKind().(*Type_Function); ok {
- return x.Function
+ if x != nil {
+ if x, ok := x.TypeKind.(*Type_Function); ok {
+ return x.Function
+ }
}
return nil
}
func (x *Type) GetMessageType() string {
- if x, ok := x.GetTypeKind().(*Type_MessageType); ok {
- return x.MessageType
+ if x != nil {
+ if x, ok := x.TypeKind.(*Type_MessageType); ok {
+ return x.MessageType
+ }
}
return ""
}
func (x *Type) GetTypeParam() string {
- if x, ok := x.GetTypeKind().(*Type_TypeParam); ok {
- return x.TypeParam
+ if x != nil {
+ if x, ok := x.TypeKind.(*Type_TypeParam); ok {
+ return x.TypeParam
+ }
}
return ""
}
func (x *Type) GetType() *Type {
- if x, ok := x.GetTypeKind().(*Type_Type); ok {
- return x.Type
+ if x != nil {
+ if x, ok := x.TypeKind.(*Type_Type); ok {
+ return x.Type
+ }
}
return nil
}
func (x *Type) GetError() *emptypb.Empty {
- if x, ok := x.GetTypeKind().(*Type_Error); ok {
- return x.Error
+ if x != nil {
+ if x, ok := x.TypeKind.(*Type_Error); ok {
+ return x.Error
+ }
}
return nil
}
func (x *Type) GetAbstractType() *Type_AbstractType {
- if x, ok := x.GetTypeKind().(*Type_AbstractType_); ok {
- return x.AbstractType
+ if x != nil {
+ if x, ok := x.TypeKind.(*Type_AbstractType_); ok {
+ return x.AbstractType
+ }
}
return nil
}
@@ -554,10 +575,7 @@ func (*Type_AbstractType_) isType_TypeKind() {}
// A declaration is part of the contract between the expression, the agent
// evaluating that expression, and the caller requesting evaluation.
type Decl struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// The fully qualified name of the declaration.
//
// Declarations are organized in containers and this represents the full path
@@ -571,20 +589,20 @@ type Decl struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Required. The declaration kind.
//
- // Types that are assignable to DeclKind:
+ // Types that are valid to be assigned to DeclKind:
//
// *Decl_Ident
// *Decl_Function
- DeclKind isDecl_DeclKind `protobuf_oneof:"decl_kind"`
+ DeclKind isDecl_DeclKind `protobuf_oneof:"decl_kind"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Decl) Reset() {
*x = Decl{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Decl) String() string {
@@ -595,7 +613,7 @@ func (*Decl) ProtoMessage() {}
func (x *Decl) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -617,23 +635,27 @@ func (x *Decl) GetName() string {
return ""
}
-func (m *Decl) GetDeclKind() isDecl_DeclKind {
- if m != nil {
- return m.DeclKind
+func (x *Decl) GetDeclKind() isDecl_DeclKind {
+ if x != nil {
+ return x.DeclKind
}
return nil
}
func (x *Decl) GetIdent() *Decl_IdentDecl {
- if x, ok := x.GetDeclKind().(*Decl_Ident); ok {
- return x.Ident
+ if x != nil {
+ if x, ok := x.DeclKind.(*Decl_Ident); ok {
+ return x.Ident
+ }
}
return nil
}
func (x *Decl) GetFunction() *Decl_FunctionDecl {
- if x, ok := x.GetDeclKind().(*Decl_Function); ok {
- return x.Function
+ if x != nil {
+ if x, ok := x.DeclKind.(*Decl_Function); ok {
+ return x.Function
+ }
}
return nil
}
@@ -658,10 +680,7 @@ func (*Decl_Function) isDecl_DeclKind() {}
// Describes a resolved reference to a declaration.
type Reference struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// The fully qualified name of the declaration.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// For references to functions, this is a list of `Overload.overload_id`
@@ -676,16 +695,16 @@ type Reference struct {
OverloadId []string `protobuf:"bytes,3,rep,name=overload_id,json=overloadId,proto3" json:"overload_id,omitempty"`
// For references to constants, this may contain the value of the
// constant if known at compile time.
- Value *Constant `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
+ Value *Constant `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Reference) Reset() {
*x = Reference{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Reference) String() string {
@@ -696,7 +715,7 @@ func (*Reference) ProtoMessage() {}
func (x *Reference) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -734,21 +753,18 @@ func (x *Reference) GetValue() *Constant {
// List type with typed elements, e.g. `list`.
type Type_ListType struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// The element type.
- ElemType *Type `protobuf:"bytes,1,opt,name=elem_type,json=elemType,proto3" json:"elem_type,omitempty"`
+ ElemType *Type `protobuf:"bytes,1,opt,name=elem_type,json=elemType,proto3" json:"elem_type,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Type_ListType) Reset() {
*x = Type_ListType{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Type_ListType) String() string {
@@ -759,7 +775,7 @@ func (*Type_ListType) ProtoMessage() {}
func (x *Type_ListType) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -783,23 +799,20 @@ func (x *Type_ListType) GetElemType() *Type {
// Map type with parameterized key and value types, e.g. `map`.
type Type_MapType struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// The type of the key.
KeyType *Type `protobuf:"bytes,1,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"`
// The type of the value.
- ValueType *Type `protobuf:"bytes,2,opt,name=value_type,json=valueType,proto3" json:"value_type,omitempty"`
+ ValueType *Type `protobuf:"bytes,2,opt,name=value_type,json=valueType,proto3" json:"value_type,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Type_MapType) Reset() {
*x = Type_MapType{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Type_MapType) String() string {
@@ -810,7 +823,7 @@ func (*Type_MapType) ProtoMessage() {}
func (x *Type_MapType) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -841,23 +854,20 @@ func (x *Type_MapType) GetValueType() *Type {
// Function type with result and arg types.
type Type_FunctionType struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Result type of the function.
ResultType *Type `protobuf:"bytes,1,opt,name=result_type,json=resultType,proto3" json:"result_type,omitempty"`
// Argument types of the function.
- ArgTypes []*Type `protobuf:"bytes,2,rep,name=arg_types,json=argTypes,proto3" json:"arg_types,omitempty"`
+ ArgTypes []*Type `protobuf:"bytes,2,rep,name=arg_types,json=argTypes,proto3" json:"arg_types,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Type_FunctionType) Reset() {
*x = Type_FunctionType{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Type_FunctionType) String() string {
@@ -868,7 +878,7 @@ func (*Type_FunctionType) ProtoMessage() {}
func (x *Type_FunctionType) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[8]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -899,23 +909,20 @@ func (x *Type_FunctionType) GetArgTypes() []*Type {
// Application defined abstract type.
type Type_AbstractType struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// The fully qualified name of this abstract type.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Parameter types for this abstract type.
ParameterTypes []*Type `protobuf:"bytes,2,rep,name=parameter_types,json=parameterTypes,proto3" json:"parameter_types,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Type_AbstractType) Reset() {
*x = Type_AbstractType{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[9]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Type_AbstractType) String() string {
@@ -926,7 +933,7 @@ func (*Type_AbstractType) ProtoMessage() {}
func (x *Type_AbstractType) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[9]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -962,26 +969,23 @@ func (x *Type_AbstractType) GetParameterTypes() []*Type {
// but may be used in conjunction with other identifiers bound at evaluation
// time.
type Decl_IdentDecl struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Required. The type of the identifier.
Type *Type `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
// The constant value of the identifier. If not specified, the identifier
// must be supplied at evaluation time.
Value *Constant `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
// Documentation string for the identifier.
- Doc string `protobuf:"bytes,3,opt,name=doc,proto3" json:"doc,omitempty"`
+ Doc string `protobuf:"bytes,3,opt,name=doc,proto3" json:"doc,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Decl_IdentDecl) Reset() {
*x = Decl_IdentDecl{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[10]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Decl_IdentDecl) String() string {
@@ -992,7 +996,7 @@ func (*Decl_IdentDecl) ProtoMessage() {}
func (x *Decl_IdentDecl) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[10]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1034,21 +1038,30 @@ func (x *Decl_IdentDecl) GetDoc() string {
// Functions have no observable side-effects (there may be side-effects like
// logging which are not observable from CEL).
type Decl_FunctionDecl struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Required. List of function overloads, must contain at least one overload.
Overloads []*Decl_FunctionDecl_Overload `protobuf:"bytes,1,rep,name=overloads,proto3" json:"overloads,omitempty"`
+ // Documentation string for the function that indicates the general purpose
+ // of the function and its behavior.
+ //
+ // Documentation strings for the function should be general purpose with
+ // specific examples provided in the overload doc string.
+ //
+ // Examples:
+ //
+ // The 'in' operator tests whether an item exists in a collection.
+ //
+ // The 'substring' function returns a substring of a target string.
+ Doc string `protobuf:"bytes,2,opt,name=doc,proto3" json:"doc,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Decl_FunctionDecl) Reset() {
*x = Decl_FunctionDecl{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[11]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Decl_FunctionDecl) String() string {
@@ -1059,7 +1072,7 @@ func (*Decl_FunctionDecl) ProtoMessage() {}
func (x *Decl_FunctionDecl) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[11]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1081,6 +1094,13 @@ func (x *Decl_FunctionDecl) GetOverloads() []*Decl_FunctionDecl_Overload {
return nil
}
+func (x *Decl_FunctionDecl) GetDoc() string {
+ if x != nil {
+ return x.Doc
+ }
+ return ""
+}
+
// An overload indicates a function's parameter types and return type, and
// may optionally include a function body described in terms of
// [Expr][google.api.expr.v1alpha1.Expr] values.
@@ -1092,10 +1112,7 @@ func (x *Decl_FunctionDecl) GetOverloads() []*Decl_FunctionDecl_Overload {
// Overloads must have non-overlapping argument types after erasure of all
// parameterized type variables (similar as type erasure in Java).
type Decl_FunctionDecl_Overload struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Required. Globally unique overload name of the function which reflects
// the function name and argument types.
//
@@ -1129,17 +1146,33 @@ type Decl_FunctionDecl_Overload struct {
// For methods, the first parameter declaration, `params[0]` is the
// expected type of the target receiver.
IsInstanceFunction bool `protobuf:"varint,5,opt,name=is_instance_function,json=isInstanceFunction,proto3" json:"is_instance_function,omitempty"`
- // Documentation string for the overload.
- Doc string `protobuf:"bytes,6,opt,name=doc,proto3" json:"doc,omitempty"`
+ // Examples for the overload and its expected return value, separated by
+ // newlines.
+ //
+ // Prefer using CEL literals in examples as they are easily consumed by
+ // humans and simple to validate with machines. The example should contain
+ // an expression with a literal return value in comments inline. If the
+ // expression example is too complex or would need an example for a
+ // variable that cannot be expressed in CEL, document the input and return
+ // in a comment preceding the example.
+ //
+ // Examples:
+ //
+ // 1 in [1, 2, 3] // true
+ // 'key' in {'key1: 1, 'key2': 2} // false
+ // // Test whether one or more keys exist within a map.
+ // // returns true if list_of_keys contains 'key2' or 'key3'
+ // list_of_keys.exists(key, key in {'key3': 1, 'key2': 2})
+ Doc string `protobuf:"bytes,6,opt,name=doc,proto3" json:"doc,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Decl_FunctionDecl_Overload) Reset() {
*x = Decl_FunctionDecl_Overload{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[12]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Decl_FunctionDecl_Overload) String() string {
@@ -1150,7 +1183,7 @@ func (*Decl_FunctionDecl_Overload) ProtoMessage() {}
func (x *Decl_FunctionDecl_Overload) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_checked_proto_msgTypes[12]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1209,220 +1242,113 @@ func (x *Decl_FunctionDecl_Overload) GetDoc() string {
var File_google_api_expr_v1alpha1_checked_proto protoreflect.FileDescriptor
-var file_google_api_expr_v1alpha1_checked_proto_rawDesc = []byte{
- 0x0a, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70,
- 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b,
- 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
- 0x61, 0x31, 0x1a, 0x25, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65,
- 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e,
- 0x74, 0x61, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x04, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64,
- 0x45, 0x78, 0x70, 0x72, 0x12, 0x5c, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
- 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31,
- 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78,
- 0x70, 0x72, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x45,
- 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4d,
- 0x61, 0x70, 0x12, 0x4d, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x03,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70,
- 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
- 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65,
- 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x4d, 0x61,
- 0x70, 0x12, 0x45, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
- 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
- 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x72,
- 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
- 0x65, 0x78, 0x70, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x04, 0x65,
- 0x78, 0x70, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c,
- 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x52, 0x04, 0x65, 0x78, 0x70, 0x72, 0x1a,
- 0x64, 0x0a, 0x11, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x45,
- 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61,
- 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
- 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5a, 0x0a, 0x0c, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x61, 0x70,
- 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
- 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
- 0x01, 0x22, 0xc8, 0x0b, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x03, 0x64, 0x79,
- 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48,
- 0x00, 0x52, 0x03, 0x64, 0x79, 0x6e, 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x75, 0x6c, 0x6c, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65,
- 0x48, 0x00, 0x52, 0x04, 0x6e, 0x75, 0x6c, 0x6c, 0x12, 0x4c, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6d,
- 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31,
- 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x72, 0x69, 0x6d,
- 0x69, 0x74, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x09, 0x70, 0x72, 0x69,
- 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65,
- 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
- 0x61, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76,
- 0x65, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x07, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72,
- 0x12, 0x4d, 0x0a, 0x0a, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x18, 0x05,
- 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70,
- 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
- 0x54, 0x79, 0x70, 0x65, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79,
- 0x70, 0x65, 0x48, 0x00, 0x52, 0x09, 0x77, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x12,
- 0x46, 0x0a, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e,
- 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x79,
- 0x70, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x6c,
- 0x69, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x43, 0x0a, 0x08, 0x6d, 0x61, 0x70, 0x5f, 0x74,
- 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c,
- 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70,
- 0x65, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x49, 0x0a, 0x08,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72,
- 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x46,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61,
- 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
- 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0a,
- 0x74, 0x79, 0x70, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09,
- 0x48, 0x00, 0x52, 0x09, 0x74, 0x79, 0x70, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x34, 0x0a,
- 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31,
- 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x04, 0x74,
- 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0c, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72,
- 0x72, 0x6f, 0x72, 0x12, 0x52, 0x0a, 0x0d, 0x61, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f,
- 0x74, 0x79, 0x70, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61,
- 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x41, 0x62, 0x73, 0x74, 0x72,
- 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x62, 0x73, 0x74, 0x72,
- 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x47, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x54,
- 0x79, 0x70, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x65, 0x6c, 0x65, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
- 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x65, 0x6c, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65,
- 0x1a, 0x83, 0x01, 0x0a, 0x07, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, 0x08,
- 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72,
- 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07,
- 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31,
- 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x8c, 0x01, 0x0a, 0x0c, 0x46, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x75, 0x6c,
- 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76,
- 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x72, 0x65,
- 0x73, 0x75, 0x6c, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x61, 0x72, 0x67, 0x5f,
- 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31,
- 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x61, 0x72, 0x67,
- 0x54, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x6b, 0x0a, 0x0c, 0x41, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63,
- 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x0f, 0x70, 0x61, 0x72,
- 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e,
- 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x79,
- 0x70, 0x65, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70,
- 0x65, 0x73, 0x22, 0x73, 0x0a, 0x0d, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x54,
- 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x50, 0x52, 0x49, 0x4d, 0x49, 0x54, 0x49, 0x56, 0x45,
- 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,
- 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x01, 0x12, 0x09, 0x0a,
- 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54,
- 0x36, 0x34, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x04,
- 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05,
- 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x06, 0x22, 0x56, 0x0a, 0x0d, 0x57, 0x65, 0x6c, 0x6c, 0x4b,
- 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x57, 0x45, 0x4c, 0x4c,
- 0x5f, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50,
- 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, 0x59,
- 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10,
- 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x42,
- 0x0b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0xb3, 0x05, 0x0a,
- 0x04, 0x44, 0x65, 0x63, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x05, 0x69, 0x64, 0x65,
- 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
- 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x44, 0x65,
- 0x63, 0x6c, 0x48, 0x00, 0x52, 0x05, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x08, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e,
- 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x2e, 0x46, 0x75,
- 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x63, 0x6c, 0x48, 0x00, 0x52, 0x08, 0x66, 0x75,
- 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x8b, 0x01, 0x0a, 0x09, 0x49, 0x64, 0x65, 0x6e, 0x74,
- 0x44, 0x65, 0x63, 0x6c, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e,
- 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x79,
- 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
- 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6f, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x03, 0x64, 0x6f, 0x63, 0x1a, 0xee, 0x02, 0x0a, 0x0c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x44, 0x65, 0x63, 0x6c, 0x12, 0x52, 0x0a, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61,
- 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
- 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x44, 0x65, 0x63, 0x6c, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x09,
- 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x1a, 0x89, 0x02, 0x0a, 0x08, 0x4f, 0x76,
- 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f,
- 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x76, 0x65,
- 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d,
- 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
- 0x61, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12,
- 0x1f, 0x0a, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03,
- 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x79, 0x70, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
- 0x12, 0x3f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18,
- 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61,
- 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
- 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x54, 0x79, 0x70,
- 0x65, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
- 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52,
- 0x12, 0x69, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6f, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x03, 0x64, 0x6f, 0x63, 0x42, 0x0b, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x6c, 0x5f, 0x6b, 0x69,
- 0x6e, 0x64, 0x22, 0x7a, 0x0a, 0x09, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12,
- 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
- 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x5f,
- 0x69, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f,
- 0x61, 0x64, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69,
- 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43,
- 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x6c,
- 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69,
- 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x09,
- 0x44, 0x65, 0x63, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67,
- 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70,
- 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c,
- 0x70, 0x68, 0x61, 0x31, 0x3b, 0x65, 0x78, 0x70, 0x72, 0xf8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x33,
-}
+const file_google_api_expr_v1alpha1_checked_proto_rawDesc = "" +
+ "\n" +
+ "&google/api/expr/v1alpha1/checked.proto\x12\x18google.api.expr.v1alpha1\x1a%google/api/expr/v1alpha1/syntax.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x9a\x04\n" +
+ "\vCheckedExpr\x12\\\n" +
+ "\rreference_map\x18\x02 \x03(\v27.google.api.expr.v1alpha1.CheckedExpr.ReferenceMapEntryR\freferenceMap\x12M\n" +
+ "\btype_map\x18\x03 \x03(\v22.google.api.expr.v1alpha1.CheckedExpr.TypeMapEntryR\atypeMap\x12E\n" +
+ "\vsource_info\x18\x05 \x01(\v2$.google.api.expr.v1alpha1.SourceInfoR\n" +
+ "sourceInfo\x12!\n" +
+ "\fexpr_version\x18\x06 \x01(\tR\vexprVersion\x122\n" +
+ "\x04expr\x18\x04 \x01(\v2\x1e.google.api.expr.v1alpha1.ExprR\x04expr\x1ad\n" +
+ "\x11ReferenceMapEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\x03R\x03key\x129\n" +
+ "\x05value\x18\x02 \x01(\v2#.google.api.expr.v1alpha1.ReferenceR\x05value:\x028\x01\x1aZ\n" +
+ "\fTypeMapEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\x03R\x03key\x124\n" +
+ "\x05value\x18\x02 \x01(\v2\x1e.google.api.expr.v1alpha1.TypeR\x05value:\x028\x01\"\xc8\v\n" +
+ "\x04Type\x12*\n" +
+ "\x03dyn\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\x03dyn\x120\n" +
+ "\x04null\x18\x02 \x01(\x0e2\x1a.google.protobuf.NullValueH\x00R\x04null\x12L\n" +
+ "\tprimitive\x18\x03 \x01(\x0e2,.google.api.expr.v1alpha1.Type.PrimitiveTypeH\x00R\tprimitive\x12H\n" +
+ "\awrapper\x18\x04 \x01(\x0e2,.google.api.expr.v1alpha1.Type.PrimitiveTypeH\x00R\awrapper\x12M\n" +
+ "\n" +
+ "well_known\x18\x05 \x01(\x0e2,.google.api.expr.v1alpha1.Type.WellKnownTypeH\x00R\twellKnown\x12F\n" +
+ "\tlist_type\x18\x06 \x01(\v2'.google.api.expr.v1alpha1.Type.ListTypeH\x00R\blistType\x12C\n" +
+ "\bmap_type\x18\a \x01(\v2&.google.api.expr.v1alpha1.Type.MapTypeH\x00R\amapType\x12I\n" +
+ "\bfunction\x18\b \x01(\v2+.google.api.expr.v1alpha1.Type.FunctionTypeH\x00R\bfunction\x12#\n" +
+ "\fmessage_type\x18\t \x01(\tH\x00R\vmessageType\x12\x1f\n" +
+ "\n" +
+ "type_param\x18\n" +
+ " \x01(\tH\x00R\ttypeParam\x124\n" +
+ "\x04type\x18\v \x01(\v2\x1e.google.api.expr.v1alpha1.TypeH\x00R\x04type\x12.\n" +
+ "\x05error\x18\f \x01(\v2\x16.google.protobuf.EmptyH\x00R\x05error\x12R\n" +
+ "\rabstract_type\x18\x0e \x01(\v2+.google.api.expr.v1alpha1.Type.AbstractTypeH\x00R\fabstractType\x1aG\n" +
+ "\bListType\x12;\n" +
+ "\telem_type\x18\x01 \x01(\v2\x1e.google.api.expr.v1alpha1.TypeR\belemType\x1a\x83\x01\n" +
+ "\aMapType\x129\n" +
+ "\bkey_type\x18\x01 \x01(\v2\x1e.google.api.expr.v1alpha1.TypeR\akeyType\x12=\n" +
+ "\n" +
+ "value_type\x18\x02 \x01(\v2\x1e.google.api.expr.v1alpha1.TypeR\tvalueType\x1a\x8c\x01\n" +
+ "\fFunctionType\x12?\n" +
+ "\vresult_type\x18\x01 \x01(\v2\x1e.google.api.expr.v1alpha1.TypeR\n" +
+ "resultType\x12;\n" +
+ "\targ_types\x18\x02 \x03(\v2\x1e.google.api.expr.v1alpha1.TypeR\bargTypes\x1ak\n" +
+ "\fAbstractType\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12G\n" +
+ "\x0fparameter_types\x18\x02 \x03(\v2\x1e.google.api.expr.v1alpha1.TypeR\x0eparameterTypes\"s\n" +
+ "\rPrimitiveType\x12\x1e\n" +
+ "\x1aPRIMITIVE_TYPE_UNSPECIFIED\x10\x00\x12\b\n" +
+ "\x04BOOL\x10\x01\x12\t\n" +
+ "\x05INT64\x10\x02\x12\n" +
+ "\n" +
+ "\x06UINT64\x10\x03\x12\n" +
+ "\n" +
+ "\x06DOUBLE\x10\x04\x12\n" +
+ "\n" +
+ "\x06STRING\x10\x05\x12\t\n" +
+ "\x05BYTES\x10\x06\"V\n" +
+ "\rWellKnownType\x12\x1f\n" +
+ "\x1bWELL_KNOWN_TYPE_UNSPECIFIED\x10\x00\x12\a\n" +
+ "\x03ANY\x10\x01\x12\r\n" +
+ "\tTIMESTAMP\x10\x02\x12\f\n" +
+ "\bDURATION\x10\x03B\v\n" +
+ "\ttype_kind\"\xc5\x05\n" +
+ "\x04Decl\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12@\n" +
+ "\x05ident\x18\x02 \x01(\v2(.google.api.expr.v1alpha1.Decl.IdentDeclH\x00R\x05ident\x12I\n" +
+ "\bfunction\x18\x03 \x01(\v2+.google.api.expr.v1alpha1.Decl.FunctionDeclH\x00R\bfunction\x1a\x8b\x01\n" +
+ "\tIdentDecl\x122\n" +
+ "\x04type\x18\x01 \x01(\v2\x1e.google.api.expr.v1alpha1.TypeR\x04type\x128\n" +
+ "\x05value\x18\x02 \x01(\v2\".google.api.expr.v1alpha1.ConstantR\x05value\x12\x10\n" +
+ "\x03doc\x18\x03 \x01(\tR\x03doc\x1a\x80\x03\n" +
+ "\fFunctionDecl\x12R\n" +
+ "\toverloads\x18\x01 \x03(\v24.google.api.expr.v1alpha1.Decl.FunctionDecl.OverloadR\toverloads\x12\x10\n" +
+ "\x03doc\x18\x02 \x01(\tR\x03doc\x1a\x89\x02\n" +
+ "\bOverload\x12\x1f\n" +
+ "\voverload_id\x18\x01 \x01(\tR\n" +
+ "overloadId\x126\n" +
+ "\x06params\x18\x02 \x03(\v2\x1e.google.api.expr.v1alpha1.TypeR\x06params\x12\x1f\n" +
+ "\vtype_params\x18\x03 \x03(\tR\n" +
+ "typeParams\x12?\n" +
+ "\vresult_type\x18\x04 \x01(\v2\x1e.google.api.expr.v1alpha1.TypeR\n" +
+ "resultType\x120\n" +
+ "\x14is_instance_function\x18\x05 \x01(\bR\x12isInstanceFunction\x12\x10\n" +
+ "\x03doc\x18\x06 \x01(\tR\x03docB\v\n" +
+ "\tdecl_kind\"z\n" +
+ "\tReference\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x1f\n" +
+ "\voverload_id\x18\x03 \x03(\tR\n" +
+ "overloadId\x128\n" +
+ "\x05value\x18\x04 \x01(\v2\".google.api.expr.v1alpha1.ConstantR\x05valueBi\n" +
+ "\x1ccom.google.api.expr.v1alpha1B\tDeclProtoP\x01Z || true) && ` will only result in ``,
// while ` || ` will result in both `` and
// ``.
//
- // Errors cause by the presence of other errors are not included in the
+ // Errors caused by the presence of other errors are not included in the
// set. For example `.foo`, `foo()`, and ` + 1` will
// only result in ``.
//
@@ -219,13 +220,13 @@ type ExprValue_Unknown struct {
// foo() ->
// + -> or
//
- // Unknown takes precidence over Error in cases where a `Value` can short
+ // Unknown takes precedence over Error in cases where a `Value` can short
// circuit the result:
//
// || ->
// && ->
//
- // Errors take precidence in all other cases:
+ // Errors take precedence in all other cases:
//
// + ->
// foo(, ) ->
@@ -242,21 +243,18 @@ func (*ExprValue_Unknown) isExprValue_Kind() {}
//
// The errors included depend on the context. See `ExprValue.error`.
type ErrorSet struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// The errors in the set.
- Errors []*status.Status `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"`
+ Errors []*status.Status `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ErrorSet) Reset() {
*x = ErrorSet{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_eval_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_eval_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ErrorSet) String() string {
@@ -267,7 +265,7 @@ func (*ErrorSet) ProtoMessage() {}
func (x *ErrorSet) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_eval_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -293,21 +291,18 @@ func (x *ErrorSet) GetErrors() []*status.Status {
//
// The unknowns included depend on the context. See `ExprValue.unknown`.
type UnknownSet struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// The ids of the expressions with unknown values.
- Exprs []int64 `protobuf:"varint,1,rep,packed,name=exprs,proto3" json:"exprs,omitempty"`
+ Exprs []int64 `protobuf:"varint,1,rep,packed,name=exprs,proto3" json:"exprs,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *UnknownSet) Reset() {
*x = UnknownSet{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_eval_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_eval_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *UnknownSet) String() string {
@@ -318,7 +313,7 @@ func (*UnknownSet) ProtoMessage() {}
func (x *UnknownSet) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_eval_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -340,25 +335,22 @@ func (x *UnknownSet) GetExprs() []int64 {
return nil
}
-// A single evalution result.
+// A single evaluation result.
type EvalState_Result struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The id of the expression this result if for.
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The id of the expression this result is for.
Expr int64 `protobuf:"varint,1,opt,name=expr,proto3" json:"expr,omitempty"`
// The index in `values` of the resulting value.
- Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
+ Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *EvalState_Result) Reset() {
*x = EvalState_Result{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_eval_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_eval_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *EvalState_Result) String() string {
@@ -369,7 +361,7 @@ func (*EvalState_Result) ProtoMessage() {}
func (x *EvalState_Result) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_eval_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -400,70 +392,41 @@ func (x *EvalState_Result) GetValue() int64 {
var File_google_api_expr_v1alpha1_eval_proto protoreflect.FileDescriptor
-var file_google_api_expr_v1alpha1_eval_proto_rawDesc = []byte{
- 0x0a, 0x23, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70,
- 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x65, 0x76, 0x61, 0x6c, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70,
- 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a,
- 0x24, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72,
- 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70,
- 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc2,
- 0x01, 0x0a, 0x09, 0x45, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x06,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76,
- 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x56, 0x61, 0x6c, 0x75,
- 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x07, 0x72, 0x65, 0x73,
- 0x75, 0x6c, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61,
- 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e,
- 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x1a,
- 0x32, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x78, 0x70,
- 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x65, 0x78, 0x70, 0x72, 0x12, 0x14, 0x0a,
- 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x22, 0xca, 0x01, 0x0a, 0x09, 0x45, 0x78, 0x70, 0x72, 0x56, 0x61, 0x6c, 0x75,
- 0x65, 0x12, 0x37, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78,
- 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75,
- 0x65, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3a, 0x0a, 0x05, 0x65, 0x72,
- 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c,
- 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52,
- 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x40, 0x0a, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77,
- 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
- 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52,
- 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64,
- 0x22, 0x36, 0x0a, 0x08, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x12, 0x2a, 0x0a, 0x06,
- 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
- 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x22, 0x0a, 0x0a, 0x55, 0x6e, 0x6b, 0x6e,
- 0x6f, 0x77, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x70, 0x72, 0x73, 0x18,
- 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x05, 0x65, 0x78, 0x70, 0x72, 0x73, 0x42, 0x6c, 0x0a, 0x1c,
- 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65,
- 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x09, 0x45, 0x76,
- 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73,
- 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
- 0x61, 0x31, 0x3b, 0x65, 0x78, 0x70, 0x72, 0xf8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x33,
-}
+const file_google_api_expr_v1alpha1_eval_proto_rawDesc = "" +
+ "\n" +
+ "#google/api/expr/v1alpha1/eval.proto\x12\x18google.api.expr.v1alpha1\x1a$google/api/expr/v1alpha1/value.proto\x1a\x17google/rpc/status.proto\"\xc2\x01\n" +
+ "\tEvalState\x12;\n" +
+ "\x06values\x18\x01 \x03(\v2#.google.api.expr.v1alpha1.ExprValueR\x06values\x12D\n" +
+ "\aresults\x18\x03 \x03(\v2*.google.api.expr.v1alpha1.EvalState.ResultR\aresults\x1a2\n" +
+ "\x06Result\x12\x12\n" +
+ "\x04expr\x18\x01 \x01(\x03R\x04expr\x12\x14\n" +
+ "\x05value\x18\x02 \x01(\x03R\x05value\"\xca\x01\n" +
+ "\tExprValue\x127\n" +
+ "\x05value\x18\x01 \x01(\v2\x1f.google.api.expr.v1alpha1.ValueH\x00R\x05value\x12:\n" +
+ "\x05error\x18\x02 \x01(\v2\".google.api.expr.v1alpha1.ErrorSetH\x00R\x05error\x12@\n" +
+ "\aunknown\x18\x03 \x01(\v2$.google.api.expr.v1alpha1.UnknownSetH\x00R\aunknownB\x06\n" +
+ "\x04kind\"6\n" +
+ "\bErrorSet\x12*\n" +
+ "\x06errors\x18\x01 \x03(\v2\x12.google.rpc.StatusR\x06errors\"\"\n" +
+ "\n" +
+ "UnknownSet\x12\x14\n" +
+ "\x05exprs\x18\x01 \x03(\x03R\x05exprsBi\n" +
+ "\x1ccom.google.api.expr.v1alpha1B\tEvalProtoP\x01Z 10)` translates to a comprehension expression. The key
// in the map corresponds to the expression id of the expanded macro, and the
// value is the call `Expr` that was replaced.
- MacroCalls map[int64]*Expr `protobuf:"bytes,5,rep,name=macro_calls,json=macroCalls,proto3" json:"macro_calls,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ MacroCalls map[int64]*Expr `protobuf:"bytes,5,rep,name=macro_calls,json=macroCalls,proto3" json:"macro_calls,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// A list of tags for extensions that were used while parsing or type checking
// the source expression. For example, optimizations that require special
// runtime support may be specified.
@@ -597,16 +618,16 @@ type SourceInfo struct {
// These are used to check feature support between components in separate
// implementations. This can be used to either skip redundant work or
// report an error if the extension is unsupported.
- Extensions []*SourceInfo_Extension `protobuf:"bytes,6,rep,name=extensions,proto3" json:"extensions,omitempty"`
+ Extensions []*SourceInfo_Extension `protobuf:"bytes,6,rep,name=extensions,proto3" json:"extensions,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *SourceInfo) Reset() {
*x = SourceInfo{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SourceInfo) String() string {
@@ -617,7 +638,7 @@ func (*SourceInfo) ProtoMessage() {}
func (x *SourceInfo) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -676,11 +697,8 @@ func (x *SourceInfo) GetExtensions() []*SourceInfo_Extension {
// A specific position in source.
type SourcePosition struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The soucre location name (e.g. file name).
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The source location name (e.g. file name).
Location string `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
// The UTF-8 code unit offset.
Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
@@ -689,16 +707,16 @@ type SourcePosition struct {
Line int32 `protobuf:"varint,3,opt,name=line,proto3" json:"line,omitempty"`
// The 0-based index of the starting position within the line of source text
// where the issue occurs. Only meaningful if line is nonzero.
- Column int32 `protobuf:"varint,4,opt,name=column,proto3" json:"column,omitempty"`
+ Column int32 `protobuf:"varint,4,opt,name=column,proto3" json:"column,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *SourcePosition) Reset() {
*x = SourcePosition{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SourcePosition) String() string {
@@ -709,7 +727,7 @@ func (*SourcePosition) ProtoMessage() {}
func (x *SourcePosition) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -754,25 +772,22 @@ func (x *SourcePosition) GetColumn() int32 {
// An identifier expression. e.g. `request`.
type Expr_Ident struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Required. Holds a single, unqualified identifier, possibly preceded by a
// '.'.
//
// Qualified names are represented by the
// [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Expr_Ident) Reset() {
*x = Expr_Ident{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Expr_Ident) String() string {
@@ -783,7 +798,7 @@ func (*Expr_Ident) ProtoMessage() {}
func (x *Expr_Ident) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -807,10 +822,7 @@ func (x *Expr_Ident) GetName() string {
// A field selection expression. e.g. `request.auth`.
type Expr_Select struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Required. The target of the selection expression.
//
// For example, in the select expression `request.auth`, the `request`
@@ -824,16 +836,16 @@ type Expr_Select struct {
// Whether the select is to be interpreted as a field presence test.
//
// This results from the macro `has(request.auth)`.
- TestOnly bool `protobuf:"varint,3,opt,name=test_only,json=testOnly,proto3" json:"test_only,omitempty"`
+ TestOnly bool `protobuf:"varint,3,opt,name=test_only,json=testOnly,proto3" json:"test_only,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Expr_Select) Reset() {
*x = Expr_Select{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Expr_Select) String() string {
@@ -844,7 +856,7 @@ func (*Expr_Select) ProtoMessage() {}
func (x *Expr_Select) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -884,26 +896,23 @@ func (x *Expr_Select) GetTestOnly() bool {
//
// For example, `value == 10`, `size(map_value)`.
type Expr_Call struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The target of an method call-style expression. For example, `x` in
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The target of a method call-style expression. For example, `x` in
// `x.f()`.
Target *Expr `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
// Required. The name of the function or method being called.
Function string `protobuf:"bytes,2,opt,name=function,proto3" json:"function,omitempty"`
// The arguments.
- Args []*Expr `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
+ Args []*Expr `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Expr_Call) Reset() {
*x = Expr_Call{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Expr_Call) String() string {
@@ -914,7 +923,7 @@ func (*Expr_Call) ProtoMessage() {}
func (x *Expr_Call) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -952,13 +961,10 @@ func (x *Expr_Call) GetArgs() []*Expr {
// A list creation expression.
//
-// Lists may either be homogenous, e.g. `[1, 2, 3]`, or heterogeneous, e.g.
+// Lists may either be homogeneous, e.g. `[1, 2, 3]`, or heterogeneous, e.g.
// `dyn([1, 'hello', 2.0])`
type Expr_CreateList struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// The elements part of the list.
Elements []*Expr `protobuf:"bytes,1,rep,name=elements,proto3" json:"elements,omitempty"`
// The indices within the elements list which are marked as optional
@@ -968,15 +974,15 @@ type Expr_CreateList struct {
// is included in the list. If the optional-typed value is absent, the list
// element is omitted from the CreateList result.
OptionalIndices []int32 `protobuf:"varint,2,rep,packed,name=optional_indices,json=optionalIndices,proto3" json:"optional_indices,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Expr_CreateList) Reset() {
*x = Expr_CreateList{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Expr_CreateList) String() string {
@@ -987,7 +993,7 @@ func (*Expr_CreateList) ProtoMessage() {}
func (x *Expr_CreateList) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[8]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1022,24 +1028,21 @@ func (x *Expr_CreateList) GetOptionalIndices() []int32 {
// similar, but prefixed with a type name and composed of field ids:
// `types.MyType{field_id: 'value'}`.
type Expr_CreateStruct struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The type name of the message to be created, empty when creating map
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The type name of the message to be created; empty when creating map
// literals.
MessageName string `protobuf:"bytes,1,opt,name=message_name,json=messageName,proto3" json:"message_name,omitempty"`
// The entries in the creation expression.
- Entries []*Expr_CreateStruct_Entry `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries,omitempty"`
+ Entries []*Expr_CreateStruct_Entry `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Expr_CreateStruct) Reset() {
*x = Expr_CreateStruct{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[9]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Expr_CreateStruct) String() string {
@@ -1050,7 +1053,7 @@ func (*Expr_CreateStruct) ProtoMessage() {}
func (x *Expr_CreateStruct) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[9]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1102,7 +1105,7 @@ func (x *Expr_CreateStruct) GetEntries() []*Expr_CreateStruct_Entry {
//
// The `has(m.x)` macro tests whether the property `x` is present in struct
// `m`. The semantics of this macro depend on the type of `m`. For proto2
-// messages `has(m.x)` is defined as 'defined, but not set`. For proto3, the
+// messages `has(m.x)` is defined as 'defined, but not set'. For proto3, the
// macro tests whether the property is set to its default. For map and struct
// types, the macro tests whether the property `x` is defined on `m`.
//
@@ -1124,7 +1127,7 @@ func (x *Expr_CreateStruct) GetEntries() []*Expr_CreateStruct_Entry {
//
// Comprehensions for the optional V2 macros which support map-to-map
// translation differ slightly from the standard environment macros in that
-// they expose both the key or index in addition to the value for each list
+// they expose the key or index in addition to the value for each list
// or map entry:
//
// ```
@@ -1140,17 +1143,13 @@ func (x *Expr_CreateStruct) GetEntries() []*Expr_CreateStruct_Entry {
// return `result`
// ```
type Expr_Comprehension struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// The name of the first iteration variable.
- // When the iter_range is a list, this variable is the list element.
- // When the iter_range is a map, this variable is the map entry key.
+ // For the single iteration variable macros, when iter_range is a list, this
+ // variable is the list element and when the iter_range is a map, this
+ // variable is the map key.
IterVar string `protobuf:"bytes,1,opt,name=iter_var,json=iterVar,proto3" json:"iter_var,omitempty"`
- // The name of the second iteration variable, empty if not set.
- // When the iter_range is a list, this variable is the integer index.
- // When the iter_range is a map, this variable is the map entry value.
+ // The name of the second iteration variable; empty if not set.
// This field is only set for comprehension v2 macros.
IterVar2 string `protobuf:"bytes,8,opt,name=iter_var2,json=iterVar2,proto3" json:"iter_var2,omitempty"`
// The range over which the comprehension iterates.
@@ -1171,16 +1170,16 @@ type Expr_Comprehension struct {
// An expression which can contain accu_var.
//
// Computes the result.
- Result *Expr `protobuf:"bytes,7,opt,name=result,proto3" json:"result,omitempty"`
+ Result *Expr `protobuf:"bytes,7,opt,name=result,proto3" json:"result,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Expr_Comprehension) Reset() {
*x = Expr_Comprehension{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[10]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Expr_Comprehension) String() string {
@@ -1191,7 +1190,7 @@ func (*Expr_Comprehension) ProtoMessage() {}
func (x *Expr_Comprehension) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[10]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1264,17 +1263,14 @@ func (x *Expr_Comprehension) GetResult() *Expr {
// Represents an entry.
type Expr_CreateStruct_Entry struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Required. An id assigned to this node by the parser which is unique
// in a given expression tree. This is used to associate type
- // information and other attributes to the node.
+ // information and other attributes with the node.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// The `Entry` key kinds.
//
- // Types that are assignable to KeyKind:
+ // Types that are valid to be assigned to KeyKind:
//
// *Expr_CreateStruct_Entry_FieldKey
// *Expr_CreateStruct_Entry_MapKey
@@ -1287,15 +1283,15 @@ type Expr_CreateStruct_Entry struct {
Value *Expr `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
// Whether the key-value pair is optional.
OptionalEntry bool `protobuf:"varint,5,opt,name=optional_entry,json=optionalEntry,proto3" json:"optional_entry,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Expr_CreateStruct_Entry) Reset() {
*x = Expr_CreateStruct_Entry{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[11]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Expr_CreateStruct_Entry) String() string {
@@ -1306,7 +1302,7 @@ func (*Expr_CreateStruct_Entry) ProtoMessage() {}
func (x *Expr_CreateStruct_Entry) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[11]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1328,23 +1324,27 @@ func (x *Expr_CreateStruct_Entry) GetId() int64 {
return 0
}
-func (m *Expr_CreateStruct_Entry) GetKeyKind() isExpr_CreateStruct_Entry_KeyKind {
- if m != nil {
- return m.KeyKind
+func (x *Expr_CreateStruct_Entry) GetKeyKind() isExpr_CreateStruct_Entry_KeyKind {
+ if x != nil {
+ return x.KeyKind
}
return nil
}
func (x *Expr_CreateStruct_Entry) GetFieldKey() string {
- if x, ok := x.GetKeyKind().(*Expr_CreateStruct_Entry_FieldKey); ok {
- return x.FieldKey
+ if x != nil {
+ if x, ok := x.KeyKind.(*Expr_CreateStruct_Entry_FieldKey); ok {
+ return x.FieldKey
+ }
}
return ""
}
func (x *Expr_CreateStruct_Entry) GetMapKey() *Expr {
- if x, ok := x.GetKeyKind().(*Expr_CreateStruct_Entry_MapKey); ok {
- return x.MapKey
+ if x != nil {
+ if x, ok := x.KeyKind.(*Expr_CreateStruct_Entry_MapKey); ok {
+ return x.MapKey
+ }
}
return nil
}
@@ -1383,29 +1383,26 @@ func (*Expr_CreateStruct_Entry_MapKey) isExpr_CreateStruct_Entry_KeyKind() {}
// An extension that was requested for the source expression.
type SourceInfo_Extension struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Identifier for the extension. Example: constant_folding
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// If set, the listed components must understand the extension for the
// expression to evaluate correctly.
//
- // This field has set semantics, repeated values should be deduplicated.
+ // This field has set semantics; repeated values should be deduplicated.
AffectedComponents []SourceInfo_Extension_Component `protobuf:"varint,2,rep,packed,name=affected_components,json=affectedComponents,proto3,enum=google.api.expr.v1alpha1.SourceInfo_Extension_Component" json:"affected_components,omitempty"`
// Version info. May be skipped if it isn't meaningful for the extension.
// (for example constant_folding might always be v0.0).
- Version *SourceInfo_Extension_Version `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
+ Version *SourceInfo_Extension_Version `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *SourceInfo_Extension) Reset() {
*x = SourceInfo_Extension{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[12]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SourceInfo_Extension) String() string {
@@ -1416,7 +1413,7 @@ func (*SourceInfo_Extension) ProtoMessage() {}
func (x *SourceInfo_Extension) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[12]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1454,25 +1451,22 @@ func (x *SourceInfo_Extension) GetVersion() *SourceInfo_Extension_Version {
// Version
type SourceInfo_Extension_Version struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Major version changes indicate different required support level from
// the required components.
Major int64 `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"`
// Minor version changes must not change the observed behavior from
// existing implementations, but may be provided informationally.
- Minor int64 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"`
+ Minor int64 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *SourceInfo_Extension_Version) Reset() {
*x = SourceInfo_Extension_Version{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[15]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SourceInfo_Extension_Version) String() string {
@@ -1483,7 +1477,7 @@ func (*SourceInfo_Extension_Version) ProtoMessage() {}
func (x *SourceInfo_Extension_Version) ProtoReflect() protoreflect.Message {
mi := &file_google_api_expr_v1alpha1_syntax_proto_msgTypes[15]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1514,252 +1508,129 @@ func (x *SourceInfo_Extension_Version) GetMinor() int64 {
var File_google_api_expr_v1alpha1_syntax_proto protoreflect.FileDescriptor
-var file_google_api_expr_v1alpha1_syntax_proto_rawDesc = []byte{
- 0x0a, 0x25, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70,
- 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61,
- 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
- 0x31, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
- 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x22, 0x87, 0x01, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x12,
- 0x32, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e,
- 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x52, 0x04, 0x65,
- 0x78, 0x70, 0x72, 0x12, 0x45, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e,
- 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
- 0x68, 0x61, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xcb, 0x0d, 0x0a, 0x04, 0x45,
- 0x78, 0x70, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
- 0x02, 0x69, 0x64, 0x12, 0x43, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x5f, 0x65, 0x78, 0x70,
- 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
- 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x09, 0x63,
- 0x6f, 0x6e, 0x73, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12, 0x45, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e,
- 0x74, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76,
- 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x2e, 0x49, 0x64, 0x65,
- 0x6e, 0x74, 0x48, 0x00, 0x52, 0x09, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12,
- 0x48, 0x0a, 0x0b, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x05,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70,
- 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
- 0x45, 0x78, 0x70, 0x72, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x73,
- 0x65, 0x6c, 0x65, 0x63, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12, 0x42, 0x0a, 0x09, 0x63, 0x61, 0x6c,
- 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76,
- 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x2e, 0x43, 0x61, 0x6c,
- 0x6c, 0x48, 0x00, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x12, 0x48, 0x0a,
- 0x09, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78,
- 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x72,
- 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x08, 0x6c,
- 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12, 0x4e, 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x75, 0x63,
- 0x74, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76,
- 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x2e, 0x43, 0x72, 0x65,
- 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x74, 0x72,
- 0x75, 0x63, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12, 0x5d, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x72,
- 0x65, 0x68, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x09, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69,
- 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45,
- 0x78, 0x70, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x68, 0x65, 0x6e, 0x73, 0x69, 0x6f,
- 0x6e, 0x48, 0x00, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x68, 0x65, 0x6e, 0x73, 0x69,
- 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x1a, 0x1b, 0x0a, 0x05, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x12,
- 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
- 0x61, 0x6d, 0x65, 0x1a, 0x75, 0x0a, 0x06, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x38, 0x0a,
- 0x07, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72,
- 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x52, 0x07,
- 0x6f, 0x70, 0x65, 0x72, 0x61, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1b, 0x0a,
- 0x09, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
- 0x52, 0x08, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x6e, 0x6c, 0x79, 0x1a, 0x8e, 0x01, 0x0a, 0x04, 0x43,
- 0x61, 0x6c, 0x6c, 0x12, 0x36, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69,
- 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45,
- 0x78, 0x70, 0x72, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18,
- 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61,
- 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
- 0x2e, 0x45, 0x78, 0x70, 0x72, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x1a, 0x73, 0x0a, 0x0a, 0x43,
- 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x08, 0x65, 0x6c, 0x65,
- 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31,
- 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x52, 0x08, 0x65, 0x6c, 0x65,
- 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61,
- 0x6c, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52,
- 0x0f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73,
- 0x1a, 0xdb, 0x02, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x75, 0x63,
- 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d,
- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
- 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18,
- 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61,
- 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
- 0x2e, 0x45, 0x78, 0x70, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x75,
- 0x63, 0x74, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65,
- 0x73, 0x1a, 0xda, 0x01, 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69,
- 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x09, 0x66,
- 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00,
- 0x52, 0x08, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x07, 0x6d, 0x61,
- 0x70, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31,
- 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x06, 0x6d,
- 0x61, 0x70, 0x4b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70,
- 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
- 0x45, 0x78, 0x70, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6f,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x05, 0x20,
- 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x45, 0x6e, 0x74,
- 0x72, 0x79, 0x42, 0x0a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x6b, 0x69, 0x6e, 0x64, 0x1a, 0x9a,
- 0x03, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x68, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
- 0x12, 0x19, 0x0a, 0x08, 0x69, 0x74, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x07, 0x69, 0x74, 0x65, 0x72, 0x56, 0x61, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x69,
- 0x74, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x72, 0x32, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
- 0x69, 0x74, 0x65, 0x72, 0x56, 0x61, 0x72, 0x32, 0x12, 0x3d, 0x0a, 0x0a, 0x69, 0x74, 0x65, 0x72,
- 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76,
- 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x52, 0x09, 0x69, 0x74,
- 0x65, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x75, 0x5f,
- 0x76, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x75, 0x56,
- 0x61, 0x72, 0x12, 0x3b, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x75, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x18,
- 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61,
- 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
- 0x2e, 0x45, 0x78, 0x70, 0x72, 0x52, 0x08, 0x61, 0x63, 0x63, 0x75, 0x49, 0x6e, 0x69, 0x74, 0x12,
- 0x45, 0x0a, 0x0e, 0x6c, 0x6f, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f,
- 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
- 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x52, 0x0d, 0x6c, 0x6f, 0x6f, 0x70, 0x43, 0x6f, 0x6e,
- 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x09, 0x6c, 0x6f, 0x6f, 0x70, 0x5f, 0x73,
- 0x74, 0x65, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c,
- 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x52, 0x08, 0x6c, 0x6f, 0x6f, 0x70, 0x53,
- 0x74, 0x65, 0x70, 0x12, 0x36, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x07, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69,
- 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45,
- 0x78, 0x70, 0x72, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x0b, 0x0a, 0x09, 0x65,
- 0x78, 0x70, 0x72, 0x5f, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0xc1, 0x03, 0x0a, 0x08, 0x43, 0x6f, 0x6e,
- 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4e, 0x75, 0x6c, 0x6c,
- 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61,
- 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x36,
- 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34,
- 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x0b,
- 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x64,
- 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
- 0x01, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65,
- 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,
- 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x79,
- 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x46, 0x0a, 0x0e, 0x64, 0x75, 0x72, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x02, 0x18, 0x01, 0x48,
- 0x00, 0x52, 0x0d, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65,
- 0x12, 0x49, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
- 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x69, 0x6d,
- 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x63,
- 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x5f, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x8c, 0x07, 0x0a,
- 0x0a, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x73,
- 0x79, 0x6e, 0x74, 0x61, 0x78, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x56, 0x65, 0x72, 0x73, 0x69,
- 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21,
- 0x0a, 0x0c, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x73, 0x18, 0x03,
- 0x20, 0x03, 0x28, 0x05, 0x52, 0x0b, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74,
- 0x73, 0x12, 0x51, 0x0a, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70,
- 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
- 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x0b, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x5f, 0x63, 0x61,
- 0x6c, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c,
- 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e,
- 0x4d, 0x61, 0x63, 0x72, 0x6f, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
- 0x0a, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x12, 0x4e, 0x0a, 0x0a, 0x65,
- 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70,
- 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52,
- 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x80, 0x03, 0x0a, 0x09,
- 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x69, 0x0a, 0x13, 0x61, 0x66, 0x66,
- 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73,
- 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
- 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x78, 0x74,
- 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74,
- 0x52, 0x12, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e,
- 0x65, 0x6e, 0x74, 0x73, 0x12, 0x50, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61,
- 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
- 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65,
- 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76,
- 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x35, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
- 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
- 0x52, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x22, 0x6f, 0x0a,
- 0x09, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x4f,
- 0x4d, 0x50, 0x4f, 0x4e, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
- 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4f, 0x4d, 0x50, 0x4f, 0x4e, 0x45,
- 0x4e, 0x54, 0x5f, 0x50, 0x41, 0x52, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x43,
- 0x4f, 0x4d, 0x50, 0x4f, 0x4e, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x48,
- 0x45, 0x43, 0x4b, 0x45, 0x52, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x4f, 0x4d, 0x50, 0x4f,
- 0x4e, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x03, 0x1a, 0x3c,
- 0x0a, 0x0e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
- 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b,
- 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5d, 0x0a, 0x0f,
- 0x4d, 0x61, 0x63, 0x72, 0x6f, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
- 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65,
- 0x79, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78,
- 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x72,
- 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x70, 0x0a, 0x0e, 0x53,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a,
- 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66,
- 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65,
- 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
- 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18,
- 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x42, 0x6e, 0x0a,
- 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e,
- 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, 0x53,
- 0x79, 0x6e, 0x74, 0x61, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f,
- 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61,
- 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31, 0x61,
- 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x65, 0x78, 0x70, 0x72, 0xf8, 0x01, 0x01, 0x62, 0x06, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+const file_google_api_expr_v1alpha1_syntax_proto_rawDesc = "" +
+ "\n" +
+ "%google/api/expr/v1alpha1/syntax.proto\x12\x18google.api.expr.v1alpha1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x87\x01\n" +
+ "\n" +
+ "ParsedExpr\x122\n" +
+ "\x04expr\x18\x02 \x01(\v2\x1e.google.api.expr.v1alpha1.ExprR\x04expr\x12E\n" +
+ "\vsource_info\x18\x03 \x01(\v2$.google.api.expr.v1alpha1.SourceInfoR\n" +
+ "sourceInfo\"\xcb\r\n" +
+ "\x04Expr\x12\x0e\n" +
+ "\x02id\x18\x02 \x01(\x03R\x02id\x12C\n" +
+ "\n" +
+ "const_expr\x18\x03 \x01(\v2\".google.api.expr.v1alpha1.ConstantH\x00R\tconstExpr\x12E\n" +
+ "\n" +
+ "ident_expr\x18\x04 \x01(\v2$.google.api.expr.v1alpha1.Expr.IdentH\x00R\tidentExpr\x12H\n" +
+ "\vselect_expr\x18\x05 \x01(\v2%.google.api.expr.v1alpha1.Expr.SelectH\x00R\n" +
+ "selectExpr\x12B\n" +
+ "\tcall_expr\x18\x06 \x01(\v2#.google.api.expr.v1alpha1.Expr.CallH\x00R\bcallExpr\x12H\n" +
+ "\tlist_expr\x18\a \x01(\v2).google.api.expr.v1alpha1.Expr.CreateListH\x00R\blistExpr\x12N\n" +
+ "\vstruct_expr\x18\b \x01(\v2+.google.api.expr.v1alpha1.Expr.CreateStructH\x00R\n" +
+ "structExpr\x12]\n" +
+ "\x12comprehension_expr\x18\t \x01(\v2,.google.api.expr.v1alpha1.Expr.ComprehensionH\x00R\x11comprehensionExpr\x1a\x1b\n" +
+ "\x05Ident\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x1au\n" +
+ "\x06Select\x128\n" +
+ "\aoperand\x18\x01 \x01(\v2\x1e.google.api.expr.v1alpha1.ExprR\aoperand\x12\x14\n" +
+ "\x05field\x18\x02 \x01(\tR\x05field\x12\x1b\n" +
+ "\ttest_only\x18\x03 \x01(\bR\btestOnly\x1a\x8e\x01\n" +
+ "\x04Call\x126\n" +
+ "\x06target\x18\x01 \x01(\v2\x1e.google.api.expr.v1alpha1.ExprR\x06target\x12\x1a\n" +
+ "\bfunction\x18\x02 \x01(\tR\bfunction\x122\n" +
+ "\x04args\x18\x03 \x03(\v2\x1e.google.api.expr.v1alpha1.ExprR\x04args\x1as\n" +
+ "\n" +
+ "CreateList\x12:\n" +
+ "\belements\x18\x01 \x03(\v2\x1e.google.api.expr.v1alpha1.ExprR\belements\x12)\n" +
+ "\x10optional_indices\x18\x02 \x03(\x05R\x0foptionalIndices\x1a\xdb\x02\n" +
+ "\fCreateStruct\x12!\n" +
+ "\fmessage_name\x18\x01 \x01(\tR\vmessageName\x12K\n" +
+ "\aentries\x18\x02 \x03(\v21.google.api.expr.v1alpha1.Expr.CreateStruct.EntryR\aentries\x1a\xda\x01\n" +
+ "\x05Entry\x12\x0e\n" +
+ "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1d\n" +
+ "\tfield_key\x18\x02 \x01(\tH\x00R\bfieldKey\x129\n" +
+ "\amap_key\x18\x03 \x01(\v2\x1e.google.api.expr.v1alpha1.ExprH\x00R\x06mapKey\x124\n" +
+ "\x05value\x18\x04 \x01(\v2\x1e.google.api.expr.v1alpha1.ExprR\x05value\x12%\n" +
+ "\x0eoptional_entry\x18\x05 \x01(\bR\roptionalEntryB\n" +
+ "\n" +
+ "\bkey_kind\x1a\x9a\x03\n" +
+ "\rComprehension\x12\x19\n" +
+ "\biter_var\x18\x01 \x01(\tR\aiterVar\x12\x1b\n" +
+ "\titer_var2\x18\b \x01(\tR\biterVar2\x12=\n" +
+ "\n" +
+ "iter_range\x18\x02 \x01(\v2\x1e.google.api.expr.v1alpha1.ExprR\titerRange\x12\x19\n" +
+ "\baccu_var\x18\x03 \x01(\tR\aaccuVar\x12;\n" +
+ "\taccu_init\x18\x04 \x01(\v2\x1e.google.api.expr.v1alpha1.ExprR\baccuInit\x12E\n" +
+ "\x0eloop_condition\x18\x05 \x01(\v2\x1e.google.api.expr.v1alpha1.ExprR\rloopCondition\x12;\n" +
+ "\tloop_step\x18\x06 \x01(\v2\x1e.google.api.expr.v1alpha1.ExprR\bloopStep\x126\n" +
+ "\x06result\x18\a \x01(\v2\x1e.google.api.expr.v1alpha1.ExprR\x06resultB\v\n" +
+ "\texpr_kind\"\xc1\x03\n" +
+ "\bConstant\x12;\n" +
+ "\n" +
+ "null_value\x18\x01 \x01(\x0e2\x1a.google.protobuf.NullValueH\x00R\tnullValue\x12\x1f\n" +
+ "\n" +
+ "bool_value\x18\x02 \x01(\bH\x00R\tboolValue\x12!\n" +
+ "\vint64_value\x18\x03 \x01(\x03H\x00R\n" +
+ "int64Value\x12#\n" +
+ "\fuint64_value\x18\x04 \x01(\x04H\x00R\vuint64Value\x12#\n" +
+ "\fdouble_value\x18\x05 \x01(\x01H\x00R\vdoubleValue\x12#\n" +
+ "\fstring_value\x18\x06 \x01(\tH\x00R\vstringValue\x12!\n" +
+ "\vbytes_value\x18\a \x01(\fH\x00R\n" +
+ "bytesValue\x12F\n" +
+ "\x0eduration_value\x18\b \x01(\v2\x19.google.protobuf.DurationB\x02\x18\x01H\x00R\rdurationValue\x12I\n" +
+ "\x0ftimestamp_value\x18\t \x01(\v2\x1a.google.protobuf.TimestampB\x02\x18\x01H\x00R\x0etimestampValueB\x0f\n" +
+ "\rconstant_kind\"\x8c\a\n" +
+ "\n" +
+ "SourceInfo\x12%\n" +
+ "\x0esyntax_version\x18\x01 \x01(\tR\rsyntaxVersion\x12\x1a\n" +
+ "\blocation\x18\x02 \x01(\tR\blocation\x12!\n" +
+ "\fline_offsets\x18\x03 \x03(\x05R\vlineOffsets\x12Q\n" +
+ "\tpositions\x18\x04 \x03(\v23.google.api.expr.v1alpha1.SourceInfo.PositionsEntryR\tpositions\x12U\n" +
+ "\vmacro_calls\x18\x05 \x03(\v24.google.api.expr.v1alpha1.SourceInfo.MacroCallsEntryR\n" +
+ "macroCalls\x12N\n" +
+ "\n" +
+ "extensions\x18\x06 \x03(\v2..google.api.expr.v1alpha1.SourceInfo.ExtensionR\n" +
+ "extensions\x1a\x80\x03\n" +
+ "\tExtension\x12\x0e\n" +
+ "\x02id\x18\x01 \x01(\tR\x02id\x12i\n" +
+ "\x13affected_components\x18\x02 \x03(\x0e28.google.api.expr.v1alpha1.SourceInfo.Extension.ComponentR\x12affectedComponents\x12P\n" +
+ "\aversion\x18\x03 \x01(\v26.google.api.expr.v1alpha1.SourceInfo.Extension.VersionR\aversion\x1a5\n" +
+ "\aVersion\x12\x14\n" +
+ "\x05major\x18\x01 \x01(\x03R\x05major\x12\x14\n" +
+ "\x05minor\x18\x02 \x01(\x03R\x05minor\"o\n" +
+ "\tComponent\x12\x19\n" +
+ "\x15COMPONENT_UNSPECIFIED\x10\x00\x12\x14\n" +
+ "\x10COMPONENT_PARSER\x10\x01\x12\x1a\n" +
+ "\x16COMPONENT_TYPE_CHECKER\x10\x02\x12\x15\n" +
+ "\x11COMPONENT_RUNTIME\x10\x03\x1a<\n" +
+ "\x0ePositionsEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\x03R\x03key\x12\x14\n" +
+ "\x05value\x18\x02 \x01(\x05R\x05value:\x028\x01\x1a]\n" +
+ "\x0fMacroCallsEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\x03R\x03key\x124\n" +
+ "\x05value\x18\x02 \x01(\v2\x1e.google.api.expr.v1alpha1.ExprR\x05value:\x028\x01\"p\n" +
+ "\x0eSourcePosition\x12\x1a\n" +
+ "\blocation\x18\x01 \x01(\tR\blocation\x12\x16\n" +
+ "\x06offset\x18\x02 \x01(\x05R\x06offset\x12\x12\n" +
+ "\x04line\x18\x03 \x01(\x05R\x04line\x12\x16\n" +
+ "\x06column\x18\x04 \x01(\x05R\x06columnBk\n" +
+ "\x1ccom.google.api.expr.v1alpha1B\vSyntaxProtoP\x01Z= 0 {
+ data := b.Bytes()
+ if bytes.Compare(data[existing[i].start:existing[i].end], data[e.start:e.end]) == 0 {
+ // The new entry gets obsoleted because it's identical.
+ // This has the advantage that key/value pairs from
+ // a WithValues call always come first, even if the same
+ // pair gets added again later. This makes different log
+ // entries more consistent.
+ //
+ // The new entry has a higher start index and thus can be appended.
+ obsolete = append(obsolete, e.interval)
+ } else {
+ // The old entry gets obsoleted because it's value is different.
+ //
+ // Sort order is not guaranteed, we have to insert at the right place.
+ index, _ := slices.BinarySearchFunc(obsolete, existing[i].interval, func(a, b interval) int { return a.start - b.start })
+ obsolete = slices.Insert(obsolete, index, existing[i].interval)
+ existing[i].interval = e.interval
+ }
+ } else {
+ // Instead of appending at the end and doing a
+ // linear search in findEntry, we could keep
+ // the slice sorted by key and do a binary search.
+ //
+ // Above:
+ // i, ok := slices.BinarySearchFunc(existing, e, func(a, b entry) int { return strings.Compare(a.key, b.key) })
+ // Here:
+ // existing = slices.Insert(existing, i, e)
+ //
+ // But that adds a dependency on the slices package
+ // and made performance slightly worse, presumably
+ // because the cost of shifting entries around
+ // did not pay of with faster lookups.
+ existing = append(existing, e)
+ }
}
- f.KVFormat(b, key, first[i+1])
}
- // Round down.
- l := len(second)
- l = l / 2 * 2
- for i := 1; i < l; i += 2 {
- f.KVFormat(b, second[i-1], second[i])
- }
- if len(second)%2 == 1 {
- f.KVFormat(b, second[len(second)-1], missingValue)
- }
-}
-func MergeAndFormatKVs(b *bytes.Buffer, first, second []interface{}) {
- Formatter{}.MergeAndFormatKVs(b, first, second)
-}
+ // If we need to remove some obsolete key/value pairs then move the memory.
+ if len(obsolete) > 0 {
+ // Potentially the next remaining output (might itself be obsolete).
+ from := obsolete[0].end
+ // Next obsolete entry.
+ nextObsolete := 1
+ // This is the source buffer, before truncation.
+ all := b.Bytes()
+ b.Truncate(obsolete[0].start)
-const missingValue = "(MISSING)"
+ for nextObsolete < len(obsolete) {
+ if from == obsolete[nextObsolete].start {
+ // Skip also the next obsolete key/value.
+ from = obsolete[nextObsolete].end
+ nextObsolete++
+ continue
+ }
-// KVListFormat serializes all key/value pairs into the provided buffer.
-// A space gets inserted before the first pair and between each pair.
-func (f Formatter) KVListFormat(b *bytes.Buffer, keysAndValues ...interface{}) {
- for i := 0; i < len(keysAndValues); i += 2 {
- var v interface{}
- k := keysAndValues[i]
- if i+1 < len(keysAndValues) {
- v = keysAndValues[i+1]
- } else {
- v = missingValue
+ // Preserve some output. Write uses copy, which
+ // explicitly allows source and destination to overlap.
+ // That could happen here.
+ valid := all[from:obsolete[nextObsolete].start]
+ b.Write(valid)
+ from = obsolete[nextObsolete].end
+ nextObsolete++
}
- f.KVFormat(b, k, v)
+ // Copy end of buffer.
+ valid := all[from:]
+ b.Write(valid)
}
}
-func KVListFormat(b *bytes.Buffer, keysAndValues ...interface{}) {
- Formatter{}.KVListFormat(b, keysAndValues...)
+type obsoleteKV struct {
+ key string
+ interval
+}
+
+// interval includes the start and excludes the end.
+type interval struct {
+ start int
+ end int
}
-func KVFormat(b *bytes.Buffer, k, v interface{}) {
- Formatter{}.KVFormat(b, k, v)
+func findObsoleteEntry(entries []obsoleteKV, key string) int {
+ for i, entry := range entries {
+ if entry.key == key {
+ return i
+ }
+ }
+ return -1
}
// formatAny is the fallback formatter for a value. It supports a hook (for
// example, for YAML encoding) and itself uses JSON encoding.
func (f Formatter) formatAny(b *bytes.Buffer, v interface{}) {
- b.WriteRune('=')
if f.AnyToStringHook != nil {
- b.WriteString(f.AnyToStringHook(v))
+ str := f.AnyToStringHook(v)
+ if strings.Contains(str, "\n") {
+ // If it's multi-line, then pass it through writeStringValue to get start/end delimiters,
+ // which separates it better from any following key/value pair.
+ writeStringValue(b, str)
+ return
+ }
+ // Otherwise put it directly after the separator, on the same lime,
+ // The assumption is that the hook returns something where start/end are obvious.
+ b.WriteRune('=')
+ b.WriteString(str)
return
}
+ b.WriteRune('=')
formatAsJSON(b, v)
}
diff --git a/vendor/k8s.io/klog/v2/internal/serialize/keyvalues_no_slog.go b/vendor/k8s.io/klog/v2/internal/serialize/keyvalues_no_slog.go
index d9c7d15467c4..b8c7e443d0bb 100644
--- a/vendor/k8s.io/klog/v2/internal/serialize/keyvalues_no_slog.go
+++ b/vendor/k8s.io/klog/v2/internal/serialize/keyvalues_no_slog.go
@@ -28,7 +28,7 @@ import (
// KVFormat serializes one key/value pair into the provided buffer.
// A space gets inserted before the pair.
-func (f Formatter) KVFormat(b *bytes.Buffer, k, v interface{}) {
+func (f Formatter) KVFormat(b *bytes.Buffer, k, v interface{}) string {
// This is the version without slog support. Must be kept in sync with
// the version in keyvalues_slog.go.
@@ -37,13 +37,15 @@ func (f Formatter) KVFormat(b *bytes.Buffer, k, v interface{}) {
// https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md#name-arguments
// for the sake of performance. Keys with spaces,
// special characters, etc. will break parsing.
+ var key string
if sK, ok := k.(string); ok {
// Avoid one allocation when the key is a string, which
// normally it should be.
- b.WriteString(sK)
+ key = sK
} else {
- b.WriteString(fmt.Sprintf("%s", k))
+ key = fmt.Sprintf("%s", k)
}
+ b.WriteString(key)
// The type checks are sorted so that more frequently used ones
// come first because that is then faster in the common
@@ -94,4 +96,6 @@ func (f Formatter) KVFormat(b *bytes.Buffer, k, v interface{}) {
default:
f.formatAny(b, v)
}
+
+ return key
}
diff --git a/vendor/k8s.io/klog/v2/internal/serialize/keyvalues_slog.go b/vendor/k8s.io/klog/v2/internal/serialize/keyvalues_slog.go
index 89acf9772309..8e00843645ea 100644
--- a/vendor/k8s.io/klog/v2/internal/serialize/keyvalues_slog.go
+++ b/vendor/k8s.io/klog/v2/internal/serialize/keyvalues_slog.go
@@ -29,8 +29,8 @@ import (
)
// KVFormat serializes one key/value pair into the provided buffer.
-// A space gets inserted before the pair.
-func (f Formatter) KVFormat(b *bytes.Buffer, k, v interface{}) {
+// A space gets inserted before the pair. It returns the key.
+func (f Formatter) KVFormat(b *bytes.Buffer, k, v interface{}) string {
// This is the version without slog support. Must be kept in sync with
// the version in keyvalues_slog.go.
@@ -39,13 +39,15 @@ func (f Formatter) KVFormat(b *bytes.Buffer, k, v interface{}) {
// https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md#name-arguments
// for the sake of performance. Keys with spaces,
// special characters, etc. will break parsing.
+ var key string
if sK, ok := k.(string); ok {
// Avoid one allocation when the key is a string, which
// normally it should be.
- b.WriteString(sK)
+ key = sK
} else {
- b.WriteString(fmt.Sprintf("%s", k))
+ key = fmt.Sprintf("%s", k)
}
+ b.WriteString(key)
// The type checks are sorted so that more frequently used ones
// come first because that is then faster in the common
@@ -112,6 +114,8 @@ func (f Formatter) KVFormat(b *bytes.Buffer, k, v interface{}) {
default:
f.formatAny(b, v)
}
+
+ return key
}
// generateJSON has the same preference for plain strings as KVFormat.
diff --git a/vendor/k8s.io/klog/v2/klog.go b/vendor/k8s.io/klog/v2/klog.go
index 47ec9466a6ff..319ffbe24831 100644
--- a/vendor/k8s.io/klog/v2/klog.go
+++ b/vendor/k8s.io/klog/v2/klog.go
@@ -58,15 +58,30 @@
//
// -logtostderr=true
// Logs are written to standard error instead of to files.
-// This shortcuts most of the usual output routing:
-// -alsologtostderr, -stderrthreshold and -log_dir have no
-// effect and output redirection at runtime with SetOutput is
-// ignored.
+// By default, all logs are written regardless of severity
+// (legacy behavior). To filter logs by severity when
+// -logtostderr=true, set -legacy_stderr_threshold_behavior=false
+// and use -stderrthreshold.
+// With -legacy_stderr_threshold_behavior=true,
+// -stderrthreshold has no effect.
+//
+// The following flags always have no effect:
+// -alsologtostderr, -alsologtostderrthreshold, and -log_dir.
+// Output redirection at runtime with SetOutput is also ignored.
// -alsologtostderr=false
// Logs are written to standard error as well as to files.
+// -alsologtostderrthreshold=INFO
+// Log events at or above this severity are logged to standard
+// error when -alsologtostderr=true (no effect when -logtostderr=true).
+// Default is INFO to maintain backward compatibility.
// -stderrthreshold=ERROR
// Log events at or above this severity are logged to standard
-// error as well as to files.
+// error as well as to files. When -logtostderr=true, this flag
+// has no effect unless -legacy_stderr_threshold_behavior=false.
+// -legacy_stderr_threshold_behavior=true
+// If true, -stderrthreshold is ignored when -logtostderr=true
+// (legacy behavior). If false, -stderrthreshold is honored even
+// when -logtostderr=true, allowing severity-based filtering.
// -log_dir=""
// Log files will be written to this directory instead of the
// default temporary directory.
@@ -156,7 +171,7 @@ func (s *severityValue) Set(value string) error {
}
threshold = severity.Severity(v)
}
- logging.stderrThreshold.set(threshold)
+ s.set(threshold)
return nil
}
@@ -409,6 +424,15 @@ var commandLine flag.FlagSet
// init sets up the defaults and creates command line flags.
func init() {
+ // Initialize severity thresholds
+ logging.stderrThreshold = severityValue{
+ Severity: severity.ErrorLog, // Default stderrThreshold is ERROR.
+ }
+ logging.alsologtostderrthreshold = severityValue{
+ Severity: severity.InfoLog, // Default alsologtostderrthreshold is INFO (to maintain backward compatibility).
+ }
+ logging.setVState(0, nil, false)
+
commandLine.StringVar(&logging.logDir, "log_dir", "", "If non-empty, write log files in this directory (no effect when -logtostderr=true)")
commandLine.StringVar(&logging.logFile, "log_file", "", "If non-empty, use this log file (no effect when -logtostderr=true)")
commandLine.Uint64Var(&logging.logFileMaxSizeMB, "log_file_max_size", 1800,
@@ -416,16 +440,14 @@ func init() {
"If the value is 0, the maximum file size is unlimited.")
commandLine.BoolVar(&logging.toStderr, "logtostderr", true, "log to standard error instead of files")
commandLine.BoolVar(&logging.alsoToStderr, "alsologtostderr", false, "log to standard error as well as files (no effect when -logtostderr=true)")
- logging.setVState(0, nil, false)
+ commandLine.BoolVar(&logging.legacyStderrThresholdBehavior, "legacy_stderr_threshold_behavior", true, "If true, stderrthreshold is ignored when logtostderr=true (legacy behavior). If false, stderrthreshold is honored even when logtostderr=true")
commandLine.Var(&logging.verbosity, "v", "number for the log level verbosity")
commandLine.BoolVar(&logging.addDirHeader, "add_dir_header", false, "If true, adds the file directory to the header of the log messages")
commandLine.BoolVar(&logging.skipHeaders, "skip_headers", false, "If true, avoid header prefixes in the log messages")
commandLine.BoolVar(&logging.oneOutput, "one_output", false, "If true, only write logs to their native severity level (vs also writing to each lower severity level; no effect when -logtostderr=true)")
commandLine.BoolVar(&logging.skipLogHeaders, "skip_log_headers", false, "If true, avoid headers when opening log files (no effect when -logtostderr=true)")
- logging.stderrThreshold = severityValue{
- Severity: severity.ErrorLog, // Default stderrThreshold is ERROR.
- }
- commandLine.Var(&logging.stderrThreshold, "stderrthreshold", "logs at or above this threshold go to stderr when writing to files and stderr (no effect when -logtostderr=true or -alsologtostderr=true)")
+ commandLine.Var(&logging.stderrThreshold, "stderrthreshold", "logs at or above this threshold go to stderr when writing to files and stderr (no effect when -logtostderr=true or -alsologtostderr=true unless -legacy_stderr_threshold_behavior=false)")
+ commandLine.Var(&logging.alsologtostderrthreshold, "alsologtostderrthreshold", "logs at or above this threshold go to stderr when -alsologtostderr=true (no effect when -logtostderr=true)")
commandLine.Var(&logging.vmodule, "vmodule", "comma-separated list of pattern=N settings for file-filtered logging")
commandLine.Var(&logging.traceLocation, "log_backtrace_at", "when logging hits line file:N, emit a stack trace")
@@ -470,11 +492,13 @@ type settings struct {
// Boolean flags. Not handled atomically because the flag.Value interface
// does not let us avoid the =true, and that shorthand is necessary for
// compatibility. TODO: does this matter enough to fix? Seems unlikely.
- toStderr bool // The -logtostderr flag.
- alsoToStderr bool // The -alsologtostderr flag.
+ toStderr bool // The -logtostderr flag.
+ alsoToStderr bool // The -alsologtostderr flag.
+ legacyStderrThresholdBehavior bool // The -legacy_stderr_threshold_behavior flag.
// Level flag. Handled atomically.
- stderrThreshold severityValue // The -stderrthreshold flag.
+ stderrThreshold severityValue // The -stderrthreshold flag.
+ alsologtostderrthreshold severityValue // The -alsologtostderrthreshold flag.
// Access to all of the following fields must be protected via a mutex.
@@ -809,16 +833,21 @@ func (l *loggingT) infoS(logger *logWriter, filter LogFilter, depth int, msg str
// printS is called from infoS and errorS if logger is not specified.
// set log severity by s
func (l *loggingT) printS(err error, s severity.Severity, depth int, msg string, keysAndValues ...interface{}) {
- // Only create a new buffer if we don't have one cached.
- b := buffer.GetBuffer()
// The message is always quoted, even if it contains line breaks.
// If developers want multi-line output, they should use a small, fixed
// message and put the multi-line output into a value.
- b.WriteString(strconv.Quote(msg))
+ qMsg := make([]byte, 0, 1024)
+ qMsg = strconv.AppendQuote(qMsg, msg)
+
+ // Only create a new buffer if we don't have one cached.
+ b := buffer.GetBuffer()
+ b.Write(qMsg)
+
+ var errKV []interface{}
if err != nil {
- serialize.KVListFormat(&b.Buffer, "err", err)
+ errKV = []interface{}{"err", err}
}
- serialize.KVListFormat(&b.Buffer, keysAndValues...)
+ serialize.FormatKVs(&b.Buffer, errKV, keysAndValues)
l.printDepth(s, nil, nil, depth+1, &b.Buffer)
// Make the buffer available for reuse.
buffer.PutBuffer(b)
@@ -885,9 +914,25 @@ func (l *loggingT) output(s severity.Severity, logger *logWriter, buf *buffer.Bu
}
}
} else if l.toStderr {
- os.Stderr.Write(data)
+ // When logging to stderr only, check if we should filter by severity.
+ // This is controlled by the legacy_stderr_threshold_behavior flag.
+ if l.legacyStderrThresholdBehavior {
+ // Legacy behavior: always write to stderr, ignore stderrthreshold
+ os.Stderr.Write(data)
+ } else {
+ // New behavior: honor stderrthreshold even when logtostderr=true
+ if s >= l.stderrThreshold.get() {
+ os.Stderr.Write(data)
+ }
+ }
} else {
- if alsoToStderr || l.alsoToStderr || s >= l.stderrThreshold.get() {
+ // Write to stderr if any of these conditions are met:
+ // - alsoToStderr is set (legacy behavior)
+ // - alsologtostderr is set and severity meets alsologtostderrthreshold
+ // - alsologtostderr is not set and severity meets stderrThreshold
+ if alsoToStderr ||
+ (l.alsoToStderr && s >= l.alsologtostderrthreshold.get()) ||
+ (!l.alsoToStderr && s >= l.stderrThreshold.get()) {
os.Stderr.Write(data)
}
diff --git a/vendor/k8s.io/klog/v2/klogr.go b/vendor/k8s.io/klog/v2/klogr.go
index efec96fd45bb..6204c7bb4341 100644
--- a/vendor/k8s.io/klog/v2/klogr.go
+++ b/vendor/k8s.io/klog/v2/klogr.go
@@ -53,7 +53,7 @@ func (l *klogger) Init(info logr.RuntimeInfo) {
}
func (l *klogger) Info(level int, msg string, kvList ...interface{}) {
- merged := serialize.MergeKVs(l.values, kvList)
+ merged := serialize.WithValues(l.values, kvList)
// Skip this function.
VDepth(l.callDepth+1, Level(level)).InfoSDepth(l.callDepth+1, msg, merged...)
}
@@ -63,7 +63,7 @@ func (l *klogger) Enabled(level int) bool {
}
func (l *klogger) Error(err error, msg string, kvList ...interface{}) {
- merged := serialize.MergeKVs(l.values, kvList)
+ merged := serialize.WithValues(l.values, kvList)
ErrorSDepth(l.callDepth+1, err, msg, merged...)
}
diff --git a/vendor/k8s.io/klog/v2/klogr_slog.go b/vendor/k8s.io/klog/v2/klogr_slog.go
index c77d7baafa65..901e28dd3917 100644
--- a/vendor/k8s.io/klog/v2/klogr_slog.go
+++ b/vendor/k8s.io/klog/v2/klogr_slog.go
@@ -63,12 +63,17 @@ func slogOutput(file string, line int, now time.Time, err error, s severity.Seve
}
// See printS.
+ qMsg := make([]byte, 0, 1024)
+ qMsg = strconv.AppendQuote(qMsg, msg)
+
b := buffer.GetBuffer()
- b.WriteString(strconv.Quote(msg))
+ b.Write(qMsg)
+
+ var errKV []interface{}
if err != nil {
- serialize.KVListFormat(&b.Buffer, "err", err)
+ errKV = []interface{}{"err", err}
}
- serialize.KVListFormat(&b.Buffer, kvList...)
+ serialize.FormatKVs(&b.Buffer, errKV, kvList)
// See print + header.
buf := logging.formatHeader(s, file, line, now)
diff --git a/vendor/k8s.io/klog/v2/textlogger/options.go b/vendor/k8s.io/klog/v2/textlogger/options.go
index b1c4eefb3706..ed834ca68006 100644
--- a/vendor/k8s.io/klog/v2/textlogger/options.go
+++ b/vendor/k8s.io/klog/v2/textlogger/options.go
@@ -59,6 +59,7 @@ type configOptions struct {
verbosityDefault int
fixedTime *time.Time
unwind func(int) (string, int)
+ withHeader bool
output io.Writer
}
@@ -106,6 +107,22 @@ func FixedTime(ts time.Time) ConfigOption {
}
}
+// WithHeader controls whether the header (time, source code location, etc.)
+// is included in the output. The default is to include it.
+//
+// This can be useful in combination with redirection to a buffer to
+// turn structured log parameters into a string (see example).
+//
+// # Experimental
+//
+// Notice: This function is EXPERIMENTAL and may be changed or removed in a
+// later release.
+func WithHeader(enabled bool) ConfigOption {
+ return func(co *configOptions) {
+ co.withHeader = enabled
+ }
+}
+
// Backtrace overrides the default mechanism for determining the call site.
// The callback is invoked with the number of function calls between itself
// and the call site. It must return the file name and line number. An empty
@@ -131,6 +148,7 @@ func NewConfig(opts ...ConfigOption) *Config {
vmoduleFlagName: "vmodule",
verbosityDefault: 0,
unwind: runtimeBacktrace,
+ withHeader: true,
output: os.Stderr,
},
}
diff --git a/vendor/k8s.io/klog/v2/textlogger/textlogger.go b/vendor/k8s.io/klog/v2/textlogger/textlogger.go
index 0b55a2994267..813cba1d4cb3 100644
--- a/vendor/k8s.io/klog/v2/textlogger/textlogger.go
+++ b/vendor/k8s.io/klog/v2/textlogger/textlogger.go
@@ -92,17 +92,23 @@ func (l *tlogger) Error(err error, msg string, kvList ...interface{}) {
}
func (l *tlogger) print(err error, s severity.Severity, msg string, kvList []interface{}) {
- // Determine caller.
- // +1 for this frame, +1 for Info/Error.
- skip := l.callDepth + 2
- file, line := l.config.co.unwind(skip)
- if file == "" {
- file = "???"
- line = 1
- } else if slash := strings.LastIndex(file, "/"); slash >= 0 {
- file = file[slash+1:]
+ var file string
+ var line int
+ var now time.Time
+ if l.config.co.withHeader {
+ // Determine caller.
+ // +1 for this frame, +1 for Info/Error.
+ skip := l.callDepth + 2
+ file, line = l.config.co.unwind(skip)
+ if file == "" {
+ file = "???"
+ line = 1
+ } else if slash := strings.LastIndex(file, "/"); slash >= 0 {
+ file = file[slash+1:]
+ }
+ now = time.Now()
}
- l.printWithInfos(file, line, time.Now(), err, s, msg, kvList)
+ l.printWithInfos(file, line, now, err, s, msg, kvList)
}
func runtimeBacktrace(skip int) (string, int) {
@@ -114,24 +120,31 @@ func runtimeBacktrace(skip int) (string, int) {
}
func (l *tlogger) printWithInfos(file string, line int, now time.Time, err error, s severity.Severity, msg string, kvList []interface{}) {
+ // The message is always quoted, even if it contains line breaks.
+ // If developers want multi-line output, they should use a small, fixed
+ // message and put the multi-line output into a value.
+ qMsg := make([]byte, 0, 1024)
+ qMsg = strconv.AppendQuote(qMsg, msg)
+
// Only create a new buffer if we don't have one cached.
b := buffer.GetBuffer()
defer buffer.PutBuffer(b)
- // Format header.
- if l.config.co.fixedTime != nil {
- now = *l.config.co.fixedTime
+ if l.config.co.withHeader {
+ // Format header.
+ if l.config.co.fixedTime != nil {
+ now = *l.config.co.fixedTime
+ }
+ b.FormatHeader(s, file, line, now)
}
- b.FormatHeader(s, file, line, now)
- // The message is always quoted, even if it contains line breaks.
- // If developers want multi-line output, they should use a small, fixed
- // message and put the multi-line output into a value.
- b.WriteString(strconv.Quote(msg))
+ b.Write(qMsg)
+
+ var errKV []interface{}
if err != nil {
- serialize.KVFormat(&b.Buffer, "err", err)
+ errKV = []interface{}{"err", err}
}
- serialize.MergeAndFormatKVs(&b.Buffer, l.values, kvList)
+ serialize.FormatKVs(&b.Buffer, errKV, l.values, kvList)
if b.Len() == 0 || b.Bytes()[b.Len()-1] != '\n' {
b.WriteByte('\n')
}
diff --git a/vendor/k8s.io/kubelet/config/v1beta1/types.go b/vendor/k8s.io/kubelet/config/v1beta1/types.go
index 474c5c0c91e6..610737c87ef1 100644
--- a/vendor/k8s.io/kubelet/config/v1beta1/types.go
+++ b/vendor/k8s.io/kubelet/config/v1beta1/types.go
@@ -301,6 +301,7 @@ type KubeletConfiguration struct {
ClusterDNS []string `json:"clusterDNS,omitempty"`
// streamingConnectionIdleTimeout is the maximum time a streaming connection
// can be idle before the connection is automatically closed.
+ // Deprecated: no longer has any effect.
// Default: "4h"
// +optional
StreamingConnectionIdleTimeout metav1.Duration `json:"streamingConnectionIdleTimeout,omitempty"`
@@ -887,7 +888,6 @@ type KubeletConfiguration struct {
// Tracing specifies the versioned configuration for OpenTelemetry tracing clients.
// See https://kep.k8s.io/2832 for more details.
// Default: nil
- // +featureGate=KubeletTracing
// +optional
Tracing *tracingapi.TracingConfiguration `json:"tracing,omitempty"`
@@ -923,7 +923,7 @@ type KubeletConfiguration struct {
FailCgroupV1 *bool `json:"failCgroupV1,omitempty"`
// UserNamespaces contains User Namespace configurations.
- // +featureGate=UserNamespaceSupport
+ // +featureGate=UserNamespacesSupport
// +optional
UserNamespaces *UserNamespaces `json:"userNamespaces,omitempty"`
}
@@ -1131,7 +1131,7 @@ type UserNamespaces struct {
// Changing the value may require recreating all containers on the node.
//
// Default: 65536
- // +featureGate=UserNamespaceSupport
+ // +featureGate=UserNamespacesSupport
// +optional
IDsPerPod *int64 `json:"idsPerPod,omitempty"`
}
diff --git a/vendor/k8s.io/utils/strings/slices/slices.go b/vendor/k8s.io/utils/strings/slices/slices.go
deleted file mode 100644
index 35657a7fcdcd..000000000000
--- a/vendor/k8s.io/utils/strings/slices/slices.go
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-Copyright 2021 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Package slices defines various functions useful with slices of string type.
-// The goal is to be as close as possible to
-// https://github.com/golang/go/issues/45955. Ideal would be if we can just
-// replace "stringslices" if the "slices" package becomes standard.
-package slices
-
-import goslices "slices"
-
-// Equal reports whether two slices are equal: the same length and all
-// elements equal. If the lengths are different, Equal returns false.
-// Otherwise, the elements are compared in index order, and the
-// comparison stops at the first unequal pair.
-//
-// Deprecated: use stdlib slices.Equal instead.
-var Equal = goslices.Equal[[]string]
-
-// Filter appends to d each element e of s for which keep(e) returns true.
-// It returns the modified d. d may be s[:0], in which case the kept
-// elements will be stored in the same slice.
-// if the slices overlap in some other way, the results are unspecified.
-// To create a new slice with the filtered results, pass nil for d.
-//
-// Deprecated: use stdlib slices.DeleteFunc instead.
-func Filter(d, s []string, keep func(string) bool) []string {
- for _, n := range s {
- if keep(n) {
- d = append(d, n)
- }
- }
- return d
-}
-
-// Contains reports whether v is present in s.
-//
-// Deprecated: use stdlib slices.Contains instead.
-var Contains = goslices.Contains[[]string]
-
-// Index returns the index of the first occurrence of v in s, or -1 if
-// not present.
-//
-// Deprecated: use stdlib slices.Index instead.
-var Index = goslices.Index[[]string]
-
-// Clone returns a new clone of s.
-//
-// Deprecated: use stdlib slices.Clone instead.
-var Clone = goslices.Clone[[]string]
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 061e61727de5..820af3ee4fc4 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -305,9 +305,6 @@ github.com/armon/go-socks5
# github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
## explicit; go 1.13
github.com/asaskevich/govalidator
-# github.com/asaskevich/govalidator/v11 v11.0.2-0.20250122183457-e11347878e23
-## explicit; go 1.13
-github.com/asaskevich/govalidator/v11
# github.com/aws/aws-sdk-go-v2 v1.42.0
## explicit; go 1.24
github.com/aws/aws-sdk-go-v2/aws
@@ -328,7 +325,6 @@ github.com/aws/aws-sdk-go-v2/internal/auth/smithy
github.com/aws/aws-sdk-go-v2/internal/context
github.com/aws/aws-sdk-go-v2/internal/endpoints
github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn
-github.com/aws/aws-sdk-go-v2/internal/middleware
github.com/aws/aws-sdk-go-v2/internal/rand
github.com/aws/aws-sdk-go-v2/internal/sdk
github.com/aws/aws-sdk-go-v2/internal/sdkio
@@ -378,11 +374,6 @@ github.com/aws/aws-sdk-go-v2/internal/v4a/internal/v4
github.com/aws/aws-sdk-go-v2/service/ec2
github.com/aws/aws-sdk-go-v2/service/ec2/internal/endpoints
github.com/aws/aws-sdk-go-v2/service/ec2/types
-# github.com/aws/aws-sdk-go-v2/service/eks v1.77.0
-## explicit; go 1.23
-github.com/aws/aws-sdk-go-v2/service/eks
-github.com/aws/aws-sdk-go-v2/service/eks/internal/endpoints
-github.com/aws/aws-sdk-go-v2/service/eks/types
# github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.34.6
## explicit; go 1.24
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing
@@ -877,8 +868,8 @@ github.com/gregjones/httpcache
# github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
## explicit
github.com/grpc-ecosystem/go-grpc-prometheus
-# github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7
-## explicit; go 1.24.0
+# github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0
+## explicit; go 1.25.0
github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options
github.com/grpc-ecosystem/grpc-gateway/v2/runtime
@@ -1006,9 +997,6 @@ github.com/opencontainers/image-spec/specs-go/v1
## explicit; go 1.19
github.com/opencontainers/selinux/go-selinux
github.com/opencontainers/selinux/pkg/pwalkdir
-# github.com/openshift-online/ocm-common v0.0.31
-## explicit; go 1.21
-github.com/openshift-online/ocm-common/pkg/resource/validations
# github.com/openshift/api v0.0.0-20260416105050-3c6b218b8a80
## explicit; go 1.25.0
github.com/openshift/api
@@ -1240,8 +1228,8 @@ github.com/prometheus/client_model/go
## explicit; go 1.25.0
github.com/prometheus/common/expfmt
github.com/prometheus/common/model
-# github.com/prometheus/procfs v0.19.2
-## explicit; go 1.24.0
+# github.com/prometheus/procfs v0.20.1
+## explicit; go 1.25.0
github.com/prometheus/procfs
github.com/prometheus/procfs/internal/fs
github.com/prometheus/procfs/internal/util
@@ -1347,16 +1335,16 @@ go.mongodb.org/mongo-driver/x/bsonx/bsoncore
## explicit; go 1.24.0
go.opentelemetry.io/auto/sdk
go.opentelemetry.io/auto/sdk/internal/telemetry
-# go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0
+# go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.69.0
## explicit; go 1.25.0
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal
-# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0
+# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0
## explicit; go 1.25.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv
-# go.opentelemetry.io/otel v1.43.0
+# go.opentelemetry.io/otel v1.44.0
## explicit; go 1.25.0
go.opentelemetry.io/otel
go.opentelemetry.io/otel/attribute
@@ -1374,18 +1362,17 @@ go.opentelemetry.io/otel/semconv/v1.12.0
go.opentelemetry.io/otel/semconv/v1.17.0
go.opentelemetry.io/otel/semconv/v1.17.0/httpconv
go.opentelemetry.io/otel/semconv/v1.37.0
-go.opentelemetry.io/otel/semconv/v1.39.0
-go.opentelemetry.io/otel/semconv/v1.39.0/otelconv
-go.opentelemetry.io/otel/semconv/v1.40.0
-go.opentelemetry.io/otel/semconv/v1.40.0/httpconv
-go.opentelemetry.io/otel/semconv/v1.40.0/otelconv
-go.opentelemetry.io/otel/semconv/v1.40.0/rpcconv
-# go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0
-## explicit; go 1.24.0
+go.opentelemetry.io/otel/semconv/v1.37.0/rpcconv
+go.opentelemetry.io/otel/semconv/v1.41.0
+go.opentelemetry.io/otel/semconv/v1.41.0/httpconv
+go.opentelemetry.io/otel/semconv/v1.41.0/otelconv
+go.opentelemetry.io/otel/semconv/v1.41.0/rpcconv
+# go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0
+## explicit; go 1.25.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace
go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform
-# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0
-## explicit; go 1.24.0
+# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.44.0
+## explicit; go 1.25.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/counter
@@ -1394,12 +1381,12 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x
-# go.opentelemetry.io/otel/metric v1.43.0
+# go.opentelemetry.io/otel/metric v1.44.0
## explicit; go 1.25.0
go.opentelemetry.io/otel/metric
go.opentelemetry.io/otel/metric/embedded
go.opentelemetry.io/otel/metric/noop
-# go.opentelemetry.io/otel/sdk v1.43.0
+# go.opentelemetry.io/otel/sdk v1.44.0
## explicit; go 1.25.0
go.opentelemetry.io/otel/sdk
go.opentelemetry.io/otel/sdk/instrumentation
@@ -1408,14 +1395,14 @@ go.opentelemetry.io/otel/sdk/resource
go.opentelemetry.io/otel/sdk/trace
go.opentelemetry.io/otel/sdk/trace/internal/env
go.opentelemetry.io/otel/sdk/trace/internal/observ
-# go.opentelemetry.io/otel/trace v1.43.0
+# go.opentelemetry.io/otel/trace v1.44.0
## explicit; go 1.25.0
go.opentelemetry.io/otel/trace
go.opentelemetry.io/otel/trace/embedded
go.opentelemetry.io/otel/trace/internal/telemetry
go.opentelemetry.io/otel/trace/noop
-# go.opentelemetry.io/proto/otlp v1.9.0
-## explicit; go 1.23.0
+# go.opentelemetry.io/proto/otlp v1.10.0
+## explicit; go 1.24.0
go.opentelemetry.io/proto/otlp/collector/trace/v1
go.opentelemetry.io/proto/otlp/common/v1
go.opentelemetry.io/proto/otlp/resource/v1
@@ -1449,7 +1436,6 @@ go.yaml.in/yaml/v3
# golang.org/x/crypto v0.53.0
## explicit; go 1.25.0
golang.org/x/crypto/bcrypt
-golang.org/x/crypto/blake2b
golang.org/x/crypto/blowfish
golang.org/x/crypto/chacha20
golang.org/x/crypto/chacha20poly1305
@@ -1470,7 +1456,7 @@ golang.org/x/crypto/ssh/internal/bcrypt_pbkdf
# golang.org/x/exp v0.0.0-20251219203646-944ab1f22d93
## explicit; go 1.24.0
golang.org/x/exp/slices
-# golang.org/x/mod v0.36.0
+# golang.org/x/mod v0.37.0
## explicit; go 1.25.0
golang.org/x/mod/semver
# golang.org/x/net v0.56.0
@@ -1594,7 +1580,7 @@ google.golang.org/api/option
google.golang.org/api/option/internaloption
google.golang.org/api/storage/v1
google.golang.org/api/transport/http
-# google.golang.org/genproto/googleapis/api v0.0.0-20260319201613-d00831a3d3e7
+# google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa
## explicit; go 1.25.0
google.golang.org/genproto/googleapis/api
google.golang.org/genproto/googleapis/api/annotations
@@ -1736,7 +1722,7 @@ gopkg.in/yaml.v2
# gopkg.in/yaml.v3 v3.0.1
## explicit
gopkg.in/yaml.v3
-# k8s.io/api v0.35.1
+# k8s.io/api v0.35.4
## explicit; go 1.25.0
k8s.io/api/admission/v1
k8s.io/api/admission/v1beta1
@@ -1798,7 +1784,7 @@ k8s.io/api/storage/v1
k8s.io/api/storage/v1alpha1
k8s.io/api/storage/v1beta1
k8s.io/api/storagemigration/v1beta1
-# k8s.io/apiextensions-apiserver v0.35.1
+# k8s.io/apiextensions-apiserver v0.35.4
## explicit; go 1.25.0
k8s.io/apiextensions-apiserver/pkg/apis/apiextensions
k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
@@ -1809,7 +1795,7 @@ k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset
k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme
k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1
k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1
-# k8s.io/apimachinery v0.35.1
+# k8s.io/apimachinery v0.35.4
## explicit; go 1.25.0
k8s.io/apimachinery/pkg/api/apitesting
k8s.io/apimachinery/pkg/api/apitesting/fuzzer
@@ -1889,7 +1875,7 @@ 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/apiserver v0.35.1
+# k8s.io/apiserver v0.35.4
## explicit; go 1.25.0
k8s.io/apiserver/pkg/admission
k8s.io/apiserver/pkg/admission/configuration
@@ -2066,7 +2052,7 @@ k8s.io/cli-runtime/pkg/genericclioptions
k8s.io/cli-runtime/pkg/genericiooptions
k8s.io/cli-runtime/pkg/printers
k8s.io/cli-runtime/pkg/resource
-# k8s.io/client-go v0.35.1
+# k8s.io/client-go v0.35.4
## explicit; go 1.25.0
k8s.io/client-go/applyconfigurations
k8s.io/client-go/applyconfigurations/admissionregistration/v1
@@ -2431,7 +2417,7 @@ k8s.io/client-go/util/workqueue
# k8s.io/cloud-provider v0.35.0
## explicit; go 1.25.0
k8s.io/cloud-provider/api
-# k8s.io/component-base v0.35.1
+# k8s.io/component-base v0.35.4
## explicit; go 1.25.0
k8s.io/component-base/cli
k8s.io/component-base/cli/flag
@@ -2470,8 +2456,8 @@ k8s.io/csi-translation-lib/plugins
# k8s.io/klog v1.0.0
## explicit; go 1.12
k8s.io/klog
-# k8s.io/klog/v2 v2.130.1
-## explicit; go 1.18
+# k8s.io/klog/v2 v2.140.0
+## explicit; go 1.21
k8s.io/klog/v2
k8s.io/klog/v2/internal/buffer
k8s.io/klog/v2/internal/clock
@@ -2481,7 +2467,7 @@ k8s.io/klog/v2/internal/severity
k8s.io/klog/v2/internal/sloghandler
k8s.io/klog/v2/internal/verbosity
k8s.io/klog/v2/textlogger
-# k8s.io/kms v0.35.1
+# k8s.io/kms v0.35.4
## explicit; go 1.25.0
k8s.io/kms/apis/v1beta1
k8s.io/kms/apis/v2
@@ -2531,7 +2517,7 @@ k8s.io/kubectl/pkg/util/openapi
k8s.io/kubectl/pkg/util/templates
k8s.io/kubectl/pkg/util/term
k8s.io/kubectl/pkg/validation
-# k8s.io/kubelet v0.33.3
+# k8s.io/kubelet v0.34.0
## explicit; go 1.24.0
k8s.io/kubelet/config/v1beta1
# k8s.io/pod-security-admission v0.35.1
@@ -2554,7 +2540,6 @@ k8s.io/utils/path
k8s.io/utils/pointer
k8s.io/utils/ptr
k8s.io/utils/set
-k8s.io/utils/strings/slices
k8s.io/utils/trace
# kubevirt.io/api v1.8.4
## explicit; go 1.24.0
@@ -2575,8 +2560,8 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client
sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/metrics
sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/common/metrics
sigs.k8s.io/apiserver-network-proxy/konnectivity-client/proto/client
-# sigs.k8s.io/cluster-api v1.12.7
-## explicit; go 1.24.0
+# sigs.k8s.io/cluster-api v1.13.3
+## explicit; go 1.25.0
sigs.k8s.io/cluster-api/api/addons/v1beta1
sigs.k8s.io/cluster-api/api/addons/v1beta2
sigs.k8s.io/cluster-api/api/core/v1beta1
@@ -2593,8 +2578,7 @@ sigs.k8s.io/cluster-api/util/conditions/deprecated/v1beta1
sigs.k8s.io/cluster-api/util/conversion
sigs.k8s.io/cluster-api/util/labels/format
sigs.k8s.io/cluster-api/util/patch
-sigs.k8s.io/cluster-api/util/topology
-# sigs.k8s.io/cluster-api-provider-aws/v2 v2.10.0
+# sigs.k8s.io/cluster-api-provider-aws/v2 v2.12.1
## explicit; go 1.24.0
sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1
sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2
@@ -2603,34 +2587,28 @@ sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta1
sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2
sigs.k8s.io/cluster-api-provider-aws/v2/feature
sigs.k8s.io/cluster-api-provider-aws/v2/iam/api/v1beta1
-sigs.k8s.io/cluster-api-provider-aws/v2/pkg/eks
-sigs.k8s.io/cluster-api-provider-aws/v2/pkg/hash
-# sigs.k8s.io/cluster-api-provider-azure v1.22.0
-## explicit; go 1.24.6
+# sigs.k8s.io/cluster-api-provider-azure v1.26.0
+## explicit; go 1.25.0
sigs.k8s.io/cluster-api-provider-azure/api/v1beta1
-sigs.k8s.io/cluster-api-provider-azure/feature
sigs.k8s.io/cluster-api-provider-azure/util/azure
-sigs.k8s.io/cluster-api-provider-azure/util/ssh
-sigs.k8s.io/cluster-api-provider-azure/util/versions
-sigs.k8s.io/cluster-api-provider-azure/util/webhook
-# sigs.k8s.io/cluster-api-provider-gcp v1.11.0
+# sigs.k8s.io/cluster-api-provider-gcp v1.12.0
## explicit; go 1.24.0
sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1
# sigs.k8s.io/cluster-api-provider-ibmcloud v0.12.0
## explicit; go 1.24.0
sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta1
sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2
-# sigs.k8s.io/cluster-api-provider-kubevirt v0.11.1
+# sigs.k8s.io/cluster-api-provider-kubevirt v0.11.2
## explicit; go 1.24.0
sigs.k8s.io/cluster-api-provider-kubevirt/api/v1alpha1
-# sigs.k8s.io/cluster-api-provider-openstack v0.14.4
+# sigs.k8s.io/cluster-api-provider-openstack v0.14.6
## explicit; go 1.24.0
sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha1
sigs.k8s.io/cluster-api-provider-openstack/api/v1beta1
sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/errors
sigs.k8s.io/cluster-api-provider-openstack/pkg/utils/optional
-# sigs.k8s.io/controller-runtime v0.22.5
-## explicit; go 1.24.0
+# sigs.k8s.io/controller-runtime v0.23.3
+## explicit; go 1.25.0
sigs.k8s.io/controller-runtime
sigs.k8s.io/controller-runtime/pkg/builder
sigs.k8s.io/controller-runtime/pkg/cache
@@ -2794,10 +2772,10 @@ sigs.k8s.io/kustomize/kyaml/yaml/walk
## explicit; go 1.18
sigs.k8s.io/randfill
sigs.k8s.io/randfill/bytesource
-# sigs.k8s.io/secrets-store-csi-driver v1.4.8
-## explicit; go 1.21
+# sigs.k8s.io/secrets-store-csi-driver v1.6.0
+## explicit; go 1.25.9
sigs.k8s.io/secrets-store-csi-driver/apis/v1
-# sigs.k8s.io/structured-merge-diff/v6 v6.4.0
+# sigs.k8s.io/structured-merge-diff/v6 v6.4.2
## explicit; go 1.23
sigs.k8s.io/structured-merge-diff/v6/fieldpath
sigs.k8s.io/structured-merge-diff/v6/merge
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/awscluster_conversion.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/awscluster_conversion.go
index 805d60856edc..ee3969e3afc0 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/awscluster_conversion.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/awscluster_conversion.go
@@ -61,12 +61,14 @@ func (src *AWSCluster) ConvertTo(dstRaw conversion.Hub) error {
dst.Status.Bastion.PrivateDNSName = restored.Status.Bastion.PrivateDNSName
dst.Status.Bastion.PublicIPOnLaunch = restored.Status.Bastion.PublicIPOnLaunch
dst.Status.Bastion.NetworkInterfaceType = restored.Status.Bastion.NetworkInterfaceType
+ dst.Status.Bastion.AssignPrimaryIPv6 = restored.Status.Bastion.AssignPrimaryIPv6
dst.Status.Bastion.CapacityReservationID = restored.Status.Bastion.CapacityReservationID
dst.Status.Bastion.MarketType = restored.Status.Bastion.MarketType
dst.Status.Bastion.HostAffinity = restored.Status.Bastion.HostAffinity
dst.Status.Bastion.HostID = restored.Status.Bastion.HostID
dst.Status.Bastion.CapacityReservationPreference = restored.Status.Bastion.CapacityReservationPreference
dst.Status.Bastion.CPUOptions = restored.Status.Bastion.CPUOptions
+ dst.Status.Bastion.IPv6Address = restored.Status.Bastion.IPv6Address
if restored.Status.Bastion.DynamicHostAllocation != nil {
dst.Status.Bastion.DynamicHostAllocation = restored.Status.Bastion.DynamicHostAllocation
}
@@ -158,6 +160,7 @@ func (src *AWSCluster) ConvertTo(dstRaw conversion.Hub) error {
func restoreControlPlaneLoadBalancerStatus(restored, dst *infrav1.LoadBalancer) {
dst.ARN = restored.ARN
dst.LoadBalancerType = restored.LoadBalancerType
+ dst.LoadBalancerIPAddressType = restored.LoadBalancerIPAddressType
dst.ELBAttributes = restored.ELBAttributes
dst.ELBListeners = restored.ELBListeners
dst.Name = restored.Name
@@ -195,6 +198,8 @@ func restoreControlPlaneLoadBalancer(restored, dst *infrav1.AWSLoadBalancerSpec)
dst.Scheme = restored.Scheme
dst.CrossZoneLoadBalancing = restored.CrossZoneLoadBalancing
dst.Subnets = restored.Subnets
+ dst.TargetGroupIPType = restored.TargetGroupIPType
+ dst.DNSResolutionCheck = restored.DNSResolutionCheck
}
// ConvertFrom converts the v1beta1 AWSCluster receiver to a v1beta1 AWSCluster.
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/awsmachine_conversion.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/awsmachine_conversion.go
index 6e87547918cb..e6ae62de3e6f 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/awsmachine_conversion.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/awsmachine_conversion.go
@@ -48,6 +48,7 @@ func (src *AWSMachine) ConvertTo(dstRaw conversion.Hub) error {
dst.Spec.HostAffinity = restored.Spec.HostAffinity
dst.Spec.CapacityReservationPreference = restored.Spec.CapacityReservationPreference
dst.Spec.NetworkInterfaceType = restored.Spec.NetworkInterfaceType
+ dst.Spec.AssignPrimaryIPv6 = restored.Spec.AssignPrimaryIPv6
dst.Spec.CPUOptions = restored.Spec.CPUOptions
if restored.Spec.DynamicHostAllocation != nil {
dst.Spec.DynamicHostAllocation = restored.Spec.DynamicHostAllocation
@@ -120,6 +121,7 @@ func (r *AWSMachineTemplate) ConvertTo(dstRaw conversion.Hub) error {
dst.Spec.Template.Spec.HostAffinity = restored.Spec.Template.Spec.HostAffinity
dst.Spec.Template.Spec.CapacityReservationPreference = restored.Spec.Template.Spec.CapacityReservationPreference
dst.Spec.Template.Spec.NetworkInterfaceType = restored.Spec.Template.Spec.NetworkInterfaceType
+ dst.Spec.Template.Spec.AssignPrimaryIPv6 = restored.Spec.Template.Spec.AssignPrimaryIPv6
dst.Spec.Template.Spec.CPUOptions = restored.Spec.Template.Spec.CPUOptions
if restored.Spec.Template.Spec.DynamicHostAllocation != nil {
dst.Spec.Template.Spec.DynamicHostAllocation = restored.Spec.Template.Spec.DynamicHostAllocation
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/network_types.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/network_types.go
index f72940f45b54..5dec501d095d 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/network_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/network_types.go
@@ -189,8 +189,7 @@ type VPCSpec struct {
// Defaults to 10.0.0.0/16.
CidrBlock string `json:"cidrBlock,omitempty"`
- // IPv6 contains ipv6 specific settings for the network. Supported only in managed clusters.
- // This field cannot be set on AWSCluster object.
+ // IPv6 contains ipv6 specific settings for the network.
// +optional
IPv6 *IPv6 `json:"ipv6,omitempty"`
@@ -249,7 +248,6 @@ type SubnetSpec struct {
// IPv6CidrBlock is the IPv6 CIDR block to be used when the provider creates a managed VPC.
// A subnet can have an IPv4 and an IPv6 address.
- // IPv6 is only supported in managed clusters, this field cannot be set on AWSCluster object.
// +optional
IPv6CidrBlock string `json:"ipv6CidrBlock,omitempty"`
@@ -260,8 +258,7 @@ type SubnetSpec struct {
// +optional
IsPublic bool `json:"isPublic"`
- // IsIPv6 defines the subnet as an IPv6 subnet. A subnet is IPv6 when it is associated with a VPC that has IPv6 enabled.
- // IPv6 is only supported in managed clusters, this field cannot be set on AWSCluster object.
+ // IsIPv6 defines the subnet as an IPv6 subnet. A subnet is IPv6 when it is associated with an IPv6 CIDR.
// +optional
IsIPv6 bool `json:"isIpv6,omitempty"`
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/types.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/types.go
index 55ec56b0c7f4..5002243fd40d 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/types.go
@@ -32,6 +32,7 @@ type AWSResourceReference struct {
// ARN of resource.
// +optional
+ //
// Deprecated: This field has no function and is going to be removed in the next release.
ARN *string `json:"arn,omitempty"`
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/zz_generated.conversion.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/zz_generated.conversion.go
index 44f2227f384d..e3b329c03e06 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/zz_generated.conversion.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/zz_generated.conversion.go
@@ -1241,6 +1241,8 @@ func autoConvert_v1beta2_AWSLoadBalancerSpec_To_v1beta1_AWSLoadBalancerSpec(in *
// WARNING: in.LoadBalancerType requires manual conversion: does not exist in peer-type
// WARNING: in.DisableHostsRewrite requires manual conversion: does not exist in peer-type
// WARNING: in.PreserveClientIP requires manual conversion: does not exist in peer-type
+ // WARNING: in.TargetGroupIPType requires manual conversion: does not exist in peer-type
+ // WARNING: in.DNSResolutionCheck requires manual conversion: does not exist in peer-type
return nil
}
@@ -1416,6 +1418,7 @@ func autoConvert_v1beta2_AWSMachineSpec_To_v1beta1_AWSMachineSpec(in *v1beta2.AW
out.NonRootVolumes = *(*[]Volume)(unsafe.Pointer(&in.NonRootVolumes))
out.NetworkInterfaces = *(*[]string)(unsafe.Pointer(&in.NetworkInterfaces))
// WARNING: in.NetworkInterfaceType requires manual conversion: does not exist in peer-type
+ // WARNING: in.AssignPrimaryIPv6 requires manual conversion: does not exist in peer-type
out.UncompressedUserData = (*bool)(unsafe.Pointer(in.UncompressedUserData))
if err := Convert_v1beta2_CloudInit_To_v1beta1_CloudInit(&in.CloudInit, &out.CloudInit, s); err != nil {
return err
@@ -1683,7 +1686,7 @@ func Convert_v1beta2_AllowedNamespaces_To_v1beta1_AllowedNamespaces(in *v1beta2.
func autoConvert_v1beta1_Bastion_To_v1beta2_Bastion(in *Bastion, out *v1beta2.Bastion, s conversion.Scope) error {
out.Enabled = in.Enabled
out.DisableIngressRules = in.DisableIngressRules
- out.AllowedCIDRBlocks = *(*[]string)(unsafe.Pointer(&in.AllowedCIDRBlocks))
+ out.AllowedCIDRBlocks = *(*v1beta2.CidrBlocks)(unsafe.Pointer(&in.AllowedCIDRBlocks))
out.InstanceType = in.InstanceType
out.AMI = in.AMI
return nil
@@ -2018,6 +2021,7 @@ func autoConvert_v1beta2_Instance_To_v1beta1_Instance(in *v1beta2.Instance, out
out.IAMProfile = in.IAMProfile
out.Addresses = *(*[]corev1beta1.MachineAddress)(unsafe.Pointer(&in.Addresses))
out.PrivateIP = (*string)(unsafe.Pointer(in.PrivateIP))
+ // WARNING: in.IPv6Address requires manual conversion: does not exist in peer-type
out.PublicIP = (*string)(unsafe.Pointer(in.PublicIP))
out.ENASupport = (*bool)(unsafe.Pointer(in.ENASupport))
out.EBSOptimized = (*bool)(unsafe.Pointer(in.EBSOptimized))
@@ -2025,6 +2029,7 @@ func autoConvert_v1beta2_Instance_To_v1beta1_Instance(in *v1beta2.Instance, out
out.NonRootVolumes = *(*[]Volume)(unsafe.Pointer(&in.NonRootVolumes))
out.NetworkInterfaces = *(*[]string)(unsafe.Pointer(&in.NetworkInterfaces))
// WARNING: in.NetworkInterfaceType requires manual conversion: does not exist in peer-type
+ // WARNING: in.AssignPrimaryIPv6 requires manual conversion: does not exist in peer-type
out.Tags = *(*map[string]string)(unsafe.Pointer(&in.Tags))
out.AvailabilityZone = in.AvailabilityZone
out.SpotMarketOptions = (*SpotMarketOptions)(unsafe.Pointer(in.SpotMarketOptions))
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/webhooks.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awscluster_defaults.go
similarity index 59%
rename from vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/webhooks.go
rename to vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awscluster_defaults.go
index b5e444b762af..aee9619af626 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/webhooks.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awscluster_defaults.go
@@ -1,5 +1,5 @@
/*
-Copyright 2022 The Kubernetes Authors.
+Copyright 2026 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -16,20 +16,7 @@ limitations under the License.
package v1beta2
-import (
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime/schema"
- "k8s.io/apimachinery/pkg/util/validation/field"
-)
-
-func aggregateObjErrors(gk schema.GroupKind, name string, allErrs field.ErrorList) error {
- if len(allErrs) == 0 {
- return nil
- }
-
- return apierrors.NewInvalid(
- gk,
- name,
- allErrs,
- )
+// Default sets default values for AWSCluster.
+func (r *AWSCluster) Default() {
+ SetObjectDefaults_AWSCluster(r)
}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awscluster_types.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awscluster_types.go
index 184ef9de4317..d79df3ee3fb1 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awscluster_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awscluster_types.go
@@ -152,8 +152,9 @@ type Bastion struct {
// AllowedCIDRBlocks is a list of CIDR blocks allowed to access the bastion host.
// They are set as ingress rules for the Bastion host's Security Group (defaults to 0.0.0.0/0).
+ // If the cluster has IPv6 enabled, defaults to ::/0 and 0.0.0.0/0.
// +optional
- AllowedCIDRBlocks []string `json:"allowedCIDRBlocks,omitempty"`
+ AllowedCIDRBlocks CidrBlocks `json:"allowedCIDRBlocks,omitempty"`
// InstanceType will use the specified instance type for the bastion. If not specified,
// Cluster API Provider AWS will use t3.micro for all regions except us-east-1, where t2.micro
@@ -182,6 +183,19 @@ var (
LoadBalancerTypeDisabled = LoadBalancerType("disabled")
)
+// AWSLoadBalancerDNSResolutionCheck specifies the behavior for checking that the load balancer's
+// DNS name is resolvable.
+type AWSLoadBalancerDNSResolutionCheck string
+
+const (
+ // AWSLoadBalancerDNSResolutionCheckNone disables the DNS resolution verification step.
+ AWSLoadBalancerDNSResolutionCheckNone AWSLoadBalancerDNSResolutionCheck = "None"
+
+ // AWSLoadBalancerDNSResolutionCheckEnabled performs a DNS lookup against the load balancer's
+ // FQDN to ensure the record has propagated and is reachable.
+ AWSLoadBalancerDNSResolutionCheckEnabled AWSLoadBalancerDNSResolutionCheck = "Enabled"
+)
+
// AWSLoadBalancerSpec defines the desired state of an AWS load balancer.
type AWSLoadBalancerSpec struct {
// Name sets the name of the classic ELB load balancer. As per AWS, the name must be unique
@@ -252,6 +266,22 @@ type AWSLoadBalancerSpec struct {
// PreserveClientIP lets the user control if preservation of client ips must be retained or not.
// If this is enabled 6443 will be opened to 0.0.0.0/0.
PreserveClientIP bool `json:"preserveClientIP,omitempty"`
+
+ // TargetGroupIPType sets the IP address type for the target group.
+ // Valid values are ipv4 and ipv6. If not specified, defaults to ipv4 unless
+ // the VPC has IPv6 enabled, in which case it defaults to ipv6.
+ // This applies to the API server target group.
+ // This field cannot be set if LoadBalancerType is classic or disabled.
+ // +kubebuilder:validation:Enum=ipv4;ipv6
+ // +optional
+ TargetGroupIPType *TargetGroupIPType `json:"targetGroupIPType,omitempty"`
+
+ // DNSResolutionCheck configures the behavior for checking the load balancer DNS resolution.
+ // Set to "None" to disable the check.
+ // If omitted, the DNS resolution check is enabled.
+ // +kubebuilder:validation:Enum=None;Enabled
+ // +optional
+ DNSResolutionCheck *AWSLoadBalancerDNSResolutionCheck `json:"dnsResolutionCheck,omitempty"`
}
// AdditionalListenerSpec defines the desired state of an
@@ -271,6 +301,14 @@ type AdditionalListenerSpec struct {
// HealthCheck sets the optional custom health check configuration to the API target group.
// +optional
HealthCheck *TargetGroupHealthCheckAdditionalSpec `json:"healthCheck,omitempty"`
+
+ // TargetGroupIPType sets the IP address type for the target group.
+ // Valid values are ipv4 and ipv6. If not specified, defaults to ipv4 unless
+ // the VPC has IPv6 enabled, in which case it defaults to ipv6.
+ // This field cannot be set if LoadBalancerType is classic or disabled.
+ // +kubebuilder:validation:Enum=ipv4;ipv6
+ // +optional
+ TargetGroupIPType *TargetGroupIPType `json:"targetGroupIPType,omitempty"`
}
// AWSClusterStatus defines the observed state of AWSCluster.
@@ -323,7 +361,8 @@ type S3Bucket struct {
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="Cluster infrastructure is ready for EC2 instances"
// +kubebuilder:printcolumn:name="VPC",type="string",JSONPath=".spec.network.vpc.id",description="AWS VPC the cluster is using"
// +kubebuilder:printcolumn:name="Endpoint",type="string",JSONPath=".spec.controlPlaneEndpoint",description="API Endpoint",priority=1
-// +kubebuilder:printcolumn:name="Bastion IP",type="string",JSONPath=".status.bastion.publicIp",description="Bastion IP address for breakglass access"
+// +kubebuilder:printcolumn:name="Bastion IP",type="string",JSONPath=".status.bastion.publicIp",description="Bastion IPv4 address for breakglass access"
+// +kubebuilder:printcolumn:name="Bastion IPv6",type="string",JSONPath=".status.bastion.ipv6Address",description="Bastion IPv6 address for breakglass access"
// +k8s:defaulter-gen=true
// AWSCluster is the schema for Amazon EC2 based Kubernetes Cluster API.
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awscluster_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awscluster_webhook.go
deleted file mode 100644
index ddef7446bf11..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awscluster_webhook.go
+++ /dev/null
@@ -1,466 +0,0 @@
-/*
-Copyright 2022 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta2
-
-import (
- "context"
- "fmt"
- "net"
- "strings"
-
- "github.com/google/go-cmp/cmp"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-
- clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
- "sigs.k8s.io/cluster-api/util/annotations"
-)
-
-const (
- warningClassicELB = "%s load balancer is using a classic elb which is deprecated & support will be removed in a future release, please consider using another type of load balancer instead"
- warningHealthCheckProtocolNotSet = "healthcheck protocol is not set, the default value has changed from SSL to TCP. Health checks for existing clusters will be updated to TCP"
-)
-
-// log is for logging in this package.
-var _ = ctrl.Log.WithName("awscluster-resource")
-
-func (r *AWSCluster) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(awsClusterWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(r).
- WithValidator(w).
- WithDefaulter(w).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta2-awscluster,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=awsclusters,versions=v1beta2,name=validation.awscluster.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta2-awscluster,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=awsclusters,versions=v1beta2,name=default.awscluster.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-type awsClusterWebhook struct{}
-
-var (
- _ webhook.CustomValidator = &awsClusterWebhook{}
- _ webhook.CustomDefaulter = &awsClusterWebhook{}
-)
-
-// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
-func (*awsClusterWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- r, ok := obj.(*AWSCluster)
- if !ok {
- return nil, fmt.Errorf("expected an AWSCluster object but got %T", r)
- }
-
- var allErrs field.ErrorList
- var allWarnings admission.Warnings
-
- allErrs = append(allErrs, r.Spec.Bastion.Validate()...)
- allErrs = append(allErrs, r.validateSSHKeyName()...)
- allErrs = append(allErrs, r.Spec.AdditionalTags.Validate()...)
- allErrs = append(allErrs, r.Spec.S3Bucket.Validate()...)
- allErrs = append(allErrs, r.validateNetwork()...)
-
- warnings, errs := r.validateControlPlaneLBs()
- if len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
- if len(warnings) > 0 {
- allWarnings = append(allWarnings, warnings...)
- }
-
- return allWarnings, aggregateObjErrors(r.GroupVersionKind().GroupKind(), r.Name, allErrs)
-}
-
-// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
-func (*awsClusterWebhook) ValidateDelete(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
-func (*awsClusterWebhook) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
- r, ok := newObj.(*AWSCluster)
- if !ok {
- return nil, fmt.Errorf("expected an AWSCluster object but got %T", r)
- }
-
- var allErrs field.ErrorList
- var allWarnings admission.Warnings
-
- allErrs = append(allErrs, r.validateGCTasksAnnotation()...)
-
- oldC, ok := oldObj.(*AWSCluster)
- if !ok {
- return nil, apierrors.NewBadRequest(fmt.Sprintf("expected an AWSCluster but got a %T", oldObj))
- }
-
- if r.Spec.Region != oldC.Spec.Region {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "region"), r.Spec.Region, "field is immutable"),
- )
- }
-
- // Validate the control plane load balancers.
- lbs := map[*AWSLoadBalancerSpec]*AWSLoadBalancerSpec{
- oldC.Spec.ControlPlaneLoadBalancer: r.Spec.ControlPlaneLoadBalancer,
- oldC.Spec.SecondaryControlPlaneLoadBalancer: r.Spec.SecondaryControlPlaneLoadBalancer,
- }
-
- for oldLB, newLB := range lbs {
- if oldLB == nil && newLB == nil {
- continue
- }
-
- allErrs = append(allErrs, r.validateControlPlaneLoadBalancerUpdate(oldLB, newLB)...)
- }
-
- if !cmp.Equal(oldC.Spec.ControlPlaneEndpoint, clusterv1beta1.APIEndpoint{}) &&
- !cmp.Equal(r.Spec.ControlPlaneEndpoint, oldC.Spec.ControlPlaneEndpoint) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "controlPlaneEndpoint"), r.Spec.ControlPlaneEndpoint, "field is immutable"),
- )
- }
-
- // Modifying VPC id is not allowed because it will cause a new VPC creation if set to nil.
- if !cmp.Equal(oldC.Spec.NetworkSpec, NetworkSpec{}) &&
- !cmp.Equal(oldC.Spec.NetworkSpec.VPC, VPCSpec{}) &&
- oldC.Spec.NetworkSpec.VPC.ID != "" {
- if cmp.Equal(r.Spec.NetworkSpec, NetworkSpec{}) ||
- cmp.Equal(r.Spec.NetworkSpec.VPC, VPCSpec{}) ||
- oldC.Spec.NetworkSpec.VPC.ID != r.Spec.NetworkSpec.VPC.ID {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "network", "vpc", "id"),
- r.Spec.NetworkSpec.VPC.ID, "field cannot be modified once set"))
- }
- }
-
- // If a identityRef is already set, do not allow removal of it.
- if oldC.Spec.IdentityRef != nil && r.Spec.IdentityRef == nil {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "identityRef"),
- r.Spec.IdentityRef, "field cannot be set to nil"),
- )
- }
-
- if annotations.IsExternallyManaged(oldC) && !annotations.IsExternallyManaged(r) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("metadata", "annotations"),
- r.Annotations, "removal of externally managed annotation is not allowed"),
- )
- }
-
- allErrs = append(allErrs, r.Spec.Bastion.Validate()...)
- allErrs = append(allErrs, r.Spec.AdditionalTags.Validate()...)
- allErrs = append(allErrs, r.Spec.S3Bucket.Validate()...)
-
- if r.Spec.ControlPlaneLoadBalancer != nil {
- if r.Spec.ControlPlaneLoadBalancer.LoadBalancerType == LoadBalancerTypeClassic {
- allWarnings = append(allWarnings, fmt.Sprintf(warningClassicELB, "primary control plane"))
- }
- }
-
- if r.Spec.SecondaryControlPlaneLoadBalancer != nil {
- if r.Spec.SecondaryControlPlaneLoadBalancer.LoadBalancerType == LoadBalancerTypeClassic {
- allWarnings = append(allWarnings, fmt.Sprintf(warningClassicELB, "secondary control plane"))
- }
- }
-
- if r.Spec.ControlPlaneLoadBalancer == nil || r.Spec.ControlPlaneLoadBalancer.HealthCheckProtocol == nil {
- allWarnings = append(allWarnings, fmt.Sprintf("%s. Existing load balancers will be updates", warningHealthCheckProtocolNotSet))
- }
-
- return allWarnings, aggregateObjErrors(r.GroupVersionKind().GroupKind(), r.Name, allErrs)
-}
-
-func (r *AWSCluster) validateControlPlaneLoadBalancerUpdate(oldlb, newlb *AWSLoadBalancerSpec) field.ErrorList {
- var allErrs field.ErrorList
-
- if oldlb == nil {
- // If old scheme was nil, the only value accepted here is the default value: internet-facing
- if newlb.Scheme != nil && newlb.Scheme.String() != ELBSchemeInternetFacing.String() {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "controlPlaneLoadBalancer", "scheme"),
- newlb.Scheme, "field is immutable, default value was set to internet-facing"),
- )
- }
- } else {
- // A disabled Load Balancer has many implications that must be treated as immutable/
- // this is mostly used by externally managed Control Plane, and there's no need to support type changes.
- // More info: https://kubernetes.slack.com/archives/CD6U2V71N/p1708983246100859?thread_ts=1708973478.410979&cid=CD6U2V71N
- if (oldlb.LoadBalancerType == LoadBalancerTypeDisabled && newlb.LoadBalancerType != LoadBalancerTypeDisabled) ||
- (newlb.LoadBalancerType == LoadBalancerTypeDisabled && oldlb.LoadBalancerType != LoadBalancerTypeDisabled) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "controlPlaneLoadBalancer", "type"),
- newlb.Scheme, "field is immutable when created of disabled type"),
- )
- }
- // If old scheme was not nil, the new scheme should be the same.
- if !cmp.Equal(oldlb.Scheme, newlb.Scheme) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "controlPlaneLoadBalancer", "scheme"),
- newlb.Scheme, "field is immutable"),
- )
- }
- // The name must be defined when the AWSCluster is created. If it is not defined,
- // then the controller generates a default name at runtime, but does not store it,
- // so the name remains nil. In either case, the name cannot be changed.
- if !cmp.Equal(oldlb.Name, newlb.Name) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "controlPlaneLoadBalancer", "name"),
- newlb.Name, "field is immutable"),
- )
- }
-
- // Block the update for Protocol :
- // - if it was not set in old spec but added in new spec
- // - if it was set in old spec but changed in new spec
- if oldlb.LoadBalancerType != LoadBalancerTypeClassic {
- if !cmp.Equal(newlb.HealthCheckProtocol, oldlb.HealthCheckProtocol) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "controlPlaneLoadBalancer", "healthCheckProtocol"),
- newlb.HealthCheckProtocol, "field is immutable once set"),
- )
- }
- }
- }
-
- return allErrs
-}
-
-// Default satisfies the defaulting webhook interface.
-func (*awsClusterWebhook) Default(_ context.Context, obj runtime.Object) error {
- r, ok := obj.(*AWSCluster)
- if !ok {
- return fmt.Errorf("expected an AWSCluster object but got %T", r)
- }
-
- r.Default()
- return nil
-}
-
-// Default satisfies the defaulting webhook interface.
-func (r *AWSCluster) Default() {
- SetObjectDefaults_AWSCluster(r)
-}
-
-func (r *AWSCluster) validateGCTasksAnnotation() field.ErrorList {
- var allErrs field.ErrorList
-
- annotations := r.GetAnnotations()
- if annotations == nil {
- return nil
- }
-
- if gcTasksAnnotationValue := annotations[ExternalResourceGCTasksAnnotation]; gcTasksAnnotationValue != "" {
- gcTasks := strings.Split(gcTasksAnnotationValue, ",")
-
- supportedGCTasks := []GCTask{GCTaskLoadBalancer, GCTaskTargetGroup, GCTaskSecurityGroup}
-
- for _, gcTask := range gcTasks {
- found := false
-
- for _, supportedGCTask := range supportedGCTasks {
- if gcTask == string(supportedGCTask) {
- found = true
- break
- }
- }
-
- if !found {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("metadata", "annotations"),
- r.Annotations,
- fmt.Sprintf("annotation %s contains unsupported GC task %s", ExternalResourceGCTasksAnnotation, gcTask)),
- )
- }
- }
- }
-
- return allErrs
-}
-
-func (r *AWSCluster) validateSSHKeyName() field.ErrorList {
- return validateSSHKeyName(r.Spec.SSHKeyName)
-}
-
-func (r *AWSCluster) validateNetwork() field.ErrorList {
- var allErrs field.ErrorList
- if r.Spec.NetworkSpec.VPC.IsIPv6Enabled() {
- allErrs = append(allErrs, field.Invalid(field.NewPath("ipv6"), r.Spec.NetworkSpec.VPC.IPv6, "IPv6 cannot be used with unmanaged clusters at this time."))
- }
- for _, subnet := range r.Spec.NetworkSpec.Subnets {
- if subnet.IsIPv6 || subnet.IPv6CidrBlock != "" {
- allErrs = append(allErrs, field.Invalid(field.NewPath("subnets"), r.Spec.NetworkSpec.Subnets, "IPv6 cannot be used with unmanaged clusters at this time."))
- }
- if subnet.ZoneType != nil && subnet.IsEdge() {
- if subnet.ParentZoneName == nil {
- allErrs = append(allErrs, field.Invalid(field.NewPath("subnets"), r.Spec.NetworkSpec.Subnets, "ParentZoneName must be set when ZoneType is 'local-zone'."))
- }
- }
- }
-
- if r.Spec.NetworkSpec.VPC.CidrBlock != "" && r.Spec.NetworkSpec.VPC.IPAMPool != nil {
- allErrs = append(allErrs, field.Invalid(field.NewPath("cidrBlock"), r.Spec.NetworkSpec.VPC.CidrBlock, "cidrBlock and ipamPool cannot be used together"))
- }
-
- if r.Spec.NetworkSpec.VPC.IPAMPool != nil && r.Spec.NetworkSpec.VPC.IPAMPool.ID == "" && r.Spec.NetworkSpec.VPC.IPAMPool.Name == "" {
- allErrs = append(allErrs, field.Invalid(field.NewPath("ipamPool"), r.Spec.NetworkSpec.VPC.IPAMPool, "ipamPool must have either id or name"))
- }
-
- allErrs = append(allErrs, r.validateIngressRules(field.NewPath("spec", "network", "additionalControlPlaneIngressRules"), r.Spec.NetworkSpec.AdditionalControlPlaneIngressRules)...)
- allErrs = append(allErrs, r.validateIngressRules(field.NewPath("spec", "network", "additionalNodeIngressRules"), r.Spec.NetworkSpec.AdditionalNodeIngressRules)...)
-
- for cidrBlockIndex, cidrBlock := range r.Spec.NetworkSpec.NodePortIngressRuleCidrBlocks {
- if _, _, err := net.ParseCIDR(cidrBlock); err != nil {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "network", fmt.Sprintf("nodePortIngressRuleCidrBlocks[%d]", cidrBlockIndex)), r.Spec.NetworkSpec.NodePortIngressRuleCidrBlocks, "CIDR block is invalid"))
- }
- }
-
- if r.Spec.NetworkSpec.VPC.ElasticIPPool != nil {
- eipp := r.Spec.NetworkSpec.VPC.ElasticIPPool
- if eipp.PublicIpv4Pool != nil {
- if eipp.PublicIpv4PoolFallBackOrder == nil {
- return append(allErrs, field.Invalid(field.NewPath("elasticIpPool.publicIpv4PoolFallbackOrder"), r.Spec.NetworkSpec.VPC.ElasticIPPool, "publicIpv4PoolFallbackOrder must be set when publicIpv4Pool is defined."))
- }
- awsPublicIpv4PoolPrefix := "ipv4pool-ec2-"
- if !strings.HasPrefix(*eipp.PublicIpv4Pool, awsPublicIpv4PoolPrefix) {
- return append(allErrs, field.Invalid(field.NewPath("elasticIpPool.publicIpv4Pool"), r.Spec.NetworkSpec.VPC.ElasticIPPool, fmt.Sprintf("publicIpv4Pool must start with %s.", awsPublicIpv4PoolPrefix)))
- }
- }
- if eipp.PublicIpv4Pool == nil && eipp.PublicIpv4PoolFallBackOrder != nil {
- return append(allErrs, field.Invalid(field.NewPath("elasticIpPool.publicIpv4PoolFallbackOrder"), r.Spec.NetworkSpec.VPC.ElasticIPPool, "publicIpv4Pool must be set when publicIpv4PoolFallbackOrder is defined."))
- }
- }
-
- secondaryCidrBlocks := r.Spec.NetworkSpec.VPC.SecondaryCidrBlocks
- secondaryCidrBlocksField := field.NewPath("spec", "network", "vpc", "secondaryCidrBlocks")
- for _, cidrBlock := range secondaryCidrBlocks {
- if r.Spec.NetworkSpec.VPC.CidrBlock != "" && r.Spec.NetworkSpec.VPC.CidrBlock == cidrBlock.IPv4CidrBlock {
- allErrs = append(allErrs, field.Invalid(secondaryCidrBlocksField, secondaryCidrBlocks, fmt.Sprintf("AWSCluster.spec.network.vpc.secondaryCidrBlocks must not contain the primary AWSCluster.spec.network.vpc.cidrBlock %v", r.Spec.NetworkSpec.VPC.CidrBlock)))
- }
- }
-
- return allErrs
-}
-
-func (r *AWSCluster) validateControlPlaneLBs() (admission.Warnings, field.ErrorList) {
- var allErrs field.ErrorList
- var allWarnings admission.Warnings
-
- if r.Spec.ControlPlaneLoadBalancer != nil && r.Spec.ControlPlaneLoadBalancer.LoadBalancerType == LoadBalancerTypeClassic {
- allWarnings = append(allWarnings, fmt.Sprintf(warningClassicELB, "primary control plane"))
-
- if r.Spec.ControlPlaneLoadBalancer.HealthCheckProtocol == nil {
- allWarnings = append(allWarnings, warningHealthCheckProtocolNotSet)
- }
-
- if r.Spec.ControlPlaneLoadBalancer.HealthCheckProtocol != nil && *r.Spec.ControlPlaneLoadBalancer.HealthCheckProtocol == ELBProtocolSSL {
- allWarnings = append(allWarnings, "loadbalancer is using a classic elb with SSL health check, this causes issues with ciper suites with kubernetes v1.30+")
- }
- }
-
- // If the secondary is defined, check that the name is not empty and different from the primary.
- // Also, ensure that the secondary load balancer is an NLB
- if r.Spec.SecondaryControlPlaneLoadBalancer != nil {
- if r.Spec.SecondaryControlPlaneLoadBalancer.Name == nil || *r.Spec.SecondaryControlPlaneLoadBalancer.Name == "" {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "secondaryControlPlaneLoadBalancer", "name"), r.Spec.SecondaryControlPlaneLoadBalancer.Name, "secondary controlPlaneLoadBalancer.name cannot be empty"))
- }
-
- if r.Spec.SecondaryControlPlaneLoadBalancer.Name == r.Spec.ControlPlaneLoadBalancer.Name {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "secondaryControlPlaneLoadBalancer", "name"), r.Spec.SecondaryControlPlaneLoadBalancer.Name, "field must be different from controlPlaneLoadBalancer.name"))
- }
-
- if r.Spec.SecondaryControlPlaneLoadBalancer.Scheme.Equals(r.Spec.ControlPlaneLoadBalancer.Scheme) {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "secondaryControlPlaneLoadBalancer", "scheme"), r.Spec.SecondaryControlPlaneLoadBalancer.Scheme, "control plane load balancers must have different schemes"))
- }
-
- if r.Spec.SecondaryControlPlaneLoadBalancer.LoadBalancerType != LoadBalancerTypeNLB {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "secondaryControlPlaneLoadBalancer", "loadBalancerType"), r.Spec.SecondaryControlPlaneLoadBalancer.LoadBalancerType, "secondary control plane load balancer must be a Network Load Balancer"))
- }
- if r.Spec.SecondaryControlPlaneLoadBalancer.LoadBalancerType == LoadBalancerTypeClassic {
- allWarnings = append(allWarnings, fmt.Sprintf(warningClassicELB, "secondary control plane"))
- }
- }
-
- // Additional listeners are only supported for NLBs.
- // Validate the control plane load balancers.
- if r.Spec.ControlPlaneLoadBalancer != nil {
- allErrs = append(allErrs, r.validateIngressRules(field.NewPath("spec", "controlPlaneLoadBalancer", "ingressRules"), r.Spec.ControlPlaneLoadBalancer.IngressRules)...)
- }
- if r.Spec.SecondaryControlPlaneLoadBalancer != nil {
- allErrs = append(allErrs, r.validateIngressRules(field.NewPath("spec", "secondaryControlPlaneLoadBalancer", "ingressRules"), r.Spec.SecondaryControlPlaneLoadBalancer.IngressRules)...)
- }
-
- if r.Spec.ControlPlaneLoadBalancer.LoadBalancerType == LoadBalancerTypeDisabled {
- if r.Spec.ControlPlaneLoadBalancer.Name != nil {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "controlPlaneLoadBalancer", "name"), r.Spec.ControlPlaneLoadBalancer.Name, "cannot configure a name if the LoadBalancer reconciliation is disabled"))
- }
-
- if r.Spec.ControlPlaneLoadBalancer.CrossZoneLoadBalancing {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "controlPlaneLoadBalancer", "crossZoneLoadBalancing"), r.Spec.ControlPlaneLoadBalancer.CrossZoneLoadBalancing, "cross-zone load balancing cannot be set if the LoadBalancer reconciliation is disabled"))
- }
-
- if len(r.Spec.ControlPlaneLoadBalancer.Subnets) > 0 {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "controlPlaneLoadBalancer", "subnets"), r.Spec.ControlPlaneLoadBalancer.Subnets, "subnets cannot be set if the LoadBalancer reconciliation is disabled"))
- }
-
- if r.Spec.ControlPlaneLoadBalancer.HealthCheckProtocol != nil {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "controlPlaneLoadBalancer", "healthCheckProtocol"), r.Spec.ControlPlaneLoadBalancer.HealthCheckProtocol, "healthcheck protocol cannot be set if the LoadBalancer reconciliation is disabled"))
- }
-
- if len(r.Spec.ControlPlaneLoadBalancer.AdditionalSecurityGroups) > 0 {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "controlPlaneLoadBalancer", "additionalSecurityGroups"), r.Spec.ControlPlaneLoadBalancer.AdditionalSecurityGroups, "additional Security Groups cannot be set if the LoadBalancer reconciliation is disabled"))
- }
-
- if len(r.Spec.ControlPlaneLoadBalancer.AdditionalListeners) > 0 {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "controlPlaneLoadBalancer", "additionalListeners"), r.Spec.ControlPlaneLoadBalancer.AdditionalListeners, "cannot set additional listeners if the LoadBalancer reconciliation is disabled"))
- }
-
- if len(r.Spec.ControlPlaneLoadBalancer.IngressRules) > 0 {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "controlPlaneLoadBalancer", "ingressRules"), r.Spec.ControlPlaneLoadBalancer.IngressRules, "ingress rules cannot be set if the LoadBalancer reconciliation is disabled"))
- }
-
- if r.Spec.ControlPlaneLoadBalancer.PreserveClientIP {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "controlPlaneLoadBalancer", "preserveClientIP"), r.Spec.ControlPlaneLoadBalancer.PreserveClientIP, "cannot preserve client IP if the LoadBalancer reconciliation is disabled"))
- }
-
- if r.Spec.ControlPlaneLoadBalancer.DisableHostsRewrite {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "controlPlaneLoadBalancer", "disableHostsRewrite"), r.Spec.ControlPlaneLoadBalancer.DisableHostsRewrite, "cannot disable hosts rewrite if the LoadBalancer reconciliation is disabled"))
- }
- }
-
- return allWarnings, allErrs
-}
-
-func (r *AWSCluster) validateIngressRules(path *field.Path, rules []IngressRule) field.ErrorList {
- var allErrs field.ErrorList
- for ruleIndex, rule := range rules {
- rulePath := path.Index(ruleIndex)
- if rule.NatGatewaysIPsSource {
- if rule.CidrBlocks != nil || rule.IPv6CidrBlocks != nil || rule.SourceSecurityGroupIDs != nil || rule.SourceSecurityGroupRoles != nil {
- allErrs = append(allErrs, field.Invalid(rulePath, rules, "natGatewaysIPsSource cannot be used together with CIDR blocks, security group IDs or security group roles"))
- }
- } else {
- if (rule.CidrBlocks != nil || rule.IPv6CidrBlocks != nil) && (rule.SourceSecurityGroupIDs != nil || rule.SourceSecurityGroupRoles != nil) {
- allErrs = append(allErrs, field.Invalid(rulePath, rules, "CIDR blocks and security group IDs or security group roles cannot be used together"))
- }
- }
- }
- return allErrs
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsclustercontrolleridentity_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsclustercontrolleridentity_webhook.go
deleted file mode 100644
index ec52eb3947b7..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsclustercontrolleridentity_webhook.go
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
-Copyright 2022 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta2
-
-import (
- "context"
- "fmt"
-
- "github.com/google/go-cmp/cmp"
- "github.com/pkg/errors"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-)
-
-// log is for logging in this package.
-var _ = ctrl.Log.WithName("awsclustercontrolleridentity-resource")
-
-func (r *AWSClusterControllerIdentity) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(awsClusterControllerIdentityWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(r).
- WithValidator(w).
- WithDefaulter(w).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta2-awsclustercontrolleridentity,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=awsclustercontrolleridentities,versions=v1beta2,name=validation.awsclustercontrolleridentity.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta2-awsclustercontrolleridentity,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=awsclustercontrolleridentities,versions=v1beta2,name=default.awsclustercontrolleridentity.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-type awsClusterControllerIdentityWebhook struct{}
-
-var (
- _ webhook.CustomValidator = &awsClusterControllerIdentityWebhook{}
- _ webhook.CustomDefaulter = &awsClusterControllerIdentityWebhook{}
-)
-
-// ValidateCreate will do any extra validation when creating an AWSClusterControllerIdentity.
-func (*awsClusterControllerIdentityWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- r, ok := obj.(*AWSClusterControllerIdentity)
- if !ok {
- return nil, fmt.Errorf("expected an AWSClusterControllerIdentity object but got %T", r)
- }
-
- // Ensures AWSClusterControllerIdentity being singleton by only allowing "default" as name
- if r.Name != AWSClusterControllerIdentityName {
- return nil, field.Invalid(field.NewPath("name"),
- r.Name, "AWSClusterControllerIdentity is a singleton and only acceptable name is default")
- }
-
- // Validate selector parses as Selector if AllowedNameSpaces is populated
- if r.Spec.AllowedNamespaces != nil {
- _, err := metav1.LabelSelectorAsSelector(&r.Spec.AllowedNamespaces.Selector)
- if err != nil {
- return nil, field.Invalid(field.NewPath("spec", "allowedNamespaces", "selector"), r.Spec.AllowedNamespaces.Selector, err.Error())
- }
- }
-
- return nil, nil
-}
-
-// ValidateDelete allows you to add any extra validation when deleting an AWSClusterControllerIdentity.
-func (*awsClusterControllerIdentityWebhook) ValidateDelete(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// ValidateUpdate will do any extra validation when updating an AWSClusterControllerIdentity.
-func (*awsClusterControllerIdentityWebhook) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
- r, ok := newObj.(*AWSClusterControllerIdentity)
- if !ok {
- return nil, fmt.Errorf("expected an AWSClusterControllerIdentity object but got %T", r)
- }
-
- oldP, ok := oldObj.(*AWSClusterControllerIdentity)
- if !ok {
- return nil, apierrors.NewBadRequest(fmt.Sprintf("expected an AWSClusterControllerIdentity but got a %T", oldObj))
- }
-
- if !cmp.Equal(r.Spec, oldP.Spec) {
- return nil, errors.New("AWSClusterControllerIdentity is immutable")
- }
-
- if r.Name != oldP.Name {
- return nil, field.Invalid(field.NewPath("name"),
- r.Name, "AWSClusterControllerIdentity is a singleton and only acceptable name is default")
- }
-
- // Validate selector parses as Selector if AllowedNameSpaces is not nil
- if r.Spec.AllowedNamespaces != nil {
- _, err := metav1.LabelSelectorAsSelector(&r.Spec.AllowedNamespaces.Selector)
- if err != nil {
- return nil, field.Invalid(field.NewPath("spec", "allowedNamespaces", "selectors"), r.Spec.AllowedNamespaces.Selector, err.Error())
- }
- }
-
- return nil, nil
-}
-
-// Default will set default values for the AWSClusterControllerIdentity.
-func (*awsClusterControllerIdentityWebhook) Default(_ context.Context, obj runtime.Object) error {
- r, ok := obj.(*AWSClusterControllerIdentity)
- if !ok {
- return fmt.Errorf("expected an AWSClusterControllerIdentity object but got %T", r)
- }
-
- SetDefaults_Labels(&r.ObjectMeta)
- return nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsclusterroleidentity_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsclusterroleidentity_webhook.go
deleted file mode 100644
index 8528ba87f06f..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsclusterroleidentity_webhook.go
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
-Copyright 2022 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta2
-
-import (
- "context"
- "fmt"
-
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-)
-
-// log is for logging in this package.
-var _ = ctrl.Log.WithName("awsclusterroleidentity-resource")
-
-func (r *AWSClusterRoleIdentity) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(awsClusterRoleIdentityWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(r).
- WithValidator(w).
- WithDefaulter(w).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta2-awsclusterroleidentity,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=awsclusterroleidentities,versions=v1beta2,name=validation.awsclusterroleidentity.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta2-awsclusterroleidentity,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=awsclusterroleidentities,versions=v1beta2,name=default.awsclusterroleidentity.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-type awsClusterRoleIdentityWebhook struct{}
-
-var (
- _ webhook.CustomValidator = &awsClusterRoleIdentityWebhook{}
- _ webhook.CustomDefaulter = &awsClusterRoleIdentityWebhook{}
-)
-
-// ValidateCreate will do any extra validation when creating an AWSClusterRoleIdentity.
-func (*awsClusterRoleIdentityWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- r, ok := obj.(*AWSClusterRoleIdentity)
- if !ok {
- return nil, fmt.Errorf("expected an AWSClusterRoleIdentity object but got %T", r)
- }
-
- if r.Spec.SourceIdentityRef == nil {
- return nil, field.Invalid(field.NewPath("spec", "sourceIdentityRef"),
- r.Spec.SourceIdentityRef, "field cannot be set to nil")
- }
-
- // Validate selector parses as Selector
- if r.Spec.AllowedNamespaces != nil {
- _, err := metav1.LabelSelectorAsSelector(&r.Spec.AllowedNamespaces.Selector)
- if err != nil {
- return nil, field.Invalid(field.NewPath("spec", "allowedNamespaces", "selector"), r.Spec.AllowedNamespaces.Selector, err.Error())
- }
- }
-
- return nil, nil
-}
-
-// ValidateDelete allows you to add any extra validation when deleting an AWSClusterRoleIdentity.
-func (*awsClusterRoleIdentityWebhook) ValidateDelete(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// ValidateUpdate will do any extra validation when updating an AWSClusterRoleIdentity.
-func (*awsClusterRoleIdentityWebhook) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
- r, ok := newObj.(*AWSClusterRoleIdentity)
- if !ok {
- return nil, fmt.Errorf("expected an AWSClusterRoleIdentity object but got %T", r)
- }
-
- oldP, ok := oldObj.(*AWSClusterRoleIdentity)
- if !ok {
- return nil, apierrors.NewBadRequest(fmt.Sprintf("expected an AWSClusterRoleIdentity but got a %T", oldObj))
- }
-
- // If a SourceIdentityRef is set, do not allow removal of it.
- if oldP.Spec.SourceIdentityRef != nil && r.Spec.SourceIdentityRef == nil {
- return nil, field.Invalid(field.NewPath("spec", "sourceIdentityRef"),
- r.Spec.SourceIdentityRef, "field cannot be set to nil")
- }
-
- // Validate selector parses as Selector
- if r.Spec.AllowedNamespaces != nil {
- _, err := metav1.LabelSelectorAsSelector(&r.Spec.AllowedNamespaces.Selector)
- if err != nil {
- return nil, field.Invalid(field.NewPath("spec", "allowedNamespaces", "selector"), r.Spec.AllowedNamespaces.Selector, err.Error())
- }
- }
-
- return nil, nil
-}
-
-// Default will set default values for the AWSClusterRoleIdentity.
-func (*awsClusterRoleIdentityWebhook) Default(_ context.Context, obj runtime.Object) error {
- r, ok := obj.(*AWSClusterRoleIdentity)
- if !ok {
- return fmt.Errorf("expected an AWSClusterRoleIdentity object but got %T", r)
- }
- SetDefaults_Labels(&r.ObjectMeta)
- return nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsclusterstaticidentity_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsclusterstaticidentity_webhook.go
deleted file mode 100644
index 0d6bd89cf3da..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsclusterstaticidentity_webhook.go
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
-Copyright 2022 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta2
-
-import (
- "context"
- "fmt"
-
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-)
-
-// log is for logging in this package.
-var _ = ctrl.Log.WithName("awsclusterstaticidentity-resource")
-
-func (r *AWSClusterStaticIdentity) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(awsClusterStaticIdentityWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(r).
- WithValidator(w).
- WithDefaulter(w).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta2-awsclusterstaticidentity,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=awsclusterstaticidentities,versions=v1beta2,name=validation.awsclusterstaticidentity.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta2-awsclusterstaticidentity,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=awsclusterstaticidentities,versions=v1beta2,name=default.awsclusterstaticidentity.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-type awsClusterStaticIdentityWebhook struct{}
-
-var (
- _ webhook.CustomValidator = &awsClusterStaticIdentityWebhook{}
- _ webhook.CustomDefaulter = &awsClusterStaticIdentityWebhook{}
-)
-
-// ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type.
-func (*awsClusterStaticIdentityWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- r, ok := obj.(*AWSClusterStaticIdentity)
- if !ok {
- return nil, fmt.Errorf("expected an AWSClusterStaticIdentity object but got %T", r)
- }
-
- // Validate selector parses as Selector
- if r.Spec.AllowedNamespaces != nil {
- _, err := metav1.LabelSelectorAsSelector(&r.Spec.AllowedNamespaces.Selector)
- if err != nil {
- return nil, field.Invalid(field.NewPath("spec", "allowedNamespaces", "selector"), r.Spec.AllowedNamespaces.Selector, err.Error())
- }
- }
-
- return nil, nil
-}
-
-// ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type.
-func (*awsClusterStaticIdentityWebhook) ValidateDelete(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type.
-func (*awsClusterStaticIdentityWebhook) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
- r, ok := newObj.(*AWSClusterStaticIdentity)
- if !ok {
- return nil, fmt.Errorf("expected an AWSClusterStaticIdentity object but got %T", r)
- }
-
- oldP, ok := oldObj.(*AWSClusterStaticIdentity)
- if !ok {
- return nil, apierrors.NewBadRequest(fmt.Sprintf("expected an AWSClusterStaticIdentity but got a %T", oldObj))
- }
-
- if oldP.Spec.SecretRef != r.Spec.SecretRef {
- return nil, field.Invalid(field.NewPath("spec", "secretRef"),
- r.Spec.SecretRef, "field cannot be updated")
- }
-
- // Validate selector parses as Selector
- if r.Spec.AllowedNamespaces != nil {
- _, err := metav1.LabelSelectorAsSelector(&r.Spec.AllowedNamespaces.Selector)
- if err != nil {
- return nil, field.Invalid(field.NewPath("spec", "allowedNamespaces", "selector"), r.Spec.AllowedNamespaces.Selector, err.Error())
- }
- }
-
- return nil, nil
-}
-
-// Default should return the default AWSClusterStaticIdentity.
-func (*awsClusterStaticIdentityWebhook) Default(_ context.Context, obj runtime.Object) error {
- r, ok := obj.(*AWSClusterStaticIdentity)
- if !ok {
- return fmt.Errorf("expected an AWSClusterStaticIdentity object but got %T", r)
- }
- SetDefaults_Labels(&r.ObjectMeta)
- return nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsclustertemplate_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsclustertemplate_webhook.go
deleted file mode 100644
index e81ea119c86d..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsclustertemplate_webhook.go
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-Copyright 2022 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta2
-
-import (
- "context"
- "fmt"
-
- "github.com/google/go-cmp/cmp"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-)
-
-func (r *AWSClusterTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(awsClusterTemplateWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(r).
- WithValidator(w).
- WithDefaulter(w).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta2-awsclustertemplate,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=awsclustertemplates,versions=v1beta2,name=validation.awsclustertemplate.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta2-awsclustertemplate,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=awsclustertemplates,versions=v1beta2,name=default.awsclustertemplate.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-type awsClusterTemplateWebhook struct{}
-
-var _ webhook.CustomDefaulter = &awsClusterTemplateWebhook{}
-var _ webhook.CustomValidator = &awsClusterTemplateWebhook{}
-
-// Default implements webhook.Defaulter so a webhook will be registered for the type.
-func (*awsClusterTemplateWebhook) Default(_ context.Context, obj runtime.Object) error {
- r, ok := obj.(*AWSClusterTemplate)
- if !ok {
- return fmt.Errorf("expected an AWSClusterTemplate object but got %T", r)
- }
-
- SetObjectDefaults_AWSClusterTemplate(r)
- return nil
-}
-
-// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
-func (*awsClusterTemplateWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- r, ok := obj.(*AWSClusterTemplate)
- if !ok {
- return nil, fmt.Errorf("expected an AWSClusterTemplate object but got %T", r)
- }
-
- var allErrs field.ErrorList
-
- allErrs = append(allErrs, r.Spec.Template.Spec.Bastion.Validate()...)
- allErrs = append(allErrs, validateSSHKeyName(r.Spec.Template.Spec.SSHKeyName)...)
-
- return nil, aggregateObjErrors(r.GroupVersionKind().GroupKind(), r.Name, allErrs)
-}
-
-// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
-func (*awsClusterTemplateWebhook) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
- r, ok := newObj.(*AWSClusterTemplate)
- if !ok {
- return nil, fmt.Errorf("expected an AWSClusterTemplate object but got %T", r)
- }
-
- old := oldObj.(*AWSClusterTemplate)
-
- if !cmp.Equal(r.Spec, old.Spec) {
- return nil, apierrors.NewBadRequest("AWSClusterTemplate.Spec is immutable")
- }
- return nil, nil
-}
-
-// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
-func (*awsClusterTemplateWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsmachine_types.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsmachine_types.go
index 2ff52d71e076..8a6c95fb4767 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsmachine_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsmachine_types.go
@@ -185,6 +185,18 @@ type AWSMachineSpec struct {
// +optional
NetworkInterfaceType NetworkInterfaceType `json:"networkInterfaceType,omitempty"`
+ // AssignPrimaryIPv6 specifies whether to enable assigning a primary IPv6 address to the primary network Interface.
+ // When set to enabled, the instance will be assigned a primary IPv6 address from the subnet's IPv6 CIDR block.
+ // This is required when registering instances by ID to IPv6 target groups of dual-stack load balancers.
+ //
+ // When not specified, the default value varies based on the subnet that the instance is launched in:
+ // - disabled if subnet is ipv4 only
+ // - enabled if subnet is ipv6 only or dual-stack
+ //
+ // +kubebuilder:validation:Enum=enabled;disabled
+ // +optional
+ AssignPrimaryIPv6 *PrimaryIPv6AssignmentState `json:"assignPrimaryIPv6,omitempty"`
+
// UncompressedUserData specify whether the user data is gzip-compressed before it is sent to ec2 instance.
// cloud-init has built-in support for gzip-compressed user data
// user data stored in aws secret manager is always gzip-compressed.
@@ -251,18 +263,22 @@ type AWSMachineSpec struct {
HostID *string `json:"hostID,omitempty"`
// HostAffinity specifies the dedicated host affinity setting for the instance.
- // When HostAffinity is set to host, an instance started onto a specific host always restarts on the same host if stopped.
- // When HostAffinity is set to default, and you stop and restart the instance, it can be restarted on any available host.
- // When HostAffinity is defined, HostID is required.
+ // When HostAffinity is set to "host", an instance started onto a specific host always restarts on the same host if stopped:
+ // - If HostID is set, the instance launches on the specific host and must return to that same host after any stop/start (Targeted & Pinned).
+ // - If HostID is not set, the instance gets launched on any available and must returns to the same host after any stop/start (Auto-placed & Pinned).
+ // When HostAffinity is set to "default" (the default value), the instance (when restarted) can return on any available host:
+ // - If HostID is set, the instance launches on the specified host now, but (when restarted) can return to any available hosts (Targeted & Flexible).
+ // - If HostID is not set, the instance launches on any available host now, and (when restarted) can return to any available hosts (Auto-placed & Flexible).
+ // If HostAffinity is not specified, it defaults to "default".
// +optional
// +kubebuilder:validation:Enum:=default;host
- // +kubebuilder:default=host
+ // +kubebuilder:default=default
HostAffinity *string `json:"hostAffinity,omitempty"`
// DynamicHostAllocation enables automatic allocation of a single dedicated host.
- // This field is mutually exclusive with HostID and always allocates exactly one host.
// Cost effectiveness of allocating a single instance on a dedicated host may vary
// depending on the instance type and the region.
+ // This field is mutually exclusive with HostID and always allocates exactly one host.
// +optional
DynamicHostAllocation *DynamicHostAllocationSpec `json:"dynamicHostAllocation,omitempty"`
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsmachine_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsmachine_webhook.go
deleted file mode 100644
index 9c271c69392f..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsmachine_webhook.go
+++ /dev/null
@@ -1,493 +0,0 @@
-/*
-Copyright 2022 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta2
-
-import (
- "context"
- "encoding/base64"
- "fmt"
- "net"
- "net/url"
- "strings"
-
- "github.com/google/go-cmp/cmp"
- "github.com/pkg/errors"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation"
- "k8s.io/apimachinery/pkg/util/validation/field"
- "k8s.io/utils/ptr"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-
- "sigs.k8s.io/cluster-api-provider-aws/v2/feature"
-)
-
-// log is for logging in this package.
-var log = ctrl.Log.WithName("awsmachine-resource")
-
-func (r *AWSMachine) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(awsMachineWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(r).
- WithValidator(w).
- WithDefaulter(w).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta2-awsmachine,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=awsmachines,versions=v1beta2,name=validation.awsmachine.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta2-awsmachine,mutating=true,failurePolicy=fail,groups=infrastructure.cluster.x-k8s.io,resources=awsmachines,versions=v1beta2,name=mawsmachine.kb.io,name=mutation.awsmachine.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-type awsMachineWebhook struct{}
-
-var (
- _ webhook.CustomValidator = &awsMachineWebhook{}
- _ webhook.CustomDefaulter = &awsMachineWebhook{}
-)
-
-// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
-func (*awsMachineWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- r, ok := obj.(*AWSMachine)
- if !ok {
- return nil, fmt.Errorf("expected an AWSMachine object but got %T", r)
- }
-
- var allErrs field.ErrorList
-
- allErrs = append(allErrs, r.validateCloudInitSecret()...)
- allErrs = append(allErrs, r.validateIgnitionAndCloudInit()...)
- allErrs = append(allErrs, r.validateRootVolume()...)
- allErrs = append(allErrs, r.validateNonRootVolumes()...)
- allErrs = append(allErrs, r.validateSSHKeyName()...)
- allErrs = append(allErrs, r.validateAdditionalSecurityGroups()...)
- allErrs = append(allErrs, r.Spec.AdditionalTags.Validate()...)
- allErrs = append(allErrs, r.validateNetworkElasticIPPool()...)
- allErrs = append(allErrs, r.validateInstanceMarketType()...)
- allErrs = append(allErrs, r.validateCapacityReservation()...)
- allErrs = append(allErrs, r.validateHostAllocation()...)
-
- return nil, aggregateObjErrors(r.GroupVersionKind().GroupKind(), r.Name, allErrs)
-}
-
-// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
-func (*awsMachineWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
- r, ok := newObj.(*AWSMachine)
- if !ok {
- return nil, fmt.Errorf("expected an AWSMachine object but got %T", r)
- }
-
- newAWSMachine, err := runtime.DefaultUnstructuredConverter.ToUnstructured(r)
- if err != nil {
- return nil, apierrors.NewInvalid(GroupVersion.WithKind("AWSMachine").GroupKind(), r.Name, field.ErrorList{
- field.InternalError(nil, errors.Wrap(err, "failed to convert new AWSMachine to unstructured object")),
- })
- }
- oldAWSMachine, err := runtime.DefaultUnstructuredConverter.ToUnstructured(oldObj)
- if err != nil {
- return nil, apierrors.NewInvalid(GroupVersion.WithKind("AWSMachine").GroupKind(), r.Name, field.ErrorList{
- field.InternalError(nil, errors.Wrap(err, "failed to convert old AWSMachine to unstructured object")),
- })
- }
-
- var allErrs field.ErrorList
-
- allErrs = append(allErrs, r.validateCloudInitSecret()...)
- allErrs = append(allErrs, r.validateAdditionalSecurityGroups()...)
- allErrs = append(allErrs, r.Spec.AdditionalTags.Validate()...)
- allErrs = append(allErrs, r.validateHostAllocation()...)
-
- newAWSMachineSpec := newAWSMachine["spec"].(map[string]interface{})
- oldAWSMachineSpec := oldAWSMachine["spec"].(map[string]interface{})
-
- // allow changes to providerID
- delete(oldAWSMachineSpec, "providerID")
- delete(newAWSMachineSpec, "providerID")
-
- // allow changes to instanceID
- delete(oldAWSMachineSpec, "instanceID")
- delete(newAWSMachineSpec, "instanceID")
-
- // allow changes to additionalTags
- delete(oldAWSMachineSpec, "additionalTags")
- delete(newAWSMachineSpec, "additionalTags")
-
- // allow changes to additionalSecurityGroups
- delete(oldAWSMachineSpec, "additionalSecurityGroups")
- delete(newAWSMachineSpec, "additionalSecurityGroups")
-
- // allow changes to secretPrefix, secretCount, and secureSecretsBackend
- if cloudInit, ok := oldAWSMachineSpec["cloudInit"].(map[string]interface{}); ok {
- delete(cloudInit, "secretPrefix")
- delete(cloudInit, "secretCount")
- delete(cloudInit, "secureSecretsBackend")
- }
-
- if cloudInit, ok := newAWSMachineSpec["cloudInit"].(map[string]interface{}); ok {
- delete(cloudInit, "secretPrefix")
- delete(cloudInit, "secretCount")
- delete(cloudInit, "secureSecretsBackend")
- }
-
- // allow changes to enableResourceNameDNSAAAARecord and enableResourceNameDNSARecord
- if privateDNSName, ok := oldAWSMachineSpec["privateDnsName"].(map[string]interface{}); ok {
- delete(privateDNSName, "enableResourceNameDnsAAAARecord")
- delete(privateDNSName, "enableResourceNameDnsARecord")
- }
-
- if privateDNSName, ok := newAWSMachineSpec["privateDnsName"].(map[string]interface{}); ok {
- delete(privateDNSName, "enableResourceNameDnsAAAARecord")
- delete(privateDNSName, "enableResourceNameDnsARecord")
- }
-
- if !cmp.Equal(oldAWSMachineSpec, newAWSMachineSpec) {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec"), "cannot be modified"))
- }
-
- return nil, aggregateObjErrors(r.GroupVersionKind().GroupKind(), r.Name, allErrs)
-}
-
-func (r *AWSMachine) validateCloudInitSecret() field.ErrorList {
- var allErrs field.ErrorList
-
- if r.Spec.CloudInit.InsecureSkipSecretsManager {
- if r.Spec.CloudInit.SecretPrefix != "" {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "cloudInit", "secretPrefix"), "cannot be set if spec.cloudInit.insecureSkipSecretsManager is true"))
- }
- if r.Spec.CloudInit.SecretCount != 0 {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "cloudInit", "secretCount"), "cannot be set if spec.cloudInit.insecureSkipSecretsManager is true"))
- }
- if r.Spec.CloudInit.SecureSecretsBackend != "" {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "cloudInit", "secureSecretsBackend"), "cannot be set if spec.cloudInit.insecureSkipSecretsManager is true"))
- }
- }
-
- if (r.Spec.CloudInit.SecretPrefix != "") != (r.Spec.CloudInit.SecretCount != 0) {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "cloudInit", "secretCount"), "must be set together with spec.CloudInit.SecretPrefix"))
- }
-
- return allErrs
-}
-
-func (r *AWSMachine) cloudInitConfigured() bool {
- configured := false
-
- configured = configured || r.Spec.CloudInit.SecretPrefix != ""
- configured = configured || r.Spec.CloudInit.SecretCount != 0
- configured = configured || r.Spec.CloudInit.SecureSecretsBackend != ""
- configured = configured || r.Spec.CloudInit.InsecureSkipSecretsManager
-
- return configured
-}
-
-func (r *AWSMachine) ignitionEnabled() bool {
- return r.Spec.Ignition != nil
-}
-
-func (r *AWSMachine) validateIgnitionAndCloudInit() field.ErrorList {
- var allErrs field.ErrorList
- if !r.ignitionEnabled() {
- return allErrs
- }
-
- // Feature gate is not enabled but ignition is enabled then send a forbidden error.
- if !feature.Gates.Enabled(feature.BootstrapFormatIgnition) {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "ignition"),
- "can be set only if the BootstrapFormatIgnition feature gate is enabled"))
- }
-
- // If ignition is enabled, cloudInit should not be configured.
- if r.cloudInitConfigured() {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "cloudInit"), "cannot be set if spec.ignition is set"))
- }
-
- // Proxy and TLS are only valid for Ignition versions >= 3.1.
- if r.Spec.Ignition.Version == "2.3" || r.Spec.Ignition.Version == "3.0" {
- if r.Spec.Ignition.Proxy != nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "ignition", "proxy"), "cannot be set if spec.ignition.version is 2.3 or 3.0"))
- }
- if r.Spec.Ignition.TLS != nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "ignition", "tls"), "cannot be set if spec.ignition.version is 2.3 or 3.0"))
- }
- }
-
- allErrs = append(allErrs, r.validateIgnitionProxy()...)
- allErrs = append(allErrs, r.validateIgnitionTLS()...)
-
- return allErrs
-}
-
-func (r *AWSMachine) validateIgnitionProxy() field.ErrorList {
- var allErrs field.ErrorList
-
- if r.Spec.Ignition.Proxy == nil {
- return allErrs
- }
-
- // Validate HTTPProxy.
- if r.Spec.Ignition.Proxy.HTTPProxy != nil {
- // Parse the url to check if it is valid.
- _, err := url.Parse(*r.Spec.Ignition.Proxy.HTTPProxy)
- if err != nil {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "ignition", "proxy", "httpProxy"), *r.Spec.Ignition.Proxy.HTTPProxy, "invalid URL"))
- }
- }
-
- // Validate HTTPSProxy.
- if r.Spec.Ignition.Proxy.HTTPSProxy != nil {
- // Parse the url to check if it is valid.
- _, err := url.Parse(*r.Spec.Ignition.Proxy.HTTPSProxy)
- if err != nil {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "ignition", "proxy", "httpsProxy"), *r.Spec.Ignition.Proxy.HTTPSProxy, "invalid URL"))
- }
- }
-
- // Validate NoProxy.
- for _, noProxy := range r.Spec.Ignition.Proxy.NoProxy {
- noProxy := string(noProxy)
- // Validate here that the value `noProxy` is:
- // - A domain name
- // - A domain name matches that name and all subdomains
- // - A domain name with a leading . matches subdomains only
-
- // A special DNS label (*).
- if noProxy == "*" {
- continue
- }
- // An IP address prefix (1.2.3.4).
- if ip := net.ParseIP(noProxy); ip != nil {
- continue
- }
- // An IP address prefix in CIDR notation (1.2.3.4/8).
- if _, _, err := net.ParseCIDR(noProxy); err == nil {
- continue
- }
- // An IP or domain name with a port.
- if _, _, err := net.SplitHostPort(noProxy); err == nil {
- continue
- }
- // A domain name.
- if noProxy[0] == '.' {
- // If it starts with a dot, it should be a domain name.
- noProxy = noProxy[1:]
- }
- // Validate that the value matches DNS 1123.
- if errs := validation.IsDNS1123Subdomain(noProxy); len(errs) > 0 {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "ignition", "proxy", "noProxy"), noProxy, fmt.Sprintf("invalid noProxy value, please refer to the field documentation: %s", strings.Join(errs, "; "))))
- }
- }
-
- return allErrs
-}
-
-func (r *AWSMachine) validateIgnitionTLS() field.ErrorList {
- var allErrs field.ErrorList
-
- if r.Spec.Ignition.TLS == nil {
- return allErrs
- }
-
- for _, source := range r.Spec.Ignition.TLS.CASources {
- // Validate that source is RFC 2397 data URL.
- u, err := url.Parse(string(source))
- if err != nil {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "ignition", "tls", "caSources"), source, "invalid URL"))
- }
-
- switch u.Scheme {
- case "http", "https", "tftp", "s3", "arn", "gs":
- // Valid schemes.
- case "data":
- // Validate that the data URL is base64 encoded.
- i := strings.Index(u.Opaque, ",")
- if i < 0 {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "ignition", "tls", "caSources"), source, "invalid data URL"))
- }
- // Validate that the data URL is base64 encoded.
- if _, err := base64.StdEncoding.DecodeString(u.Opaque[i+1:]); err != nil {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "ignition", "tls", "caSources"), source, "invalid base64 encoding for data url"))
- }
- default:
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "ignition", "tls", "caSources"), source, "unsupported URL scheme"))
- }
- }
-
- return allErrs
-}
-
-func (r *AWSMachine) validateRootVolume() field.ErrorList {
- var allErrs field.ErrorList
-
- if r.Spec.RootVolume == nil {
- return allErrs
- }
-
- if VolumeTypesProvisioned.Has(string(r.Spec.RootVolume.Type)) && r.Spec.RootVolume.IOPS == 0 {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.rootVolume.iops"), "iops required if type is 'io1' or 'io2'"))
- }
-
- if r.Spec.RootVolume.Throughput != nil {
- if r.Spec.RootVolume.Type != VolumeTypeGP3 {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.rootVolume.throughput"), "throughput is valid only for type 'gp3'"))
- }
- if *r.Spec.RootVolume.Throughput < 0 {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.rootVolume.throughput"), "throughput must be nonnegative"))
- }
- }
-
- if r.Spec.RootVolume.DeviceName != "" {
- log.Info("root volume shouldn't have a device name (this can be ignored if performing a `clusterctl move`)")
- }
-
- return allErrs
-}
-
-func (r *AWSMachine) validateNetworkElasticIPPool() field.ErrorList {
- var allErrs field.ErrorList
-
- if r.Spec.ElasticIPPool == nil {
- return allErrs
- }
- if !ptr.Deref(r.Spec.PublicIP, false) {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.elasticIpPool"), "publicIp must be set to 'true' to assign custom public IPv4 pools with elasticIpPool"))
- }
- eipp := r.Spec.ElasticIPPool
- if eipp.PublicIpv4Pool != nil {
- if eipp.PublicIpv4PoolFallBackOrder == nil {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec.elasticIpPool.publicIpv4PoolFallbackOrder"), r.Spec.ElasticIPPool, "publicIpv4PoolFallbackOrder must be set when publicIpv4Pool is defined."))
- }
- awsPublicIpv4PoolPrefix := "ipv4pool-ec2-"
- if !strings.HasPrefix(*eipp.PublicIpv4Pool, awsPublicIpv4PoolPrefix) {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec.elasticIpPool.publicIpv4Pool"), r.Spec.ElasticIPPool, fmt.Sprintf("publicIpv4Pool must start with %s.", awsPublicIpv4PoolPrefix)))
- }
- } else if eipp.PublicIpv4PoolFallBackOrder != nil {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec.elasticIpPool.publicIpv4PoolFallbackOrder"), r.Spec.ElasticIPPool, "publicIpv4Pool must be set when publicIpv4PoolFallbackOrder is defined."))
- }
-
- return allErrs
-}
-
-func (r *AWSMachine) validateCapacityReservation() field.ErrorList {
- var allErrs field.ErrorList
- if r.Spec.CapacityReservationID != nil && r.Spec.CapacityReservationPreference != CapacityReservationPreferenceOnly && r.Spec.CapacityReservationPreference != "" {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "capacityReservationPreference"), "when capacityReservationId is specified, capacityReservationPreference may only be 'CapacityReservationsOnly' or empty"))
- }
- if r.Spec.CapacityReservationPreference == CapacityReservationPreferenceOnly && r.Spec.MarketType == MarketTypeSpot {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "capacityReservationPreference"), "when marketType is set to 'Spot', capacityReservationPreference cannot be set to 'CapacityReservationsOnly'"))
- }
- if r.Spec.CapacityReservationPreference == CapacityReservationPreferenceOnly && r.Spec.SpotMarketOptions != nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "capacityReservationPreference"), "when capacityReservationPreference is 'CapacityReservationsOnly', spotMarketOptions cannot be set (which implies marketType: 'Spot')"))
- }
- return allErrs
-}
-
-func (r *AWSMachine) validateInstanceMarketType() field.ErrorList {
- var allErrs field.ErrorList
- if r.Spec.MarketType == MarketTypeCapacityBlock && r.Spec.SpotMarketOptions != nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "marketType"), "marketType set to CapacityBlock and spotMarketOptions cannot be used together"))
- }
- if r.Spec.MarketType == MarketTypeOnDemand && r.Spec.SpotMarketOptions != nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "marketType"), "setting marketType to OnDemand and spotMarketOptions cannot be used together"))
- }
- if r.Spec.MarketType == MarketTypeCapacityBlock && r.Spec.CapacityReservationID == nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "capacityReservationID"), "is required when CapacityBlock is provided"))
- }
- return allErrs
-}
-
-func (r *AWSMachine) validateNonRootVolumes() field.ErrorList {
- var allErrs field.ErrorList
-
- for _, volume := range r.Spec.NonRootVolumes {
- if VolumeTypesProvisioned.Has(string(volume.Type)) && volume.IOPS == 0 {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.nonRootVolumes.iops"), "iops required if type is 'io1' or 'io2'"))
- }
-
- if volume.Throughput != nil {
- if volume.Type != VolumeTypeGP3 {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.nonRootVolumes.throughput"), "throughput is valid only for type 'gp3'"))
- }
- if *volume.Throughput < 0 {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.nonRootVolumes.throughput"), "throughput must be nonnegative"))
- }
- }
-
- if volume.DeviceName == "" {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.nonRootVolumes.deviceName"), "non root volume should have device name"))
- }
- }
-
- return allErrs
-}
-
-// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
-func (*awsMachineWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// Default implements webhook.Defaulter such that an empty CloudInit will be defined with a default
-// SecureSecretsBackend as SecretBackendSecretsManager iff InsecureSkipSecretsManager is unset.
-func (*awsMachineWebhook) Default(_ context.Context, obj runtime.Object) error {
- r, ok := obj.(*AWSMachine)
- if !ok {
- return fmt.Errorf("expected an AWSMachine object but got %T", r)
- }
-
- if !r.Spec.CloudInit.InsecureSkipSecretsManager && r.Spec.CloudInit.SecureSecretsBackend == "" && !r.ignitionEnabled() {
- r.Spec.CloudInit.SecureSecretsBackend = SecretBackendSecretsManager
- }
-
- if r.ignitionEnabled() && r.Spec.Ignition.StorageType == "" {
- r.Spec.Ignition.StorageType = DefaultIgnitionStorageType
- }
- // Defaults the version field if StorageType is not set to `UnencryptedUserData`.
- // When using `UnencryptedUserData` the version field is ignored because the userdata defines its version itself.
- if r.ignitionEnabled() && r.Spec.Ignition.Version == "" && r.Spec.Ignition.StorageType != IgnitionStorageTypeOptionUnencryptedUserData {
- r.Spec.Ignition.Version = DefaultIgnitionVersion
- }
-
- return nil
-}
-
-func (r *AWSMachine) validateAdditionalSecurityGroups() field.ErrorList {
- var allErrs field.ErrorList
-
- for _, additionalSecurityGroup := range r.Spec.AdditionalSecurityGroups {
- if len(additionalSecurityGroup.Filters) > 0 && additionalSecurityGroup.ID != nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec.additionalSecurityGroups"), "only one of ID or Filters may be specified, specifying both is forbidden"))
- }
- }
- return allErrs
-}
-
-func (r *AWSMachine) validateHostAllocation() field.ErrorList {
- var allErrs field.ErrorList
-
- // Check if both hostID and dynamicHostAllocation are specified
- hasHostID := r.Spec.HostID != nil && len(*r.Spec.HostID) > 0
- hasDynamicHostAllocation := r.Spec.DynamicHostAllocation != nil
-
- if hasHostID && hasDynamicHostAllocation {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec.hostID"), "hostID and dynamicHostAllocation are mutually exclusive"), field.Forbidden(field.NewPath("spec.dynamicHostAllocation"), "hostID and dynamicHostAllocation are mutually exclusive"))
- }
-
- return allErrs
-}
-
-func (r *AWSMachine) validateSSHKeyName() field.ErrorList {
- return validateSSHKeyName(r.Spec.SSHKeyName)
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsmachinetemplate_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsmachinetemplate_webhook.go
deleted file mode 100644
index 7180939d5360..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsmachinetemplate_webhook.go
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
-Copyright 2022 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta2
-
-import (
- "context"
- "fmt"
-
- "github.com/google/go-cmp/cmp"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-
- "sigs.k8s.io/cluster-api-provider-aws/v2/feature"
- "sigs.k8s.io/cluster-api/util/topology"
-)
-
-func (r *AWSMachineTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(AWSMachineTemplateWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(&AWSMachineTemplate{}).
- WithValidator(w).
- Complete()
-}
-
-// AWSMachineTemplateWebhook implements a custom validation webhook for AWSMachineTemplate.
-// Note: we use a custom validator to access the request context for SSA of AWSMachineTemplate.
-// +kubebuilder:object:generate=false
-type AWSMachineTemplateWebhook struct{}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta2-awsmachinetemplate,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=awsmachinetemplates,versions=v1beta2,name=validation.awsmachinetemplate.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-var _ webhook.CustomValidator = &AWSMachineTemplateWebhook{}
-
-func (r *AWSMachineTemplate) validateRootVolume() field.ErrorList {
- var allErrs field.ErrorList
-
- spec := r.Spec.Template.Spec
- if spec.RootVolume == nil {
- return allErrs
- }
-
- if VolumeTypesProvisioned.Has(string(spec.RootVolume.Type)) && spec.RootVolume.IOPS == 0 {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.template.spec.rootVolume.iops"), "iops required if type is 'io1' or 'io2'"))
- }
-
- if spec.RootVolume.Throughput != nil {
- if spec.RootVolume.Type != VolumeTypeGP3 {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.template.spec.rootVolume.throughput"), "throughput is valid only for type 'gp3'"))
- }
- if *spec.RootVolume.Throughput < 0 {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.template.spec.rootVolume.throughput"), "throughput must be nonnegative"))
- }
- }
-
- if spec.RootVolume.DeviceName != "" {
- log.Info("root volume shouldn't have a device name (this can be ignored if performing a `clusterctl move`)")
- }
-
- return allErrs
-}
-
-func (r *AWSMachineTemplate) validateNonRootVolumes() field.ErrorList {
- var allErrs field.ErrorList
-
- spec := r.Spec.Template.Spec
-
- for _, volume := range spec.NonRootVolumes {
- if VolumeTypesProvisioned.Has(string(volume.Type)) && volume.IOPS == 0 {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.template.spec.nonRootVolumes.iops"), "iops required if type is 'io1' or 'io2'"))
- }
-
- if volume.Throughput != nil {
- if volume.Type != VolumeTypeGP3 {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.template.spec.nonRootVolumes.throughput"), "throughput is valid only for type 'gp3'"))
- }
- if *volume.Throughput < 0 {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.template.spec.nonRootVolumes.throughput"), "throughput must be nonnegative"))
- }
- }
-
- if volume.DeviceName == "" {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.template.spec.nonRootVolumes.deviceName"), "non root volume should have device name"))
- }
- }
-
- return allErrs
-}
-
-func (r *AWSMachineTemplate) validateAdditionalSecurityGroups() field.ErrorList {
- var allErrs field.ErrorList
-
- spec := r.Spec.Template.Spec
-
- for _, additionalSecurityGroup := range spec.AdditionalSecurityGroups {
- if len(additionalSecurityGroup.Filters) > 0 && additionalSecurityGroup.ID != nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "template", "spec", "additionalSecurityGroups"), "only one of ID or Filters may be specified, specifying both is forbidden"))
- }
- }
- return allErrs
-}
-
-func (r *AWSMachineTemplate) validateCloudInitSecret() field.ErrorList {
- var allErrs field.ErrorList
-
- spec := r.Spec.Template.Spec
- if spec.CloudInit.InsecureSkipSecretsManager {
- if spec.CloudInit.SecretPrefix != "" {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "template", "spec", "cloudInit", "secretPrefix"), "cannot be set if spec.template.spec.cloudInit.insecureSkipSecretsManager is true"))
- }
- if spec.CloudInit.SecretCount != 0 {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "template", "spec", "cloudInit", "secretCount"), "cannot be set if spec.template.spec.cloudInit.insecureSkipSecretsManager is true"))
- }
- if spec.CloudInit.SecureSecretsBackend != "" {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "template", "spec", "cloudInit", "secureSecretsBackend"), "cannot be set if spec.template.spec.cloudInit.insecureSkipSecretsManager is true"))
- }
- }
-
- if (spec.CloudInit.SecretPrefix != "") != (spec.CloudInit.SecretCount != 0) {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "template", "spec", "cloudInit", "secretCount"), "must be set together with spec.template.spec.CloudInit.SecretPrefix"))
- }
-
- return allErrs
-}
-
-func (r *AWSMachineTemplate) cloudInitConfigured() bool {
- spec := r.Spec.Template.Spec
- configured := false
-
- configured = configured || spec.CloudInit.SecretPrefix != ""
- configured = configured || spec.CloudInit.SecretCount != 0
- configured = configured || spec.CloudInit.SecureSecretsBackend != ""
- configured = configured || spec.CloudInit.InsecureSkipSecretsManager
-
- return configured
-}
-
-func (r *AWSMachineTemplate) ignitionEnabled() bool {
- return r.Spec.Template.Spec.Ignition != nil
-}
-
-func (r *AWSMachineTemplate) validateIgnitionAndCloudInit() field.ErrorList {
- var allErrs field.ErrorList
-
- // Feature gate is not enabled but ignition is enabled then send a forbidden error.
- if !feature.Gates.Enabled(feature.BootstrapFormatIgnition) && r.ignitionEnabled() {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "template", "spec", "ignition"),
- "can be set only if the BootstrapFormatIgnition feature gate is enabled"))
- }
-
- if r.ignitionEnabled() && r.cloudInitConfigured() {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "template", "spec", "cloudInit"),
- "cannot be set if spec.template.spec.ignition is set"))
- }
-
- return allErrs
-}
-
-func (r *AWSMachineTemplate) validateHostAllocation() field.ErrorList {
- var allErrs field.ErrorList
-
- spec := r.Spec.Template.Spec
-
- // Check if both hostID and dynamicHostAllocation are specified
- hasHostID := spec.HostID != nil && len(*spec.HostID) > 0
- hasDynamicHostAllocation := spec.DynamicHostAllocation != nil
-
- if hasHostID && hasDynamicHostAllocation {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec.template.spec.hostID"), "hostID and dynamicHostAllocation are mutually exclusive"), field.Forbidden(field.NewPath("spec.template.spec.dynamicHostAllocation"), "hostID and dynamicHostAllocation are mutually exclusive"))
- }
-
- return allErrs
-}
-
-func (r *AWSMachineTemplate) validateSSHKeyName() field.ErrorList {
- return validateSSHKeyName(r.Spec.Template.Spec.SSHKeyName)
-}
-
-// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
-func (r *AWSMachineTemplateWebhook) ValidateCreate(_ context.Context, raw runtime.Object) (admission.Warnings, error) {
- var allErrs field.ErrorList
- obj, ok := raw.(*AWSMachineTemplate)
- if !ok {
- return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a AWSMachineTemplate but got a %T", raw))
- }
-
- spec := obj.Spec.Template.Spec
-
- if spec.CloudInit.SecretPrefix != "" {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "template", "spec", "cloudInit", "secretPrefix"), "cannot be set in templates"))
- }
-
- if spec.CloudInit.SecretCount != 0 {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "cloudInit", "secretCount"), "cannot be set in templates"))
- }
-
- if spec.ProviderID != nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "template", "spec", "providerID"), "cannot be set in templates"))
- }
-
- allErrs = append(allErrs, obj.validateCloudInitSecret()...)
- allErrs = append(allErrs, obj.validateIgnitionAndCloudInit()...)
- allErrs = append(allErrs, obj.validateRootVolume()...)
- allErrs = append(allErrs, obj.validateNonRootVolumes()...)
- allErrs = append(allErrs, obj.validateSSHKeyName()...)
- allErrs = append(allErrs, obj.validateAdditionalSecurityGroups()...)
- allErrs = append(allErrs, obj.Spec.Template.Spec.AdditionalTags.Validate()...)
- allErrs = append(allErrs, obj.validateHostAllocation()...)
-
- return nil, aggregateObjErrors(obj.GroupVersionKind().GroupKind(), obj.Name, allErrs)
-}
-
-// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
-func (r *AWSMachineTemplateWebhook) ValidateUpdate(ctx context.Context, oldRaw runtime.Object, newRaw runtime.Object) (admission.Warnings, error) {
- newAWSMachineTemplate, ok := newRaw.(*AWSMachineTemplate)
- if !ok {
- return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a AWSMachineTemplate but got a %T", newRaw))
- }
- oldAWSMachineTemplate, ok := oldRaw.(*AWSMachineTemplate)
- if !ok {
- return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a AWSMachineTemplate but got a %T", oldRaw))
- }
-
- req, err := admission.RequestFromContext(ctx)
- if err != nil {
- return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a admission.Request inside context: %v", err))
- }
-
- var allErrs field.ErrorList
-
- if !topology.IsDryRunRequest(req, newAWSMachineTemplate) && !cmp.Equal(newAWSMachineTemplate.Spec, oldAWSMachineTemplate.Spec) {
- if oldAWSMachineTemplate.Spec.Template.Spec.InstanceMetadataOptions == nil {
- oldAWSMachineTemplate.Spec.Template.Spec.InstanceMetadataOptions = newAWSMachineTemplate.Spec.Template.Spec.InstanceMetadataOptions
- }
-
- if !cmp.Equal(newAWSMachineTemplate.Spec.Template.Spec, oldAWSMachineTemplate.Spec.Template.Spec) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "template", "spec"), newAWSMachineTemplate, "AWSMachineTemplate.Spec is immutable"),
- )
- }
- }
-
- return nil, aggregateObjErrors(newAWSMachineTemplate.GroupVersionKind().GroupKind(), newAWSMachineTemplate.Name, allErrs)
-}
-
-// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
-func (r *AWSMachineTemplateWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/bastion.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/bastion.go
index 16c92951608f..8d6a5cec7e1b 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/bastion.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/bastion.go
@@ -19,15 +19,10 @@ package v1beta2
import (
"fmt"
"net"
- "regexp"
"k8s.io/apimachinery/pkg/util/validation/field"
)
-var (
- sshKeyValidNameRegex = regexp.MustCompile(`^[[:graph:]]+([[:print:]]*[[:graph:]]+)*$`)
-)
-
// Validate will validate the bastion fields.
func (b *Bastion) Validate() []*field.Error {
var errs field.ErrorList
@@ -48,16 +43,3 @@ func (b *Bastion) Validate() []*field.Error {
}
return errs
}
-
-func validateSSHKeyName(sshKeyName *string) field.ErrorList {
- var allErrs field.ErrorList
- switch {
- case sshKeyName == nil:
- // nil is accepted
- case sshKeyName != nil && *sshKeyName == "":
- // empty string is accepted
- case sshKeyName != nil && !sshKeyValidNameRegex.MatchString(*sshKeyName):
- allErrs = append(allErrs, field.Invalid(field.NewPath("sshKeyName"), sshKeyName, "Name is invalid. Must be specified in ASCII and must not start or end in whitespace"))
- }
- return allErrs
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/defaults.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/defaults.go
index f10bb895c124..540e1e7474ae 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/defaults.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/defaults.go
@@ -26,7 +26,7 @@ import (
func SetDefaults_Bastion(obj *Bastion) { //nolint:golint,stylecheck
// Default to allow open access to the bastion host if no CIDR Blocks have been set
if len(obj.AllowedCIDRBlocks) == 0 && !obj.DisableIngressRules {
- obj.AllowedCIDRBlocks = []string{"0.0.0.0/0"}
+ obj.AllowedCIDRBlocks = []string{"0.0.0.0/0", "::/0"}
}
}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/network_types.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/network_types.go
index 26e38bc934c4..d02a279db1b3 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/network_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/network_types.go
@@ -23,6 +23,7 @@ import (
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/ec2/types"
+ "k8s.io/utils/net"
"k8s.io/utils/ptr"
)
@@ -34,13 +35,13 @@ const (
// DefaultAPIServerHealthCheckPath the API server health check path.
DefaultAPIServerHealthCheckPath = "/readyz"
// DefaultAPIServerHealthCheckIntervalSec the API server health check interval in seconds.
- DefaultAPIServerHealthCheckIntervalSec = 10
+ DefaultAPIServerHealthCheckIntervalSec = 5
// DefaultAPIServerHealthCheckTimeoutSec the API server health check timeout in seconds.
- DefaultAPIServerHealthCheckTimeoutSec = 5
+ DefaultAPIServerHealthCheckTimeoutSec = 4
// DefaultAPIServerHealthThresholdCount the API server health check threshold count.
- DefaultAPIServerHealthThresholdCount = 5
+ DefaultAPIServerHealthThresholdCount = 2
// DefaultAPIServerUnhealthThresholdCount the API server unhealthy check threshold count.
- DefaultAPIServerUnhealthThresholdCount = 3
+ DefaultAPIServerUnhealthThresholdCount = 6
// ZoneTypeAvailabilityZone defines the regular AWS zones in the Region.
ZoneTypeAvailabilityZone ZoneType = "availability-zone"
@@ -217,6 +218,53 @@ var (
TargetGroupAttributeUnhealthyDrainingIntervalSeconds = "target_health_state.unhealthy.draining_interval_seconds"
)
+// TargetGroupIPType defines the IP address type for target groups.
+type TargetGroupIPType string
+
+var (
+ // TargetGroupIPTypeIPv4 defines the IPv4 address type for target groups.
+ TargetGroupIPTypeIPv4 = TargetGroupIPType("ipv4")
+
+ // TargetGroupIPTypeIPv6 defines the IPv6 address type for target groups.
+ TargetGroupIPTypeIPv6 = TargetGroupIPType("ipv6")
+)
+
+func (t TargetGroupIPType) String() string {
+ return string(t)
+}
+
+// Equals returns true if two TargetGroupIPType are equal.
+func (t TargetGroupIPType) Equals(other *TargetGroupIPType) bool {
+ if other == nil {
+ return false
+ }
+
+ return t == *other
+}
+
+// LoadBalancerIPAddressType defines the IP address type for load balancers.
+type LoadBalancerIPAddressType string
+
+// Enum values for LoadBalancerIPAddressType
+const (
+ LoadBalancerIPAddressTypeIPv4 = LoadBalancerIPAddressType("ipv4")
+ LoadBalancerIPAddressTypeDualstack = LoadBalancerIPAddressType("dualstack")
+ LoadBalancerIPAddressTypeDualstackWithoutPublicIPv4 = LoadBalancerIPAddressType("dualstack-without-public-ipv4")
+)
+
+func (t LoadBalancerIPAddressType) String() string {
+ return string(t)
+}
+
+// Equals returns true if two LoadBalancerIPAddressType are equal.
+func (t LoadBalancerIPAddressType) Equals(other *LoadBalancerIPAddressType) bool {
+ if other == nil {
+ return false
+ }
+
+ return t == *other
+}
+
// LoadBalancerAttribute defines a set of attributes for a V2 load balancer.
type LoadBalancerAttribute string
@@ -242,6 +290,8 @@ type TargetGroupSpec struct {
VpcID string `json:"vpcId"`
// HealthCheck is the elb health check associated with the load balancer.
HealthCheck *TargetGroupHealthCheck `json:"targetGroupHealthCheck,omitempty"`
+ // IPType is the IP address type for the target group.
+ IPType TargetGroupIPType `json:"ipType,omitempty"`
}
// Listener defines an AWS network load balancer listener.
@@ -297,6 +347,10 @@ type LoadBalancer struct {
// LoadBalancerType sets the type for a load balancer. The default type is classic.
// +kubebuilder:validation:Enum:=classic;elb;alb;nlb
LoadBalancerType LoadBalancerType `json:"loadBalancerType,omitempty"`
+
+ // LoadBalancerIPAddressType specifies the IP address type for the load balancer.
+ // +kubebuilder:validation:Enum:=ipv4;dualstack;dualstack-without-public-ipv4
+ LoadBalancerIPAddressType LoadBalancerIPAddressType `json:"loadBalancerIPAddressType,omitempty"`
}
// IsUnmanaged returns true if the Classic ELB is unmanaged.
@@ -367,7 +421,32 @@ type NetworkSpec struct {
// NodePortIngressRuleCidrBlocks is an optional set of CIDR blocks to allow traffic to nodes' NodePort services.
// If none are specified here, all IPs are allowed to connect.
// +optional
- NodePortIngressRuleCidrBlocks []string `json:"nodePortIngressRuleCidrBlocks,omitempty"`
+ NodePortIngressRuleCidrBlocks CidrBlocks `json:"nodePortIngressRuleCidrBlocks,omitempty"`
+}
+
+// CidrBlocks defines a set of CIDR blocks.
+type CidrBlocks []string
+
+// IPv4CidrBlocks returns only IPv4 CIDR blocks.
+func (c CidrBlocks) IPv4CidrBlocks() CidrBlocks {
+ var cidrs CidrBlocks
+ for _, cidr := range c {
+ if net.IsIPv4CIDRString(cidr) {
+ cidrs = append(cidrs, cidr)
+ }
+ }
+ return cidrs
+}
+
+// IPv6CidrBlocks returns only IPv6 CIDR blocks.
+func (c CidrBlocks) IPv6CidrBlocks() CidrBlocks {
+ var cidrs CidrBlocks
+ for _, cidr := range c {
+ if net.IsIPv6CIDRString(cidr) {
+ cidrs = append(cidrs, cidr)
+ }
+ }
+ return cidrs
}
// IPv6 contains ipv6 specific settings for the network.
@@ -402,6 +481,7 @@ type IPAMPool struct {
// The netmask length of the IPv4 CIDR you want to allocate to VPC from
// an Amazon VPC IP Address Manager (IPAM) pool.
// Defaults to /16 for IPv4 if not specified.
+ // Defaults to /56 for IPv6 if not specified.
NetmaskLength int64 `json:"netmaskLength,omitempty"`
}
@@ -432,8 +512,7 @@ type VPCSpec struct {
// Mutually exclusive with CidrBlock.
IPAMPool *IPAMPool `json:"ipamPool,omitempty"`
- // IPv6 contains ipv6 specific settings for the network. Supported only in managed clusters.
- // This field cannot be set on AWSCluster object.
+ // IPv6 contains ipv6 specific settings for the network.
// +optional
IPv6 *IPv6 `json:"ipv6,omitempty"`
@@ -561,7 +640,6 @@ type SubnetSpec struct {
// IPv6CidrBlock is the IPv6 CIDR block to be used when the provider creates a managed VPC.
// A subnet can have an IPv4 and an IPv6 address.
- // IPv6 is only supported in managed clusters, this field cannot be set on AWSCluster object.
// +optional
IPv6CidrBlock string `json:"ipv6CidrBlock,omitempty"`
@@ -572,8 +650,7 @@ type SubnetSpec struct {
// +optional
IsPublic bool `json:"isPublic"`
- // IsIPv6 defines the subnet as an IPv6 subnet. A subnet is IPv6 when it is associated with a VPC that has IPv6 enabled.
- // IPv6 is only supported in managed clusters, this field cannot be set on AWSCluster object.
+ // IsIPv6 defines the subnet as an IPv6 subnet. A subnet is IPv6 when it is associated with an IPv6 CIDR.
// +optional
IsIPv6 bool `json:"isIpv6,omitempty"`
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/types.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/types.go
index 81a3be6db35b..b29b4df5a84f 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/types.go
@@ -197,6 +197,9 @@ type Instance struct {
// The private IPv4 address assigned to the instance.
PrivateIP *string `json:"privateIp,omitempty"`
+ // The IPv6 address assigned to the instance.
+ IPv6Address *string `json:"ipv6Address,omitempty"`
+
// The public IPv4 address assigned to the instance, if applicable.
PublicIP *string `json:"publicIp,omitempty"`
@@ -220,6 +223,9 @@ type Instance struct {
// NetworkInterfaceType is the interface type of the primary network Interface.
NetworkInterfaceType NetworkInterfaceType `json:"networkInterfaceType,omitempty"`
+ // AssignPrimaryIPv6 specifies whether to enable assigning a primary IPv6 address to the primary network Interface.
+ AssignPrimaryIPv6 *PrimaryIPv6AssignmentState `json:"assignPrimaryIPv6,omitempty"`
+
// The tags associated with the instance.
Tags map[string]string `json:"tags,omitempty"`
@@ -275,9 +281,12 @@ type Instance struct {
MarketType MarketType `json:"marketType,omitempty"`
// HostAffinity specifies the dedicated host affinity setting for the instance.
- // When hostAffinity is set to host, an instance started onto a specific host always restarts on the same host if stopped.
- // When hostAffinity is set to default, and you stop and restart the instance, it can be restarted on any available host.
- // When HostAffinity is defined, HostID is required.
+ // When HostAffinity is set to "host", an instance started onto a specific host always restarts on the same host if stopped:
+ // - If HostID is set, the instance launches on the specific host and must return to that same host after any stop/start (Targeted & Pinned).
+ // - If HostID is not set, the instance gets launched on any available and must returns to the same host after any stop/start (Auto-placed & Pinned).
+ // When HostAffinity is set to "default" (the default value), the instance (when restarted) can return on any available host:
+ // - If HostID is set, the instance launches on the specified host now, but (when restarted) can return to any available hosts (Targeted & Flexible).
+ // - If HostID is not set, the instance launches on any available host now, and (when restarted) can return to any available hosts (Auto-placed & Flexible).
// +optional
// +kubebuilder:validation:Enum:=default;host
HostAffinity *string `json:"hostAffinity,omitempty"`
@@ -385,6 +394,24 @@ const (
HTTPTokensStateRequired = HTTPTokensState("required")
)
+// PrimaryIPv6AssignmentState describes whether to assign a primary IPv6 address to the primary network interface.
+type PrimaryIPv6AssignmentState string
+
+const (
+ // PrimaryIPv6AssignmentStateEnabled enables assigning a primary IPv6 address
+ PrimaryIPv6AssignmentStateEnabled = PrimaryIPv6AssignmentState("enabled")
+
+ // PrimaryIPv6AssignmentStateDisabled disables assigning a primary IPv6 address
+ PrimaryIPv6AssignmentStateDisabled = PrimaryIPv6AssignmentState("disabled")
+)
+
+// EnclaveOptions defines the options for Nitro Enclave support on the instance.
+type EnclaveOptions struct {
+ // Enabled enables the instance for AWS Nitro Enclaves.
+ // +optional
+ Enabled *bool `json:"enabled,omitempty"`
+}
+
// InstanceMetadataOptions describes metadata options for the EC2 instance.
type InstanceMetadataOptions struct {
// Enables or disables the HTTP metadata endpoint on your instances.
@@ -397,6 +424,15 @@ type InstanceMetadataOptions struct {
// +kubebuilder:default=enabled
HTTPEndpoint InstanceMetadataState `json:"httpEndpoint,omitempty"`
+ // Enables or disables the IPv6 endpoint for the instance metadata service.
+ // This applies only if you enabled the HTTP metadata endpoint.
+ //
+ // Default: disabled
+ //
+ // +kubebuilder:validation:Enum:=enabled;disabled
+ // +kubebuilder:default=disabled
+ HTTPProtocolIPv6 InstanceMetadataState `json:"httpProtocolIpv6,omitempty"`
+
// The desired HTTP PUT response hop limit for instance metadata requests. The
// larger the number, the further instance metadata requests can travel.
//
@@ -443,6 +479,9 @@ func (obj *InstanceMetadataOptions) SetDefaults() {
if obj.HTTPEndpoint == "" {
obj.HTTPEndpoint = InstanceMetadataEndpointStateEnabled
}
+ if obj.HTTPProtocolIPv6 == "" {
+ obj.HTTPProtocolIPv6 = InstanceMetadataEndpointStateDisabled
+ }
if obj.HTTPPutResponseHopLimit == 0 {
obj.HTTPPutResponseHopLimit = 1
}
@@ -583,6 +622,17 @@ const (
AWSConfidentialComputePolicySEVSNP AWSConfidentialComputePolicy = "AMDEncryptedVirtualizationNestedPaging"
)
+// NestedVirtualizationPolicy represents the nested virtualization configuration for the instance.
+// +kubebuilder:validation:Enum=enabled;disabled
+type NestedVirtualizationPolicy string
+
+const (
+ // NestedVirtualizationPolicyEnabled enables nested virtualization for the instance.
+ NestedVirtualizationPolicyEnabled NestedVirtualizationPolicy = "enabled"
+ // NestedVirtualizationPolicyDisabled disables nested virtualization for the instance.
+ NestedVirtualizationPolicyDisabled NestedVirtualizationPolicy = "disabled"
+)
+
// CPUOptions defines CPU-related settings for the instance, including the confidential computing policy.
// +kubebuilder:validation:MinProperties=1
type CPUOptions struct {
@@ -600,4 +650,10 @@ type CPUOptions struct {
// which is subject to change without notice. The current default is Disabled.
// +optional
ConfidentialCompute AWSConfidentialComputePolicy `json:"confidentialCompute,omitempty"`
+
+ // NestedVirtualization specifies whether to enable nested virtualization on the instance.
+ // Nested virtualization is supported on C8i, M8i, and R8i instance types.
+ // Valid values are: enabled, disabled
+ // +optional
+ NestedVirtualization NestedVirtualizationPolicy `json:"nestedVirtualization,omitempty"`
}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/zz_generated.deepcopy.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/zz_generated.deepcopy.go
index 1293074cb56d..c14768d06d03 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/zz_generated.deepcopy.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/zz_generated.deepcopy.go
@@ -23,7 +23,7 @@ package v1beta2
import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
+ runtime "k8s.io/apimachinery/pkg/runtime"
"sigs.k8s.io/cluster-api/api/core/v1beta1"
)
@@ -597,6 +597,16 @@ func (in *AWSLoadBalancerSpec) DeepCopyInto(out *AWSLoadBalancerSpec) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
+ if in.TargetGroupIPType != nil {
+ in, out := &in.TargetGroupIPType, &out.TargetGroupIPType
+ *out = new(TargetGroupIPType)
+ **out = **in
+ }
+ if in.DNSResolutionCheck != nil {
+ in, out := &in.DNSResolutionCheck, &out.DNSResolutionCheck
+ *out = new(AWSLoadBalancerDNSResolutionCheck)
+ **out = **in
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSLoadBalancerSpec.
@@ -746,6 +756,11 @@ func (in *AWSMachineSpec) DeepCopyInto(out *AWSMachineSpec) {
*out = make([]string, len(*in))
copy(*out, *in)
}
+ if in.AssignPrimaryIPv6 != nil {
+ in, out := &in.AssignPrimaryIPv6, &out.AssignPrimaryIPv6
+ *out = new(PrimaryIPv6AssignmentState)
+ **out = **in
+ }
if in.UncompressedUserData != nil {
in, out := &in.UncompressedUserData, &out.UncompressedUserData
*out = new(bool)
@@ -1221,6 +1236,11 @@ func (in *AdditionalListenerSpec) DeepCopyInto(out *AdditionalListenerSpec) {
*out = new(TargetGroupHealthCheckAdditionalSpec)
(*in).DeepCopyInto(*out)
}
+ if in.TargetGroupIPType != nil {
+ in, out := &in.TargetGroupIPType, &out.TargetGroupIPType
+ *out = new(TargetGroupIPType)
+ **out = **in
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdditionalListenerSpec.
@@ -1259,7 +1279,7 @@ func (in *Bastion) DeepCopyInto(out *Bastion) {
*out = *in
if in.AllowedCIDRBlocks != nil {
in, out := &in.AllowedCIDRBlocks, &out.AllowedCIDRBlocks
- *out = make([]string, len(*in))
+ *out = make(CidrBlocks, len(*in))
copy(*out, *in)
}
}
@@ -1375,6 +1395,25 @@ func (in *CPUOptions) DeepCopy() *CPUOptions {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in CidrBlocks) DeepCopyInto(out *CidrBlocks) {
+ {
+ in := &in
+ *out = make(CidrBlocks, len(*in))
+ copy(*out, *in)
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CidrBlocks.
+func (in CidrBlocks) DeepCopy() CidrBlocks {
+ if in == nil {
+ return nil
+ }
+ out := new(CidrBlocks)
+ in.DeepCopyInto(out)
+ return *out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClassicELBAttributes) DeepCopyInto(out *ClassicELBAttributes) {
*out = *in
@@ -1524,6 +1563,26 @@ func (in *ElasticIPPool) DeepCopy() *ElasticIPPool {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *EnclaveOptions) DeepCopyInto(out *EnclaveOptions) {
+ *out = *in
+ if in.Enabled != nil {
+ in, out := &in.Enabled, &out.Enabled
+ *out = new(bool)
+ **out = **in
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnclaveOptions.
+func (in *EnclaveOptions) DeepCopy() *EnclaveOptions {
+ if in == nil {
+ return nil
+ }
+ out := new(EnclaveOptions)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Filter) DeepCopyInto(out *Filter) {
*out = *in
@@ -1743,6 +1802,11 @@ func (in *Instance) DeepCopyInto(out *Instance) {
*out = new(string)
**out = **in
}
+ if in.IPv6Address != nil {
+ in, out := &in.IPv6Address, &out.IPv6Address
+ *out = new(string)
+ **out = **in
+ }
if in.PublicIP != nil {
in, out := &in.PublicIP, &out.PublicIP
*out = new(string)
@@ -1775,6 +1839,11 @@ func (in *Instance) DeepCopyInto(out *Instance) {
*out = make([]string, len(*in))
copy(*out, *in)
}
+ if in.AssignPrimaryIPv6 != nil {
+ in, out := &in.AssignPrimaryIPv6, &out.AssignPrimaryIPv6
+ *out = new(PrimaryIPv6AssignmentState)
+ **out = **in
+ }
if in.Tags != nil {
in, out := &in.Tags, &out.Tags
*out = make(map[string]string, len(*in))
@@ -1981,7 +2050,7 @@ func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec) {
}
if in.NodePortIngressRuleCidrBlocks != nil {
in, out := &in.NodePortIngressRuleCidrBlocks, &out.NodePortIngressRuleCidrBlocks
- *out = make([]string, len(*in))
+ *out = make(CidrBlocks, len(*in))
copy(*out, *in)
}
}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/controlplane/rosa/api/v1beta2/rosacontrolplane_types.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/controlplane/rosa/api/v1beta2/rosacontrolplane_types.go
index 4be22a8decf8..f961b5dd32b2 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/controlplane/rosa/api/v1beta2/rosacontrolplane_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/controlplane/rosa/api/v1beta2/rosacontrolplane_types.go
@@ -71,6 +71,17 @@ const (
Nightly ChannelGroupType = "nightly"
)
+// FIPSState represents the FIPS mode for the ROSA Control Plane.
+type FIPSState string
+
+const (
+ // FIPSEnabled indicates FIPS is enabled
+ FIPSEnabled FIPSState = "Enabled"
+
+ // FIPSDisabled indicates FIPS is disabled
+ FIPSDisabled FIPSState = "Disabled"
+)
+
// AutoNodeMode specifies the AutoNode mode for the ROSA Control Plane.
type AutoNodeMode string
@@ -123,11 +134,38 @@ type RosaControlPlaneSpec struct { //nolint: maligned
// OpenShift semantic version, for example "4.14.5".
Version string `json:"version"`
- // OpenShift version channel group, default is stable.
+ // OpenShift version channel group.
+ // When not specified, OCM will determine the appropriate channel group based on the cluster version.
+ // This field will be deprecated in a future release in favor of the Channel field.
//
+ // +optional
// +kubebuilder:validation:Enum=stable;eus;fast;candidate;nightly
- // +kubebuilder:default=stable
- ChannelGroup ChannelGroupType `json:"channelGroup"`
+ ChannelGroup ChannelGroupType `json:"channelGroup,omitempty"`
+
+ // Channel is the Y-stream OpenShift channel to use for this cluster, for example "stable-4.16" or "eus-4.16".
+ // This determines which Y-stream versions are available for upgrades.
+ // When not specified, OCM will determine the appropriate channel based on the cluster version.
+ // If Channel is set, ChannelGroup will be ignored.
+ //
+ // +optional
+ // +kubebuilder:validation:Pattern:=`^(stable|eus|fast|candidate|nightly)-[0-9]+\.[0-9]+$`
+ Channel string `json:"channel,omitempty"`
+
+ // FIPS configures FIPS-validated / Modules in Process cryptographic libraries.
+ // FIPS (Federal Information Processing Standard) 140-2 is a U.S. government standard
+ // that validates cryptographic modules used to protect sensitive information.
+ //
+ // When set to "Enabled", the cluster will use FIPS 140-2 validated cryptographic modules.
+ // This setting is immutable and cannot be changed after cluster creation.
+ //
+ // IMPORTANT: When FIPS is enabled, etcdEncryptionKMSARN must be provided.
+ // The KMS key must be tagged with 'red-hat:true'.
+ //
+ // +optional
+ // +kubebuilder:default=Disabled
+ // +kubebuilder:validation:Enum=Enabled;Disabled
+ // +kubebuilder:validation:XValidation:rule="self == oldSelf", message="fips is immutable"
+ FIPS FIPSState `json:"fips,omitempty"`
// VersionGate requires acknowledgment when upgrading ROSA-HCP y-stream versions (e.g., from 4.15 to 4.16).
// Default is WaitForAcknowledge.
@@ -188,6 +226,23 @@ type RosaControlPlaneSpec struct { //nolint: maligned
// +optional
WorkerRoleARN string `json:"workerRoleARN,omitempty"`
+ // TrustPolicyExternalID is an optional STS external ID that OCM will use when assuming
+ // the installer and support account roles.
+ // When using RosaRoleConfigRef, this field is ignored, the value is always read from
+ // the ROSARoleConfig, which owns the trust policies.
+ // When providing role ARNs directly (no RosaRoleConfigRef), the user is responsible for
+ // including the sts:ExternalId condition in the roles' trust policies; this field only
+ // tells OCM which external ID to present when assuming the roles.
+ // Worker roles are not affected.
+ // Must be 2–1224 characters matching [a-zA-Z0-9=,.@:/-]+ per AWS STS requirements.
+ //
+ // +kubebuilder:validation:MinLength=2
+ // +kubebuilder:validation:MaxLength=1224
+ // +kubebuilder:validation:Pattern=`^[a-zA-Z0-9=,.@:\/-]+$`
+ // +kubebuilder:validation:XValidation:rule="self == oldSelf", message="trustPolicyExternalID is immutable"
+ // +optional
+ TrustPolicyExternalID string `json:"trustPolicyExternalID,omitempty"`
+
// BillingAccount is an optional AWS account to use for billing the subscription fees for ROSA HCP clusters.
// The cost of running each ROSA HCP cluster will be billed to the infrastructure account in which the cluster
// is running.
@@ -271,6 +326,52 @@ type RosaControlPlaneSpec struct { //nolint: maligned
// for the ROSA HCP cluster.
// +optional
ROSANetworkRef *corev1.LocalObjectReference `json:"rosaNetworkRef,omitempty"`
+
+ // cloudWatchlogForwarder set the cloudWatch log forward config for applications and groupVersions.
+ // +optional
+ CloudWatchLogForwarder *CloudWatchLogForwarderConfig `json:"cloudWatchlogForwarder,omitempty"`
+
+ // s3LogForwarder set the AWS S3 log forward config for applications and groupVersions.
+ // +optional
+ S3LogForwarder *S3LogForwarderConfig `json:"s3LogForwarder,omitempty"`
+}
+
+// CloudWatchLogForwarderConfig present the cloudWatch log forward config for applications and groupVersions.
+type CloudWatchLogForwarderConfig struct {
+ // applications list included in the groupLog Ids ex; for groupLog api allowed applications as audit-webhook.
+ // +optional
+ Applications []string `json:"applications,omitempty"`
+
+ // groupLogIDs is list of available groupLog Ids ex; api, authentication, controller manager, scheduler
+ // +optional
+ GroupLogIDs []string `json:"groupLogIDs,omitempty"`
+
+ // cloudWatchLogRoleArn is the ARN of the IAM CloudWatch role for log distribution.
+ // +optional
+ CloudWatchLogRoleArn string `json:"cloudWatchLogRoleArn,omitempty"`
+
+ // cloudWatchLogGroupName is the name of the CloudWatch log group.
+ // +optional
+ CloudWatchLogGroupName string `json:"cloudWatchLogGroupName,omitempty"`
+}
+
+// S3LogForwarderConfig present the AWS S3 log forward config for applications and groupVersions.
+type S3LogForwarderConfig struct {
+ // applications list included in the groupLog Ids ex; for groupLog api allowed applications as audit-webhook.
+ // +optional
+ Applications []string `json:"applications,omitempty"`
+
+ // groupLogIDs is list of available groupLog Ids ex; api, authentication, controller manager, scheduler
+ // +optional
+ GroupLogIDs []string `json:"groupLogIDs,omitempty"`
+
+ // s3ConfigBucketName is the name of the S3 bucket
+ // +optional
+ S3ConfigBucketName string `json:"s3ConfigBucketName,omitempty"`
+
+ // s3ConfigBucketPrefix is the prefix to use for objects stored in the S3 bucket.
+ // +optional
+ S3ConfigBucketPrefix string `json:"s3ConfigBucketPrefix,omitempty"`
}
// AutoNode set the AutoNode mode and AutoNode role ARN.
@@ -397,7 +498,7 @@ type DefaultMachinePoolSpec struct {
// AutoScaling specifies scaling options.
type AutoScaling struct {
- // +kubebuilder:validation:Minimum=1
+ // +kubebuilder:validation:Minimum=0
MinReplicas int `json:"minReplicas,omitempty"`
// +kubebuilder:validation:Minimum=1
MaxReplicas int `json:"maxReplicas,omitempty"`
@@ -821,6 +922,9 @@ type RosaControlPlaneStatus struct {
// Available upgrades for the ROSA hosted control plane.
AvailableUpgrades []string `json:"availableUpgrades,omitempty"`
+
+ // Available channels for the ROSA hosted control plane.
+ AvailableChannels []string `json:"availableChannels,omitempty"`
}
// +kubebuilder:object:root=true
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/controlplane/rosa/api/v1beta2/rosacontrolplane_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/controlplane/rosa/api/v1beta2/rosacontrolplane_webhook.go
deleted file mode 100644
index 21618bcec355..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/controlplane/rosa/api/v1beta2/rosacontrolplane_webhook.go
+++ /dev/null
@@ -1,292 +0,0 @@
-/*
-Copyright 2023 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta2
-
-import (
- "context"
- "fmt"
- "net"
-
- "github.com/blang/semver"
- kmsArnRegexpValidator "github.com/openshift-online/ocm-common/pkg/resource/validations"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- runtime "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-)
-
-// SetupWebhookWithManager will setup the webhooks for the ROSAControlPlane.
-func (r *ROSAControlPlane) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(rosaControlPlaneWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(r).
- WithValidator(w).
- WithDefaulter(w).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-controlplane-cluster-x-k8s-io-v1beta2-rosacontrolplane,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=controlplane.cluster.x-k8s.io,resources=rosacontrolplanes,versions=v1beta2,name=validation.rosacontrolplanes.controlplane.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-controlplane-cluster-x-k8s-io-v1beta2-rosacontrolplane,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=controlplane.cluster.x-k8s.io,resources=rosacontrolplanes,versions=v1beta2,name=default.rosacontrolplanes.controlplane.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-type rosaControlPlaneWebhook struct{}
-
-var _ webhook.CustomDefaulter = &rosaControlPlaneWebhook{}
-var _ webhook.CustomValidator = &rosaControlPlaneWebhook{}
-
-// ValidateCreate implements admission.Validator.
-func (*rosaControlPlaneWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (warnings admission.Warnings, err error) {
- r, ok := obj.(*ROSAControlPlane)
- if !ok {
- return nil, fmt.Errorf("expected an ROSAControlPlane object but got %T", r)
- }
-
- var allErrs field.ErrorList
-
- if err := r.validateVersion(); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := r.validateEtcdEncryptionKMSArn(); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := r.validateExternalAuthProviders(); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := r.validateClusterRegistryConfig(); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := r.validateRosaRoleConfig(); err != nil {
- allErrs = append(allErrs, err)
- }
-
- allErrs = append(allErrs, r.validateNetwork()...)
- allErrs = append(allErrs, r.Spec.AdditionalTags.Validate()...)
-
- if err := r.validateROSANetwork(); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if len(allErrs) == 0 {
- return nil, nil
- }
-
- return nil, apierrors.NewInvalid(
- r.GroupVersionKind().GroupKind(),
- r.Name,
- allErrs,
- )
-}
-
-func (r *ROSAControlPlane) validateClusterRegistryConfig() *field.Error {
- if r.Spec.ClusterRegistryConfig != nil {
- if r.Spec.ClusterRegistryConfig.RegistrySources != nil {
- if len(r.Spec.ClusterRegistryConfig.RegistrySources.AllowedRegistries) > 0 && len(r.Spec.ClusterRegistryConfig.RegistrySources.BlockedRegistries) > 0 {
- return field.Invalid(field.NewPath("spec.clusterRegistryConfig.registrySources"), r.Spec.ClusterRegistryConfig.RegistrySources, "allowedRegistries and blockedRegistries are mutually exclusive fields")
- }
- }
- }
-
- return nil
-}
-
-// ValidateUpdate implements admission.Validator.
-func (*rosaControlPlaneWebhook) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (warnings admission.Warnings, err error) {
- r, ok := newObj.(*ROSAControlPlane)
- if !ok {
- return nil, fmt.Errorf("expected an ROSAControlPlane object but got %T", r)
- }
-
- var allErrs field.ErrorList
-
- if err := r.validateVersion(); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := r.validateEtcdEncryptionKMSArn(); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := r.validateRosaRoleConfig(); err != nil {
- allErrs = append(allErrs, err)
- }
-
- allErrs = append(allErrs, r.validateNetwork()...)
- allErrs = append(allErrs, r.Spec.AdditionalTags.Validate()...)
-
- if len(allErrs) == 0 {
- return nil, nil
- }
-
- return nil, apierrors.NewInvalid(
- r.GroupVersionKind().GroupKind(),
- r.Name,
- allErrs,
- )
-}
-
-// ValidateDelete implements admission.Validator.
-func (*rosaControlPlaneWebhook) ValidateDelete(_ context.Context, obj runtime.Object) (warnings admission.Warnings, err error) {
- return nil, nil
-}
-
-func (r *ROSAControlPlane) validateVersion() *field.Error {
- _, err := semver.Parse(r.Spec.Version)
- if err != nil {
- return field.Invalid(field.NewPath("spec.version"), r.Spec.Version, "must be a valid semantic version")
- }
-
- return nil
-}
-
-func (r *ROSAControlPlane) validateNetwork() field.ErrorList {
- var allErrs field.ErrorList
- if r.Spec.Network == nil {
- return allErrs
- }
-
- rootPath := field.NewPath("spec", "network")
-
- if r.Spec.Network.MachineCIDR != "" {
- _, _, err := net.ParseCIDR(r.Spec.Network.MachineCIDR)
- if err != nil {
- allErrs = append(allErrs, field.Invalid(rootPath.Child("machineCIDR"), r.Spec.Network.MachineCIDR, "must be valid CIDR block"))
- }
- }
-
- if r.Spec.Network.PodCIDR != "" {
- _, _, err := net.ParseCIDR(r.Spec.Network.PodCIDR)
- if err != nil {
- allErrs = append(allErrs, field.Invalid(rootPath.Child("podCIDR"), r.Spec.Network.PodCIDR, "must be valid CIDR block"))
- }
- }
-
- if r.Spec.Network.ServiceCIDR != "" {
- _, _, err := net.ParseCIDR(r.Spec.Network.ServiceCIDR)
- if err != nil {
- allErrs = append(allErrs, field.Invalid(rootPath.Child("serviceCIDR"), r.Spec.Network.ServiceCIDR, "must be valid CIDR block"))
- }
- }
-
- return allErrs
-}
-
-func (r *ROSAControlPlane) validateEtcdEncryptionKMSArn() *field.Error {
- err := kmsArnRegexpValidator.ValidateKMSKeyARN(&r.Spec.EtcdEncryptionKMSARN)
- if err != nil {
- return field.Invalid(field.NewPath("spec.etcdEncryptionKMSARN"), r.Spec.EtcdEncryptionKMSARN, err.Error())
- }
-
- return nil
-}
-
-func (r *ROSAControlPlane) validateExternalAuthProviders() *field.Error {
- if !r.Spec.EnableExternalAuthProviders && len(r.Spec.ExternalAuthProviders) > 0 {
- return field.Invalid(field.NewPath("spec.ExternalAuthProviders"), r.Spec.ExternalAuthProviders,
- "can only be set if spec.EnableExternalAuthProviders is set to 'True'")
- }
-
- return nil
-}
-
-func (r *ROSAControlPlane) validateRosaRoleConfig() *field.Error {
- hasRoleFields := r.Spec.OIDCID != "" || r.Spec.InstallerRoleARN != "" || r.Spec.SupportRoleARN != "" || r.Spec.WorkerRoleARN != "" ||
- r.Spec.RolesRef.IngressARN != "" || r.Spec.RolesRef.ImageRegistryARN != "" || r.Spec.RolesRef.StorageARN != "" ||
- r.Spec.RolesRef.NetworkARN != "" || r.Spec.RolesRef.KubeCloudControllerARN != "" || r.Spec.RolesRef.NodePoolManagementARN != "" ||
- r.Spec.RolesRef.ControlPlaneOperatorARN != "" || r.Spec.RolesRef.KMSProviderARN != ""
-
- if r.Spec.RosaRoleConfigRef != nil {
- if hasRoleFields {
- return field.Invalid(field.NewPath("spec.rosaRoleConfigRef"), r.Spec.RosaRoleConfigRef, "RosaRoleConfigRef and role fields such as installerRoleARN, supportRoleARN, workerRoleARN, rolesRef and oidcID are mutually exclusive")
- }
- return nil
- }
-
- if r.Spec.OIDCID == "" {
- return field.Invalid(field.NewPath("spec.oidcID"), r.Spec.OIDCID, "must be specified")
- }
- if r.Spec.InstallerRoleARN == "" {
- return field.Invalid(field.NewPath("spec.installerRoleARN"), r.Spec.InstallerRoleARN, "must be specified")
- }
- if r.Spec.SupportRoleARN == "" {
- return field.Invalid(field.NewPath("spec.supportRoleARN"), r.Spec.SupportRoleARN, "must be specified")
- }
- if r.Spec.WorkerRoleARN == "" {
- return field.Invalid(field.NewPath("spec.workerRoleARN"), r.Spec.WorkerRoleARN, "must be specified")
- }
- if r.Spec.RolesRef.IngressARN == "" {
- return field.Invalid(field.NewPath("spec.rolesRef.ingressARN"), r.Spec.RolesRef.IngressARN, "must be specified")
- }
- if r.Spec.RolesRef.ImageRegistryARN == "" {
- return field.Invalid(field.NewPath("spec.rolesRef.imageRegistryARN"), r.Spec.RolesRef.ImageRegistryARN, "must be specified")
- }
- if r.Spec.RolesRef.StorageARN == "" {
- return field.Invalid(field.NewPath("spec.rolesRef.storageARN"), r.Spec.RolesRef.StorageARN, "must be specified")
- }
- if r.Spec.RolesRef.NetworkARN == "" {
- return field.Invalid(field.NewPath("spec.rolesRef.networkARN"), r.Spec.RolesRef.NetworkARN, "must be specified")
- }
- if r.Spec.RolesRef.KubeCloudControllerARN == "" {
- return field.Invalid(field.NewPath("spec.rolesRef.kubeCloudControllerARN"), r.Spec.RolesRef.KubeCloudControllerARN, "must be specified")
- }
- if r.Spec.RolesRef.NodePoolManagementARN == "" {
- return field.Invalid(field.NewPath("spec.rolesRef.nodePoolManagementARN"), r.Spec.RolesRef.NodePoolManagementARN, "must be specified")
- }
- if r.Spec.RolesRef.ControlPlaneOperatorARN == "" {
- return field.Invalid(field.NewPath("spec.rolesRef.controlPlaneOperatorARN"), r.Spec.RolesRef.ControlPlaneOperatorARN, "must be specified")
- }
- if r.Spec.RolesRef.KMSProviderARN == "" {
- return field.Invalid(field.NewPath("spec.rolesRef.kmsProviderARN"), r.Spec.RolesRef.KMSProviderARN, "must be specified")
- }
- return nil
-}
-
-func (r *ROSAControlPlane) validateROSANetwork() *field.Error {
- if r.Spec.ROSANetworkRef != nil {
- if r.Spec.Subnets != nil {
- return field.Forbidden(field.NewPath("spec.rosaNetworkRef"), "spec.subnets and spec.rosaNetworkRef are mutually exclusive")
- }
- if r.Spec.AvailabilityZones != nil {
- return field.Forbidden(field.NewPath("spec.rosaNetworkRef"), "spec.availabilityZones and spec.rosaNetworkRef are mutually exclusive")
- }
- }
-
- if r.Spec.ROSANetworkRef == nil && r.Spec.Subnets == nil {
- return field.Required(field.NewPath("spec.subnets"), "spec.subnets cannot be empty when spec.rosaNetworkRef is unspecified")
- }
-
- if r.Spec.ROSANetworkRef == nil && r.Spec.AvailabilityZones == nil {
- return field.Required(field.NewPath("spec.availabilityZones"), "spec.availabilityZones cannot be empty when spec.rosaNetworkRef is unspecified")
- }
-
- return nil
-}
-
-// Default implements admission.Defaulter.
-func (*rosaControlPlaneWebhook) Default(_ context.Context, obj runtime.Object) error {
- r, ok := obj.(*ROSAControlPlane)
- if !ok {
- return fmt.Errorf("expected an ROSAControlPlane object but got %T", r)
- }
-
- SetObjectDefaults_ROSAControlPlane(r)
- return nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/controlplane/rosa/api/v1beta2/zz_generated.deepcopy.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/controlplane/rosa/api/v1beta2/zz_generated.deepcopy.go
index 8c6e718edb20..2e17d77723e8 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/controlplane/rosa/api/v1beta2/zz_generated.deepcopy.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/controlplane/rosa/api/v1beta2/zz_generated.deepcopy.go
@@ -22,7 +22,7 @@ package v1beta2
import (
"k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/runtime"
+ runtime "k8s.io/apimachinery/pkg/runtime"
apiv1beta2 "sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2"
"sigs.k8s.io/cluster-api/api/core/v1beta1"
)
@@ -72,6 +72,31 @@ func (in *AutoScaling) DeepCopy() *AutoScaling {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *CloudWatchLogForwarderConfig) DeepCopyInto(out *CloudWatchLogForwarderConfig) {
+ *out = *in
+ if in.Applications != nil {
+ in, out := &in.Applications, &out.Applications
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.GroupLogIDs != nil {
+ in, out := &in.GroupLogIDs, &out.GroupLogIDs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudWatchLogForwarderConfig.
+func (in *CloudWatchLogForwarderConfig) DeepCopy() *CloudWatchLogForwarderConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(CloudWatchLogForwarderConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DefaultMachinePoolSpec) DeepCopyInto(out *DefaultMachinePoolSpec) {
*out = *in
@@ -392,6 +417,16 @@ func (in *RosaControlPlaneSpec) DeepCopyInto(out *RosaControlPlaneSpec) {
*out = new(v1.LocalObjectReference)
**out = **in
}
+ if in.CloudWatchLogForwarder != nil {
+ in, out := &in.CloudWatchLogForwarder, &out.CloudWatchLogForwarder
+ *out = new(CloudWatchLogForwarderConfig)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.S3LogForwarder != nil {
+ in, out := &in.S3LogForwarder, &out.S3LogForwarder
+ *out = new(S3LogForwarderConfig)
+ (*in).DeepCopyInto(*out)
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RosaControlPlaneSpec.
@@ -429,6 +464,11 @@ func (in *RosaControlPlaneStatus) DeepCopyInto(out *RosaControlPlaneStatus) {
*out = make([]string, len(*in))
copy(*out, *in)
}
+ if in.AvailableChannels != nil {
+ in, out := &in.AvailableChannels, &out.AvailableChannels
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RosaControlPlaneStatus.
@@ -441,6 +481,31 @@ func (in *RosaControlPlaneStatus) DeepCopy() *RosaControlPlaneStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *S3LogForwarderConfig) DeepCopyInto(out *S3LogForwarderConfig) {
+ *out = *in
+ if in.Applications != nil {
+ in, out := &in.Applications, &out.Applications
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.GroupLogIDs != nil {
+ in, out := &in.GroupLogIDs, &out.GroupLogIDs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3LogForwarderConfig.
+func (in *S3LogForwarderConfig) DeepCopy() *S3LogForwarderConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(S3LogForwarderConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TokenClaimMappings) DeepCopyInto(out *TokenClaimMappings) {
*out = *in
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta1/conversion.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta1/conversion.go
index 7b49ed9f64f1..b943c6d41768 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta1/conversion.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta1/conversion.go
@@ -47,6 +47,9 @@ func (src *AWSMachinePool) ConvertTo(dstRaw conversion.Hub) error {
if restored.Spec.AWSLaunchTemplate.InstanceMetadataOptions != nil {
dst.Spec.AWSLaunchTemplate.InstanceMetadataOptions = restored.Spec.AWSLaunchTemplate.InstanceMetadataOptions
}
+ if restored.Spec.AWSLaunchTemplate.EnclaveOptions != nil {
+ dst.Spec.AWSLaunchTemplate.EnclaveOptions = restored.Spec.AWSLaunchTemplate.EnclaveOptions
+ }
if restored.Spec.AvailabilityZoneSubnetType != nil {
dst.Spec.AvailabilityZoneSubnetType = restored.Spec.AvailabilityZoneSubnetType
}
@@ -121,6 +124,10 @@ func (src *AWSManagedMachinePool) ConvertTo(dstRaw conversion.Hub) error {
dst.Spec.AWSLaunchTemplate.InstanceMetadataOptions = restored.Spec.AWSLaunchTemplate.InstanceMetadataOptions
dst.Spec.AWSLaunchTemplate.NonRootVolumes = restored.Spec.AWSLaunchTemplate.NonRootVolumes
+ if restored.Spec.AWSLaunchTemplate.EnclaveOptions != nil {
+ dst.Spec.AWSLaunchTemplate.EnclaveOptions = restored.Spec.AWSLaunchTemplate.EnclaveOptions
+ }
+
if restored.Spec.AWSLaunchTemplate.PrivateDNSName != nil {
dst.Spec.AWSLaunchTemplate.PrivateDNSName = restored.Spec.AWSLaunchTemplate.PrivateDNSName
}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta1/zz_generated.conversion.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta1/zz_generated.conversion.go
index e825e20a31d0..612dc28083bd 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta1/zz_generated.conversion.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta1/zz_generated.conversion.go
@@ -411,6 +411,7 @@ func autoConvert_v1beta2_AWSLaunchTemplate_To_v1beta1_AWSLaunchTemplate(in *v1be
out.AdditionalSecurityGroups = *(*[]apiv1beta2.AWSResourceReference)(unsafe.Pointer(&in.AdditionalSecurityGroups))
out.SpotMarketOptions = (*apiv1beta2.SpotMarketOptions)(unsafe.Pointer(in.SpotMarketOptions))
// WARNING: in.InstanceMetadataOptions requires manual conversion: does not exist in peer-type
+ // WARNING: in.EnclaveOptions requires manual conversion: does not exist in peer-type
// WARNING: in.PrivateDNSName requires manual conversion: does not exist in peer-type
// WARNING: in.CapacityReservationID requires manual conversion: does not exist in peer-type
// WARNING: in.MarketType requires manual conversion: does not exist in peer-type
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/OWNERS b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/OWNERS
index c8a9655900e3..370dab6dd7c3 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/OWNERS
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/OWNERS
@@ -3,7 +3,6 @@
filters:
"^(rosa|zz_).*\\.go$":
approvers:
- - muraee
- - serngawy
+ - cluster-api-aws-rosa-reviewers
reviewers:
- - serngawy
+ - cluster-api-aws-rosa-reviewers
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/awsfargateprofile_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/awsfargateprofile_webhook.go
deleted file mode 100644
index f0cb893cb846..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/awsfargateprofile_webhook.go
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
-Copyright 2022 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta2
-
-import (
- "context"
- "fmt"
-
- "github.com/google/go-cmp/cmp"
- "github.com/pkg/errors"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-
- "sigs.k8s.io/cluster-api-provider-aws/v2/pkg/eks"
- clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
-)
-
-const (
- maxProfileNameLength = 100
- maxIAMRoleNameLength = 64
-)
-
-// SetupWebhookWithManager will setup the webhooks for the AWSFargateProfile.
-func (r *AWSFargateProfile) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(awsFargateProfileWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(r).
- WithValidator(w).
- WithDefaulter(w).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta2-awsfargateprofile,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=awsfargateprofiles,versions=v1beta2,name=default.awsfargateprofile.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta2-awsfargateprofile,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=awsfargateprofiles,versions=v1beta2,name=validation.awsfargateprofile.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-type awsFargateProfileWebhook struct{}
-
-var (
- _ webhook.CustomDefaulter = &awsFargateProfileWebhook{}
- _ webhook.CustomValidator = &awsFargateProfileWebhook{}
-)
-
-// Default will set default values for the AWSFargateProfile.
-func (*awsFargateProfileWebhook) Default(_ context.Context, obj runtime.Object) error {
- r, ok := obj.(*AWSFargateProfile)
- if !ok {
- return fmt.Errorf("expected an AWSFargateProfile object but got %T", r)
- }
-
- if r.Labels == nil {
- r.Labels = make(map[string]string)
- }
- r.Labels[clusterv1beta1.ClusterNameLabel] = r.Spec.ClusterName
-
- if r.Spec.ProfileName == "" {
- name, err := eks.GenerateEKSName(r.Name, r.Namespace, maxProfileNameLength)
- if err != nil {
- mmpLog.Error(err, "failed to create EKS nodegroup name")
- return nil
- }
-
- r.Spec.ProfileName = name
- }
- return nil
-}
-
-// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
-func (*awsFargateProfileWebhook) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
- r, ok := newObj.(*AWSFargateProfile)
- if !ok {
- return nil, fmt.Errorf("expected an AWSFargateProfile object but got %T", r)
- }
-
- gv := r.GroupVersionKind().GroupKind()
- old, ok := oldObj.(*AWSFargateProfile)
- if !ok {
- return nil, apierrors.NewInvalid(gv, r.Name, field.ErrorList{
- field.InternalError(nil, errors.Errorf("failed to convert old %s to object", gv.Kind)),
- })
- }
-
- var allErrs field.ErrorList
-
- // Spec is immutable, but if the new RoleName is the generated one(or default if EnableIAM is disabled) and
- // the old RoleName is nil, then ignore checking that field.
- if old.Spec.RoleName == "" {
- roleName, err := eks.GenerateEKSName(
- "fargate",
- fmt.Sprintf("%s-%s", r.Spec.ClusterName, r.Spec.ProfileName),
- maxIAMRoleNameLength,
- )
- if err != nil {
- mmpLog.Error(err, "failed to create EKS fargate role name")
- }
-
- if r.Spec.RoleName == roleName || r.Spec.RoleName == DefaultEKSFargateRole {
- r.Spec.RoleName = ""
- }
- }
-
- // Spec is immutable, but if the new ProfileName is the defaulted one and
- // the old ProfileName is nil, then ignore checking that field.
- if old.Spec.ProfileName == "" {
- name, err := eks.GenerateEKSName(old.Name, old.Namespace, maxProfileNameLength)
- if err != nil {
- mmpLog.Error(err, "failed to create EKS nodegroup name")
- }
- if r.Spec.ProfileName == name {
- r.Spec.ProfileName = ""
- }
- }
-
- allErrs = append(allErrs, r.Spec.AdditionalTags.Validate()...)
- // remove additionalTags from equal check since they are mutable
- old.Spec.AdditionalTags = nil
- r.Spec.AdditionalTags = nil
-
- if !cmp.Equal(old.Spec, r.Spec) {
- allErrs = append(
- allErrs,
- field.Invalid(field.NewPath("spec"), r.Spec, "is immutable"),
- )
- }
-
- if len(allErrs) == 0 {
- return nil, nil
- }
-
- return nil, apierrors.NewInvalid(
- gv,
- r.Name,
- allErrs,
- )
-}
-
-// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
-func (*awsFargateProfileWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- r, ok := obj.(*AWSFargateProfile)
- if !ok {
- return nil, fmt.Errorf("expected an AWSFargateProfile object but got %T", r)
- }
-
- var allErrs field.ErrorList
- allErrs = append(allErrs, r.Spec.AdditionalTags.Validate()...)
- if len(allErrs) == 0 {
- return nil, nil
- }
- return nil, apierrors.NewInvalid(
- r.GroupVersionKind().GroupKind(),
- r.Name,
- allErrs,
- )
-}
-
-// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
-func (*awsFargateProfileWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/awsmachinepool_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/awsmachinepool_webhook.go
deleted file mode 100644
index 478ec233749f..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/awsmachinepool_webhook.go
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
-Copyright 2022 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta2
-
-import (
- "context"
- "fmt"
- "time"
-
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- "k8s.io/klog/v2"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-
- infrav1 "sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2"
- "sigs.k8s.io/cluster-api-provider-aws/v2/feature"
-)
-
-var log = ctrl.Log.WithName("awsmachinepool-resource")
-
-// SetupWebhookWithManager will setup the webhooks for the AWSMachinePool.
-func (r *AWSMachinePool) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(AWSMachinePoolWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(r).
- WithValidator(w).
- WithDefaulter(w).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta2-awsmachinepool,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=awsmachinepools,versions=v1beta2,name=validation.awsmachinepool.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta2-awsmachinepool,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=awsmachinepools,versions=v1beta2,name=default.awsmachinepool.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-// AWSMachinePoolWebhook implements a custom validation webhook for AWSMachinePool.
-type AWSMachinePoolWebhook struct{}
-
-var _ webhook.CustomDefaulter = &AWSMachinePoolWebhook{}
-var _ webhook.CustomValidator = &AWSMachinePoolWebhook{}
-
-func (r *AWSMachinePool) validateDefaultCoolDown() field.ErrorList {
- var allErrs field.ErrorList
-
- if int(r.Spec.DefaultCoolDown.Duration.Seconds()) < 0 {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.DefaultCoolDown"), "DefaultCoolDown must be greater than zero"))
- }
-
- return allErrs
-}
-
-func (r *AWSMachinePool) validateRootVolume() field.ErrorList {
- var allErrs field.ErrorList
-
- if r.Spec.AWSLaunchTemplate.RootVolume == nil {
- return allErrs
- }
-
- if infrav1.VolumeTypesProvisioned.Has(string(r.Spec.AWSLaunchTemplate.RootVolume.Type)) && r.Spec.AWSLaunchTemplate.RootVolume.IOPS == 0 {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.awsLaunchTemplate.rootVolume.iops"), "iops required if type is 'io1' or 'io2'"))
- }
-
- if r.Spec.AWSLaunchTemplate.RootVolume.Throughput != nil {
- if r.Spec.AWSLaunchTemplate.RootVolume.Type != infrav1.VolumeTypeGP3 {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.awsLaunchTemplate.rootVolume.throughput"), "throughput is valid only for type 'gp3'"))
- }
- if *r.Spec.AWSLaunchTemplate.RootVolume.Throughput < 0 {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.awsLaunchTemplate.rootVolume.throughput"), "throughput must be nonnegative"))
- }
- }
-
- if r.Spec.AWSLaunchTemplate.RootVolume.DeviceName != "" {
- log.Info("root volume shouldn't have a device name (this can be ignored if performing a `clusterctl move`)")
- }
-
- return allErrs
-}
-
-func (r *AWSMachinePool) validateNonRootVolumes() field.ErrorList {
- var allErrs field.ErrorList
-
- for _, volume := range r.Spec.AWSLaunchTemplate.NonRootVolumes {
- if infrav1.VolumeTypesProvisioned.Has(string(volume.Type)) && volume.IOPS == 0 {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.template.spec.nonRootVolumes.iops"), "iops required if type is 'io1' or 'io2'"))
- }
-
- if volume.Throughput != nil {
- if volume.Type != infrav1.VolumeTypeGP3 {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.template.spec.nonRootVolumes.throughput"), "throughput is valid only for type 'gp3'"))
- }
- if *volume.Throughput < 0 {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.template.spec.nonRootVolumes.throughput"), "throughput must be nonnegative"))
- }
- }
-
- if volume.DeviceName == "" {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.template.spec.nonRootVolumes.deviceName"), "non root volume should have device name"))
- }
- }
-
- return allErrs
-}
-
-func (r *AWSMachinePool) validateSubnets() field.ErrorList {
- var allErrs field.ErrorList
-
- if r.Spec.Subnets == nil {
- return allErrs
- }
-
- for _, subnet := range r.Spec.Subnets {
- if subnet.ID != nil && subnet.Filters != nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec.subnets.filters"), "providing either subnet ID or filter is supported, should not provide both"))
- break
- }
- }
-
- return allErrs
-}
-
-func (r *AWSMachinePool) validateAdditionalSecurityGroups() field.ErrorList {
- var allErrs field.ErrorList
- for _, sg := range r.Spec.AWSLaunchTemplate.AdditionalSecurityGroups {
- if sg.ID != nil && sg.Filters != nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec.awsLaunchTemplate.AdditionalSecurityGroups"), "either ID or filters should be used"))
- }
- }
- return allErrs
-}
-
-func (r *AWSMachinePool) validateSpotInstances() field.ErrorList {
- var allErrs field.ErrorList
- if r.Spec.AWSLaunchTemplate.SpotMarketOptions != nil && r.Spec.MixedInstancesPolicy != nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec.awsLaunchTemplate.spotMarketOptions"), "either spec.awsLaunchTemplate.spotMarketOptions or spec.mixedInstancesPolicy should be used"))
- }
- return allErrs
-}
-
-func (r *AWSMachinePool) validateRefreshPreferences() field.ErrorList {
- var allErrs field.ErrorList
-
- if r.Spec.RefreshPreferences == nil {
- return allErrs
- }
-
- if r.Spec.RefreshPreferences.MaxHealthyPercentage != nil && r.Spec.RefreshPreferences.MinHealthyPercentage == nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec.refreshPreferences.maxHealthyPercentage"), "If you specify spec.refreshPreferences.maxHealthyPercentage, you must also specify spec.refreshPreferences.minHealthyPercentage"))
- }
-
- if r.Spec.RefreshPreferences.MaxHealthyPercentage != nil && r.Spec.RefreshPreferences.MinHealthyPercentage != nil {
- if *r.Spec.RefreshPreferences.MaxHealthyPercentage-*r.Spec.RefreshPreferences.MinHealthyPercentage > 100 {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec.refreshPreferences.maxHealthyPercentage"), "the difference between spec.refreshPreferences.maxHealthyPercentage and spec.refreshPreferences.minHealthyPercentage cannot be greater than 100"))
- }
- }
-
- return allErrs
-}
-
-func (r *AWSMachinePool) validateLifecycleHooks() field.ErrorList {
- return validateLifecycleHooks(r.Spec.AWSLifecycleHooks)
-}
-
-func (r *AWSMachinePool) ignitionEnabled() bool {
- return r.Spec.Ignition != nil
-}
-
-func (r *AWSMachinePool) validateIgnition() field.ErrorList {
- var allErrs field.ErrorList
-
- // Feature gate is not enabled but ignition is enabled then send a forbidden error.
- if !feature.Gates.Enabled(feature.BootstrapFormatIgnition) && r.ignitionEnabled() {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "ignition"),
- "can be set only if the BootstrapFormatIgnition feature gate is enabled"))
- }
-
- return allErrs
-}
-
-// ValidateCreate will do any extra validation when creating a AWSMachinePool.
-func (*AWSMachinePoolWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- r, ok := obj.(*AWSMachinePool)
- if !ok {
- return nil, fmt.Errorf("expected an AWSMachinePool object but got %T", r)
- }
-
- log.Info("AWSMachinePool validate create", "machine-pool", klog.KObj(r))
-
- var allErrs field.ErrorList
-
- allErrs = append(allErrs, r.validateDefaultCoolDown()...)
- allErrs = append(allErrs, r.validateRootVolume()...)
- allErrs = append(allErrs, r.validateNonRootVolumes()...)
- allErrs = append(allErrs, r.Spec.AdditionalTags.Validate()...)
- allErrs = append(allErrs, r.validateSubnets()...)
- allErrs = append(allErrs, r.validateAdditionalSecurityGroups()...)
- allErrs = append(allErrs, r.validateSpotInstances()...)
- allErrs = append(allErrs, r.validateRefreshPreferences()...)
- allErrs = append(allErrs, r.validateInstanceMarketType()...)
- allErrs = append(allErrs, r.validateCapacityReservation()...)
- allErrs = append(allErrs, r.validateLifecycleHooks()...)
- allErrs = append(allErrs, r.validateIgnition()...)
-
- if len(allErrs) == 0 {
- return nil, nil
- }
-
- return nil, apierrors.NewInvalid(
- r.GroupVersionKind().GroupKind(),
- r.Name,
- allErrs,
- )
-}
-
-func (r *AWSMachinePool) validateCapacityReservation() field.ErrorList {
- var allErrs field.ErrorList
- if r.Spec.AWSLaunchTemplate.CapacityReservationID != nil &&
- r.Spec.AWSLaunchTemplate.CapacityReservationPreference != infrav1.CapacityReservationPreferenceOnly &&
- r.Spec.AWSLaunchTemplate.CapacityReservationPreference != "" {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "capacityReservationPreference"), "when capacityReservationId is specified, capacityReservationPreference may only be `CapacityReservationsOnly` or empty"))
- }
- return allErrs
-}
-
-func (r *AWSMachinePool) validateInstanceMarketType() field.ErrorList {
- var allErrs field.ErrorList
- if r.Spec.AWSLaunchTemplate.MarketType == infrav1.MarketTypeCapacityBlock && r.Spec.AWSLaunchTemplate.SpotMarketOptions != nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec.awsLaunchTemplate.marketType"), "setting marketType to CapacityBlock and spotMarketOptions cannot be used together"))
- }
- if r.Spec.AWSLaunchTemplate.MarketType == infrav1.MarketTypeOnDemand && r.Spec.AWSLaunchTemplate.SpotMarketOptions != nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec.awsLaunchTemplate.marketType"), "setting marketType to OnDemand and spotMarketOptions cannot be used together"))
- }
-
- if r.Spec.AWSLaunchTemplate.MarketType == infrav1.MarketTypeCapacityBlock && r.Spec.AWSLaunchTemplate.CapacityReservationID == nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec.awsLaunchTemplate.capacityReservationID"), "is required when CapacityBlock is provided"))
- }
- switch r.Spec.AWSLaunchTemplate.MarketType {
- case "", infrav1.MarketTypeOnDemand, infrav1.MarketTypeSpot, infrav1.MarketTypeCapacityBlock:
- default:
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec.awsLaunchTemplate.marketType"), r.Spec.AWSLaunchTemplate.MarketType, fmt.Sprintf("Valid values are: %s, %s, %s and omitted", infrav1.MarketTypeOnDemand, infrav1.MarketTypeSpot, infrav1.MarketTypeCapacityBlock)))
- }
- if r.Spec.AWSLaunchTemplate.MarketType == infrav1.MarketTypeSpot && r.Spec.AWSLaunchTemplate.CapacityReservationID != nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec.awsLaunchTemplate.marketType"), "cannot be set to 'Spot' when CapacityReservationID is specified"))
- }
-
- if r.Spec.AWSLaunchTemplate.CapacityReservationID != nil && r.Spec.AWSLaunchTemplate.SpotMarketOptions != nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec.awsLaunchTemplate.spotMarketOptions"), "cannot be set to when CapacityReservationID is specified"))
- }
-
- return allErrs
-}
-
-// ValidateUpdate will do any extra validation when updating a AWSMachinePool.
-func (*AWSMachinePoolWebhook) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
- r, ok := newObj.(*AWSMachinePool)
- if !ok {
- return nil, fmt.Errorf("expected an AWSMachinePool object but got %T", r)
- }
-
- var allErrs field.ErrorList
-
- allErrs = append(allErrs, r.validateDefaultCoolDown()...)
- allErrs = append(allErrs, r.Spec.AdditionalTags.Validate()...)
- allErrs = append(allErrs, r.validateSubnets()...)
- allErrs = append(allErrs, r.validateAdditionalSecurityGroups()...)
- allErrs = append(allErrs, r.validateSpotInstances()...)
- allErrs = append(allErrs, r.validateRefreshPreferences()...)
- allErrs = append(allErrs, r.validateLifecycleHooks()...)
-
- if len(allErrs) == 0 {
- return nil, nil
- }
-
- return nil, apierrors.NewInvalid(
- r.GroupVersionKind().GroupKind(),
- r.Name,
- allErrs,
- )
-}
-
-// ValidateDelete allows you to add any extra validation when deleting.
-func (*AWSMachinePoolWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// Default will set default values for the AWSMachinePool.
-func (*AWSMachinePoolWebhook) Default(ctx context.Context, obj runtime.Object) error {
- r, ok := obj.(*AWSMachinePool)
- if !ok {
- return fmt.Errorf("expected an AWSMachinePool object but got %T", r)
- }
-
- if int(r.Spec.DefaultCoolDown.Duration.Seconds()) == 0 {
- log.Info("DefaultCoolDown is zero, setting 300 seconds as default")
- r.Spec.DefaultCoolDown.Duration = 300 * time.Second
- }
-
- if int(r.Spec.DefaultInstanceWarmup.Duration.Seconds()) == 0 {
- log.Info("DefaultInstanceWarmup is zero, setting 300 seconds as default")
- r.Spec.DefaultInstanceWarmup.Duration = 300 * time.Second
- }
-
- if r.ignitionEnabled() && r.Spec.Ignition.StorageType == "" {
- r.Spec.Ignition.StorageType = infrav1.DefaultMachinePoolIgnitionStorageType
- }
- // Defaults the version field if StorageType is not set to `UnencryptedUserData`.
- // When using `UnencryptedUserData` the version field is ignored because the userdata defines its version itself.
- if r.ignitionEnabled() && r.Spec.Ignition.Version == "" && r.Spec.Ignition.StorageType != infrav1.IgnitionStorageTypeOptionUnencryptedUserData {
- r.Spec.Ignition.Version = infrav1.DefaultIgnitionVersion
- }
-
- return nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/awsmanagedmachinepool_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/awsmanagedmachinepool_webhook.go
deleted file mode 100644
index 38ceffe3f3b7..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/awsmanagedmachinepool_webhook.go
+++ /dev/null
@@ -1,314 +0,0 @@
-/*
-Copyright 2022 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta2
-
-import (
- "context"
- "fmt"
- "reflect"
-
- "github.com/google/go-cmp/cmp"
- "github.com/pkg/errors"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- "k8s.io/klog/v2"
- "k8s.io/utils/ptr"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-
- "sigs.k8s.io/cluster-api-provider-aws/v2/pkg/eks"
-)
-
-const (
- maxNodegroupNameLength = 64
-)
-
-// log is for logging in this package.
-var mmpLog = ctrl.Log.WithName("awsmanagedmachinepool-resource")
-
-// SetupWebhookWithManager will setup the webhooks for the AWSManagedMachinePool.
-func (r *AWSManagedMachinePool) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(awsManagedMachinePoolWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(r).
- WithValidator(w).
- WithDefaulter(w).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta2-awsmanagedmachinepool,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=awsmanagedmachinepools,versions=v1beta2,name=validation.awsmanagedmachinepool.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta2-awsmanagedmachinepool,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=awsmanagedmachinepools,versions=v1beta2,name=default.awsmanagedmachinepool.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-type awsManagedMachinePoolWebhook struct{}
-
-var _ webhook.CustomDefaulter = &awsManagedMachinePoolWebhook{}
-var _ webhook.CustomValidator = &awsManagedMachinePoolWebhook{}
-
-func (r *AWSManagedMachinePool) validateScaling() field.ErrorList {
- var allErrs field.ErrorList
- if r.Spec.Scaling != nil { //nolint:nestif
- minField := field.NewPath("spec", "scaling", "minSize")
- maxField := field.NewPath("spec", "scaling", "maxSize")
- minSize := r.Spec.Scaling.MinSize
- maxSize := r.Spec.Scaling.MaxSize
- if minSize != nil {
- if *minSize < 0 {
- allErrs = append(allErrs, field.Invalid(minField, *minSize, "must be greater or equal zero"))
- }
- if maxSize != nil && *maxSize < *minSize {
- allErrs = append(allErrs, field.Invalid(maxField, *maxSize, fmt.Sprintf("must be greater than field %s", minField.String())))
- }
- }
- if maxSize != nil && *maxSize < 0 {
- allErrs = append(allErrs, field.Invalid(maxField, *maxSize, "must be greater than zero"))
- }
- }
- if len(allErrs) == 0 {
- return nil
- }
- return allErrs
-}
-
-func (r *AWSManagedMachinePool) validateNodegroupUpdateConfig() field.ErrorList {
- var allErrs field.ErrorList
-
- if r.Spec.UpdateConfig != nil {
- nodegroupUpdateConfigField := field.NewPath("spec", "updateConfig")
-
- if r.Spec.UpdateConfig.MaxUnavailable == nil && r.Spec.UpdateConfig.MaxUnavailablePercentage == nil {
- allErrs = append(allErrs, field.Invalid(nodegroupUpdateConfigField, r.Spec.UpdateConfig, "must specify one of maxUnavailable or maxUnavailablePercentage when using nodegroup updateconfig"))
- }
-
- if r.Spec.UpdateConfig.MaxUnavailable != nil && r.Spec.UpdateConfig.MaxUnavailablePercentage != nil {
- allErrs = append(allErrs, field.Invalid(nodegroupUpdateConfigField, r.Spec.UpdateConfig, "cannot specify both maxUnavailable and maxUnavailablePercentage"))
- }
- }
-
- if len(allErrs) == 0 {
- return nil
- }
- return allErrs
-}
-
-func (r *AWSManagedMachinePool) validateRemoteAccess() field.ErrorList {
- var allErrs field.ErrorList
- if r.Spec.RemoteAccess == nil {
- return allErrs
- }
- remoteAccessPath := field.NewPath("spec", "remoteAccess")
- sourceSecurityGroups := r.Spec.RemoteAccess.SourceSecurityGroups
-
- if public := r.Spec.RemoteAccess.Public; public && len(sourceSecurityGroups) > 0 {
- allErrs = append(
- allErrs,
- field.Invalid(remoteAccessPath.Child("sourceSecurityGroups"), sourceSecurityGroups, "must be empty if public is set"),
- )
- }
-
- return allErrs
-}
-
-func (r *AWSManagedMachinePool) validateLaunchTemplate() field.ErrorList {
- var allErrs field.ErrorList
- if r.Spec.AWSLaunchTemplate == nil {
- return allErrs
- }
-
- if r.Spec.InstanceType != nil {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "InstanceType"), r.Spec.InstanceType, "InstanceType cannot be specified when LaunchTemplate is specified"))
- }
- if r.Spec.DiskSize != nil {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "DiskSize"), r.Spec.DiskSize, "DiskSize cannot be specified when LaunchTemplate is specified"))
- }
-
- if r.Spec.AWSLaunchTemplate.IamInstanceProfile != "" {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "AWSLaunchTemplate", "IamInstanceProfile"), r.Spec.AWSLaunchTemplate.IamInstanceProfile, "IAM instance profile in launch template is prohibited in EKS managed node group"))
- }
-
- return allErrs
-}
-
-func (r *AWSManagedMachinePool) validateLifecycleHooks() field.ErrorList {
- return validateLifecycleHooks(r.Spec.AWSLifecycleHooks)
-}
-
-// ValidateCreate will do any extra validation when creating a AWSManagedMachinePool.
-func (*awsManagedMachinePoolWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- r, ok := obj.(*AWSManagedMachinePool)
- if !ok {
- return nil, fmt.Errorf("expected an AWSManagedMachinePool object but got %T", r)
- }
-
- mmpLog.Info("AWSManagedMachinePool validate create", "managed-machine-pool", klog.KObj(r))
-
- var allErrs field.ErrorList
-
- if r.Spec.EKSNodegroupName == "" {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.eksNodegroupName"), "eksNodegroupName is required"))
- }
- if errs := r.validateScaling(); errs != nil || len(errs) == 0 {
- allErrs = append(allErrs, errs...)
- }
- if errs := r.validateRemoteAccess(); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
- if errs := r.validateNodegroupUpdateConfig(); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
- if errs := r.validateLaunchTemplate(); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
- if errs := r.validateLifecycleHooks(); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- allErrs = append(allErrs, r.Spec.AdditionalTags.Validate()...)
-
- if len(allErrs) == 0 {
- return nil, nil
- }
-
- return nil, apierrors.NewInvalid(
- r.GroupVersionKind().GroupKind(),
- r.Name,
- allErrs,
- )
-}
-
-// ValidateUpdate will do any extra validation when updating a AWSManagedMachinePool.
-func (*awsManagedMachinePoolWebhook) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
- r, ok := newObj.(*AWSManagedMachinePool)
- if !ok {
- return nil, fmt.Errorf("expected an AWSManagedMachinePool object but got %T", r)
- }
-
- mmpLog.Info("AWSManagedMachinePool validate update", "managed-machine-pool", klog.KObj(r))
- oldPool, ok := oldObj.(*AWSManagedMachinePool)
- if !ok {
- return nil, apierrors.NewInvalid(GroupVersion.WithKind("AWSManagedMachinePool").GroupKind(), r.Name, field.ErrorList{
- field.InternalError(nil, errors.New("failed to convert old AWSManagedMachinePool to object")),
- })
- }
-
- var allErrs field.ErrorList
- allErrs = append(allErrs, r.validateImmutable(oldPool)...)
- allErrs = append(allErrs, r.Spec.AdditionalTags.Validate()...)
-
- if errs := r.validateScaling(); errs != nil || len(errs) == 0 {
- allErrs = append(allErrs, errs...)
- }
- if errs := r.validateNodegroupUpdateConfig(); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
- if errs := r.validateLaunchTemplate(); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
- if errs := r.validateLifecycleHooks(); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if len(allErrs) == 0 {
- return nil, nil
- }
-
- return nil, apierrors.NewInvalid(
- r.GroupVersionKind().GroupKind(),
- r.Name,
- allErrs,
- )
-}
-
-// ValidateDelete allows you to add any extra validation when deleting.
-func (*awsManagedMachinePoolWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-func (r *AWSManagedMachinePool) validateImmutable(old *AWSManagedMachinePool) field.ErrorList {
- var allErrs field.ErrorList
-
- appendErrorIfMutated := func(old, update interface{}, name string) {
- if !cmp.Equal(old, update) {
- allErrs = append(
- allErrs,
- field.Invalid(field.NewPath("spec", name), update, "field is immutable"),
- )
- }
- }
- appendErrorIfSetAndMutated := func(old, update interface{}, name string) {
- if !reflect.ValueOf(old).IsZero() && !cmp.Equal(old, update) {
- allErrs = append(
- allErrs,
- field.Invalid(field.NewPath("spec", name), update, "field is immutable"),
- )
- }
- }
-
- if old.Spec.EKSNodegroupName != "" {
- appendErrorIfMutated(old.Spec.EKSNodegroupName, r.Spec.EKSNodegroupName, "eksNodegroupName")
- }
- appendErrorIfMutated(old.Spec.SubnetIDs, r.Spec.SubnetIDs, "subnetIDs")
- appendErrorIfSetAndMutated(old.Spec.RoleName, r.Spec.RoleName, "roleName")
- appendErrorIfMutated(old.Spec.DiskSize, r.Spec.DiskSize, "diskSize")
- appendErrorIfMutated(old.Spec.AMIType, r.Spec.AMIType, "amiType")
- appendErrorIfMutated(old.Spec.RemoteAccess, r.Spec.RemoteAccess, "remoteAccess")
- appendErrorIfSetAndMutated(old.Spec.CapacityType, r.Spec.CapacityType, "capacityType")
- appendErrorIfMutated(old.Spec.AvailabilityZones, r.Spec.AvailabilityZones, "availabilityZones")
- appendErrorIfMutated(old.Spec.AvailabilityZoneSubnetType, r.Spec.AvailabilityZoneSubnetType, "availabilityZoneSubnetType")
- if (old.Spec.AWSLaunchTemplate != nil && r.Spec.AWSLaunchTemplate == nil) ||
- (old.Spec.AWSLaunchTemplate == nil && r.Spec.AWSLaunchTemplate != nil) {
- allErrs = append(
- allErrs,
- field.Invalid(field.NewPath("spec", "AWSLaunchTemplate"), old.Spec.AWSLaunchTemplate, "field is immutable"),
- )
- }
- if old.Spec.AWSLaunchTemplate != nil && r.Spec.AWSLaunchTemplate != nil {
- appendErrorIfMutated(old.Spec.AWSLaunchTemplate.Name, r.Spec.AWSLaunchTemplate.Name, "awsLaunchTemplate.name")
- }
-
- return allErrs
-}
-
-// Default will set default values for the AWSManagedMachinePool.
-func (*awsManagedMachinePoolWebhook) Default(_ context.Context, obj runtime.Object) error {
- r, ok := obj.(*AWSManagedMachinePool)
- if !ok {
- return fmt.Errorf("expected an AWSManagedMachinePool object but got %T", r)
- }
-
- mmpLog.Info("AWSManagedMachinePool setting defaults", "managed-machine-pool", klog.KObj(r))
-
- if r.Spec.EKSNodegroupName == "" {
- mmpLog.Info("EKSNodegroupName is empty, generating name")
- name, err := eks.GenerateEKSName(r.Name, r.Namespace, maxNodegroupNameLength)
- if err != nil {
- mmpLog.Error(err, "failed to create EKS nodegroup name")
- return nil
- }
-
- mmpLog.Info("Generated EKSNodegroupName", "nodegroup", klog.KRef(r.Namespace, name))
- r.Spec.EKSNodegroupName = name
- }
-
- if r.Spec.UpdateConfig == nil {
- r.Spec.UpdateConfig = &UpdateConfig{
- MaxUnavailable: ptr.To[int](1),
- }
- }
- return nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/conditions_consts.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/conditions_consts.go
index 7e656f93c5e6..7f36d0343742 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/conditions_consts.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/conditions_consts.go
@@ -38,6 +38,9 @@ const (
LaunchTemplateCreateFailedReason = "LaunchTemplateCreateFailed"
// LaunchTemplateReconcileFailedReason used for failures during Launch Template reconciliation.
LaunchTemplateReconcileFailedReason = "LaunchTemplateReconcileFailed"
+ // LaunchTemplateNitroEnclaveEdgeZoneReason used when enclaveOptions is enabled but the pool
+ // targets a Local Zone or Wavelength Zone, which does not support Nitro Enclaves.
+ LaunchTemplateNitroEnclaveEdgeZoneReason = "NitroEnclaveEdgeZoneUnsupported"
// PreLaunchTemplateUpdateCheckCondition reports if all prerequisite are met for launch template update.
PreLaunchTemplateUpdateCheckCondition clusterv1beta1.ConditionType = "PreLaunchTemplateUpdateCheckSuccess"
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/finalizers.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/finalizers.go
index f0cffa7958f2..99b5ee80a15b 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/finalizers.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/finalizers.go
@@ -31,4 +31,7 @@ const (
// RosaRoleConfigFinalizer allows the controller to clean up resources on delete.
RosaRoleConfigFinalizer = "rosaroleconfigs.infrastructure.cluster.x-k8s.io"
+
+ // ROSAOCMRoleConfigFinalizer allows the controller to clean up resources on delete.
+ ROSAOCMRoleConfigFinalizer = "rosaocmroleconfigs.infrastructure.cluster.x-k8s.io"
)
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosamachinepool_defaults.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosamachinepool_defaults.go
new file mode 100644
index 000000000000..8d1b8cf406fa
--- /dev/null
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosamachinepool_defaults.go
@@ -0,0 +1,40 @@
+/*
+Copyright 2026 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta2
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/utils/ptr"
+)
+
+// Default satisfies the defaulting webhook interface.
+func (r *ROSAMachinePool) Default() {
+ if r.Spec.NodeDrainGracePeriod == nil {
+ r.Spec.NodeDrainGracePeriod = &metav1.Duration{}
+ }
+
+ if r.Spec.UpdateConfig == nil {
+ r.Spec.UpdateConfig = &RosaUpdateConfig{}
+ }
+ if r.Spec.UpdateConfig.RollingUpdate == nil {
+ r.Spec.UpdateConfig.RollingUpdate = &RollingUpdate{
+ MaxUnavailable: ptr.To(intstr.FromInt32(0)),
+ MaxSurge: ptr.To(intstr.FromInt32(1)),
+ }
+ }
+}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosamachinepool_types.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosamachinepool_types.go
index 9c379586c69f..513e37ee5906 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosamachinepool_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosamachinepool_types.go
@@ -72,11 +72,17 @@ type RosaMachinePoolSpec struct {
// +optional
AutoRepair bool `json:"autoRepair,omitempty"`
- // InstanceType specifies the AWS instance type
+ // InstanceType specifies the AWS instance type, for example `r5.xlarge`. Instance type ref; https://aws.amazon.com/ec2/instance-types/
//
// +kubebuilder:validation:Required
InstanceType string `json:"instanceType"`
+ // ImageType is the AMI (Amazon Machine Image) to use for running the associated NodePool (i.e. Windows or Default/Linux).
+ //
+ // +kubebuilder:validation:Enum=Windows;Default
+ // +optional
+ ImageType string `json:"imageType,omitempty"`
+
// Autoscaling specifies auto scaling behaviour for this MachinePool.
// required if Replicas is not configured
// +optional
@@ -97,6 +103,7 @@ type RosaMachinePoolSpec struct {
// VolumeSize set the disk volume size for the machine pool, in Gib. The default is 300 GiB.
// +kubebuilder:validation:Minimum=75
// +kubebuilder:validation:Maximum=16384
+ // +kubebuilder:validation:XValidation:rule="self == oldSelf", message="volumeSize is immutable"
// +immutable
// +optional
VolumeSize int `json:"volumeSize,omitempty"`
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosamachinepool_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosamachinepool_webhook.go
deleted file mode 100644
index e0f1a9b0a818..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosamachinepool_webhook.go
+++ /dev/null
@@ -1,175 +0,0 @@
-package v1beta2
-
-import (
- "context"
- "fmt"
-
- "github.com/blang/semver"
- "github.com/google/go-cmp/cmp"
- "github.com/pkg/errors"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/intstr"
- "k8s.io/apimachinery/pkg/util/validation/field"
- "k8s.io/utils/ptr"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-)
-
-// SetupWebhookWithManager will setup the webhooks for the ROSAMachinePool.
-func (r *ROSAMachinePool) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(rosaMachinePoolWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(r).
- WithValidator(w).
- WithDefaulter(w).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta2-rosamachinepool,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=rosamachinepools,versions=v1beta2,name=validation.rosamachinepool.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta2-rosamachinepool,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=rosamachinepools,versions=v1beta2,name=default.rosamachinepool.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-type rosaMachinePoolWebhook struct{}
-
-var _ webhook.CustomDefaulter = &rosaMachinePoolWebhook{}
-var _ webhook.CustomValidator = &rosaMachinePoolWebhook{}
-
-// ValidateCreate implements admission.Validator.
-func (*rosaMachinePoolWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (warnings admission.Warnings, err error) {
- r, ok := obj.(*ROSAMachinePool)
- if !ok {
- return nil, fmt.Errorf("expected an ROSAMachinePool object but got %T", r)
- }
-
- var allErrs field.ErrorList
-
- if err := r.validateVersion(); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := r.validateNodeDrainGracePeriod(); err != nil {
- allErrs = append(allErrs, err)
- }
-
- allErrs = append(allErrs, r.Spec.AdditionalTags.Validate()...)
-
- if len(allErrs) == 0 {
- return nil, nil
- }
-
- return nil, apierrors.NewInvalid(
- r.GroupVersionKind().GroupKind(),
- r.Name,
- allErrs,
- )
-}
-
-// ValidateUpdate implements admission.Validator.
-func (*rosaMachinePoolWebhook) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (warnings admission.Warnings, err error) {
- r, ok := newObj.(*ROSAMachinePool)
- if !ok {
- return nil, fmt.Errorf("expected an ROSAMachinePool object but got %T", r)
- }
-
- oldPool, ok := oldObj.(*ROSAMachinePool)
- if !ok {
- return nil, apierrors.NewInvalid(GroupVersion.WithKind("ROSAMachinePool").GroupKind(), r.Name, field.ErrorList{
- field.InternalError(nil, errors.New("failed to convert old ROSAMachinePool to object")),
- })
- }
-
- var allErrs field.ErrorList
- if err := r.validateVersion(); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := r.validateNodeDrainGracePeriod(); err != nil {
- allErrs = append(allErrs, err)
- }
-
- allErrs = append(allErrs, validateImmutable(oldPool.Spec.AdditionalSecurityGroups, r.Spec.AdditionalSecurityGroups, "additionalSecurityGroups")...)
- allErrs = append(allErrs, validateImmutable(oldPool.Spec.AdditionalTags, r.Spec.AdditionalTags, "additionalTags")...)
-
- if len(allErrs) == 0 {
- return nil, nil
- }
-
- return nil, apierrors.NewInvalid(
- r.GroupVersionKind().GroupKind(),
- r.Name,
- allErrs,
- )
-}
-
-// ValidateDelete implements admission.Validator.
-func (*rosaMachinePoolWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (warnings admission.Warnings, err error) {
- return nil, nil
-}
-
-func (r *ROSAMachinePool) validateVersion() *field.Error {
- if r.Spec.Version == "" {
- return nil
- }
- _, err := semver.Parse(r.Spec.Version)
- if err != nil {
- return field.Invalid(field.NewPath("spec.version"), r.Spec.Version, "must be a valid semantic version")
- }
-
- return nil
-}
-
-func (r *ROSAMachinePool) validateNodeDrainGracePeriod() *field.Error {
- if r.Spec.NodeDrainGracePeriod == nil {
- return nil
- }
-
- if r.Spec.NodeDrainGracePeriod.Minutes() > 10080 {
- return field.Invalid(field.NewPath("spec.nodeDrainGracePeriod"), r.Spec.NodeDrainGracePeriod,
- "max supported duration is 1 week (10080m|168h)")
- }
-
- return nil
-}
-
-func validateImmutable(old, updated interface{}, name string) field.ErrorList {
- var allErrs field.ErrorList
-
- if !cmp.Equal(old, updated) {
- allErrs = append(
- allErrs,
- field.Invalid(field.NewPath("spec", name), updated, "field is immutable"),
- )
- }
-
- return allErrs
-}
-
-// Default implements admission.Defaulter.
-func (*rosaMachinePoolWebhook) Default(ctx context.Context, obj runtime.Object) error {
- r, ok := obj.(*ROSAMachinePool)
- if !ok {
- return fmt.Errorf("expected an ROSAMachinePool object but got %T", r)
- }
-
- r.Default()
- return nil
-}
-
-// Default satisfies the defaulting webhook interface.
-func (r *ROSAMachinePool) Default() {
- if r.Spec.NodeDrainGracePeriod == nil {
- r.Spec.NodeDrainGracePeriod = &metav1.Duration{}
- }
-
- if r.Spec.UpdateConfig == nil {
- r.Spec.UpdateConfig = &RosaUpdateConfig{}
- }
- if r.Spec.UpdateConfig.RollingUpdate == nil {
- r.Spec.UpdateConfig.RollingUpdate = &RollingUpdate{
- MaxUnavailable: ptr.To(intstr.FromInt32(0)),
- MaxSurge: ptr.To(intstr.FromInt32(1)),
- }
- }
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosanetwork_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosanetwork_webhook.go
deleted file mode 100644
index 0465d892a2fa..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosanetwork_webhook.go
+++ /dev/null
@@ -1,73 +0,0 @@
-package v1beta2
-
-import (
- "context"
- "fmt"
-
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- runtime "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-)
-
-// SetupWebhookWithManager will setup the webhooks for the ROSANetwork.
-func (r *ROSANetwork) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(rosaNetworkWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(r).
- WithValidator(w).
- WithDefaulter(w).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta2-rosanetwork,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=rosanetworks,versions=v1beta2,name=validation.rosanetwork.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta2-rosanetwork,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=rosanetworks,versions=v1beta2,name=default.rosanetwork.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-type rosaNetworkWebhook struct{}
-
-var _ webhook.CustomDefaulter = &rosaNetworkWebhook{}
-var _ webhook.CustomValidator = &rosaNetworkWebhook{}
-
-// ValidateCreate implements admission.Validator.
-func (r *rosaNetworkWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error) {
- rosaNet, ok := obj.(*ROSANetwork)
- if !ok {
- return nil, fmt.Errorf("expected an ROSANetwork object but got %T", rosaNet)
- }
-
- var allErrs field.ErrorList
- if rosaNet.Spec.AvailabilityZoneCount == 0 && len(rosaNet.Spec.AvailabilityZones) == 0 {
- err := field.Invalid(field.NewPath("spec.AvailabilityZones"), rosaNet.Spec.AvailabilityZones, "Either AvailabilityZones OR AvailabilityZoneCount must be set.")
- allErrs = append(allErrs, err)
- }
- if rosaNet.Spec.AvailabilityZoneCount != 0 && len(rosaNet.Spec.AvailabilityZones) > 0 {
- err := field.Invalid(field.NewPath("spec.AvailabilityZones"), rosaNet.Spec.AvailabilityZones, "Either AvailabilityZones OR AvailabilityZoneCount can be set.")
- allErrs = append(allErrs, err)
- }
-
- if len(allErrs) > 0 {
- return nil, apierrors.NewInvalid(
- rosaNet.GroupVersionKind().GroupKind(),
- rosaNet.Name,
- allErrs)
- }
-
- return nil, nil
-}
-
-// ValidateUpdate implements admission.Validator.
-func (r *rosaNetworkWebhook) ValidateUpdate(ctx context.Context, old runtime.Object, updated runtime.Object) (warnings admission.Warnings, err error) {
- return nil, nil
-}
-
-// ValidateDelete implements admission.Validator.
-func (r *rosaNetworkWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error) {
- return nil, nil
-}
-
-// Default implements admission.Defaulter.
-func (r *rosaNetworkWebhook) Default(ctx context.Context, obj runtime.Object) error {
- return nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosaocmroleconfig_types.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosaocmroleconfig_types.go
new file mode 100644
index 000000000000..1bdf26ddc852
--- /dev/null
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosaocmroleconfig_types.go
@@ -0,0 +1,162 @@
+/*
+Copyright 2026 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta2
+
+import (
+ corev1 "k8s.io/api/core/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+ infrav1 "sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2"
+ clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
+)
+
+// ROSAOCMRoleProfile defines the permission level for the OCM role
+type ROSAOCMRoleProfile string
+
+const (
+ // ROSAOCMRoleProfileStandard provides standard OCM permissions
+ ROSAOCMRoleProfileStandard ROSAOCMRoleProfile = "Standard"
+
+ // ROSAOCMRoleProfileAdmin provides admin OCM permissions
+ ROSAOCMRoleProfileAdmin ROSAOCMRoleProfile = "Admin"
+
+ // ROSAOCMRoleProfileNoConsole provides minimal OCM permissions (cannot use console.redhat.com)
+ ROSAOCMRoleProfileNoConsole ROSAOCMRoleProfile = "NoConsole"
+)
+
+// ROSAOCMRoleDeletionPolicy defines what happens to the OCM role when the CR is deleted.
+type ROSAOCMRoleDeletionPolicy string
+
+const (
+ // ROSAOCMRoleDeletionPolicyDelete unlinks and deletes the OCM role when the CR is deleted.
+ ROSAOCMRoleDeletionPolicyDelete ROSAOCMRoleDeletionPolicy = "Delete"
+
+ // ROSAOCMRoleDeletionPolicyRetain keeps the OCM role intact when the CR is deleted.
+ ROSAOCMRoleDeletionPolicyRetain ROSAOCMRoleDeletionPolicy = "Retain"
+)
+
+const (
+ // ROSAOCMRoleConfigReadyCondition condition reports on the successful reconciliation of ROSAOCMRoleConfig.
+ ROSAOCMRoleConfigReadyCondition = "ROSAOCMRoleConfigReady"
+
+ // ROSAOCMRoleConfigDeletionFailedReason used to report failures while deleting ROSAOCMRoleConfig.
+ ROSAOCMRoleConfigDeletionFailedReason = "DeletionFailed"
+
+ // ROSAOCMRoleConfigReconciliationFailedReason used to report reconciliation failures.
+ ROSAOCMRoleConfigReconciliationFailedReason = "ReconciliationFailed"
+
+ // ROSAOCMRoleConfigDeletionStarted used to indicate that the deletion of ROSAOCMRoleConfig has started.
+ ROSAOCMRoleConfigDeletionStarted = "DeletionStarted"
+
+ // ROSAOCMRoleConfigCreatedReason used to indicate that the ROSAOCMRoleConfig has been created.
+ ROSAOCMRoleConfigCreatedReason = "Created"
+
+ // ROSAOCMRoleConfigLinkedReason used to indicate that the OCM role has been linked to the organization.
+ ROSAOCMRoleConfigLinkedReason = "Linked"
+)
+
+// ROSAOCMRoleConfigSpec defines the desired state of ROSAOCMRoleConfig
+type ROSAOCMRoleConfigSpec struct {
+ // RolePrefix is the user-defined prefix for the OCM role name.
+ // The final role name will be: {RolePrefix}-OCM-Role-{ExternalID}
+ // where ExternalID is the organization's external identifier from OCM.
+ // +kubebuilder:validation:Required
+ // +kubebuilder:validation:MaxLength:=12
+ // +kubebuilder:validation:Pattern:=`^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$`
+ // +kubebuilder:validation:XValidation:rule="self == oldSelf", message="rolePrefix is immutable"
+ RolePrefix string `json:"rolePrefix"`
+
+ // Profile defines the permission level for the OCM role.
+ // +kubebuilder:validation:Enum=Standard;Admin;NoConsole
+ // +kubebuilder:default=Standard
+ // +kubebuilder:validation:XValidation:rule="self == oldSelf", message="profile is immutable"
+ Profile ROSAOCMRoleProfile `json:"profile"`
+
+ // PermissionsBoundaryARN is the ARN of the policy that is used to set the permissions boundary for the OCM role.
+ // +optional
+ PermissionsBoundaryARN string `json:"permissionsBoundaryARN,omitempty"`
+
+ // Path is the IAM path for the OCM role.
+ // +optional
+ // +kubebuilder:validation:Pattern=`^\/.*\/$`
+ Path string `json:"path,omitempty"`
+
+ // IdentityRef is a reference to an identity to be used when reconciling the OCM Role Config.
+ // If no identity is specified, the default identity for this controller will be used.
+ // +optional
+ IdentityRef *infrav1.AWSIdentityReference `json:"identityRef,omitempty"`
+
+ // CredentialsSecretRef references a secret with necessary credentials to connect to the OCM API.
+ // +optional
+ CredentialsSecretRef *corev1.SecretReference `json:"credentialsSecretRef,omitempty"`
+
+ // DeletionPolicy determines what happens to the OCM role when this CR is deleted.
+ // Delete will unlink and delete the OCM role.
+ // Retain will keep the OCM role intact.
+ // This is useful when reprovisioning management clusters to avoid disrupting users in the same organization.
+ // +kubebuilder:validation:Enum=Delete;Retain
+ // +kubebuilder:default=Delete
+ // +optional
+ DeletionPolicy ROSAOCMRoleDeletionPolicy `json:"deletionPolicy,omitempty"`
+}
+
+// ROSAOCMRoleConfigStatus defines the observed state of ROSAOCMRoleConfig
+type ROSAOCMRoleConfigStatus struct {
+ // RoleARN is the ARN of the created OCM role.
+ RoleARN string `json:"roleARN,omitempty"`
+
+ // OrganizationID is the OCM organization ID that this role is linked to.
+ OrganizationID string `json:"organizationID,omitempty"`
+
+ // Conditions specifies the ROSAOCMRoleConfig conditions
+ Conditions clusterv1beta1.Conditions `json:"conditions,omitempty"`
+}
+
+// ROSAOCMRoleConfig is the Schema for the rosaocmroleconfigs API
+// +kubebuilder:object:root=true
+// +kubebuilder:resource:path=rosaocmroleconfigs,scope=Cluster,categories=cluster-api,shortName=rosaocmrole
+// +kubebuilder:storageversion
+// +kubebuilder:subresource:status
+type ROSAOCMRoleConfig struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ Spec ROSAOCMRoleConfigSpec `json:"spec,omitempty"`
+ Status ROSAOCMRoleConfigStatus `json:"status,omitempty"`
+}
+
+// ROSAOCMRoleConfigList contains a list of ROSAOCMRoleConfig
+// +kubebuilder:object:root=true
+type ROSAOCMRoleConfigList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty"`
+ Items []ROSAOCMRoleConfig `json:"items"`
+}
+
+// SetConditions sets the conditions of the ROSAOCMRoleConfig.
+func (r *ROSAOCMRoleConfig) SetConditions(conditions clusterv1beta1.Conditions) {
+ r.Status.Conditions = conditions
+}
+
+// GetConditions returns the observations of the operational state of the ROSAOCMRoleConfig resource.
+func (r *ROSAOCMRoleConfig) GetConditions() clusterv1beta1.Conditions {
+ return r.Status.Conditions
+}
+
+func init() {
+ SchemeBuilder.Register(&ROSAOCMRoleConfig{}, &ROSAOCMRoleConfigList{})
+}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosaroleconfig_types.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosaroleconfig_types.go
index 41e0c21addb3..37349a1f893d 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosaroleconfig_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosaroleconfig_types.go
@@ -141,6 +141,20 @@ type AccountRoleConfig struct {
// SharedVPCConfig is used to set up shared VPC.
// +optional
SharedVPCConfig SharedVPCConfig `json:"sharedVPCConfig,omitempty"`
+
+ // TrustPolicyExternalID is an optional STS external ID that OCM will use when assuming
+ // the installer and support account roles. When set, the controller embeds an
+ // sts:ExternalId condition in the installer and support roles' trust policies, and
+ // passes the value to OCM for cluster creation.
+ // Worker roles are not affected.
+ // Must be 2–1224 characters matching [a-zA-Z0-9=,.@:/-]+ per AWS STS requirements.
+ //
+ // +kubebuilder:validation:MinLength=2
+ // +kubebuilder:validation:MaxLength=1224
+ // +kubebuilder:validation:Pattern=`^[a-zA-Z0-9=,.@:\/-]+$`
+ // +kubebuilder:validation:XValidation:rule="self == oldSelf", message="trustPolicyExternalID is immutable"
+ // +optional
+ TrustPolicyExternalID string `json:"trustPolicyExternalID,omitempty"`
}
// OperatorRoleConfig defines cluster-specific operator IAM roles based on your cluster configuration.
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosaroleconfig_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosaroleconfig_webhook.go
deleted file mode 100644
index 5e9d36a30b98..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/rosaroleconfig_webhook.go
+++ /dev/null
@@ -1,79 +0,0 @@
-package v1beta2
-
-import (
- "context"
- "fmt"
-
- "github.com/blang/semver"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- runtime "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-)
-
-// SetupWebhookWithManager will setup the webhooks for the ROSARoleConfig.
-func (r *ROSARoleConfig) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(rosaRoleConfigWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(r).
- WithValidator(w).
- WithDefaulter(w).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta2-rosaroleconfig,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=rosaroleconfigs,versions=v1beta2,name=validation.rosaroleconfig.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta2-rosaroleconfig,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=rosaroleconfigs,versions=v1beta2,name=default.rosaroleconfig.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-type rosaRoleConfigWebhook struct{}
-
-var _ webhook.CustomDefaulter = &rosaRoleConfigWebhook{}
-var _ webhook.CustomValidator = &rosaRoleConfigWebhook{}
-
-// ValidateCreate implements admission.Validator.
-func (r *rosaRoleConfigWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error) {
- roleConfig, ok := obj.(*ROSARoleConfig)
- if !ok {
- return nil, fmt.Errorf("expected an ROSARoleConfig object but got %T", roleConfig)
- }
-
- var allErrs field.ErrorList
- if roleConfig.Spec.OidcProviderType == Managed && roleConfig.Spec.OperatorRoleConfig.OIDCID != "" {
- err := field.Invalid(field.NewPath("spec.operatorRoleConfig.oidcId"), roleConfig.Spec.OperatorRoleConfig.OIDCID, "cannot be set with Managed oidc provider type")
- allErrs = append(allErrs, err)
- } else if roleConfig.Spec.OidcProviderType == Unmanaged && roleConfig.Spec.OperatorRoleConfig.OIDCID == "" {
- err := field.Invalid(field.NewPath("spec.operatorRoleConfig.oidcId"), roleConfig.Spec.OperatorRoleConfig.OIDCID, "must set operatorRoleConfig.oidcId with UnManaged oidc provider type")
- allErrs = append(allErrs, err)
- }
-
- _, vErr := semver.Parse(roleConfig.Spec.AccountRoleConfig.Version)
- if vErr != nil {
- err := field.Invalid(field.NewPath("spec.accountRoleConfig.version"), roleConfig.Spec.AccountRoleConfig.Version, "must be a valid semantic version")
- allErrs = append(allErrs, err)
- }
-
- if len(allErrs) > 0 {
- return nil, apierrors.NewInvalid(
- roleConfig.GroupVersionKind().GroupKind(),
- roleConfig.Name,
- allErrs)
- }
-
- return nil, nil
-}
-
-// ValidateUpdate implements admission.Validator.
-func (r *rosaRoleConfigWebhook) ValidateUpdate(ctx context.Context, old runtime.Object, updated runtime.Object) (warnings admission.Warnings, err error) {
- return nil, nil
-}
-
-// ValidateDelete implements admission.Validator.
-func (r *rosaRoleConfigWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error) {
- return nil, nil
-}
-
-// Default implements admission.Defaulter.
-func (r *rosaRoleConfigWebhook) Default(ctx context.Context, obj runtime.Object) error {
- return nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/types.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/types.go
index b4eca931a80a..0bc21ea33da6 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/types.go
@@ -130,6 +130,10 @@ type AWSLaunchTemplate struct {
// +optional
InstanceMetadataOptions *infrav1.InstanceMetadataOptions `json:"instanceMetadataOptions,omitempty"`
+ // EnclaveOptions defines the options for Nitro Enclave support on the instance.
+ // +optional
+ EnclaveOptions *infrav1.EnclaveOptions `json:"enclaveOptions,omitempty"`
+
// PrivateDNSName is the options for the instance hostname.
// +optional
PrivateDNSName *infrav1.PrivateDNSName `json:"privateDnsName,omitempty"`
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/validation.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/validation.go
deleted file mode 100644
index e369d6f3958b..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/validation.go
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-Copyright 2024 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta2
-
-import (
- "fmt"
-
- "k8s.io/apimachinery/pkg/util/validation/field"
-)
-
-func validateLifecycleHooks(hooks []AWSLifecycleHook) field.ErrorList {
- var allErrs field.ErrorList
-
- for _, hook := range hooks {
- if hook.Name == "" {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.lifecycleHooks.name"), "Name is required"))
- }
- if hook.NotificationTargetARN != nil && hook.RoleARN == nil {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.lifecycleHooks.roleARN"), "RoleARN is required if NotificationTargetARN is provided"))
- }
- if hook.RoleARN != nil && hook.NotificationTargetARN == nil {
- allErrs = append(allErrs, field.Required(field.NewPath("spec.lifecycleHooks.notificationTargetARN"), "NotificationTargetARN is required if RoleARN is provided"))
- }
- if hook.LifecycleTransition != LifecycleHookTransitionInstanceLaunching && hook.LifecycleTransition != LifecycleHookTransitionInstanceTerminating {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec.lifecycleHooks.lifecycleTransition"), hook.LifecycleTransition, fmt.Sprintf("LifecycleTransition must be either %q or %q", LifecycleHookTransitionInstanceLaunching, LifecycleHookTransitionInstanceTerminating)))
- }
- if hook.DefaultResult != nil && (*hook.DefaultResult != LifecycleHookDefaultResultContinue && *hook.DefaultResult != LifecycleHookDefaultResultAbandon) {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec.lifecycleHooks.defaultResult"), *hook.DefaultResult, fmt.Sprintf("DefaultResult must be either %s or %s", LifecycleHookDefaultResultContinue, LifecycleHookDefaultResultAbandon)))
- }
- if hook.HeartbeatTimeout != nil && (hook.HeartbeatTimeout.Seconds() < float64(30) || hook.HeartbeatTimeout.Seconds() > float64(172800)) {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec.lifecycleHooks.heartbeatTimeout"), *hook.HeartbeatTimeout, "HeartbeatTimeout must be between 30 and 172800 seconds"))
- }
- }
-
- return allErrs
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/zz_generated.deepcopy.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/zz_generated.deepcopy.go
index 592ec7d7fa8f..be662917bf31 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/zz_generated.deepcopy.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/zz_generated.deepcopy.go
@@ -23,7 +23,7 @@ package v1beta2
import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
+ runtime "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/intstr"
apiv1beta2 "sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2"
rosaapiv1beta2 "sigs.k8s.io/cluster-api-provider-aws/v2/controlplane/rosa/api/v1beta2"
@@ -132,6 +132,11 @@ func (in *AWSLaunchTemplate) DeepCopyInto(out *AWSLaunchTemplate) {
*out = new(apiv1beta2.InstanceMetadataOptions)
**out = **in
}
+ if in.EnclaveOptions != nil {
+ in, out := &in.EnclaveOptions, &out.EnclaveOptions
+ *out = new(apiv1beta2.EnclaveOptions)
+ (*in).DeepCopyInto(*out)
+ }
if in.PrivateDNSName != nil {
in, out := &in.PrivateDNSName, &out.PrivateDNSName
*out = new(apiv1beta2.PrivateDNSName)
@@ -396,21 +401,6 @@ func (in *AWSMachinePoolStatus) DeepCopy() *AWSMachinePoolStatus {
return out
}
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *AWSMachinePoolWebhook) DeepCopyInto(out *AWSMachinePoolWebhook) {
- *out = *in
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSMachinePoolWebhook.
-func (in *AWSMachinePoolWebhook) DeepCopy() *AWSMachinePoolWebhook {
- if in == nil {
- return nil
- }
- out := new(AWSMachinePoolWebhook)
- in.DeepCopyInto(out)
- return out
-}
-
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AWSManagedMachinePool) DeepCopyInto(out *AWSManagedMachinePool) {
*out = *in
@@ -1356,6 +1346,112 @@ func (in *ROSANetworkSubnet) DeepCopy() *ROSANetworkSubnet {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ROSAOCMRoleConfig) DeepCopyInto(out *ROSAOCMRoleConfig) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.Status.DeepCopyInto(&out.Status)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ROSAOCMRoleConfig.
+func (in *ROSAOCMRoleConfig) DeepCopy() *ROSAOCMRoleConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(ROSAOCMRoleConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ROSAOCMRoleConfig) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ROSAOCMRoleConfigList) DeepCopyInto(out *ROSAOCMRoleConfigList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ROSAOCMRoleConfig, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ROSAOCMRoleConfigList.
+func (in *ROSAOCMRoleConfigList) DeepCopy() *ROSAOCMRoleConfigList {
+ if in == nil {
+ return nil
+ }
+ out := new(ROSAOCMRoleConfigList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ROSAOCMRoleConfigList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ROSAOCMRoleConfigSpec) DeepCopyInto(out *ROSAOCMRoleConfigSpec) {
+ *out = *in
+ if in.IdentityRef != nil {
+ in, out := &in.IdentityRef, &out.IdentityRef
+ *out = new(apiv1beta2.AWSIdentityReference)
+ **out = **in
+ }
+ if in.CredentialsSecretRef != nil {
+ in, out := &in.CredentialsSecretRef, &out.CredentialsSecretRef
+ *out = new(corev1.SecretReference)
+ **out = **in
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ROSAOCMRoleConfigSpec.
+func (in *ROSAOCMRoleConfigSpec) DeepCopy() *ROSAOCMRoleConfigSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(ROSAOCMRoleConfigSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ROSAOCMRoleConfigStatus) DeepCopyInto(out *ROSAOCMRoleConfigStatus) {
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make(v1beta1.Conditions, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ROSAOCMRoleConfigStatus.
+func (in *ROSAOCMRoleConfigStatus) DeepCopy() *ROSAOCMRoleConfigStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(ROSAOCMRoleConfigStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ROSARoleConfig) DeepCopyInto(out *ROSARoleConfig) {
*out = *in
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/eks/eks.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/eks/eks.go
deleted file mode 100644
index fd20a913e9bd..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/eks/eks.go
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-Copyright 2020 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Package eks contains the EKS API implementation.
-package eks
-
-import (
- "context"
- "fmt"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go-v2/service/eks"
- "github.com/pkg/errors"
-
- "sigs.k8s.io/cluster-api-provider-aws/v2/pkg/hash"
-)
-
-const (
- resourcePrefix = "capa_"
-)
-
-// Client implements EKSAPI as it can not be imported from pkg/cloud/services/eks/service.go due to import cycle.
-type Client interface {
- AssociateIdentityProviderConfig(ctx context.Context, params *eks.AssociateIdentityProviderConfigInput, optFns ...func(*eks.Options)) (*eks.AssociateIdentityProviderConfigOutput, error)
- DisassociateIdentityProviderConfig(ctx context.Context, params *eks.DisassociateIdentityProviderConfigInput, optFns ...func(*eks.Options)) (*eks.DisassociateIdentityProviderConfigOutput, error)
- DescribeIdentityProviderConfig(ctx context.Context, params *eks.DescribeIdentityProviderConfigInput, optFns ...func(*eks.Options)) (*eks.DescribeIdentityProviderConfigOutput, error)
- TagResource(ctx context.Context, params *eks.TagResourceInput, optFns ...func(*eks.Options)) (*eks.TagResourceOutput, error)
- UntagResource(ctx context.Context, params *eks.UntagResourceInput, optFns ...func(*eks.Options)) (*eks.UntagResourceOutput, error)
- CreateAddon(ctx context.Context, params *eks.CreateAddonInput, optFns ...func(*eks.Options)) (*eks.CreateAddonOutput, error)
- DeleteAddon(ctx context.Context, params *eks.DeleteAddonInput, optFns ...func(*eks.Options)) (*eks.DeleteAddonOutput, error)
- UpdateAddon(ctx context.Context, params *eks.UpdateAddonInput, optFns ...func(*eks.Options)) (*eks.UpdateAddonOutput, error)
- DescribeAddon(ctx context.Context, params *eks.DescribeAddonInput, optFns ...func(*eks.Options)) (*eks.DescribeAddonOutput, error)
- WaitUntilAddonDeleted(ctx context.Context, params *eks.DescribeAddonInput, maxWait time.Duration) error
-}
-
-// GenerateEKSName generates a name of an EKS resources.
-func GenerateEKSName(resourceName, namespace string, maxLength int) (string, error) {
- escapedName := strings.ReplaceAll(resourceName, ".", "_")
- eksName := fmt.Sprintf("%s_%s", namespace, escapedName)
-
- if len(eksName) < maxLength {
- return eksName, nil
- }
-
- hashLength := 32 - len(resourcePrefix)
- hashedName, err := hash.Base36TruncatedHash(eksName, hashLength)
- if err != nil {
- return "", errors.Wrap(err, "creating hash from name")
- }
-
- return fmt.Sprintf("%s%s", resourcePrefix, hashedName), nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/hash/base36.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/hash/base36.go
deleted file mode 100644
index f03f515001ae..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/hash/base36.go
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-Copyright 2019 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Package hash provides a consistent hash function using blake2b.
-package hash
-
-import (
- "github.com/pkg/errors"
- "golang.org/x/crypto/blake2b"
- _ "k8s.io/apimachinery/pkg/util/intstr" // keep the blank import to include intstr.
-)
-
-const base36set = "0123456789abcdefghijklmnopqrstuvwxyz"
-
-// Base36TruncatedHash returns a consistent hash using blake2b
-// and truncating the byte values to alphanumeric only
-// of a fixed length specified by the consumer.
-func Base36TruncatedHash(str string, length int) (string, error) {
- hasher, err := blake2b.New(length, nil)
- if err != nil {
- return "", errors.Wrap(err, "unable to create hash function")
- }
-
- if _, err := hasher.Write([]byte(str)); err != nil {
- return "", errors.Wrap(err, "unable to write hash")
- }
- return base36Truncate(hasher.Sum(nil)), nil
-}
-
-// base36Truncate returns a string that is base36 compliant
-// It is not an encoding since it returns a same-length string
-// for any byte value.
-func base36Truncate(bytes []byte) string {
- var chars string
- for _, bite := range bytes {
- idx := int(bite) % 36
- chars += string(base36set[idx])
- }
-
- return chars
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedcluster_types.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedcluster_types.go
index b42d22da923b..50587d67f27c 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedcluster_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedcluster_types.go
@@ -99,5 +99,5 @@ type AzureASOManagedClusterList struct {
}
func init() {
- SchemeBuilder.Register(&AzureASOManagedCluster{}, &AzureASOManagedClusterList{})
+ objectTypes = append(objectTypes, &AzureASOManagedCluster{}, &AzureASOManagedClusterList{})
}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedcluster_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedcluster_webhook.go
deleted file mode 100644
index b51413608a1f..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedcluster_webhook.go
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-Copyright 2025 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "context"
- "fmt"
-
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-
- "sigs.k8s.io/cluster-api-provider-azure/feature"
-)
-
-// SetupAzureASOManagedClusterWebhookWithManager sets up and registers the webhook with the manager.
-func SetupAzureASOManagedClusterWebhookWithManager(mgr ctrl.Manager) error {
- azureASOManagedClusterWebhook := &azureASOManagedClusterWebhook{}
- return ctrl.NewWebhookManagedBy(mgr).
- For(&AzureASOManagedCluster{}).
- WithValidator(azureASOManagedClusterWebhook).
- Complete()
-}
-
-// azureASOManagedClusterWebhook implements a validating and defaulting webhook for AzureASOManagedCluster.
-type azureASOManagedClusterWebhook struct {
-}
-
-// +kubebuilder:webhook:verbs=create,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-azureasomanagedcluster,mutating=false,failurePolicy=fail,groups=infrastructure.cluster.x-k8s.io,resources=azureasomanagedclusters,versions=v1beta1,name=validation.azureasomanagedcluster.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
-func (ampw *azureASOManagedClusterWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- _, ok := obj.(*AzureASOManagedCluster)
- if !ok {
- return nil, apierrors.NewBadRequest("expected an AzureASOManagedCluster")
- }
- if !feature.Gates.Enabled(feature.ASOAPI) {
- return nil, field.Forbidden(
- field.NewPath("spec"),
- fmt.Sprintf("can be set only if the %s feature flag is enabled", feature.ASOAPI),
- )
- }
- return nil, nil
-}
-
-// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
-func (ampw *azureASOManagedClusterWebhook) ValidateUpdate(_ context.Context, _, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
-func (ampw *azureASOManagedClusterWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedclustertemplate_types.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedclustertemplate_types.go
index cc47db0261de..3d06d783202c 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedclustertemplate_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedclustertemplate_types.go
@@ -59,5 +59,5 @@ type AzureASOManagedClusterTemplateList struct {
}
func init() {
- SchemeBuilder.Register(&AzureASOManagedClusterTemplate{}, &AzureASOManagedClusterTemplateList{})
+ objectTypes = append(objectTypes, &AzureASOManagedClusterTemplate{}, &AzureASOManagedClusterTemplateList{})
}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedcontrolplane_types.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedcontrolplane_types.go
index 4a0cb985b208..5a318209a3e5 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedcontrolplane_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedcontrolplane_types.go
@@ -87,5 +87,5 @@ type AzureASOManagedControlPlaneList struct {
}
func init() {
- SchemeBuilder.Register(&AzureASOManagedControlPlane{}, &AzureASOManagedControlPlaneList{})
+ objectTypes = append(objectTypes, &AzureASOManagedControlPlane{}, &AzureASOManagedControlPlaneList{})
}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedcontrolplane_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedcontrolplane_webhook.go
deleted file mode 100644
index 261e0c2e8b8a..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedcontrolplane_webhook.go
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-Copyright 2025 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "context"
- "fmt"
-
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-
- "sigs.k8s.io/cluster-api-provider-azure/feature"
-)
-
-// SetupAzureASOManagedControlPlaneWebhookWithManager sets up and registers the webhook with the manager.
-func SetupAzureASOManagedControlPlaneWebhookWithManager(mgr ctrl.Manager) error {
- azureASOManagedControlPlaneWebhook := &azureASOManagedControlPlaneWebhook{}
- return ctrl.NewWebhookManagedBy(mgr).
- For(&AzureASOManagedControlPlane{}).
- WithValidator(azureASOManagedControlPlaneWebhook).
- Complete()
-}
-
-// azureASOManagedControlPlaneWebhook implements a validating webhook for AzureASOManagedControlPlane.
-type azureASOManagedControlPlaneWebhook struct {
-}
-
-// +kubebuilder:webhook:verbs=create,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-azureasomanagedcontrolplane,mutating=false,failurePolicy=fail,groups=infrastructure.cluster.x-k8s.io,resources=azureasomanagedcontrolplanes,versions=v1beta1,name=validation.azureasomanagedcontrolplane.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
-func (ampw *azureASOManagedControlPlaneWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- _, ok := obj.(*AzureASOManagedControlPlane)
- if !ok {
- return nil, apierrors.NewBadRequest("expected an AzureASOManagedControlPlane")
- }
- if !feature.Gates.Enabled(feature.ASOAPI) {
- return nil, field.Forbidden(
- field.NewPath("spec"),
- fmt.Sprintf("can be set only if the %s feature flag is enabled", feature.ASOAPI),
- )
- }
- return nil, nil
-}
-
-// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
-func (ampw *azureASOManagedControlPlaneWebhook) ValidateUpdate(_ context.Context, _, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
-func (ampw *azureASOManagedControlPlaneWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedcontrolplanetemplate_types.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedcontrolplanetemplate_types.go
index 6fce8124e5cb..d9cc8d0b8052 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedcontrolplanetemplate_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedcontrolplanetemplate_types.go
@@ -64,5 +64,5 @@ type AzureASOManagedControlPlaneTemplateList struct {
}
func init() {
- SchemeBuilder.Register(&AzureASOManagedControlPlaneTemplate{}, &AzureASOManagedControlPlaneTemplateList{})
+ objectTypes = append(objectTypes, &AzureASOManagedControlPlaneTemplate{}, &AzureASOManagedControlPlaneTemplateList{})
}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedmachinepool_types.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedmachinepool_types.go
index 160933a1280f..4b7a000d8d79 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedmachinepool_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedmachinepool_types.go
@@ -82,5 +82,5 @@ type AzureASOManagedMachinePoolList struct {
}
func init() {
- SchemeBuilder.Register(&AzureASOManagedMachinePool{}, &AzureASOManagedMachinePoolList{})
+ objectTypes = append(objectTypes, &AzureASOManagedMachinePool{}, &AzureASOManagedMachinePoolList{})
}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedmachinepool_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedmachinepool_webhook.go
deleted file mode 100644
index 821f4fc55336..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedmachinepool_webhook.go
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-Copyright 2025 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "context"
- "fmt"
-
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-
- "sigs.k8s.io/cluster-api-provider-azure/feature"
-)
-
-// SetupAzureASOManagedMachinePoolWebhookWithManager sets up and registers the webhook with the manager.
-func SetupAzureASOManagedMachinePoolWebhookWithManager(mgr ctrl.Manager) error {
- azureASOManagedMachinePoolWebhook := &azureASOManagedMachinePoolWebhook{}
- return ctrl.NewWebhookManagedBy(mgr).
- For(&AzureASOManagedMachinePool{}).
- WithValidator(azureASOManagedMachinePoolWebhook).
- Complete()
-}
-
-// azureASOManagedMachinePoolWebhook implements a validating and defaulting webhook for AzureASOManagedMachinePool.
-type azureASOManagedMachinePoolWebhook struct {
-}
-
-// +kubebuilder:webhook:verbs=create,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-azureasomanagedmachinepool,mutating=false,failurePolicy=fail,groups=infrastructure.cluster.x-k8s.io,resources=azureasomanagedmachinepools,versions=v1beta1,name=validation.azureasomanagedmachinepool.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
-func (ampw *azureASOManagedMachinePoolWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- _, ok := obj.(*AzureASOManagedMachinePool)
- if !ok {
- return nil, apierrors.NewBadRequest("expected an AzureASOManagedMachinePool")
- }
- if !feature.Gates.Enabled(feature.ASOAPI) {
- return nil, field.Forbidden(
- field.NewPath("spec"),
- fmt.Sprintf("can be set only if the %s feature flag is enabled", feature.ASOAPI),
- )
- }
- return nil, nil
-}
-
-// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
-func (ampw *azureASOManagedMachinePoolWebhook) ValidateUpdate(_ context.Context, _, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
-func (ampw *azureASOManagedMachinePoolWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedmachinepooltemplate_types.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedmachinepooltemplate_types.go
index a33b0764ddd6..c97181034f12 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedmachinepooltemplate_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedmachinepooltemplate_types.go
@@ -63,5 +63,5 @@ type AzureASOManagedMachinePoolTemplateList struct {
}
func init() {
- SchemeBuilder.Register(&AzureASOManagedMachinePoolTemplate{}, &AzureASOManagedMachinePoolTemplateList{})
+ objectTypes = append(objectTypes, &AzureASOManagedMachinePoolTemplate{}, &AzureASOManagedMachinePoolTemplateList{})
}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azurecluster_default.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azurecluster_default.go
deleted file mode 100644
index 25c072c827c1..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azurecluster_default.go
+++ /dev/null
@@ -1,599 +0,0 @@
-/*
-Copyright 2021 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "fmt"
-
- "k8s.io/utils/ptr"
-
- "sigs.k8s.io/cluster-api-provider-azure/feature"
-)
-
-const (
- // DefaultVnetCIDR is the default Vnet CIDR.
- DefaultVnetCIDR = "10.0.0.0/8"
- // DefaultControlPlaneSubnetCIDR is the default Control Plane Subnet CIDR.
- DefaultControlPlaneSubnetCIDR = "10.0.0.0/16"
- // DefaultNodeSubnetCIDR is the default Node Subnet CIDR.
- DefaultNodeSubnetCIDR = "10.1.0.0/16"
- // DefaultClusterSubnetCIDR is the default Cluster Subnet CIDR.
- DefaultClusterSubnetCIDR = "10.0.0.0/16"
- // DefaultNodeSubnetCIDRPattern is the pattern that will be used to generate the default subnets CIDRs.
- DefaultNodeSubnetCIDRPattern = "10.%d.0.0/16"
- // DefaultAzureBastionSubnetCIDR is the default Subnet CIDR for AzureBastion.
- DefaultAzureBastionSubnetCIDR = "10.255.255.224/27"
- // DefaultAzureBastionSubnetName is the default Subnet Name for AzureBastion.
- DefaultAzureBastionSubnetName = "AzureBastionSubnet"
- // DefaultAzureBastionSubnetRole is the default Subnet role for AzureBastion.
- DefaultAzureBastionSubnetRole = SubnetBastion
- // DefaultInternalLBIPAddress is the default internal load balancer ip address.
- DefaultInternalLBIPAddress = "10.0.0.100"
- // DefaultOutboundRuleIdleTimeoutInMinutes is the default for IdleTimeoutInMinutes for the load balancer.
- DefaultOutboundRuleIdleTimeoutInMinutes = 4
- // DefaultAzureCloud is the public cloud that will be used by most users.
- DefaultAzureCloud = "AzurePublicCloud"
-)
-
-func (c *AzureCluster) setDefaults() {
- c.Spec.AzureClusterClassSpec.setDefaults()
- c.setResourceGroupDefault()
- c.setNetworkSpecDefaults()
-}
-
-func (c *AzureCluster) setNetworkSpecDefaults() {
- c.setVnetDefaults()
- c.setBastionDefaults()
- c.setSubnetDefaults()
- c.setVnetPeeringDefaults()
- if c.Spec.ControlPlaneEnabled {
- c.setAPIServerLBDefaults()
- }
- c.SetNodeOutboundLBDefaults()
- if c.Spec.ControlPlaneEnabled {
- c.SetControlPlaneOutboundLBDefaults()
- }
- if !c.Spec.ControlPlaneEnabled {
- c.Spec.NetworkSpec.APIServerLB = nil
- }
-}
-
-func (c *AzureCluster) setResourceGroupDefault() {
- if c.Spec.ResourceGroup == "" {
- c.Spec.ResourceGroup = c.Name
- }
-}
-
-func (c *AzureCluster) setAzureEnvironmentDefault() {
- if c.Spec.AzureEnvironment == "" {
- c.Spec.AzureEnvironment = DefaultAzureCloud
- }
-}
-
-func (c *AzureCluster) setVnetDefaults() {
- if c.Spec.NetworkSpec.Vnet.ResourceGroup == "" {
- c.Spec.NetworkSpec.Vnet.ResourceGroup = c.Spec.ResourceGroup
- }
- if c.Spec.NetworkSpec.Vnet.Name == "" {
- c.Spec.NetworkSpec.Vnet.Name = generateVnetName(c.ObjectMeta.Name)
- }
- c.Spec.NetworkSpec.Vnet.VnetClassSpec.setDefaults()
-}
-
-// setSubnetDefaults ensures a fully populated, default subnet configuration
-// and in certain scenarios creates new, default subnet configurations.
-func (c *AzureCluster) setSubnetDefaults() {
- clusterSubnet, err := c.Spec.NetworkSpec.GetSubnet(SubnetCluster)
- clusterSubnetExists := err == nil
- // If we already have a cluster subnet defined, ensure it has sensible defaults
- // for all properties.
- if clusterSubnetExists {
- clusterSubnet.setClusterSubnetDefaults(c.ObjectMeta.Name)
- c.Spec.NetworkSpec.UpdateSubnet(clusterSubnet, SubnetCluster)
- }
-
- if c.Spec.ControlPlaneEnabled {
- cpSubnet, errcp := c.Spec.NetworkSpec.GetSubnet(SubnetControlPlane)
- // If we already have a control plane subnet defined, ensure it has sensible defaults
- // for all properties.
- if errcp == nil {
- cpSubnet.setControlPlaneSubnetDefaults(c.ObjectMeta.Name)
- c.Spec.NetworkSpec.UpdateSubnet(cpSubnet, SubnetControlPlane)
- // If we don't have either a control plane subnet or a cluster subnet,
- // create a new control plane subnet from scratch and populate with sensible defaults.
- } else if !clusterSubnetExists {
- cpSubnet = SubnetSpec{SubnetClassSpec: SubnetClassSpec{Role: SubnetControlPlane}}
- cpSubnet.setControlPlaneSubnetDefaults(c.ObjectMeta.Name)
- c.Spec.NetworkSpec.Subnets = append(c.Spec.NetworkSpec.Subnets, cpSubnet)
- }
- }
-
- // anyNodeSubnetFound tracks whether or not we have one or more node subnets defined.
- var anyNodeSubnetFound bool
- // nodeSubnetCounter tracks all node subnets to aid automatic CIDR configuration.
- var nodeSubnetCounter int
- for i, subnet := range c.Spec.NetworkSpec.Subnets {
- // Skip all non-node subnets
- if subnet.Role != SubnetNode {
- continue
- }
- nodeSubnetCounter++
- anyNodeSubnetFound = true
- // Set has sensible defaults for this existing node subnet.
- subnet.setNodeSubnetDefaults(c.ObjectMeta.Name, nodeSubnetCounter)
- // Because there can be multiple node subnets, we have to update any changes
- // after applying defaults to the explicit item at the current index.
- c.Spec.NetworkSpec.Subnets[i] = subnet
- }
-
- // We need at least one subnet for nodes.
- // If no node subnets are defined, and there is no cluster subnet defined,
- // create a default 10.1.0.0/16 node subnet.
- if !anyNodeSubnetFound && !clusterSubnetExists {
- nodeSubnet := SubnetSpec{
- SubnetClassSpec: SubnetClassSpec{
- Role: SubnetNode,
- CIDRBlocks: []string{DefaultNodeSubnetCIDR},
- Name: generateNodeSubnetName(c.ObjectMeta.Name),
- },
- SecurityGroup: SecurityGroup{
- Name: generateNodeSecurityGroupName(c.ObjectMeta.Name),
- },
- RouteTable: RouteTable{
- Name: generateNodeRouteTableName(c.ObjectMeta.Name),
- },
- NatGateway: NatGateway{
- NatGatewayClassSpec: NatGatewayClassSpec{
- Name: generateNatGatewayName(c.ObjectMeta.Name),
- },
- },
- }
- c.Spec.NetworkSpec.Subnets = append(c.Spec.NetworkSpec.Subnets, nodeSubnet)
- }
-}
-
-func (s *SubnetSpec) setNodeSubnetDefaults(clusterName string, index int) {
- if s.Name == "" {
- s.Name = withIndex(generateNodeSubnetName(clusterName), index)
- }
- s.SubnetClassSpec.setDefaults(fmt.Sprintf(DefaultNodeSubnetCIDRPattern, index))
-
- if s.SecurityGroup.Name == "" {
- s.SecurityGroup.Name = generateNodeSecurityGroupName(clusterName)
- }
- s.SecurityGroup.SecurityGroupClass.setDefaults()
-
- if s.RouteTable.Name == "" {
- s.RouteTable.Name = generateNodeRouteTableName(clusterName)
- }
-
- // NAT gateway only supports the use of IPv4 public IP addresses for outbound connectivity.
- // So default use the NAT gateway for outbound traffic in IPv4 cluster instead of loadbalancer.
- // We assume that if the ID is set, the subnet already exists so we shouldn't add a NAT gateway.
- if !s.IsIPv6Enabled() && s.ID == "" {
- if s.NatGateway.Name == "" {
- s.NatGateway.Name = withIndex(generateNatGatewayName(clusterName), index)
- }
- if s.NatGateway.NatGatewayIP.Name == "" {
- s.NatGateway.NatGatewayIP.Name = generateNatGatewayIPName(s.NatGateway.Name)
- }
- }
-}
-
-func (s *SubnetSpec) setControlPlaneSubnetDefaults(clusterName string) {
- if s.Name == "" {
- s.Name = generateControlPlaneSubnetName(clusterName)
- }
-
- s.SubnetClassSpec.setDefaults(DefaultControlPlaneSubnetCIDR)
-
- if s.SecurityGroup.Name == "" {
- s.SecurityGroup.Name = generateControlPlaneSecurityGroupName(clusterName)
- }
- s.SecurityGroup.SecurityGroupClass.setDefaults()
-}
-
-func (s *SubnetSpec) setClusterSubnetDefaults(clusterName string) {
- if s.Name == "" {
- s.Name = generateClusterSubnetSubnetName(clusterName)
- }
- if s.SecurityGroup.Name == "" {
- s.SecurityGroup.Name = generateClusterSecurityGroupName(clusterName)
- }
- if s.RouteTable.Name == "" {
- s.RouteTable.Name = generateClusterRouteTableName(clusterName)
- }
- if s.ID == "" {
- if s.NatGateway.Name == "" {
- s.NatGateway.Name = generateClusterNatGatewayName(clusterName)
- }
- if !s.IsIPv6Enabled() && s.NatGateway.NatGatewayIP.Name == "" {
- s.NatGateway.NatGatewayIP.Name = generateNatGatewayIPName(s.NatGateway.Name)
- }
- }
- s.setDefaults(DefaultClusterSubnetCIDR)
- s.SecurityGroup.SecurityGroupClass.setDefaults()
-}
-
-func (c *AzureCluster) setVnetPeeringDefaults() {
- for i, peering := range c.Spec.NetworkSpec.Vnet.Peerings {
- if peering.ResourceGroup == "" {
- c.Spec.NetworkSpec.Vnet.Peerings[i].ResourceGroup = c.Spec.ResourceGroup
- }
- }
-}
-
-func (c *AzureCluster) setAPIServerLBDefaults() {
- if c.Spec.NetworkSpec.APIServerLB == nil {
- lbSpec := LoadBalancerSpec{
- LoadBalancerClassSpec: LoadBalancerClassSpec{
- Type: "Public",
- },
- }
- c.Spec.NetworkSpec.APIServerLB = &lbSpec
- }
- lb := c.Spec.NetworkSpec.APIServerLB
-
- lb.LoadBalancerClassSpec.setAPIServerLBDefaults()
-
- if lb.Type == Public {
- if lb.Name == "" {
- lb.Name = generatePublicLBName(c.ObjectMeta.Name)
- }
- if len(lb.FrontendIPs) == 0 {
- lb.FrontendIPs = []FrontendIP{
- {
- Name: generateFrontendIPConfigName(lb.Name),
- PublicIP: &PublicIPSpec{
- Name: generatePublicIPName(c.ObjectMeta.Name),
- },
- },
- }
- }
- // If the API Server ILB feature is enabled, create a default internal LB IP or use the specified one
- if feature.Gates.Enabled(feature.APIServerILB) {
- privateIPFound := false
- for i := range lb.FrontendIPs {
- if lb.FrontendIPs[i].FrontendIPClass.PrivateIPAddress != "" {
- if lb.FrontendIPs[i].Name == "" {
- lb.FrontendIPs[i].Name = generatePrivateIPConfigName(lb.Name)
- }
- privateIPFound = true
- break
- }
- }
- // if no private IP is found, we should create a default internal LB IP
- if !privateIPFound {
- privateIP := FrontendIP{
- Name: generatePrivateIPConfigName(lb.Name),
- FrontendIPClass: FrontendIPClass{
- PrivateIPAddress: DefaultInternalLBIPAddress,
- },
- }
- lb.FrontendIPs = append(lb.FrontendIPs, privateIP)
- }
- }
- } else if lb.Type == Internal {
- if lb.Name == "" {
- lb.Name = generateInternalLBName(c.ObjectMeta.Name)
- }
- if len(lb.FrontendIPs) == 0 {
- lb.FrontendIPs = []FrontendIP{
- {
- Name: generateFrontendIPConfigName(lb.Name),
- FrontendIPClass: FrontendIPClass{
- PrivateIPAddress: DefaultInternalLBIPAddress,
- },
- },
- }
- }
- }
- c.SetAPIServerLBBackendPoolNameDefault()
-}
-
-// SetNodeOutboundLBDefaults sets the default values for the NodeOutboundLB.
-func (c *AzureCluster) SetNodeOutboundLBDefaults() {
- if c.Spec.NetworkSpec.NodeOutboundLB == nil {
- if !c.Spec.ControlPlaneEnabled || c.Spec.NetworkSpec.APIServerLB.Type == Internal {
- return
- }
-
- var needsOutboundLB bool
- for _, subnet := range c.Spec.NetworkSpec.Subnets {
- if (subnet.Role == SubnetNode || subnet.Role == SubnetCluster) && subnet.IsIPv6Enabled() {
- needsOutboundLB = true
- break
- }
- }
-
- // If we don't default the outbound LB when there are some subnets with NAT gateway,
- // and some without, those without wouldn't have outbound traffic. So taking the
- // safer route, we configure the outbound LB in that scenario.
- if !needsOutboundLB {
- return
- }
-
- c.Spec.NetworkSpec.NodeOutboundLB = &LoadBalancerSpec{}
- }
-
- lb := c.Spec.NetworkSpec.NodeOutboundLB
- lb.LoadBalancerClassSpec.setNodeOutboundLBDefaults()
-
- if lb.Name == "" {
- lb.Name = c.ObjectMeta.Name
- }
-
- if lb.FrontendIPsCount == nil {
- lb.FrontendIPsCount = ptr.To[int32](1)
- }
-
- c.setOutboundLBFrontendIPs(lb, generateNodeOutboundIPName)
- c.SetNodeOutboundLBBackendPoolNameDefault()
-}
-
-// SetControlPlaneOutboundLBDefaults sets the default values for the control plane's outbound LB.
-func (c *AzureCluster) SetControlPlaneOutboundLBDefaults() {
- lb := c.Spec.NetworkSpec.ControlPlaneOutboundLB
-
- if lb == nil {
- return
- }
-
- lb.LoadBalancerClassSpec.setControlPlaneOutboundLBDefaults()
- if lb.Name == "" {
- lb.Name = generateControlPlaneOutboundLBName(c.ObjectMeta.Name)
- }
- if lb.FrontendIPsCount == nil {
- lb.FrontendIPsCount = ptr.To[int32](1)
- }
- c.setOutboundLBFrontendIPs(lb, generateControlPlaneOutboundIPName)
- c.SetControlPlaneOutboundLBBackendPoolNameDefault()
-}
-
-// SetBackendPoolNameDefault defaults the backend pool name of the LBs.
-func (c *AzureCluster) SetBackendPoolNameDefault() {
- c.SetAPIServerLBBackendPoolNameDefault()
- c.SetNodeOutboundLBBackendPoolNameDefault()
- c.SetControlPlaneOutboundLBBackendPoolNameDefault()
-}
-
-// SetAPIServerLBBackendPoolNameDefault defaults the name of the backend pool for apiserver LB.
-func (c *AzureCluster) SetAPIServerLBBackendPoolNameDefault() {
- apiServerLB := c.Spec.NetworkSpec.APIServerLB
- if apiServerLB.BackendPool.Name == "" {
- apiServerLB.BackendPool.Name = generateBackendAddressPoolName(apiServerLB.Name)
- }
-}
-
-// SetNodeOutboundLBBackendPoolNameDefault defaults the name of the backend pool for node outbound LB.
-func (c *AzureCluster) SetNodeOutboundLBBackendPoolNameDefault() {
- nodeOutboundLB := c.Spec.NetworkSpec.NodeOutboundLB
- if nodeOutboundLB != nil && nodeOutboundLB.BackendPool.Name == "" {
- nodeOutboundLB.BackendPool.Name = generateOutboundBackendAddressPoolName(nodeOutboundLB.Name)
- }
-}
-
-// SetControlPlaneOutboundLBBackendPoolNameDefault defaults the name of the backend pool for control plane outbound LB.
-func (c *AzureCluster) SetControlPlaneOutboundLBBackendPoolNameDefault() {
- controlPlaneOutboundLB := c.Spec.NetworkSpec.ControlPlaneOutboundLB
- if controlPlaneOutboundLB != nil && controlPlaneOutboundLB.BackendPool.Name == "" {
- controlPlaneOutboundLB.BackendPool.Name = generateOutboundBackendAddressPoolName(generateControlPlaneOutboundLBName(c.ObjectMeta.Name))
- }
-}
-
-// setOutboundLBFrontendIPs sets the frontend ips for the given load balancer.
-// The name of the frontend ip is generated using generatePublicIPName function.
-func (c *AzureCluster) setOutboundLBFrontendIPs(lb *LoadBalancerSpec, generatePublicIPName func(string) string) {
- switch *lb.FrontendIPsCount {
- case 0:
- lb.FrontendIPs = []FrontendIP{}
- case 1:
- lb.FrontendIPs = []FrontendIP{
- {
- Name: generateFrontendIPConfigName(lb.Name),
- PublicIP: &PublicIPSpec{
- Name: generatePublicIPName(c.ObjectMeta.Name),
- },
- },
- }
- default:
- lb.FrontendIPs = make([]FrontendIP, *lb.FrontendIPsCount)
- for i := 0; i < int(*lb.FrontendIPsCount); i++ {
- lb.FrontendIPs[i] = FrontendIP{
- Name: withIndex(generateFrontendIPConfigName(lb.Name), i+1),
- PublicIP: &PublicIPSpec{
- Name: withIndex(generatePublicIPName(c.ObjectMeta.Name), i+1),
- },
- }
- }
- }
-}
-
-func (c *AzureCluster) setBastionDefaults() {
- if c.Spec.BastionSpec.AzureBastion != nil {
- if c.Spec.BastionSpec.AzureBastion.Name == "" {
- c.Spec.BastionSpec.AzureBastion.Name = generateAzureBastionName(c.ObjectMeta.Name)
- }
- // Ensure defaults for the Subnet settings.
- if c.Spec.BastionSpec.AzureBastion.Subnet.Name == "" {
- c.Spec.BastionSpec.AzureBastion.Subnet.Name = DefaultAzureBastionSubnetName
- }
- if len(c.Spec.BastionSpec.AzureBastion.Subnet.CIDRBlocks) == 0 {
- c.Spec.BastionSpec.AzureBastion.Subnet.CIDRBlocks = []string{DefaultAzureBastionSubnetCIDR}
- }
- if c.Spec.BastionSpec.AzureBastion.Subnet.Role == "" {
- c.Spec.BastionSpec.AzureBastion.Subnet.Role = DefaultAzureBastionSubnetRole
- }
- // Ensure defaults for the PublicIP settings.
- if c.Spec.BastionSpec.AzureBastion.PublicIP.Name == "" {
- c.Spec.BastionSpec.AzureBastion.PublicIP.Name = generateAzureBastionPublicIPName(c.ObjectMeta.Name)
- }
- }
-}
-
-func (lb *LoadBalancerClassSpec) setAPIServerLBDefaults() {
- if lb.Type == "" {
- lb.Type = Public
- }
- if lb.SKU == "" {
- lb.SKU = SKUStandard
- }
- if lb.IdleTimeoutInMinutes == nil {
- lb.IdleTimeoutInMinutes = ptr.To[int32](DefaultOutboundRuleIdleTimeoutInMinutes)
- }
-}
-
-func (lb *LoadBalancerClassSpec) setNodeOutboundLBDefaults() {
- lb.setOutboundLBDefaults()
-}
-
-func (lb *LoadBalancerClassSpec) setControlPlaneOutboundLBDefaults() {
- lb.setOutboundLBDefaults()
-}
-
-func (lb *LoadBalancerClassSpec) setOutboundLBDefaults() {
- lb.Type = Public
- lb.SKU = SKUStandard
- if lb.IdleTimeoutInMinutes == nil {
- lb.IdleTimeoutInMinutes = ptr.To[int32](DefaultOutboundRuleIdleTimeoutInMinutes)
- }
-}
-
-// generateVnetName generates a virtual network name, based on the cluster name.
-func generateVnetName(clusterName string) string {
- return fmt.Sprintf("%s-%s", clusterName, "vnet")
-}
-
-// generateClusterSubnetSubnetName generates a subnet name, based on the cluster name.
-func generateClusterSubnetSubnetName(clusterName string) string {
- return fmt.Sprintf("%s-%s", clusterName, "subnet")
-}
-
-// generateControlPlaneSubnetName generates a node subnet name, based on the cluster name.
-func generateControlPlaneSubnetName(clusterName string) string {
- return fmt.Sprintf("%s-%s", clusterName, "controlplane-subnet")
-}
-
-// generateNodeSubnetName generates a node subnet name, based on the cluster name.
-func generateNodeSubnetName(clusterName string) string {
- return fmt.Sprintf("%s-%s", clusterName, "node-subnet")
-}
-
-// generateAzureBastionName generates an azure bastion name.
-func generateAzureBastionName(clusterName string) string {
- return fmt.Sprintf("%s-azure-bastion", clusterName)
-}
-
-// generateAzureBastionPublicIPName generates an azure bastion public ip name.
-func generateAzureBastionPublicIPName(clusterName string) string {
- return fmt.Sprintf("%s-azure-bastion-pip", clusterName)
-}
-
-// generateClusterSecurityGroupName generates a security group name, based on the cluster name.
-func generateClusterSecurityGroupName(clusterName string) string {
- return fmt.Sprintf("%s-%s", clusterName, "nsg")
-}
-
-// generateControlPlaneSecurityGroupName generates a control plane security group name, based on the cluster name.
-func generateControlPlaneSecurityGroupName(clusterName string) string {
- return fmt.Sprintf("%s-%s", clusterName, "controlplane-nsg")
-}
-
-// generateNodeSecurityGroupName generates a node security group name, based on the cluster name.
-func generateNodeSecurityGroupName(clusterName string) string {
- return fmt.Sprintf("%s-%s", clusterName, "node-nsg")
-}
-
-// generateClusterRouteTableName generates a route table name, based on the cluster name.
-func generateClusterRouteTableName(clusterName string) string {
- return fmt.Sprintf("%s-%s", clusterName, "routetable")
-}
-
-// generateNodeRouteTableName generates a node route table name, based on the cluster name.
-func generateNodeRouteTableName(clusterName string) string {
- return fmt.Sprintf("%s-%s", clusterName, "node-routetable")
-}
-
-// generateInternalLBName generates a internal load balancer name, based on the cluster name.
-func generateInternalLBName(clusterName string) string {
- return fmt.Sprintf("%s-%s", clusterName, "internal-lb")
-}
-
-// generatePublicLBName generates a public load balancer name, based on the cluster name.
-func generatePublicLBName(clusterName string) string {
- return fmt.Sprintf("%s-%s", clusterName, "public-lb")
-}
-
-// generateControlPlaneOutboundLBName generates the name of the control plane outbound LB.
-func generateControlPlaneOutboundLBName(clusterName string) string {
- return fmt.Sprintf("%s-outbound-lb", clusterName)
-}
-
-// generatePublicIPName generates a public IP name, based on the cluster name and a hash.
-func generatePublicIPName(clusterName string) string {
- return fmt.Sprintf("pip-%s-apiserver", clusterName)
-}
-
-// generateFrontendIPConfigName generates a load balancer frontend IP config name.
-func generateFrontendIPConfigName(lbName string) string {
- return fmt.Sprintf("%s-%s", lbName, "frontEnd")
-}
-
-// generatePrivateIPConfigName generates a load balancer frontend private IP config name.
-func generatePrivateIPConfigName(lbName string) string {
- return fmt.Sprintf("%s-%s", lbName, "frontEnd-internal-ip")
-}
-
-// generateNodeOutboundIPName generates a public IP name, based on the cluster name.
-func generateNodeOutboundIPName(clusterName string) string {
- return fmt.Sprintf("pip-%s-node-outbound", clusterName)
-}
-
-// generateControlPlaneOutboundIPName generates a public IP name, based on the cluster name.
-func generateControlPlaneOutboundIPName(clusterName string) string {
- return fmt.Sprintf("pip-%s-controlplane-outbound", clusterName)
-}
-
-// generateClusterNatGatewayName generates a NAT gateway name.
-func generateClusterNatGatewayName(clusterName string) string {
- return fmt.Sprintf("%s-%s", clusterName, "natgw")
-}
-
-// generateNatGatewayName generates a NAT gateway name.
-func generateNatGatewayName(clusterName string) string {
- return fmt.Sprintf("%s-%s", clusterName, "node-natgw")
-}
-
-// generateNatGatewayIPName generates a NAT gateway IP name.
-func generateNatGatewayIPName(natGatewayName string) string {
- return fmt.Sprintf("pip-%s", natGatewayName)
-}
-
-// withIndex appends the index as suffix to a generated name.
-func withIndex(name string, n int) string {
- return fmt.Sprintf("%s-%d", name, n)
-}
-
-// generateBackendAddressPoolName generates a load balancer backend address pool name.
-func generateBackendAddressPoolName(lbName string) string {
- return fmt.Sprintf("%s-%s", lbName, "backendPool")
-}
-
-// generateOutboundBackendAddressPoolName generates a load balancer outbound backend address pool name.
-func generateOutboundBackendAddressPoolName(lbName string) string {
- return fmt.Sprintf("%s-%s", lbName, "outboundBackendPool")
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azurecluster_types.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azurecluster_types.go
index 08195026981a..ecc4e046c115 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azurecluster_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azurecluster_types.go
@@ -134,5 +134,5 @@ func (c *AzureCluster) SetFutures(futures Futures) {
}
func init() {
- SchemeBuilder.Register(&AzureCluster{}, &AzureClusterList{})
+ objectTypes = append(objectTypes, &AzureCluster{}, &AzureClusterList{})
}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azurecluster_validation.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azurecluster_validation.go
deleted file mode 100644
index 479e9cddd4b8..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azurecluster_validation.go
+++ /dev/null
@@ -1,805 +0,0 @@
-/*
-Copyright 2021 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "fmt"
- "net"
- "reflect"
- "regexp"
-
- valid "github.com/asaskevich/govalidator/v11"
- corev1 "k8s.io/api/core/v1"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime/schema"
- "k8s.io/apimachinery/pkg/util/validation/field"
- "k8s.io/utils/ptr"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-
- "sigs.k8s.io/cluster-api-provider-azure/feature"
-)
-
-const (
- // can't use: \/"'[]:|<>+=;,.?*@&, Can't start with underscore. Can't end with period or hyphen.
- // not using . in the name to avoid issues when the name is part of DNS name.
- clusterNameRegex = `^[a-z0-9][a-z0-9-]{0,42}[a-z0-9]$`
- // max length of 44 to allow for cluster name to be used as a prefix for VMs and other resources that
- // have limitations as outlined here https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules.
- clusterNameMaxLength = 44
- // obtained from https://learn.microsoft.com/rest/api/resources/resourcegroups/createorupdate#uri-parameters.
- resourceGroupRegex = `^[-\w\._\(\)]+$`
- // described in https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules.
- subnetRegex = `^[-\w\._]+$`
- loadBalancerRegex = `^[-\w\._]+$`
- // MaxLoadBalancerOutboundIPs is the maximum number of outbound IPs in a Standard LoadBalancer frontend configuration.
- MaxLoadBalancerOutboundIPs = 16
- // MinLBIdleTimeoutInMinutes is the minimum number of minutes for the LB idle timeout.
- MinLBIdleTimeoutInMinutes = 4
- // MaxLBIdleTimeoutInMinutes is the maximum number of minutes for the LB idle timeout.
- MaxLBIdleTimeoutInMinutes = 30
- // Network security rules should be a number between 100 and 4096.
- // https://learn.microsoft.com/azure/virtual-network/network-security-groups-overview#security-rules
- minRulePriority = 100
- maxRulePriority = 4096
- // Must start with 'Microsoft.', then an alpha character, then can include alnum.
- serviceEndpointServiceRegexPattern = `^Microsoft\.[a-zA-Z]{1,42}[a-zA-Z0-9]{0,42}$`
- // Must start with an alpha character and then can include alnum OR be only *.
- serviceEndpointLocationRegexPattern = `^([a-z]{1,42}\d{0,5}|[*])$`
- // described in https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules.
- privateEndpointRegex = `^[-\w\._]+$`
- // resource ID Pattern.
- resourceIDPattern = `(?i)subscriptions/(.+)/resourceGroups/(.+)/providers/(.+?)/(.+?)/(.+)`
-)
-
-var (
- serviceEndpointServiceRegex = regexp.MustCompile(serviceEndpointServiceRegexPattern)
- serviceEndpointLocationRegex = regexp.MustCompile(serviceEndpointLocationRegexPattern)
-)
-
-// validateCluster validates a cluster.
-func (c *AzureCluster) validateCluster(old *AzureCluster) (admission.Warnings, error) {
- var allErrs field.ErrorList
- allErrs = append(allErrs, c.validateClusterName()...)
- allErrs = append(allErrs, c.validateClusterSpec(old)...)
- if len(allErrs) == 0 {
- return nil, nil
- }
-
- return nil, apierrors.NewInvalid(
- schema.GroupKind{Group: "infrastructure.cluster.x-k8s.io", Kind: AzureClusterKind},
- c.Name, allErrs)
-}
-
-// validateClusterSpec validates a ClusterSpec.
-func (c *AzureCluster) validateClusterSpec(old *AzureCluster) field.ErrorList {
- var allErrs field.ErrorList
- var oldNetworkSpec NetworkSpec
- if old != nil {
- oldNetworkSpec = old.Spec.NetworkSpec
- }
-
- allErrs = append(allErrs, validateNetworkSpec(c.Spec.ControlPlaneEnabled, c.Spec.NetworkSpec, oldNetworkSpec, field.NewPath("spec").Child("networkSpec"))...)
-
- var oldCloudProviderConfigOverrides *CloudProviderConfigOverrides
- if old != nil {
- oldCloudProviderConfigOverrides = old.Spec.CloudProviderConfigOverrides
- }
- allErrs = append(allErrs, validateCloudProviderConfigOverrides(c.Spec.CloudProviderConfigOverrides, oldCloudProviderConfigOverrides,
- field.NewPath("spec").Child("cloudProviderConfigOverrides"))...)
-
- // If ClusterSpec has non-nil ExtendedLocation field but not enable EdgeZone feature gate flag, ClusterSpec validation failed.
- if !feature.Gates.Enabled(feature.EdgeZone) && c.Spec.ExtendedLocation != nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "extendedLocation"), "can be set only if the EdgeZone feature flag is enabled"))
- }
-
- if err := validateBastionSpec(c.Spec.BastionSpec, field.NewPath("spec").Child("azureBastion").Child("bastionSpec")); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := validateIdentityRef(c.Spec.IdentityRef, field.NewPath("spec").Child("identityRef")); err != nil {
- allErrs = append(allErrs, err)
- }
-
- return allErrs
-}
-
-// validateClusterName validates ClusterName.
-func (c *AzureCluster) validateClusterName() field.ErrorList {
- var allErrs field.ErrorList
- if len(c.Name) > clusterNameMaxLength {
- allErrs = append(allErrs, field.Invalid(field.NewPath("metadata").Child("Name"), c.Name,
- fmt.Sprintf("Cluster Name longer than allowed length of %d characters", clusterNameMaxLength)))
- }
- if success, _ := regexp.MatchString(clusterNameRegex, c.Name); !success {
- allErrs = append(allErrs, field.Invalid(field.NewPath("metadata").Child("name"), c.Name,
- fmt.Sprintf("Cluster Name doesn't match regex %s, can contain only lowercase alphanumeric characters and '-', must start/end with an alphanumeric character",
- clusterNameRegex)))
- }
- if len(allErrs) == 0 {
- return nil
- }
- return allErrs
-}
-
-// validateBastionSpec validates a BastionSpec.
-func validateBastionSpec(bastionSpec BastionSpec, fldPath *field.Path) *field.Error {
- if bastionSpec.AzureBastion != nil && bastionSpec.AzureBastion.Sku != StandardBastionHostSku && bastionSpec.AzureBastion.EnableTunneling {
- return field.Invalid(fldPath.Child("sku"), bastionSpec.AzureBastion.Sku,
- "sku must be Standard if tunneling is enabled")
- }
- return nil
-}
-
-// validateIdentityRef validates an IdentityRef.
-func validateIdentityRef(identityRef *corev1.ObjectReference, fldPath *field.Path) *field.Error {
- if identityRef == nil {
- return field.Required(fldPath, "identityRef is required")
- }
- if identityRef.Kind != AzureClusterIdentityKind {
- return field.NotSupported(fldPath.Child("name"), identityRef.Name, []string{"AzureClusterIdentity"})
- }
- return nil
-}
-
-// validateNetworkSpec validates a NetworkSpec.
-func validateNetworkSpec(controlPlaneEnabled bool, networkSpec NetworkSpec, old NetworkSpec, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- // If the user specifies a resourceGroup for vnet, it means
- // that they intend to use a pre-existing vnet. In this case,
- // we need to verify the information they provide
- if networkSpec.Vnet.ResourceGroup != "" {
- if err := validateResourceGroup(networkSpec.Vnet.ResourceGroup,
- fldPath.Child("vnet").Child("resourceGroup")); err != nil {
- allErrs = append(allErrs, err)
- }
-
- allErrs = append(allErrs, validateVnetCIDR(networkSpec.Vnet.CIDRBlocks, fldPath.Child("cidrBlocks"))...)
-
- allErrs = append(allErrs, validateSubnets(controlPlaneEnabled, networkSpec.Subnets, networkSpec.Vnet, fldPath.Child("subnets"))...)
-
- allErrs = append(allErrs, validateVnetPeerings(networkSpec.Vnet.Peerings, fldPath.Child("peerings"))...)
- }
-
- var cidrBlocks []string
- if controlPlaneEnabled {
- controlPlaneSubnet, err := networkSpec.GetControlPlaneSubnet()
- if err != nil {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("subnets"), networkSpec.Subnets, "ControlPlaneSubnet invalid"))
- }
-
- cidrBlocks = controlPlaneSubnet.CIDRBlocks
- allErrs = append(allErrs, validateAPIServerLB(networkSpec.APIServerLB, old.APIServerLB, cidrBlocks, fldPath.Child("apiServerLB"))...)
- }
-
- var needOutboundLB bool
- for _, subnet := range networkSpec.Subnets {
- if (subnet.Role == SubnetNode || subnet.Role == SubnetCluster) && subnet.IsIPv6Enabled() {
- needOutboundLB = true
- break
- }
- }
- if needOutboundLB {
- allErrs = append(allErrs, validateNodeOutboundLB(networkSpec.NodeOutboundLB, old.NodeOutboundLB, networkSpec.APIServerLB, fldPath.Child("nodeOutboundLB"))...)
- }
- if controlPlaneEnabled {
- allErrs = append(allErrs, validateControlPlaneOutboundLB(networkSpec.ControlPlaneOutboundLB, networkSpec.APIServerLB, fldPath.Child("controlPlaneOutboundLB"))...)
- }
- var lbType = Internal
- if networkSpec.APIServerLB != nil {
- lbType = networkSpec.APIServerLB.Type
- }
- allErrs = append(allErrs, validatePrivateDNSZoneName(networkSpec.PrivateDNSZoneName, controlPlaneEnabled, lbType, fldPath.Child("privateDNSZoneName"))...)
- allErrs = append(allErrs, validatePrivateDNSZoneResourceGroup(networkSpec.PrivateDNSZoneName, networkSpec.PrivateDNSZoneResourceGroup, fldPath.Child("privateDNSZoneResourceGroup"))...)
-
- if len(allErrs) == 0 {
- return nil
- }
- return allErrs
-}
-
-// validateResourceGroup validates a ResourceGroup.
-func validateResourceGroup(resourceGroup string, fldPath *field.Path) *field.Error {
- if success, _ := regexp.MatchString(resourceGroupRegex, resourceGroup); !success {
- return field.Invalid(fldPath, resourceGroup,
- fmt.Sprintf("resourceGroup doesn't match regex %s", resourceGroupRegex))
- }
- return nil
-}
-
-// validateSubnets validates a list of Subnets.
-// When configuring a cluster, it is essential to include either a control-plane subnet and a node subnet, or a user can configure a cluster subnet which will be used as a control-plane subnet and a node subnet.
-func validateSubnets(controlPlaneEnabled bool, subnets Subnets, vnet VnetSpec, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- subnetNames := make(map[string]bool, len(subnets))
- requiredSubnetRoles := map[string]bool{
- "node": false,
- }
- if controlPlaneEnabled {
- requiredSubnetRoles["control-plane"] = false
- }
- clusterSubnet := false
- for i, subnet := range subnets {
- if err := validateSubnetName(subnet.Name, fldPath.Index(i).Child("name")); err != nil {
- allErrs = append(allErrs, err)
- }
- if _, ok := subnetNames[subnet.Name]; ok {
- allErrs = append(allErrs, field.Duplicate(fldPath, subnet.Name))
- }
- subnetNames[subnet.Name] = true
- if subnet.Role == SubnetCluster {
- clusterSubnet = true
- } else {
- for role := range requiredSubnetRoles {
- if role == string(subnet.Role) {
- requiredSubnetRoles[role] = true
- }
- }
- }
-
- for j, rule := range subnet.SecurityGroup.SecurityRules {
- if err := validateSecurityRule(
- rule,
- fldPath.Index(i).Child("securityGroup").Child("securityRules").Index(j),
- ); err != nil {
- allErrs = append(allErrs, err...)
- }
- }
- allErrs = append(allErrs, validateSubnetCIDR(subnet.CIDRBlocks, vnet.CIDRBlocks, fldPath.Index(i).Child("cidrBlocks"))...)
-
- if len(subnet.ServiceEndpoints) > 0 {
- allErrs = append(allErrs, validateServiceEndpoints(subnet.ServiceEndpoints, fldPath.Index(i).Child("serviceEndpoints"))...)
- }
-
- if len(subnet.PrivateEndpoints) > 0 {
- allErrs = append(allErrs, validatePrivateEndpoints(subnet.PrivateEndpoints, subnet.CIDRBlocks, fldPath.Index(i).Child("privateEndpoints"))...)
- }
- }
-
- // The clusterSubnet is applicable to both the control-plane and node pools.
- // Validation of requiredSubnetRoles is skipped since clusterSubnet is set to true.
- if clusterSubnet {
- return allErrs
- }
-
- for k, v := range requiredSubnetRoles {
- if !v {
- allErrs = append(allErrs, field.Required(fldPath,
- fmt.Sprintf("required role %s not included in provided subnets", k)))
- }
- }
- return allErrs
-}
-
-// validateSubnetName validates the Name of a Subnet.
-func validateSubnetName(name string, fldPath *field.Path) *field.Error {
- if success, _ := regexp.Match(subnetRegex, []byte(name)); !success {
- return field.Invalid(fldPath, name,
- fmt.Sprintf("name of subnet doesn't match regex %s", subnetRegex))
- }
- return nil
-}
-
-// validateSubnetCIDR validates the CIDR blocks of a Subnet.
-func validateSubnetCIDR(subnetCidrBlocks []string, vnetCidrBlocks []string, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- var vnetNws []*net.IPNet
-
- for _, vnetCidr := range vnetCidrBlocks {
- if _, vnetNw, err := net.ParseCIDR(vnetCidr); err == nil {
- vnetNws = append(vnetNws, vnetNw)
- }
- }
-
- for _, subnetCidr := range subnetCidrBlocks {
- subnetCidrIP, _, err := net.ParseCIDR(subnetCidr)
- if err != nil {
- allErrs = append(allErrs, field.Invalid(fldPath, subnetCidr, "invalid CIDR format"))
- }
-
- var found bool
- for _, vnetNw := range vnetNws {
- if vnetNw.Contains(subnetCidrIP) {
- found = true
- break
- }
- }
-
- if !found {
- allErrs = append(allErrs, field.Invalid(fldPath, subnetCidr, fmt.Sprintf("subnet CIDR not in vnet address space: %s", vnetCidrBlocks)))
- }
- }
-
- return allErrs
-}
-
-// validateVnetCIDR validates the CIDR blocks of a Vnet.
-func validateVnetCIDR(vnetCIDRBlocks []string, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- for _, vnetCidr := range vnetCIDRBlocks {
- if _, _, err := net.ParseCIDR(vnetCidr); err != nil {
- allErrs = append(allErrs, field.Invalid(fldPath, vnetCidr, "invalid CIDR format"))
- }
- }
- return allErrs
-}
-
-// validateVnetPeerings validates a list of virtual network peerings.
-func validateVnetPeerings(peerings VnetPeerings, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- vnetIdentifiers := make(map[string]bool, len(peerings))
-
- for _, peering := range peerings {
- vnetIdentifier := peering.ResourceGroup + "/" + peering.RemoteVnetName
- if _, ok := vnetIdentifiers[vnetIdentifier]; ok {
- allErrs = append(allErrs, field.Duplicate(fldPath, vnetIdentifier))
- }
- vnetIdentifiers[vnetIdentifier] = true
- }
- return allErrs
-}
-
-// validateLoadBalancerName validates the Name of a Load Balancer.
-func validateLoadBalancerName(name string, fldPath *field.Path) *field.Error {
- if success, _ := regexp.Match(loadBalancerRegex, []byte(name)); !success {
- return field.Invalid(fldPath, name,
- fmt.Sprintf("name of load balancer doesn't match regex %s", loadBalancerRegex))
- }
- return nil
-}
-
-// validateInternalLBIPAddress validates a InternalLBIPAddress.
-func validateInternalLBIPAddress(address string, cidrs []string, fldPath *field.Path) *field.Error {
- ip := net.ParseIP(address)
- if ip == nil {
- return field.Invalid(fldPath, address,
- "Internal LB IP address isn't a valid IPv4 or IPv6 address")
- }
- for _, cidr := range cidrs {
- _, subnet, _ := net.ParseCIDR(cidr)
- if subnet.Contains(ip) {
- return nil
- }
- }
- return field.Invalid(fldPath, address,
- fmt.Sprintf("Internal LB IP address needs to be in control plane subnet range (%s)", cidrs))
-}
-
-// validateSecurityRule validates a SecurityRule.
-func validateSecurityRule(rule SecurityRule, fldPath *field.Path) (allErrs field.ErrorList) {
- if rule.Priority < minRulePriority || rule.Priority > maxRulePriority {
- allErrs = append(allErrs, field.Invalid(fldPath, rule.Priority, fmt.Sprintf("security rule priorities should be between %d and %d", minRulePriority, maxRulePriority)))
- }
-
- if rule.Source != nil && rule.Sources != nil {
- allErrs = append(allErrs, field.Invalid(fldPath, rule.Source, "security rule cannot have both source and sources"))
- }
-
- return allErrs
-}
-
-func validateAPIServerLB(lb *LoadBalancerSpec, old *LoadBalancerSpec, cidrs []string, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
-
- lbClassSpec := lb.LoadBalancerClassSpec
- var olLBClassSpec LoadBalancerClassSpec
- if old != nil {
- olLBClassSpec = old.LoadBalancerClassSpec
- }
-
- allErrs = append(allErrs, validateClassSpecForAPIServerLB(lbClassSpec, &olLBClassSpec, fldPath)...)
-
- // Name should be valid.
- if err := validateLoadBalancerName(lb.Name, fldPath.Child("name")); err != nil {
- allErrs = append(allErrs, err)
- }
- // Name should be immutable.
- if old != nil && old.Name != "" && old.Name != lb.Name {
- allErrs = append(allErrs, field.Forbidden(fldPath.Child("name"), "API Server load balancer name should not be modified after AzureCluster creation."))
- }
-
- publicIPCount, privateIPCount := 0, 0
- privateIP := ""
- for i := range lb.FrontendIPs {
- if lb.FrontendIPs[i].PublicIP != nil {
- publicIPCount++
- }
- if lb.FrontendIPs[i].PrivateIPAddress != "" {
- privateIPCount++
- privateIP = lb.FrontendIPs[i].PrivateIPAddress
- }
- }
- if lb.Type == Public {
- // there should be one public IP for public LB.
- if publicIPCount != 1 || ptr.Deref[int32](lb.FrontendIPsCount, 1) != 1 {
- // Note: FrontendIPsCount creates public IPs when set. Therefore, we check for both publicIPCount and FrontendIPsCount to be 1.
- allErrs = append(allErrs, field.Invalid(fldPath.Child("frontendIPConfigs"), lb.FrontendIPs,
- "API Server Load balancer should have 1 Frontend IP"))
- }
- if feature.Gates.Enabled(feature.APIServerILB) {
- if err := validateInternalLBIPAddress(privateIP, cidrs, fldPath.Child("frontendIPConfigs").Index(0).Child("privateIP")); err != nil {
- allErrs = append(allErrs, err)
- }
- } else {
- // API Server LB should not have a Private IP if APIServerILB feature is disabled.
- if privateIPCount > 0 {
- allErrs = append(allErrs, field.Forbidden(fldPath.Child("frontendIPConfigs").Index(0).Child("privateIP"),
- "Public Load Balancers cannot have a Private IP"))
- }
- }
- }
-
- // internal LB should not have a public IP.
- if lb.Type == Internal {
- if publicIPCount != 0 {
- allErrs = append(allErrs, field.Forbidden(fldPath.Child("frontendIPConfigs").Index(0).Child("publicIP"),
- "Internal Load Balancers cannot have a Public IP"))
- }
- if privateIPCount != 1 {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("frontendIPConfigs"), lb.FrontendIPs,
- "API Server Load balancer of type private should have 1 frontend private IP"))
- } else {
- if err := validateInternalLBIPAddress(lb.FrontendIPs[0].PrivateIPAddress, cidrs,
- fldPath.Child("frontendIPConfigs").Index(0).Child("privateIP")); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if old != nil && len(old.FrontendIPs) != 0 && old.FrontendIPs[0].PrivateIPAddress != lb.FrontendIPs[0].PrivateIPAddress {
- allErrs = append(allErrs, field.Forbidden(fldPath.Child("name"), "API Server load balancer private IP should not be modified after AzureCluster creation."))
- }
- }
- }
- return allErrs
-}
-
-func validateNodeOutboundLB(lb *LoadBalancerSpec, old *LoadBalancerSpec, apiserverLB *LoadBalancerSpec, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
-
- var lbClassSpec, oldClassSpec *LoadBalancerClassSpec
- if lb != nil {
- lbClassSpec = &lb.LoadBalancerClassSpec
- }
- if old != nil {
- oldClassSpec = &old.LoadBalancerClassSpec
- }
- apiserverLBClassSpec := apiserverLB.LoadBalancerClassSpec
-
- allErrs = append(allErrs, validateClassSpecForNodeOutboundLB(lbClassSpec, oldClassSpec, apiserverLBClassSpec, fldPath)...)
-
- if lb == nil {
- return allErrs
- }
-
- if old != nil && old.ID != lb.ID {
- allErrs = append(allErrs, field.Forbidden(fldPath.Child("id"), "Node outbound load balancer ID should not be modified after AzureCluster creation."))
- }
-
- if old != nil && old.Name != lb.Name {
- allErrs = append(allErrs, field.Forbidden(fldPath.Child("name"), "Node outbound load balancer Name should not be modified after AzureCluster creation."))
- }
-
- if old != nil && old.FrontendIPsCount == lb.FrontendIPsCount {
- if len(old.FrontendIPs) != len(lb.FrontendIPs) {
- allErrs = append(allErrs, field.Forbidden(fldPath.Child("frontendIPs"), "Node outbound load balancer FrontendIPs cannot be modified after AzureCluster creation."))
- }
-
- if len(old.FrontendIPs) == len(lb.FrontendIPs) {
- for i, frontEndIP := range lb.FrontendIPs {
- oldFrontendIP := old.FrontendIPs[i]
- if oldFrontendIP.Name != frontEndIP.Name || !reflect.DeepEqual(*oldFrontendIP.PublicIP, *frontEndIP.PublicIP) {
- allErrs = append(allErrs, field.Forbidden(fldPath.Child("frontendIPs").Index(i),
- "Node outbound load balancer FrontendIPs cannot be modified after AzureCluster creation."))
- }
- }
- }
- }
-
- if lb.FrontendIPsCount != nil && *lb.FrontendIPsCount > MaxLoadBalancerOutboundIPs {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("frontendIPsCount"), *lb.FrontendIPsCount,
- fmt.Sprintf("Max front end ips allowed is %d", MaxLoadBalancerOutboundIPs)))
- }
-
- return allErrs
-}
-
-func validateControlPlaneOutboundLB(lb *LoadBalancerSpec, apiserverLB *LoadBalancerSpec, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
-
- var lbClassSpec *LoadBalancerClassSpec
- if lb != nil {
- lbClassSpec = &lb.LoadBalancerClassSpec
- }
- apiServerLBClassSpec := apiserverLB.LoadBalancerClassSpec
-
- allErrs = append(allErrs, validateClassSpecForControlPlaneOutboundLB(lbClassSpec, apiServerLBClassSpec, fldPath)...)
-
- if apiServerLBClassSpec.Type == Internal && lb != nil {
- if lb.FrontendIPsCount != nil && *lb.FrontendIPsCount > MaxLoadBalancerOutboundIPs {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("frontendIPsCount"), *lb.FrontendIPsCount,
- fmt.Sprintf("Max front end ips allowed is %d", MaxLoadBalancerOutboundIPs)))
- }
- }
-
- return allErrs
-}
-
-// validatePrivateDNSZoneName validates the PrivateDNSZoneName.
-func validatePrivateDNSZoneName(privateDNSZoneName string, controlPlaneEnabled bool, apiserverLBType LBType, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
-
- if privateDNSZoneName != "" {
- if controlPlaneEnabled && apiserverLBType != Internal {
- allErrs = append(allErrs, field.Invalid(fldPath, apiserverLBType,
- "PrivateDNSZoneName is available only if APIServerLB.Type is Internal"))
- }
- if !valid.IsDNSName(privateDNSZoneName) {
- allErrs = append(allErrs, field.Invalid(fldPath, privateDNSZoneName,
- "PrivateDNSZoneName can only contain alphanumeric characters, underscores and dashes, must end with an alphanumeric character",
- ))
- }
- }
-
- return allErrs
-}
-
-// validatePrivateDNSZoneResourceGroup validates the PrivateDNSZoneResourceGroup.
-// A private DNS Zone's resource group is valid as long as privateDNSZoneName is provided with the private dns resource group name.
-func validatePrivateDNSZoneResourceGroup(privateDNSZoneName string, privateDNSZoneResourceGroup string, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
-
- if privateDNSZoneResourceGroup != "" {
- if privateDNSZoneName == "" {
- allErrs = append(allErrs, field.Invalid(fldPath, privateDNSZoneName,
- "PrivateDNSZoneResourceGroup can only be used when PrivateDNSZoneName is provided"))
- }
- if err := validateResourceGroup(privateDNSZoneResourceGroup, fldPath); err != nil {
- allErrs = append(allErrs, err)
- }
- }
-
- return allErrs
-}
-
-// validateCloudProviderConfigOverrides validates CloudProviderConfigOverrides.
-func validateCloudProviderConfigOverrides(oldConfig, newConfig *CloudProviderConfigOverrides, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- if !reflect.DeepEqual(oldConfig, newConfig) {
- allErrs = append(allErrs, field.Invalid(fldPath, newConfig, "cannot change cloudProviderConfigOverrides cluster creation"))
- }
- return allErrs
-}
-
-func validateClassSpecForAPIServerLB(lb LoadBalancerClassSpec, old *LoadBalancerClassSpec, apiServerLBPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
-
- // SKU should be Standard
- if lb.SKU != SKUStandard {
- allErrs = append(allErrs, field.NotSupported(apiServerLBPath.Child("sku"), lb.SKU, []string{string(SKUStandard)}))
- }
-
- // Type should be Public or Internal.
- if lb.Type != Internal && lb.Type != Public {
- allErrs = append(allErrs, field.NotSupported(apiServerLBPath.Child("type"), lb.Type,
- []string{string(Public), string(Internal)}))
- }
-
- // SKU should be immutable.
- if old != nil && old.SKU != "" && old.SKU != lb.SKU {
- allErrs = append(allErrs, field.Forbidden(apiServerLBPath.Child("sku"), "API Server load balancer SKU should not be modified after AzureCluster creation."))
- }
-
- // Type should be immutable.
- if old != nil && old.Type != "" && old.Type != lb.Type {
- allErrs = append(allErrs, field.Forbidden(apiServerLBPath.Child("type"), "API Server load balancer type should not be modified after AzureCluster creation."))
- }
-
- // IdletimeoutInMinutes should be immutable.
- if old != nil && old.IdleTimeoutInMinutes != nil && !ptr.Equal(old.IdleTimeoutInMinutes, lb.IdleTimeoutInMinutes) {
- allErrs = append(allErrs, field.Forbidden(apiServerLBPath.Child("idleTimeoutInMinutes"), "API Server load balancer idle timeout cannot be modified after AzureCluster creation."))
- }
-
- if lb.IdleTimeoutInMinutes != nil && (*lb.IdleTimeoutInMinutes < MinLBIdleTimeoutInMinutes || *lb.IdleTimeoutInMinutes > MaxLBIdleTimeoutInMinutes) {
- allErrs = append(allErrs, field.Invalid(apiServerLBPath.Child("idleTimeoutInMinutes"), *lb.IdleTimeoutInMinutes,
- fmt.Sprintf("API Server load balancer idle timeout should be between %d and %d minutes", MinLBIdleTimeoutInMinutes, MaxLBIdleTimeoutInMinutes)))
- }
-
- return allErrs
-}
-
-func validateClassSpecForNodeOutboundLB(lb *LoadBalancerClassSpec, old *LoadBalancerClassSpec, apiserverLB LoadBalancerClassSpec, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
-
- // LB can be nil when disabled for private clusters.
- if lb == nil && apiserverLB.Type == Internal {
- return allErrs
- }
-
- if lb == nil {
- allErrs = append(allErrs, field.Required(fldPath, "Node outbound load balancer cannot be nil for public clusters."))
- return allErrs
- }
-
- if old != nil && old.SKU != lb.SKU {
- allErrs = append(allErrs, field.Forbidden(fldPath.Child("sku"), "Node outbound load balancer SKU should not be modified after AzureCluster creation."))
- }
-
- if old != nil && old.Type != lb.Type {
- allErrs = append(allErrs, field.Forbidden(fldPath.Child("type"), "Node outbound load balancer Type cannot be modified after AzureCluster creation."))
- }
-
- if old != nil && !ptr.Equal(old.IdleTimeoutInMinutes, lb.IdleTimeoutInMinutes) {
- allErrs = append(allErrs, field.Forbidden(fldPath.Child("idleTimeoutInMinutes"), "Node outbound load balancer idle timeout cannot be modified after AzureCluster creation."))
- }
-
- if lb.IdleTimeoutInMinutes != nil && (*lb.IdleTimeoutInMinutes < MinLBIdleTimeoutInMinutes || *lb.IdleTimeoutInMinutes > MaxLBIdleTimeoutInMinutes) {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("idleTimeoutInMinutes"), *lb.IdleTimeoutInMinutes,
- fmt.Sprintf("Node outbound idle timeout should be between %d and %d minutes", MinLBIdleTimeoutInMinutes, MaxLBIdleTimeoutInMinutes)))
- }
-
- return allErrs
-}
-
-func validateClassSpecForControlPlaneOutboundLB(lb *LoadBalancerClassSpec, apiserverLB LoadBalancerClassSpec, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
-
- switch apiserverLB.Type {
- case Public:
- if lb != nil {
- allErrs = append(allErrs, field.Forbidden(fldPath, "Control plane outbound load balancer cannot be set for public clusters."))
- }
- case Internal:
- // Control plane outbound lb can be nil when it's disabled for private clusters.
- if lb == nil {
- return nil
- }
-
- if lb.IdleTimeoutInMinutes != nil && (*lb.IdleTimeoutInMinutes < MinLBIdleTimeoutInMinutes || *lb.IdleTimeoutInMinutes > MaxLBIdleTimeoutInMinutes) {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("idleTimeoutInMinutes"), *lb.IdleTimeoutInMinutes,
- fmt.Sprintf("Control plane outbound idle timeout should be between %d and %d minutes", MinLBIdleTimeoutInMinutes, MaxLBIdleTimeoutInMinutes)))
- }
- }
-
- return allErrs
-}
-
-func validateServiceEndpoints(serviceEndpoints []ServiceEndpointSpec, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
-
- serviceEndpointsServices := make(map[string]bool, len(serviceEndpoints))
- for i, se := range serviceEndpoints {
- if se.Service == "" {
- allErrs = append(allErrs, field.Required(fldPath.Index(i).Child("service"), "service is required for all service endpoints"))
- } else {
- if err := validateServiceEndpointServiceName(se.Service, fldPath.Index(i).Child("service")); err != nil {
- allErrs = append(allErrs, err)
- }
- if _, ok := serviceEndpointsServices[se.Service]; ok {
- allErrs = append(allErrs, field.Duplicate(fldPath.Index(i).Child("service"), se.Service))
- }
- serviceEndpointsServices[se.Service] = true
- }
-
- if len(se.Locations) == 0 {
- allErrs = append(allErrs, field.Required(fldPath.Index(i).Child("locations"), "locations are required for all service endpoints"))
- } else {
- serviceEndpointsLocations := make(map[string]bool, len(se.Locations))
- for j, locationName := range se.Locations {
- if err := validateServiceEndpointLocationName(locationName, fldPath.Index(i).Child("locations").Index(j)); err != nil {
- allErrs = append(allErrs, err)
- }
- if _, ok := serviceEndpointsLocations[locationName]; ok {
- allErrs = append(allErrs, field.Duplicate(fldPath.Index(i).Child("locations").Index(j), locationName))
- }
- serviceEndpointsLocations[locationName] = true
- }
- }
- }
-
- return allErrs
-}
-
-func validateServiceEndpointServiceName(serviceName string, fldPath *field.Path) *field.Error {
- if success := serviceEndpointServiceRegex.MatchString(serviceName); !success {
- return field.Invalid(fldPath, serviceName, fmt.Sprintf("service name of endpoint service doesn't match regex %s", serviceEndpointServiceRegexPattern))
- }
- return nil
-}
-
-func validateServiceEndpointLocationName(location string, fldPath *field.Path) *field.Error {
- if success := serviceEndpointLocationRegex.MatchString(location); !success {
- return field.Invalid(fldPath, location, fmt.Sprintf("location doesn't match regex %s", serviceEndpointLocationRegexPattern))
- }
- return nil
-}
-
-func validatePrivateEndpoints(privateEndpointSpecs []PrivateEndpointSpec, subnetCIDRs []string, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
-
- for i, pe := range privateEndpointSpecs {
- if err := validatePrivateEndpointName(pe.Name, fldPath.Index(i).Child("name")); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if len(pe.PrivateLinkServiceConnections) == 0 {
- allErrs = append(allErrs, field.Invalid(fldPath.Index(i), pe.PrivateLinkServiceConnections, "privateLinkServiceConnections cannot be empty"))
- }
-
- for j, privateLinkServiceConnection := range pe.PrivateLinkServiceConnections {
- if privateLinkServiceConnection.PrivateLinkServiceID == "" {
- allErrs = append(allErrs, field.Required(fldPath.Index(i).Child("privateLinkServiceConnections").Index(j), "privateLinkServiceID is required for all privateLinkServiceConnections in private endpoints"))
- } else {
- if err := validatePrivateEndpointPrivateLinkServiceConnection(privateLinkServiceConnection, fldPath.Index(i).Child("privateLinkServiceConnections").Index(j)); err != nil {
- allErrs = append(allErrs, err)
- }
- }
- }
-
- for _, privateIP := range pe.PrivateIPAddresses {
- if err := validatePrivateEndpointIPAddress(privateIP, subnetCIDRs, fldPath.Index(i).Child("privateIPAddresses")); err != nil {
- allErrs = append(allErrs, err)
- }
- }
- }
-
- return allErrs
-}
-
-// validatePrivateEndpointName validates the Name of a Private Endpoint.
-func validatePrivateEndpointName(name string, fldPath *field.Path) *field.Error {
- if name == "" {
- return field.Invalid(fldPath, name, "name of private endpoint cannot be empty")
- }
-
- if success, _ := regexp.MatchString(privateEndpointRegex, name); !success {
- return field.Invalid(fldPath, name,
- fmt.Sprintf("name of private endpoint doesn't match regex %s", privateEndpointRegex))
- }
- return nil
-}
-
-// validatePrivateEndpointServiceID validates the service ID of a Private Endpoint.
-func validatePrivateEndpointPrivateLinkServiceConnection(privateLinkServiceConnection PrivateLinkServiceConnection, fldPath *field.Path) *field.Error {
- if success, _ := regexp.MatchString(resourceIDPattern, privateLinkServiceConnection.PrivateLinkServiceID); !success {
- return field.Invalid(fldPath, privateLinkServiceConnection.PrivateLinkServiceID,
- fmt.Sprintf("private endpoint privateLinkServiceConnection service ID doesn't match regex %s", resourceIDPattern))
- }
- if privateLinkServiceConnection.Name != "" {
- if success, _ := regexp.MatchString(privateEndpointRegex, privateLinkServiceConnection.Name); !success {
- return field.Invalid(fldPath, privateLinkServiceConnection.Name,
- fmt.Sprintf("private endpoint privateLinkServiceConnection name doesn't match regex %s", privateEndpointRegex))
- }
- }
- return nil
-}
-
-// validatePrivateEndpointIPAddress validates a Private Endpoint IP Address.
-func validatePrivateEndpointIPAddress(address string, cidrs []string, fldPath *field.Path) *field.Error {
- ip := net.ParseIP(address)
- if ip == nil {
- return field.Invalid(fldPath, address,
- "Private Endpoint IP address isn't a valid IPv4 or IPv6 address")
- }
-
- for _, cidr := range cidrs {
- _, subnet, _ := net.ParseCIDR(cidr)
- if subnet != nil && subnet.Contains(ip) {
- return nil
- }
- }
-
- return field.Invalid(fldPath, address,
- fmt.Sprintf("Private Endpoint IP address needs to be in subnet range (%s)", cidrs))
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azurecluster_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azurecluster_webhook.go
deleted file mode 100644
index def1503c053c..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azurecluster_webhook.go
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
-Copyright 2021 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "context"
- "fmt"
- "reflect"
-
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-
- webhookutils "sigs.k8s.io/cluster-api-provider-azure/util/webhook"
-)
-
-// SetupWebhookWithManager sets up and registers the webhook with the manager.
-func (c *AzureCluster) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(AzureClusterWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(c).
- WithValidator(w).
- WithDefaulter(w).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-azurecluster,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=azureclusters,versions=v1beta1,name=validation.azurecluster.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta1-azurecluster,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=azureclusters,versions=v1beta1,name=default.azurecluster.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-// AzureClusterWebhook implements validating and mutating webhook for AzureCluster.
-type AzureClusterWebhook struct{}
-
-var _ webhook.CustomValidator = &AzureClusterWebhook{}
-var _ webhook.CustomDefaulter = &AzureClusterWebhook{}
-
-// Default implements webhook.CustomDefaulter so a webhook will be registered for the type.
-func (*AzureClusterWebhook) Default(_ context.Context, obj runtime.Object) error {
- c, ok := obj.(*AzureCluster)
- if !ok {
- return fmt.Errorf("expected an AzureCluster object but got %T", c)
- }
-
- c.setDefaults()
- return nil
-}
-
-// ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type.
-func (*AzureClusterWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- c, ok := obj.(*AzureCluster)
- if !ok {
- return nil, fmt.Errorf("expected an AzureCluster object but got %T", c)
- }
-
- return c.validateCluster(nil)
-}
-
-// ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type.
-func (*AzureClusterWebhook) ValidateUpdate(_ context.Context, oldRaw, newObj runtime.Object) (admission.Warnings, error) {
- c, ok := newObj.(*AzureCluster)
- if !ok {
- return nil, fmt.Errorf("expected an AzureCluster object but got %T", c)
- }
-
- var allErrs field.ErrorList
- old := oldRaw.(*AzureCluster)
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "resourceGroup"),
- old.Spec.ResourceGroup,
- c.Spec.ResourceGroup); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "subscriptionID"),
- old.Spec.SubscriptionID,
- c.Spec.SubscriptionID); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "location"),
- old.Spec.Location,
- c.Spec.Location); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if old.Spec.ControlPlaneEndpoint.Host != "" && c.Spec.ControlPlaneEndpoint.Host != old.Spec.ControlPlaneEndpoint.Host {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "controlPlaneEndpoint", "host"),
- c.Spec.ControlPlaneEndpoint.Host, "field is immutable"),
- )
- }
-
- if old.Spec.ControlPlaneEndpoint.Port != 0 && c.Spec.ControlPlaneEndpoint.Port != old.Spec.ControlPlaneEndpoint.Port {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "controlPlaneEndpoint", "port"),
- c.Spec.ControlPlaneEndpoint.Port, "field is immutable"),
- )
- }
-
- if !reflect.DeepEqual(c.Spec.AzureEnvironment, old.Spec.AzureEnvironment) {
- // The equality failure could be because of default mismatch between v1alpha3 and v1beta1. This happens because
- // the new object `r` will have run through the default webhooks but the old object `old` would not have so.
- // This means if the old object was in v1alpha3, it would not get the new defaults set in v1beta1 resulting
- // in object inequality. To workaround this, we set the v1beta1 defaults here so that the old object also gets
- // the new defaults.
- old.setAzureEnvironmentDefault()
-
- // if it's still not equal, return error.
- if !reflect.DeepEqual(c.Spec.AzureEnvironment, old.Spec.AzureEnvironment) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "azureEnvironment"),
- c.Spec.AzureEnvironment, "field is immutable"),
- )
- }
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "networkSpec", "privateDNSZoneName"),
- old.Spec.NetworkSpec.PrivateDNSZoneName,
- c.Spec.NetworkSpec.PrivateDNSZoneName); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "networkSpec", "privateDNSZoneResourceGroup"),
- old.Spec.NetworkSpec.PrivateDNSZoneResourceGroup,
- c.Spec.NetworkSpec.PrivateDNSZoneResourceGroup); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "networkSpec", "privateDNSZone"),
- old.Spec.NetworkSpec.PrivateDNSZone,
- c.Spec.NetworkSpec.PrivateDNSZone); err != nil {
- allErrs = append(allErrs, err)
- }
-
- // Allow enabling azure bastion but avoid disabling it.
- if old.Spec.BastionSpec.AzureBastion != nil && !reflect.DeepEqual(old.Spec.BastionSpec.AzureBastion, c.Spec.BastionSpec.AzureBastion) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "bastionSpec", "azureBastion"),
- c.Spec.BastionSpec.AzureBastion, "azure bastion cannot be removed from a cluster"),
- )
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "networkSpec", "controlPlaneOutboundLB"),
- old.Spec.NetworkSpec.ControlPlaneOutboundLB,
- c.Spec.NetworkSpec.ControlPlaneOutboundLB); err != nil {
- allErrs = append(allErrs, err)
- }
-
- allErrs = append(allErrs, c.validateSubnetUpdate(old)...)
-
- if len(allErrs) == 0 {
- return c.validateCluster(old)
- }
-
- return nil, apierrors.NewInvalid(GroupVersion.WithKind(AzureClusterKind).GroupKind(), c.Name, allErrs)
-}
-
-// validateSubnetUpdate validates a ClusterSpec.NetworkSpec.Subnets for immutability.
-func (c *AzureCluster) validateSubnetUpdate(old *AzureCluster) field.ErrorList {
- var allErrs field.ErrorList
-
- oldSubnetMap := make(map[string]SubnetSpec, len(old.Spec.NetworkSpec.Subnets))
- oldSubnetIndex := make(map[string]int, len(old.Spec.NetworkSpec.Subnets))
- for i, subnet := range old.Spec.NetworkSpec.Subnets {
- oldSubnetMap[subnet.Name] = subnet
- oldSubnetIndex[subnet.Name] = i
- }
- for i, subnet := range c.Spec.NetworkSpec.Subnets {
- if oldSubnet, ok := oldSubnetMap[subnet.Name]; ok {
- // Verify the CIDR blocks haven't changed for an owned Vnet.
- // A non-owned Vnet's CIDR block can change based on what's
- // defined in the spec vs what's been loaded from Azure directly.
- // This technically allows the cidr block to be modified in the brief
- // moments before the Vnet is created (because the tags haven't been
- // set yet) but once the Vnet has been created it becomes immutable.
- if old.Spec.NetworkSpec.Vnet.Tags.HasOwned(old.Name) && !reflect.DeepEqual(subnet.CIDRBlocks, oldSubnet.CIDRBlocks) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "networkSpec", "subnets").Index(oldSubnetIndex[subnet.Name]).Child("CIDRBlocks"),
- c.Spec.NetworkSpec.Subnets[i].CIDRBlocks, "field is immutable"),
- )
- }
- if subnet.RouteTable.Name != oldSubnet.RouteTable.Name {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "networkSpec", "subnets").Index(oldSubnetIndex[subnet.Name]).Child("RouteTable").Child("Name"),
- c.Spec.NetworkSpec.Subnets[i].RouteTable.Name, "field is immutable"),
- )
- }
- if (subnet.NatGateway.Name != oldSubnet.NatGateway.Name) && (oldSubnet.NatGateway.Name != "") {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "networkSpec", "subnets").Index(oldSubnetIndex[subnet.Name]).Child("NatGateway").Child("Name"),
- c.Spec.NetworkSpec.Subnets[i].NatGateway.Name, "field is immutable"),
- )
- }
- if subnet.SecurityGroup.Name != oldSubnet.SecurityGroup.Name {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "networkSpec", "subnets").Index(oldSubnetIndex[subnet.Name]).Child("SecurityGroup").Child("Name"),
- c.Spec.NetworkSpec.Subnets[i].SecurityGroup.Name, "field is immutable"),
- )
- }
- }
- }
-
- return allErrs
-}
-
-// ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type.
-func (*AzureClusterWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclusteridentity_types.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclusteridentity_types.go
index 83559f407e24..e2fa6c8d225f 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclusteridentity_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclusteridentity_types.go
@@ -25,10 +25,9 @@ import (
// AllowedNamespaces defines the namespaces the clusters are allowed to use the identity from
// NamespaceList takes precedence over the Selector.
type AllowedNamespaces struct {
- // A nil or empty list indicates that AzureCluster cannot use the identity from any namespace.
+ // An empty list indicates that AzureCluster cannot use the identity from any namespace.
//
// +optional
- // +nullable
NamespaceList []string `json:"list"`
// Selector is a selector of namespaces that AzureCluster can
// use this Identity from. This is a standard Kubernetes LabelSelector,
@@ -81,7 +80,6 @@ type AzureClusterIdentitySpec struct {
// A namespace should be either in the NamespaceList or match with Selector to use the identity.
//
// +optional
- // +nullable
AllowedNamespaces *AllowedNamespaces `json:"allowedNamespaces"`
}
@@ -128,5 +126,5 @@ func (c *AzureClusterIdentity) SetConditions(conditions clusterv1beta1.Condition
}
func init() {
- SchemeBuilder.Register(&AzureClusterIdentity{}, &AzureClusterIdentityList{})
+ objectTypes = append(objectTypes, &AzureClusterIdentity{}, &AzureClusterIdentityList{})
}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclusteridentity_validation.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclusteridentity_validation.go
deleted file mode 100644
index 51b1842e5422..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclusteridentity_validation.go
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-Copyright 2022 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "fmt"
-
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/util/validation/field"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-)
-
-func (c *AzureClusterIdentity) validateClusterIdentity() (admission.Warnings, error) {
- var allErrs field.ErrorList
- if c.Spec.Type != UserAssignedMSI && c.Spec.ResourceID != "" {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "resourceID"), c.Spec.ResourceID))
- }
- if c.Spec.Type != UserAssignedIdentityCredential && (c.Spec.UserAssignedIdentityCredentialsPath != "" || c.Spec.UserAssignedIdentityCredentialsCloudType != "") {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "userAssignedIdentityCredentialsPath"), fmt.Sprintf("%s can only be set when AzureClusterIdentity is of type UserAssignedIdentityCredential", c.Spec.UserAssignedIdentityCredentialsPath)))
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "userAssignedIdentityCredentialsCloudType"), fmt.Sprintf("%s can only be set when AzureClusterIdentity is of type UserAssignedIdentityCredential ", c.Spec.UserAssignedIdentityCredentialsCloudType)))
- }
- if len(allErrs) == 0 {
- return nil, nil
- }
- return nil, apierrors.NewInvalid(GroupVersion.WithKind(AzureClusterIdentityKind).GroupKind(), c.Name, allErrs)
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclusteridentity_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclusteridentity_webhook.go
deleted file mode 100644
index 7ecc650c4a62..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclusteridentity_webhook.go
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-Copyright 2021 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "context"
- "fmt"
-
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-
- webhookutils "sigs.k8s.io/cluster-api-provider-azure/util/webhook"
-)
-
-// SetupWebhookWithManager sets up and registers the webhook with the manager.
-func (c *AzureClusterIdentity) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(azureClusterIdentityWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(c).
- WithValidator(w).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-azureclusteridentity,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=azureclusteridentities,versions=v1beta1,name=validation.azureclusteridentity.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-type azureClusterIdentityWebhook struct{}
-
-var _ webhook.CustomValidator = &azureClusterIdentityWebhook{}
-
-// ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type.
-func (*azureClusterIdentityWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- c, ok := obj.(*AzureClusterIdentity)
- if !ok {
- return nil, fmt.Errorf("expected an AzureClusterIdentity object but got %T", c)
- }
-
- return c.validateClusterIdentity()
-}
-
-// ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type.
-func (*azureClusterIdentityWebhook) ValidateUpdate(_ context.Context, oldRaw, newObj runtime.Object) (admission.Warnings, error) {
- c, ok := newObj.(*AzureClusterIdentity)
- if !ok {
- return nil, fmt.Errorf("expected an AzureClusterIdentity object but got %T", c)
- }
-
- var allErrs field.ErrorList
- old := oldRaw.(*AzureClusterIdentity)
- if err := webhookutils.ValidateImmutable(
- field.NewPath("Spec", "Type"),
- old.Spec.Type,
- c.Spec.Type); err != nil {
- allErrs = append(allErrs, err)
- }
- if len(allErrs) == 0 {
- return c.validateClusterIdentity()
- }
- return nil, apierrors.NewInvalid(GroupVersion.WithKind(AzureClusterIdentityKind).GroupKind(), c.Name, allErrs)
-}
-
-// ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type.
-func (*azureClusterIdentityWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclustertemplate_default.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclustertemplate_default.go
deleted file mode 100644
index 99facc26afa3..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclustertemplate_default.go
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
-Copyright 2022 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "fmt"
-)
-
-func (c *AzureClusterTemplate) setDefaults() {
- c.Spec.Template.Spec.AzureClusterClassSpec.setDefaults()
- c.setNetworkTemplateSpecDefaults()
-}
-
-func (c *AzureClusterTemplate) setNetworkTemplateSpecDefaults() {
- c.setVnetTemplateDefaults()
- c.setBastionTemplateDefaults()
- c.setSubnetsTemplateDefaults()
-
- apiServerLB := &c.Spec.Template.Spec.NetworkSpec.APIServerLB
- apiServerLB.setAPIServerLBDefaults()
- c.setNodeOutboundLBDefaults()
- c.setControlPlaneOutboundLBDefaults()
-}
-
-func (c *AzureClusterTemplate) setVnetTemplateDefaults() {
- c.Spec.Template.Spec.NetworkSpec.Vnet.VnetClassSpec.setDefaults()
-}
-
-func (c *AzureClusterTemplate) setBastionTemplateDefaults() {
- if c.Spec.Template.Spec.BastionSpec.AzureBastion != nil {
- // Ensure defaults for Subnet settings.
- if len(c.Spec.Template.Spec.BastionSpec.AzureBastion.Subnet.CIDRBlocks) == 0 {
- c.Spec.Template.Spec.BastionSpec.AzureBastion.Subnet.CIDRBlocks = []string{DefaultAzureBastionSubnetCIDR}
- }
- if c.Spec.Template.Spec.BastionSpec.AzureBastion.Subnet.Role == "" {
- c.Spec.Template.Spec.BastionSpec.AzureBastion.Subnet.Role = DefaultAzureBastionSubnetRole
- }
- }
-}
-
-func (c *AzureClusterTemplate) setSubnetsTemplateDefaults() {
- clusterSubnet, err := c.Spec.Template.Spec.NetworkSpec.GetSubnetTemplate(SubnetCluster)
- clusterSubnetExists := err == nil
- if clusterSubnetExists {
- clusterSubnet.SubnetClassSpec.setDefaults(DefaultClusterSubnetCIDR)
- clusterSubnet.SecurityGroup.setDefaults()
- c.Spec.Template.Spec.NetworkSpec.UpdateSubnetTemplate(clusterSubnet, SubnetCluster)
- }
-
- cpSubnet, errcp := c.Spec.Template.Spec.NetworkSpec.GetSubnetTemplate(SubnetControlPlane)
- if errcp == nil {
- cpSubnet.SubnetClassSpec.setDefaults(DefaultControlPlaneSubnetCIDR)
- cpSubnet.SecurityGroup.setDefaults()
- c.Spec.Template.Spec.NetworkSpec.UpdateSubnetTemplate(cpSubnet, SubnetControlPlane)
- } else if errcp != nil && !clusterSubnetExists {
- cpSubnet = SubnetTemplateSpec{SubnetClassSpec: SubnetClassSpec{Role: SubnetControlPlane}}
- cpSubnet.SubnetClassSpec.setDefaults(DefaultControlPlaneSubnetCIDR)
- cpSubnet.SecurityGroup.setDefaults()
- c.Spec.Template.Spec.NetworkSpec.Subnets = append(c.Spec.Template.Spec.NetworkSpec.Subnets, cpSubnet)
- }
-
- var nodeSubnetFound bool
- var nodeSubnetCounter int
- for i, subnet := range c.Spec.Template.Spec.NetworkSpec.Subnets {
- if subnet.Role != SubnetNode {
- continue
- }
- nodeSubnetCounter++
- nodeSubnetFound = true
- subnet.SubnetClassSpec.setDefaults(fmt.Sprintf(DefaultNodeSubnetCIDRPattern, nodeSubnetCounter))
- subnet.SecurityGroup.setDefaults()
- c.Spec.Template.Spec.NetworkSpec.Subnets[i] = subnet
- }
-
- if !nodeSubnetFound && !clusterSubnetExists {
- nodeSubnet := SubnetTemplateSpec{
- SubnetClassSpec: SubnetClassSpec{
- Role: SubnetNode,
- CIDRBlocks: []string{DefaultNodeSubnetCIDR},
- },
- }
- c.Spec.Template.Spec.NetworkSpec.Subnets = append(c.Spec.Template.Spec.NetworkSpec.Subnets, nodeSubnet)
- }
-}
-
-func (c *AzureClusterTemplate) setNodeOutboundLBDefaults() {
- if c.Spec.Template.Spec.NetworkSpec.NodeOutboundLB == nil {
- if c.Spec.Template.Spec.NetworkSpec.APIServerLB.Type == Internal {
- return
- }
-
- var needsOutboundLB bool
- for _, subnet := range c.Spec.Template.Spec.NetworkSpec.Subnets {
- if (subnet.Role == SubnetNode || subnet.Role == SubnetCluster) && subnet.IsIPv6Enabled() {
- needsOutboundLB = true
- break
- }
- }
-
- // If we don't default the outbound LB when there are some subnets with NAT gateway,
- // and some without, those without wouldn't have outbound traffic. So taking the
- // safer route, we configure the outbound LB in that scenario.
- if !needsOutboundLB {
- return
- }
-
- c.Spec.Template.Spec.NetworkSpec.NodeOutboundLB = &LoadBalancerClassSpec{}
- }
-
- c.Spec.Template.Spec.NetworkSpec.NodeOutboundLB.setNodeOutboundLBDefaults()
-}
-
-func (c *AzureClusterTemplate) setControlPlaneOutboundLBDefaults() {
- lb := c.Spec.Template.Spec.NetworkSpec.ControlPlaneOutboundLB
- if lb == nil {
- return
- }
- lb.setControlPlaneOutboundLBDefaults()
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclustertemplate_types.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclustertemplate_types.go
index 487a18270bfb..c9bb5e61b0e7 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclustertemplate_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclustertemplate_types.go
@@ -47,7 +47,7 @@ type AzureClusterTemplateList struct {
}
func init() {
- SchemeBuilder.Register(&AzureClusterTemplate{}, &AzureClusterTemplateList{})
+ objectTypes = append(objectTypes, &AzureClusterTemplate{}, &AzureClusterTemplateList{})
}
// AzureClusterTemplateResource describes the data needed to create an AzureCluster from a template.
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclustertemplate_validation.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclustertemplate_validation.go
deleted file mode 100644
index fe078960b97b..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclustertemplate_validation.go
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
-Copyright 2022 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "fmt"
-
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime/schema"
- "k8s.io/apimachinery/pkg/util/validation/field"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-)
-
-func (c *AzureClusterTemplate) validateClusterTemplate() (admission.Warnings, error) {
- var allErrs field.ErrorList
- allErrs = append(allErrs, c.validateClusterTemplateSpec()...)
-
- if len(allErrs) == 0 {
- return nil, nil
- }
-
- return nil, apierrors.NewInvalid(
- schema.GroupKind{Group: "infrastructure.cluster.x-k8s.io", Kind: "AzureClusterTemplate"},
- c.Name, allErrs)
-}
-
-func (c *AzureClusterTemplate) validateClusterTemplateSpec() field.ErrorList {
- var allErrs field.ErrorList
-
- allErrs = append(allErrs, validateVnetCIDR(
- c.Spec.Template.Spec.NetworkSpec.Vnet.CIDRBlocks,
- field.NewPath("spec").Child("template").Child("spec").
- Child("networkSpec").Child("vnet").Child("cidrBlocks"))...)
-
- allErrs = append(allErrs, validateSubnetTemplates(
- c.Spec.Template.Spec.NetworkSpec.Subnets,
- c.Spec.Template.Spec.NetworkSpec.Vnet,
- field.NewPath("spec").Child("template").Child("spec").Child("networkSpec").Child("subnets"),
- )...)
-
- allErrs = append(allErrs, c.validateAPIServerLB(
- field.NewPath("spec").Child("template").Child("spec").Child("networkSpec").Child("apiServerLB"),
- )...)
-
- allErrs = append(allErrs, c.validateNetworkSpec()...)
-
- allErrs = append(allErrs, c.validateControlPlaneOutboundLB()...)
-
- allErrs = append(allErrs, c.validatePrivateDNSZoneName()...)
-
- allErrs = append(allErrs, c.validatePrivateDNSZoneResourceGroup()...)
-
- return allErrs
-}
-
-func (c *AzureClusterTemplate) validateNetworkSpec() field.ErrorList {
- var allErrs field.ErrorList
-
- var needOutboundLB bool
- networkSpec := c.Spec.Template.Spec.NetworkSpec
- for _, subnet := range networkSpec.Subnets {
- if subnet.Role == SubnetNode && subnet.IsIPv6Enabled() {
- needOutboundLB = true
- break
- }
- }
- if needOutboundLB {
- allErrs = append(allErrs, c.validateNodeOutboundLB()...)
- }
-
- return allErrs
-}
-
-func validateSubnetTemplates(subnets SubnetTemplatesSpec, vnet VnetTemplateSpec, fld *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- subnetNames := make(map[string]bool, len(subnets))
- requiredSubnetRoles := map[string]bool{
- "control-plane": false,
- "node": false,
- }
-
- for i, subnet := range subnets {
- if err := validateSubnetName(subnet.Name, fld.Index(i).Child("name")); err != nil {
- allErrs = append(allErrs, err)
- }
- if _, ok := subnetNames[subnet.Name]; ok {
- allErrs = append(allErrs, field.Duplicate(fld, subnet.Name))
- }
- subnetNames[subnet.Name] = true
- for role := range requiredSubnetRoles {
- if role == string(subnet.Role) {
- requiredSubnetRoles[role] = true
- }
- }
- for j, rule := range subnet.SecurityGroup.SecurityRules {
- if err := validateSecurityRule(
- rule,
- fld.Index(i).Child("securityGroup").Child("securityGroup").Child("securityRules").Index(j),
- ); err != nil {
- allErrs = append(allErrs, err...)
- }
- }
- allErrs = append(allErrs, validateSubnetCIDR(subnet.CIDRBlocks, vnet.CIDRBlocks, fld.Index(i).Child("cidrBlocks"))...)
- }
- for k, v := range requiredSubnetRoles {
- if !v {
- allErrs = append(allErrs, field.Required(fld,
- fmt.Sprintf("required role %s not included in provided subnets", k)))
- }
- }
- return allErrs
-}
-
-func (c *AzureClusterTemplate) validateAPIServerLB(apiServerLBPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- lb := c.Spec.Template.Spec.NetworkSpec.APIServerLB
- allErrs = append(allErrs, validateClassSpecForAPIServerLB(lb, nil, apiServerLBPath)...)
- return allErrs
-}
-
-func (c *AzureClusterTemplate) validateNodeOutboundLB() field.ErrorList {
- var allErrs field.ErrorList
-
- fldPath := field.NewPath("spec").Child("template").Child("spec").Child("networkSpec").Child("nodeOutboundLB")
- apiserverLB := c.Spec.Template.Spec.NetworkSpec.APIServerLB
- lb := c.Spec.Template.Spec.NetworkSpec.NodeOutboundLB
-
- allErrs = append(allErrs, validateClassSpecForNodeOutboundLB(lb, nil, apiserverLB, fldPath)...)
-
- return allErrs
-}
-
-func (c *AzureClusterTemplate) validateControlPlaneOutboundLB() field.ErrorList {
- var allErrs field.ErrorList
-
- fldPath := field.NewPath("spec").Child("template").Child("spec").Child("networkSpec").Child("controlPlaneOutboundLB")
- apiserverLB := c.Spec.Template.Spec.NetworkSpec.APIServerLB
- lb := c.Spec.Template.Spec.NetworkSpec.ControlPlaneOutboundLB
-
- allErrs = append(allErrs, validateClassSpecForControlPlaneOutboundLB(lb, apiserverLB, fldPath)...)
-
- return allErrs
-}
-
-func (c *AzureClusterTemplate) validatePrivateDNSZoneName() field.ErrorList {
- var allErrs field.ErrorList
-
- fldPath := field.NewPath("spec").Child("template").Child("spec").Child("networkSpec").Child("privateDNSZoneName")
- networkSpec := c.Spec.Template.Spec.NetworkSpec
-
- allErrs = append(allErrs, validatePrivateDNSZoneName(
- networkSpec.PrivateDNSZoneName,
- true,
- networkSpec.APIServerLB.Type,
- fldPath,
- )...)
-
- return allErrs
-}
-
-func (c *AzureClusterTemplate) validatePrivateDNSZoneResourceGroup() field.ErrorList {
- var allErrs field.ErrorList
-
- fldPath := field.NewPath("spec").Child("template").Child("spec").Child("networkSpec").Child("privateDNSZoneResourceGroup")
- networkSpec := c.Spec.Template.Spec.NetworkSpec
-
- allErrs = append(allErrs, validatePrivateDNSZoneResourceGroup(
- networkSpec.PrivateDNSZoneName,
- networkSpec.PrivateDNSZoneResourceGroup,
- fldPath,
- )...)
-
- return allErrs
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclustertemplate_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclustertemplate_webhook.go
deleted file mode 100644
index 3f9c0fe82c14..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclustertemplate_webhook.go
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
-Copyright 2022 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "context"
- "fmt"
- "reflect"
-
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-)
-
-// AzureClusterTemplateImmutableMsg is the message used for errors on fields that are immutable.
-const AzureClusterTemplateImmutableMsg = "AzureClusterTemplate spec.template.spec field is immutable. Please create new resource instead. ref doc: https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-class/change-clusterclass.html"
-
-// SetupWebhookWithManager will set up the webhook to be managed by the specified manager.
-func (c *AzureClusterTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(azureClusterTemplateWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(c).
- WithValidator(w).
- WithDefaulter(w).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-azureclustertemplate,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=azureclustertemplates,versions=v1beta1,name=validation.azureclustertemplate.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta1-azureclustertemplate,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=azureclustertemplates,versions=v1beta1,name=default.azureclustertemplate.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-type azureClusterTemplateWebhook struct{}
-
-var _ webhook.CustomDefaulter = &azureClusterTemplateWebhook{}
-
-// Default implements webhook.CustomDefaulter so a webhook will be registered for the type.
-func (*azureClusterTemplateWebhook) Default(_ context.Context, obj runtime.Object) error {
- c, ok := obj.(*AzureClusterTemplate)
- if !ok {
- return fmt.Errorf("expected an AzureClusterTemplate object but got %T", c)
- }
-
- c.setDefaults()
- return nil
-}
-
-var _ webhook.CustomValidator = &azureClusterTemplateWebhook{}
-
-// ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type.
-func (*azureClusterTemplateWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- c, ok := obj.(*AzureClusterTemplate)
- if !ok {
- return nil, fmt.Errorf("expected an AzureClusterTemplate object but got %T", c)
- }
-
- return c.validateClusterTemplate()
-}
-
-// ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type.
-func (*azureClusterTemplateWebhook) ValidateUpdate(_ context.Context, oldRaw, newObj runtime.Object) (admission.Warnings, error) {
- c, ok := newObj.(*AzureClusterTemplate)
- if !ok {
- return nil, fmt.Errorf("expected an AzureClusterTemplate object but got %T", c)
- }
-
- var allErrs field.ErrorList
- old := oldRaw.(*AzureClusterTemplate)
- if !reflect.DeepEqual(c.Spec.Template.Spec, old.Spec.Template.Spec) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("AzureClusterTemplate", "spec", "template", "spec"), c, AzureClusterTemplateImmutableMsg),
- )
- }
-
- if len(allErrs) == 0 {
- return nil, nil
- }
- return nil, apierrors.NewInvalid(GroupVersion.WithKind(AzureClusterTemplateKind).GroupKind(), c.Name, allErrs)
-}
-
-// ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type.
-func (*azureClusterTemplateWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureimage_validation.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureimage_validation.go
deleted file mode 100644
index d9e14e932e07..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureimage_validation.go
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
-Copyright 2021 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "k8s.io/apimachinery/pkg/util/validation/field"
-)
-
-// ValidateImage validates an image.
-func ValidateImage(image *Image, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
-
- if image == nil {
- // allow empty image as it is defaulted in the AzureMachine controller
- return allErrs
- }
-
- allErrs = append(allErrs, validateSingleDetailsOnly(image, fldPath)...)
-
- if image.Marketplace != nil {
- allErrs = append(allErrs, validateMarketplaceImage(image, fldPath)...)
- }
- if image.SharedGallery != nil {
- allErrs = append(allErrs, validateSharedGalleryImage(image, fldPath)...)
- }
- if image.ID != nil {
- allErrs = append(allErrs, validateSpecificImage(image, fldPath)...)
- }
- if image.ComputeGallery != nil {
- allErrs = append(allErrs, validateComputeGalleryImage(image, fldPath)...)
- }
-
- return allErrs
-}
-
-func validateSingleDetailsOnly(image *Image, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
- imageDetailsFound := (image.ID != nil)
-
- if image.Marketplace != nil {
- if imageDetailsFound {
- allErrs = append(allErrs, field.Forbidden(fldPath.Child("Marketplace"), "Marketplace cannot be used as an image ID has been specified"))
- } else {
- imageDetailsFound = true
- }
- }
-
- if image.SharedGallery != nil {
- if imageDetailsFound {
- allErrs = append(allErrs, field.Forbidden(fldPath.Child("SharedGallery"), "SharedGallery cannot be used as an image ID. Marketplace or ComputeGallery images has been specified"))
- } else {
- imageDetailsFound = true
- }
- }
-
- if image.ComputeGallery != nil {
- if imageDetailsFound {
- allErrs = append(allErrs, field.Forbidden(fldPath.Child("ComputeGallery"), "ComputeGallery cannot be used as an image ID. Marketplace or SharedGallery images has been specified"))
- } else {
- imageDetailsFound = true
- }
- }
-
- if !imageDetailsFound {
- allErrs = append(allErrs, field.Required(fldPath, "You must supply an ID, Marketplace or ComputeGallery image details"))
- }
-
- return allErrs
-}
-
-func validateComputeGalleryImage(image *Image, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
-
- if image.ComputeGallery.SubscriptionID != nil && image.ComputeGallery.ResourceGroup == nil {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("ResourceGroup"), "", "ResourceGroup cannot be empty when SubscriptionID is specified"))
- }
- if image.ComputeGallery.ResourceGroup != nil && image.ComputeGallery.SubscriptionID == nil {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("SubscriptionID"), "", "SubscriptionID cannot be empty when ResourceGroup is specified"))
- }
-
- return allErrs
-}
-
-func validateSharedGalleryImage(image *Image, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
-
- if image.SharedGallery.SubscriptionID == "" {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("SubscriptionID"), "", "SubscriptionID cannot be empty when specifying an AzureSharedGalleryImage"))
- }
- if image.SharedGallery.ResourceGroup == "" {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("ResourceGroup"), "", "ResourceGroup cannot be empty when specifying an AzureSharedGalleryImage"))
- }
- if image.SharedGallery.Gallery == "" {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("Gallery"), "", "Gallery cannot be empty when specifying an AzureSharedGalleryImage"))
- }
- if image.SharedGallery.Name == "" {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("Name"), "", "Name cannot be empty when specifying an AzureSharedGalleryImage"))
- }
- if image.SharedGallery.Version == "" {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("Version"), "", "Version cannot be empty when specifying an AzureSharedGalleryImage"))
- }
-
- return allErrs
-}
-
-func validateMarketplaceImage(image *Image, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
-
- if image.Marketplace.Publisher == "" {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("Publisher"), "", "Publisher cannot be empty when specifying an AzureMarketplaceImage"))
- }
- if image.Marketplace.Offer == "" {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("Offer"), "", "Offer cannot be empty when specifying an AzureMarketplaceImage"))
- }
- if image.Marketplace.SKU == "" {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("SKU"), "", "SKU cannot be empty when specifying an AzureMarketplaceImage"))
- }
- if image.Marketplace.Version == "" {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("Version"), "", "Version cannot be empty when specifying an AzureMarketplaceImage"))
- }
- return allErrs
-}
-
-func validateSpecificImage(image *Image, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
-
- if *image.ID == "" {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("ID"), "", "ID cannot be empty when specifying an AzureImageByID"))
- }
-
- return allErrs
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachine_default.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachine_default.go
deleted file mode 100644
index 7e216e82e6e7..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachine_default.go
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
-Copyright 2021 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "context"
- "encoding/base64"
- "fmt"
- "time"
-
- "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5"
- "github.com/pkg/errors"
- "golang.org/x/crypto/ssh"
- kerrors "k8s.io/apimachinery/pkg/util/errors"
- "k8s.io/apimachinery/pkg/util/uuid"
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
- "sigs.k8s.io/controller-runtime/pkg/client"
-
- utilSSH "sigs.k8s.io/cluster-api-provider-azure/util/ssh"
-)
-
-// ContributorRoleID is the ID of the built-in "Contributor" role.
-const ContributorRoleID = "b24988ac-6180-42a0-ab88-20f7382dd24c"
-
-// SetDefaultSSHPublicKey sets the default SSHPublicKey for an AzureMachine.
-func (s *AzureMachineSpec) SetDefaultSSHPublicKey() error {
- if sshKeyData := s.SSHPublicKey; sshKeyData == "" {
- _, publicRsaKey, err := utilSSH.GenerateSSHKey()
- if err != nil {
- return err
- }
-
- s.SSHPublicKey = base64.StdEncoding.EncodeToString(ssh.MarshalAuthorizedKey(publicRsaKey))
- }
- return nil
-}
-
-// SetDataDisksDefaults sets the data disk defaults for an AzureMachine.
-func (s *AzureMachineSpec) SetDataDisksDefaults() {
- set := make(map[int32]struct{})
- // populate all the existing values in the set
- for _, disk := range s.DataDisks {
- if disk.Lun != nil {
- set[*disk.Lun] = struct{}{}
- }
- }
- // Look for unique values for unassigned LUNs
- for i, disk := range s.DataDisks {
- if disk.Lun == nil {
- for l := range s.DataDisks {
- lun := int32(l)
- if _, ok := set[lun]; !ok {
- s.DataDisks[i].Lun = &lun
- set[lun] = struct{}{}
- break
- }
- }
- }
- if disk.CachingType == "" {
- if s.DataDisks[i].ManagedDisk != nil &&
- s.DataDisks[i].ManagedDisk.StorageAccountType == string(armcompute.StorageAccountTypesUltraSSDLRS) {
- s.DataDisks[i].CachingType = string(armcompute.CachingTypesNone)
- } else {
- s.DataDisks[i].CachingType = string(armcompute.CachingTypesReadWrite)
- }
- }
- }
-}
-
-// SetIdentityDefaults sets the defaults for VM Identity.
-func (s *AzureMachineSpec) SetIdentityDefaults(subscriptionID string) {
- // Ensure the deprecated fields and new fields are not populated simultaneously
- if s.RoleAssignmentName != "" && s.SystemAssignedIdentityRole != nil && s.SystemAssignedIdentityRole.Name != "" {
- // Both the deprecated and the new fields are both set, return without changes
- // and reject the request in the validating webhook which runs later.
- return
- }
- if s.Identity == VMIdentitySystemAssigned {
- if s.SystemAssignedIdentityRole == nil {
- s.SystemAssignedIdentityRole = &SystemAssignedIdentityRole{}
- }
- if s.RoleAssignmentName != "" {
- // Move the existing value from the deprecated RoleAssignmentName field.
- s.SystemAssignedIdentityRole.Name = s.RoleAssignmentName
- s.RoleAssignmentName = ""
- } else if s.SystemAssignedIdentityRole.Name == "" {
- // Default role name to a generated UUID.
- s.SystemAssignedIdentityRole.Name = string(uuid.NewUUID())
- }
- if s.SystemAssignedIdentityRole.Scope == "" && subscriptionID != "" {
- // Default scope to the subscription.
- s.SystemAssignedIdentityRole.Scope = fmt.Sprintf("/subscriptions/%s/", subscriptionID)
- }
- if s.SystemAssignedIdentityRole.DefinitionID == "" && subscriptionID != "" {
- // Default role definition ID to Contributor role.
- s.SystemAssignedIdentityRole.DefinitionID = fmt.Sprintf("/subscriptions/%s/providers/Microsoft.Authorization/roleDefinitions/%s", subscriptionID, ContributorRoleID)
- }
- }
-}
-
-// SetSpotEvictionPolicyDefaults sets the defaults for the spot VM eviction policy.
-func (s *AzureMachineSpec) SetSpotEvictionPolicyDefaults() {
- if s.SpotVMOptions != nil && s.SpotVMOptions.EvictionPolicy == nil {
- defaultPolicy := SpotEvictionPolicyDeallocate
- if s.OSDisk.DiffDiskSettings != nil && s.OSDisk.DiffDiskSettings.Option == "Local" {
- defaultPolicy = SpotEvictionPolicyDelete
- }
- s.SpotVMOptions.EvictionPolicy = &defaultPolicy
- }
-}
-
-// SetDiagnosticsDefaults sets the defaults for Diagnostic settings for an AzureMachinePool.
-func (s *AzureMachineSpec) SetDiagnosticsDefaults() {
- bootDiagnosticsDefault := &BootDiagnostics{
- StorageAccountType: ManagedDiagnosticsStorage,
- }
-
- diagnosticsDefault := &Diagnostics{Boot: bootDiagnosticsDefault}
-
- if s.Diagnostics == nil {
- s.Diagnostics = diagnosticsDefault
- }
-
- if s.Diagnostics.Boot == nil {
- s.Diagnostics.Boot = bootDiagnosticsDefault
- }
-}
-
-// SetNetworkInterfacesDefaults sets the defaults for the network interfaces.
-func (s *AzureMachineSpec) SetNetworkInterfacesDefaults() {
- // Ensure the deprecated fields and new fields are not populated simultaneously
- if (s.SubnetName != "" || s.AcceleratedNetworking != nil) && len(s.NetworkInterfaces) > 0 {
- // Both the deprecated and the new fields are both set, return without changes
- // and reject the request in the validating webhook which runs later.
- return
- }
-
- if len(s.NetworkInterfaces) == 0 {
- s.NetworkInterfaces = []NetworkInterface{
- {
- SubnetName: s.SubnetName,
- AcceleratedNetworking: s.AcceleratedNetworking,
- },
- }
- s.SubnetName = ""
- s.AcceleratedNetworking = nil
- }
-
- // Ensure that PrivateIPConfigs defaults to 1 if not specified.
- for i := 0; i < len(s.NetworkInterfaces); i++ {
- if s.NetworkInterfaces[i].PrivateIPConfigs == 0 {
- s.NetworkInterfaces[i].PrivateIPConfigs = 1
- }
- }
-}
-
-// GetOwnerAzureClusterNameAndNamespace returns the owner azure cluster's name and namespace for the given cluster name and namespace.
-func GetOwnerAzureClusterNameAndNamespace(cli client.Client, clusterName string, namespace string, maxAttempts int) (azureClusterName string, azureClusterNamespace string, err error) {
- ctx := context.Background()
-
- ownerCluster := &clusterv1.Cluster{}
- key := client.ObjectKey{
- Namespace: namespace,
- Name: clusterName,
- }
-
- for i := 1; ; i++ {
- if err := cli.Get(ctx, key, ownerCluster); err != nil {
- if i > maxAttempts {
- return "", "", errors.Wrapf(err, "failed to find owner cluster for %s/%s", namespace, clusterName)
- }
- time.Sleep(1 * time.Second)
- continue
- }
- break
- }
-
- return ownerCluster.Spec.InfrastructureRef.Name, ownerCluster.Namespace, nil
-}
-
-// GetSubscriptionID returns the subscription ID for the AzureCluster given the cluster name and namespace.
-func GetSubscriptionID(cli client.Client, ownerAzureClusterName string, ownerAzureClusterNamespace string, maxAttempts int) (string, error) {
- ctx := context.Background()
-
- ownerAzureCluster := &AzureCluster{}
- key := client.ObjectKey{
- Namespace: ownerAzureClusterNamespace,
- Name: ownerAzureClusterName,
- }
- for i := 1; ; i++ {
- if err := cli.Get(ctx, key, ownerAzureCluster); err != nil {
- if i >= maxAttempts {
- return "", errors.Wrapf(err, "failed to find AzureCluster for owner cluster %s/%s", ownerAzureClusterNamespace, ownerAzureClusterName)
- }
- time.Sleep(1 * time.Second)
- continue
- }
- break
- }
-
- return ownerAzureCluster.Spec.SubscriptionID, nil
-}
-
-// SetDefaults sets to the defaults for the AzureMachineSpec.
-func (m *AzureMachine) SetDefaults(client client.Client) error {
- var errs []error
- if err := m.Spec.SetDefaultSSHPublicKey(); err != nil {
- errs = append(errs, errors.Wrap(err, "failed to set default SSH public key"))
- }
-
- // Fetch the Cluster.
- clusterName, ok := m.Labels[clusterv1.ClusterNameLabel]
- if !ok {
- errs = append(errs, errors.Errorf("failed to fetch ClusterName for AzureMachine %s/%s", m.Namespace, m.Name))
- }
-
- ownerAzureClusterName, ownerAzureClusterNamespace, err := GetOwnerAzureClusterNameAndNamespace(client, clusterName, m.Namespace, 5)
- if err != nil {
- errs = append(errs, errors.Wrapf(err, "failed to fetch owner cluster for AzureMachine %s/%s", m.Namespace, m.Name))
- }
-
- subscriptionID, err := GetSubscriptionID(client, ownerAzureClusterName, ownerAzureClusterNamespace, 5)
- if err != nil {
- errs = append(errs, errors.Wrapf(err, "failed to fetch subscription ID for AzureMachine %s/%s", m.Namespace, m.Name))
- }
-
- m.Spec.SetDataDisksDefaults()
- m.Spec.SetIdentityDefaults(subscriptionID)
- m.Spec.SetSpotEvictionPolicyDefaults()
- m.Spec.SetDiagnosticsDefaults()
- m.Spec.SetNetworkInterfacesDefaults()
-
- return kerrors.NewAggregate(errs)
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachine_types.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachine_types.go
index 402888f180ff..d2abd7e90990 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachine_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachine_types.go
@@ -139,6 +139,8 @@ type AzureMachineSpec struct {
// DisableVMBootstrapExtension specifies whether the VM bootstrap extension should be disabled on the virtual machine.
// Use this setting if you want to disable only the bootstrapping extension and not all extensions.
+ // If unset, CAPZ treats this as true during reconciliation, meaning the bootstrap extension is not installed on new VMs.
+ // Set to false to opt back in to the bootstrap extension.
// +optional
DisableVMBootstrapExtension *bool `json:"disableVMBootstrapExtension,omitempty"`
@@ -317,5 +319,5 @@ func (m *AzureMachine) SetFutures(futures Futures) {
}
func init() {
- SchemeBuilder.Register(&AzureMachine{}, &AzureMachineList{})
+ objectTypes = append(objectTypes, &AzureMachine{}, &AzureMachineList{})
}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachine_validation.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachine_validation.go
deleted file mode 100644
index d370f3eb590f..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachine_validation.go
+++ /dev/null
@@ -1,503 +0,0 @@
-/*
-Copyright 2021 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "encoding/base64"
- "fmt"
-
- "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5"
- "github.com/google/uuid"
- "golang.org/x/crypto/ssh"
- "k8s.io/apimachinery/pkg/util/validation/field"
- "k8s.io/utils/ptr"
-
- azureutil "sigs.k8s.io/cluster-api-provider-azure/util/azure"
-)
-
-// ValidateAzureMachineSpec checks an AzureMachineSpec and returns any validation errors.
-func ValidateAzureMachineSpec(spec AzureMachineSpec) field.ErrorList {
- var allErrs field.ErrorList
-
- if errs := ValidateImage(spec.Image, field.NewPath("image")); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := ValidateOSDisk(spec.OSDisk, field.NewPath("osDisk")); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := ValidateConfidentialCompute(spec.OSDisk.ManagedDisk, spec.SecurityProfile, field.NewPath("securityProfile")); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := ValidateSSHKey(spec.SSHPublicKey, field.NewPath("sshPublicKey")); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := ValidateUserAssignedIdentity(spec.Identity, spec.UserAssignedIdentities, field.NewPath("userAssignedIdentities")); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := ValidateDataDisks(spec.DataDisks, field.NewPath("dataDisks")); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := ValidateDiagnostics(spec.Diagnostics, field.NewPath("diagnostics")); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := ValidateNetwork(spec.SubnetName, spec.AcceleratedNetworking, spec.NetworkInterfaces, field.NewPath("networkInterfaces")); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := ValidateSystemAssignedIdentityRole(spec.Identity, spec.RoleAssignmentName, spec.SystemAssignedIdentityRole, field.NewPath("systemAssignedIdentityRole")); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := ValidateCapacityReservationGroupID(spec.CapacityReservationGroupID, field.NewPath("capacityReservationGroupID")); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := ValidateVMExtensions(spec.DisableExtensionOperations, spec.VMExtensions, field.NewPath("vmExtensions")); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- return allErrs
-}
-
-// ValidateNetwork validates the network configuration.
-func ValidateNetwork(subnetName string, acceleratedNetworking *bool, networkInterfaces []NetworkInterface, fldPath *field.Path) field.ErrorList {
- if (networkInterfaces != nil) && len(networkInterfaces) > 0 && subnetName != "" {
- return field.ErrorList{field.Invalid(fldPath, networkInterfaces, "cannot set both networkInterfaces and machine subnetName")}
- }
-
- if (networkInterfaces != nil) && len(networkInterfaces) > 0 && acceleratedNetworking != nil {
- return field.ErrorList{field.Invalid(fldPath, networkInterfaces, "cannot set both networkInterfaces and machine acceleratedNetworking")}
- }
-
- for _, nic := range networkInterfaces {
- if nic.PrivateIPConfigs < 1 {
- return field.ErrorList{field.Invalid(fldPath, networkInterfaces, "number of privateIPConfigs per interface must be at least 1")}
- }
- }
-
- return field.ErrorList{}
-}
-
-// ValidateSSHKey validates an SSHKey.
-func ValidateSSHKey(sshKey string, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
-
- decoded, err := base64.StdEncoding.DecodeString(sshKey)
- if err != nil {
- allErrs = append(allErrs, field.Invalid(fldPath, sshKey, "the SSH public key is not properly base64 encoded"))
- return allErrs
- }
-
- if _, _, _, _, err := ssh.ParseAuthorizedKey(decoded); err != nil {
- allErrs = append(allErrs, field.Invalid(fldPath, sshKey, "the SSH public key is not valid"))
- return allErrs
- }
-
- return allErrs
-}
-
-// ValidateSystemAssignedIdentity validates the system-assigned identities list.
-func ValidateSystemAssignedIdentity(identityType VMIdentity, oldIdentity, newIdentity string, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
-
- if identityType == VMIdentitySystemAssigned {
- if _, err := uuid.Parse(newIdentity); err != nil {
- allErrs = append(allErrs, field.Invalid(fldPath, newIdentity, "Role assignment name must be a valid GUID. It is optional and will be auto-generated when not specified."))
- }
- if oldIdentity != "" && oldIdentity != newIdentity {
- allErrs = append(allErrs, field.Invalid(fldPath, newIdentity, "Role assignment name should not be modified after AzureMachine creation."))
- }
- } else if newIdentity != "" {
- allErrs = append(allErrs, field.Forbidden(fldPath, "Role assignment name should only be set when using system assigned identity."))
- }
-
- return allErrs
-}
-
-// ValidateUserAssignedIdentity validates the user-assigned identities list.
-func ValidateUserAssignedIdentity(identityType VMIdentity, userAssignedIdentities []UserAssignedIdentity, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
-
- if len(userAssignedIdentities) > 0 && identityType != VMIdentityUserAssigned {
- allErrs = append(allErrs, field.Invalid(fldPath, identityType, "must be set to 'UserAssigned' when assigning any user identity to the machine"))
- }
-
- if identityType == VMIdentityUserAssigned {
- if len(userAssignedIdentities) == 0 {
- allErrs = append(allErrs, field.Required(fldPath, "must be specified for the 'UserAssigned' identity type"))
- }
- for _, identity := range userAssignedIdentities {
- if identity.ProviderID != "" {
- if _, err := azureutil.ParseResourceID(identity.ProviderID); err != nil {
- allErrs = append(allErrs, field.Invalid(fldPath, identity.ProviderID, "must be a valid Azure resource ID"))
- }
- }
- }
- }
-
- return allErrs
-}
-
-// ValidateSystemAssignedIdentityRole validates the system-assigned identity role.
-func ValidateSystemAssignedIdentityRole(identityType VMIdentity, roleAssignmentName string, role *SystemAssignedIdentityRole, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- if roleAssignmentName != "" && role != nil && role.Name != "" {
- allErrs = append(allErrs, field.Invalid(fldPath, role.Name, "cannot set both roleAssignmentName and systemAssignedIdentityRole.name"))
- }
- if identityType == VMIdentitySystemAssigned && role != nil {
- if role.DefinitionID == "" {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "systemAssignedIdentityRole", "definitionID"), role.DefinitionID, "the definitionID field cannot be empty"))
- }
- if role.Scope == "" {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "systemAssignedIdentityRole", "scope"), role.Scope, "the scope field cannot be empty"))
- }
- }
- if identityType != VMIdentitySystemAssigned && role != nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "role"), "systemAssignedIdentityRole can only be set when identity is set to SystemAssigned"))
- }
- return allErrs
-}
-
-// ValidateDataDisks validates a list of data disks.
-func ValidateDataDisks(dataDisks []DataDisk, fieldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
- lunSet := make(map[int32]struct{})
- nameSet := make(map[string]struct{})
- for _, disk := range dataDisks {
- // validate that the disk size is between 4 and 32767.
- if disk.DiskSizeGB < 4 || disk.DiskSizeGB > 32767 {
- allErrs = append(allErrs, field.Invalid(fieldPath.Child("DiskSizeGB"), "", "the disk size should be a value between 4 and 32767"))
- }
-
- // validate that all names are unique
- if disk.NameSuffix == "" {
- allErrs = append(allErrs, field.Required(fieldPath.Child("NameSuffix"), "the name suffix cannot be empty"))
- }
- if _, ok := nameSet[disk.NameSuffix]; ok {
- allErrs = append(allErrs, field.Duplicate(fieldPath, disk.NameSuffix))
- } else {
- nameSet[disk.NameSuffix] = struct{}{}
- }
-
- // validate optional managed disk option
- if disk.ManagedDisk != nil {
- if errs := validateManagedDisk(disk.ManagedDisk, fieldPath.Child("managedDisk"), false); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
- }
-
- // validate that all LUNs are unique and between 0 and 63.
- if disk.Lun == nil {
- allErrs = append(allErrs, field.Required(fieldPath, "LUN should not be nil"))
- } else if *disk.Lun < 0 || *disk.Lun > 63 {
- allErrs = append(allErrs, field.Invalid(fieldPath, disk.Lun, "logical unit number must be between 0 and 63"))
- } else if _, ok := lunSet[*disk.Lun]; ok {
- allErrs = append(allErrs, field.Duplicate(fieldPath, disk.Lun))
- } else {
- lunSet[*disk.Lun] = struct{}{}
- }
-
- // validate cachingType
- allErrs = append(allErrs, validateCachingType(disk.CachingType, fieldPath, disk.ManagedDisk)...)
- }
- return allErrs
-}
-
-// ValidateOSDisk validates the OSDisk spec.
-func ValidateOSDisk(osDisk OSDisk, fieldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
-
- if osDisk.DiskSizeGB != nil {
- if *osDisk.DiskSizeGB <= 0 || *osDisk.DiskSizeGB > 2048 {
- allErrs = append(allErrs, field.Invalid(fieldPath.Child("DiskSizeGB"), "", "the Disk size should be a value between 1 and 2048"))
- }
- }
-
- if osDisk.OSType == "" {
- allErrs = append(allErrs, field.Required(fieldPath.Child("OSType"), "the OS type cannot be empty"))
- }
-
- allErrs = append(allErrs, validateCachingType(osDisk.CachingType, fieldPath, osDisk.ManagedDisk)...)
-
- if osDisk.ManagedDisk != nil {
- if errs := validateManagedDisk(osDisk.ManagedDisk, fieldPath.Child("managedDisk"), true); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
- }
-
- if osDisk.DiffDiskSettings != nil && osDisk.ManagedDisk != nil && osDisk.ManagedDisk.DiskEncryptionSet != nil {
- allErrs = append(allErrs, field.Invalid(
- fieldPath.Child("managedDisks").Child("diskEncryptionSet"),
- osDisk.ManagedDisk.DiskEncryptionSet.ID,
- "diskEncryptionSet is not supported when diffDiskSettings.option is 'Local'",
- ))
- }
- if osDisk.DiffDiskSettings != nil && osDisk.DiffDiskSettings.Placement != nil {
- if osDisk.DiffDiskSettings.Option != string(armcompute.DiffDiskOptionsLocal) {
- allErrs = append(allErrs, field.Invalid(
- fieldPath.Child("diffDiskSettings"),
- osDisk.DiffDiskSettings,
- "placement is only supported when diffDiskSettings.option is 'Local'",
- ))
- }
- }
-
- return allErrs
-}
-
-// validateManagedDisk validates updates to the ManagedDiskParameters field.
-func validateManagedDisk(m *ManagedDiskParameters, fieldPath *field.Path, isOSDisk bool) field.ErrorList {
- allErrs := field.ErrorList{}
-
- if m != nil {
- allErrs = append(allErrs, validateStorageAccountType(m.StorageAccountType, fieldPath.Child("StorageAccountType"), isOSDisk)...)
-
- // DiskEncryptionSet can only be set when SecurityEncryptionType is set to DiskWithVMGuestState
- // https://learn.microsoft.com/en-us/rest/api/compute/virtual-machines/create-or-update?tabs=HTTP#securityencryptiontypes
- if isOSDisk && m.SecurityProfile != nil && m.SecurityProfile.DiskEncryptionSet != nil {
- if m.SecurityProfile.SecurityEncryptionType != SecurityEncryptionTypeDiskWithVMGuestState {
- allErrs = append(allErrs, field.Invalid(
- fieldPath.Child("securityProfile").Child("diskEncryptionSet"),
- m.SecurityProfile.DiskEncryptionSet.ID,
- "diskEncryptionSet is only supported when securityEncryptionType is set to DiskWithVMGuestState",
- ))
- }
- }
- }
-
- return allErrs
-}
-
-// ValidateDataDisksUpdate validates updates to Data disks.
-func ValidateDataDisksUpdate(oldDataDisks, newDataDisks []DataDisk, fieldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
-
- diskErrMsg := "adding/removing data disks after machine creation is not allowed"
- fieldErrMsg := "modifying data disk's fields after machine creation is not allowed"
-
- if len(oldDataDisks) != len(newDataDisks) {
- allErrs = append(allErrs, field.Invalid(fieldPath, newDataDisks, diskErrMsg))
- return allErrs
- }
-
- oldDisks := make(map[string]DataDisk)
-
- for _, disk := range oldDataDisks {
- oldDisks[disk.NameSuffix] = disk
- }
-
- for i, newDisk := range newDataDisks {
- if oldDisk, ok := oldDisks[newDisk.NameSuffix]; ok {
- if newDisk.DiskSizeGB != oldDisk.DiskSizeGB {
- allErrs = append(allErrs, field.Invalid(fieldPath.Index(i).Child("diskSizeGB"), newDataDisks, fieldErrMsg))
- }
-
- allErrs = append(allErrs, validateManagedDisksUpdate(oldDisk.ManagedDisk, newDisk.ManagedDisk, fieldPath.Index(i).Child("managedDisk"))...)
-
- if (newDisk.Lun != nil && oldDisk.Lun != nil) && (*newDisk.Lun != *oldDisk.Lun) {
- allErrs = append(allErrs, field.Invalid(fieldPath.Index(i).Child("lun"), newDataDisks, fieldErrMsg))
- } else if (newDisk.Lun != nil && oldDisk.Lun == nil) || (newDisk.Lun == nil && oldDisk.Lun != nil) {
- allErrs = append(allErrs, field.Invalid(fieldPath.Index(i).Child("lun"), newDataDisks, fieldErrMsg))
- }
-
- if newDisk.CachingType != oldDisk.CachingType {
- allErrs = append(allErrs, field.Invalid(fieldPath.Index(i).Child("cachingType"), newDataDisks, fieldErrMsg))
- }
- } else {
- allErrs = append(allErrs, field.Invalid(fieldPath.Index(i).Child("nameSuffix"), newDataDisks, diskErrMsg))
- }
- }
-
- return allErrs
-}
-
-func validateManagedDisksUpdate(oldDiskParams, newDiskParams *ManagedDiskParameters, fieldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
- fieldErrMsg := "changing managed disk options after machine creation is not allowed"
-
- if newDiskParams != nil && oldDiskParams != nil {
- if newDiskParams.StorageAccountType != oldDiskParams.StorageAccountType {
- allErrs = append(allErrs, field.Invalid(fieldPath.Child("storageAccountType"), newDiskParams, fieldErrMsg))
- }
- if newDiskParams.DiskEncryptionSet != nil && oldDiskParams.DiskEncryptionSet != nil {
- if newDiskParams.DiskEncryptionSet.ID != oldDiskParams.DiskEncryptionSet.ID {
- allErrs = append(allErrs, field.Invalid(fieldPath.Child("diskEncryptionSet").Child("ID"), newDiskParams, fieldErrMsg))
- }
- } else if (newDiskParams.DiskEncryptionSet != nil && oldDiskParams.DiskEncryptionSet == nil) || (newDiskParams.DiskEncryptionSet == nil && oldDiskParams.DiskEncryptionSet != nil) {
- allErrs = append(allErrs, field.Invalid(fieldPath.Child("diskEncryptionSet"), newDiskParams, fieldErrMsg))
- }
- } else if (newDiskParams != nil && oldDiskParams == nil) || (newDiskParams == nil && oldDiskParams != nil) {
- allErrs = append(allErrs, field.Invalid(fieldPath, newDiskParams, fieldErrMsg))
- }
-
- return allErrs
-}
-
-func validateStorageAccountType(storageAccountType string, fieldPath *field.Path, isOSDisk bool) field.ErrorList {
- allErrs := field.ErrorList{}
-
- if isOSDisk && storageAccountType == string(armcompute.StorageAccountTypesUltraSSDLRS) {
- allErrs = append(allErrs, field.Invalid(fieldPath.Child("managedDisks").Child("storageAccountType"), storageAccountType, "UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disks"))
- }
-
- if storageAccountType == "" {
- allErrs = append(allErrs, field.Required(fieldPath, "the Storage Account Type for Managed Disk cannot be empty"))
- return allErrs
- }
-
- for _, possibleStorageAccountType := range armcompute.PossibleDiskStorageAccountTypesValues() {
- if string(possibleStorageAccountType) == storageAccountType {
- return allErrs
- }
- }
- allErrs = append(allErrs, field.Invalid(fieldPath, "", fmt.Sprintf("allowed values are %v", armcompute.PossibleDiskStorageAccountTypesValues())))
- return allErrs
-}
-
-func validateCachingType(cachingType string, fieldPath *field.Path, managedDisk *ManagedDiskParameters) field.ErrorList {
- allErrs := field.ErrorList{}
- cachingTypeChildPath := fieldPath.Child("CachingType")
-
- if managedDisk != nil && managedDisk.StorageAccountType == string(armcompute.StorageAccountTypesUltraSSDLRS) {
- if cachingType != string(armcompute.CachingTypesNone) {
- allErrs = append(allErrs, field.Invalid(cachingTypeChildPath, cachingType, fmt.Sprintf("cachingType '%s' is not supported when storageAccountType is '%s'. Allowed values are: '%s'", cachingType, armcompute.StorageAccountTypesUltraSSDLRS, armcompute.CachingTypesNone)))
- }
- }
-
- for _, possibleCachingType := range armcompute.PossibleCachingTypesValues() {
- if string(possibleCachingType) == cachingType {
- return allErrs
- }
- }
-
- allErrs = append(allErrs, field.Invalid(cachingTypeChildPath, cachingType, fmt.Sprintf("allowed values are %v", armcompute.PossibleCachingTypesValues())))
- return allErrs
-}
-
-// ValidateDiagnostics validates the Diagnostic spec.
-func ValidateDiagnostics(diagnostics *Diagnostics, fieldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
-
- if diagnostics != nil && diagnostics.Boot != nil {
- switch diagnostics.Boot.StorageAccountType {
- case UserManagedDiagnosticsStorage:
- if diagnostics.Boot.UserManaged == nil {
- allErrs = append(allErrs, field.Required(fieldPath.Child("UserManaged"),
- fmt.Sprintf("userManaged must be specified when storageAccountType is '%s'", UserManagedDiagnosticsStorage)))
- } else if diagnostics.Boot.UserManaged.StorageAccountURI == "" {
- allErrs = append(allErrs, field.Required(fieldPath.Child("StorageAccountURI"),
- fmt.Sprintf("StorageAccountURI cannot be empty when storageAccountType is '%s'", UserManagedDiagnosticsStorage)))
- }
- case ManagedDiagnosticsStorage:
- if diagnostics.Boot.UserManaged != nil &&
- diagnostics.Boot.UserManaged.StorageAccountURI != "" {
- allErrs = append(allErrs, field.Invalid(fieldPath.Child("StorageAccountURI"), diagnostics.Boot.UserManaged.StorageAccountURI,
- fmt.Sprintf("StorageAccountURI cannot be set when storageAccountType is '%s'",
- ManagedDiagnosticsStorage)))
- }
- case DisabledDiagnosticsStorage:
- if diagnostics.Boot.UserManaged != nil &&
- diagnostics.Boot.UserManaged.StorageAccountURI != "" {
- allErrs = append(allErrs, field.Invalid(fieldPath.Child("StorageAccountURI"), diagnostics.Boot.UserManaged.StorageAccountURI,
- fmt.Sprintf("StorageAccountURI cannot be set when storageAccountType is '%s'",
- ManagedDiagnosticsStorage)))
- }
- }
- }
-
- return allErrs
-}
-
-// ValidateConfidentialCompute validates the configuration options when the machine is a Confidential VM.
-// https://learn.microsoft.com/en-us/rest/api/compute/virtual-machines/create-or-update?tabs=HTTP#vmdisksecurityprofile
-// https://learn.microsoft.com/en-us/rest/api/compute/virtual-machines/create-or-update?tabs=HTTP#securityencryptiontypes
-// https://learn.microsoft.com/en-us/rest/api/compute/virtual-machines/create-or-update?tabs=HTTP#uefisettings
-func ValidateConfidentialCompute(managedDisk *ManagedDiskParameters, profile *SecurityProfile, fieldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
-
- var securityEncryptionType SecurityEncryptionType
-
- if managedDisk != nil && managedDisk.SecurityProfile != nil {
- securityEncryptionType = managedDisk.SecurityProfile.SecurityEncryptionType
- }
-
- if profile != nil && securityEncryptionType != "" {
- // SecurityEncryptionType can only be set for Confindential VMs
- if profile.SecurityType != SecurityTypesConfidentialVM {
- allErrs = append(allErrs, field.Invalid(fieldPath.Child("SecurityType"), profile.SecurityType,
- fmt.Sprintf("SecurityType should be set to '%s' when securityEncryptionType is defined", SecurityTypesConfidentialVM)))
- }
-
- // Confidential VMs require vTPM to be enabled, irrespective of the SecurityEncryptionType used
- if profile.UefiSettings == nil {
- allErrs = append(allErrs, field.Invalid(fieldPath.Child("UefiSettings"), profile.UefiSettings,
- "UefiSettings should be set when securityEncryptionType is defined"))
- }
-
- if profile.UefiSettings != nil && (profile.UefiSettings.VTpmEnabled == nil || !*profile.UefiSettings.VTpmEnabled) {
- allErrs = append(allErrs, field.Invalid(fieldPath.Child("VTpmEnabled"), profile.UefiSettings.VTpmEnabled,
- "VTpmEnabled should be set to true when securityEncryptionType is defined"))
- }
-
- if securityEncryptionType == SecurityEncryptionTypeDiskWithVMGuestState {
- // DiskWithVMGuestState encryption type is not compatible with EncryptionAtHost
- if profile.EncryptionAtHost != nil && *profile.EncryptionAtHost {
- allErrs = append(allErrs, field.Invalid(fieldPath.Child("EncryptionAtHost"), profile.EncryptionAtHost,
- fmt.Sprintf("EncryptionAtHost cannot be set to 'true' when securityEncryptionType is set to '%s'", SecurityEncryptionTypeDiskWithVMGuestState)))
- }
-
- // DiskWithVMGuestState encryption type requires SecureBoot to be enabled
- if profile.UefiSettings != nil && (profile.UefiSettings.SecureBootEnabled == nil || !*profile.UefiSettings.SecureBootEnabled) {
- allErrs = append(allErrs, field.Invalid(fieldPath.Child("SecureBootEnabled"), profile.UefiSettings.SecureBootEnabled,
- fmt.Sprintf("SecureBootEnabled should be set to true when securityEncryptionType is set to '%s'", SecurityEncryptionTypeDiskWithVMGuestState)))
- }
- }
- }
-
- return allErrs
-}
-
-// ValidateCapacityReservationGroupID validates the capacity reservation group id.
-func ValidateCapacityReservationGroupID(capacityReservationGroupID *string, fldPath *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
-
- if capacityReservationGroupID != nil {
- if _, err := azureutil.ParseResourceID(*capacityReservationGroupID); err != nil {
- allErrs = append(allErrs, field.Invalid(fldPath, capacityReservationGroupID, "must be a valid Azure resource ID"))
- }
- }
-
- return allErrs
-}
-
-// ValidateVMExtensions validates the VMExtensions spec.
-func ValidateVMExtensions(disableExtensionOperations *bool, vmExtensions []VMExtension, _ *field.Path) field.ErrorList {
- allErrs := field.ErrorList{}
-
- if ptr.Deref(disableExtensionOperations, false) && len(vmExtensions) > 0 {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("AzureMachineTemplate", "spec", "template", "spec", "vmExtensions"), "VMExtensions must be empty when DisableExtensionOperations is true"))
- }
-
- return allErrs
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachine_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachine_webhook.go
deleted file mode 100644
index 246d160da245..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachine_webhook.go
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
-Copyright 2021 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "context"
- "reflect"
-
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/client"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-
- webhookutils "sigs.k8s.io/cluster-api-provider-azure/util/webhook"
-)
-
-// SetupAzureMachineWebhookWithManager sets up and registers the webhook with the manager.
-func SetupAzureMachineWebhookWithManager(mgr ctrl.Manager) error {
- mw := &azureMachineWebhook{Client: mgr.GetClient()}
- return ctrl.NewWebhookManagedBy(mgr).
- For(&AzureMachine{}).
- WithDefaulter(mw).
- WithValidator(mw).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-azuremachine,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=azuremachines,versions=v1beta1,name=validation.azuremachine.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta1-azuremachine,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=azuremachines,versions=v1beta1,name=default.azuremachine.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-// azureMachineWebhook implements a validating and defaulting webhook for AzureMachines.
-type azureMachineWebhook struct {
- Client client.Client
-}
-
-// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
-func (mw *azureMachineWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- m, ok := obj.(*AzureMachine)
- if !ok {
- return nil, apierrors.NewBadRequest("expected an AzureMachine resource")
- }
- spec := m.Spec
-
- allErrs := ValidateAzureMachineSpec(spec)
-
- roleAssignmentName := ""
- if spec.SystemAssignedIdentityRole != nil {
- roleAssignmentName = spec.SystemAssignedIdentityRole.Name
- }
-
- if errs := ValidateSystemAssignedIdentity(spec.Identity, "", roleAssignmentName, field.NewPath("roleAssignmentName")); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if len(allErrs) == 0 {
- return nil, nil
- }
-
- return nil, apierrors.NewInvalid(GroupVersion.WithKind(AzureMachineKind).GroupKind(), m.Name, allErrs)
-}
-
-// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
-func (mw *azureMachineWebhook) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
- var allErrs field.ErrorList
- old, ok := oldObj.(*AzureMachine)
- if !ok {
- return nil, apierrors.NewBadRequest("expected an AzureMachine resource")
- }
- m, ok := newObj.(*AzureMachine)
- if !ok {
- return nil, apierrors.NewBadRequest("expected an AzureMachine resource")
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "image"),
- old.Spec.Image,
- m.Spec.Image); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "identity"),
- old.Spec.Identity,
- m.Spec.Identity); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "systemAssignedIdentityRole"),
- old.Spec.SystemAssignedIdentityRole,
- m.Spec.SystemAssignedIdentityRole); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "userAssignedIdentities"),
- old.Spec.UserAssignedIdentities,
- m.Spec.UserAssignedIdentities); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "roleAssignmentName"),
- old.Spec.RoleAssignmentName,
- m.Spec.RoleAssignmentName); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "osDisk"),
- old.Spec.OSDisk,
- m.Spec.OSDisk); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "dataDisks"),
- old.Spec.DataDisks,
- m.Spec.DataDisks); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "sshPublicKey"),
- old.Spec.SSHPublicKey,
- m.Spec.SSHPublicKey); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "allocatePublicIP"),
- old.Spec.AllocatePublicIP,
- m.Spec.AllocatePublicIP); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "enableIPForwarding"),
- old.Spec.EnableIPForwarding,
- m.Spec.EnableIPForwarding); err != nil {
- allErrs = append(allErrs, err)
- }
-
- // Spec.AcceleratedNetworking can only be reset to nil and no other changes apart from that
- // is accepted if the field is set.
- // Ref issue #3518
- if err := webhookutils.ValidateZeroTransition(
- field.NewPath("Spec", "AcceleratedNetworking"),
- old.Spec.AcceleratedNetworking,
- m.Spec.AcceleratedNetworking); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("Spec", "SpotVMOptions"),
- old.Spec.SpotVMOptions,
- m.Spec.SpotVMOptions); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("Spec", "SecurityProfile"),
- old.Spec.SecurityProfile,
- m.Spec.SecurityProfile); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if old.Spec.Diagnostics != nil {
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "diagnostics"),
- old.Spec.Diagnostics,
- m.Spec.Diagnostics); err != nil {
- allErrs = append(allErrs, err)
- }
- }
-
- if !reflect.DeepEqual(m.Spec.NetworkInterfaces, old.Spec.NetworkInterfaces) {
- // The defaulting webhook may have migrated values from the old SubnetName field to the new NetworkInterfaces format.
- old.Spec.SetNetworkInterfacesDefaults()
-
- // The reconciler will populate the SubnetName on the first interface if the user left it blank.
- if old.Spec.NetworkInterfaces[0].SubnetName == "" && m.Spec.NetworkInterfaces[0].SubnetName != "" {
- old.Spec.NetworkInterfaces[0].SubnetName = m.Spec.NetworkInterfaces[0].SubnetName
- }
-
- // Enforce immutability for all other changes to NetworkInterfaces.
- if !reflect.DeepEqual(m.Spec.NetworkInterfaces, old.Spec.NetworkInterfaces) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "networkInterfaces"),
- m.Spec.NetworkInterfaces, "field is immutable"),
- )
- }
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "capacityReservationGroupID"),
- old.Spec.CapacityReservationGroupID,
- m.Spec.CapacityReservationGroupID); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "disableExtensionOperations"),
- old.Spec.DisableExtensionOperations,
- m.Spec.DisableExtensionOperations); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "disableVMBootstrapExtension"),
- old.Spec.DisableVMBootstrapExtension,
- m.Spec.DisableVMBootstrapExtension); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if len(allErrs) == 0 {
- return nil, nil
- }
- return nil, apierrors.NewInvalid(GroupVersion.WithKind(AzureMachineKind).GroupKind(), m.Name, allErrs)
-}
-
-// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
-func (mw *azureMachineWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// Default implements webhook.Defaulter so a webhook will be registered for the type.
-func (mw *azureMachineWebhook) Default(_ context.Context, obj runtime.Object) error {
- m, ok := obj.(*AzureMachine)
- if !ok {
- return apierrors.NewBadRequest("expected an AzureMachine resource")
- }
- return m.SetDefaults(mw.Client)
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachinetemplate_types.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachinetemplate_types.go
index e9332c91cda8..708221e643c7 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachinetemplate_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachinetemplate_types.go
@@ -104,7 +104,7 @@ type AzureMachineTemplateList struct {
}
func init() {
- SchemeBuilder.Register(&AzureMachineTemplate{}, &AzureMachineTemplateList{})
+ objectTypes = append(objectTypes, &AzureMachineTemplate{}, &AzureMachineTemplateList{})
}
// AzureMachineTemplateResource describes the data needed to create an AzureMachine from a template.
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachinetemplate_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachinetemplate_webhook.go
deleted file mode 100644
index e135e209db39..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachinetemplate_webhook.go
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
-Copyright 2021 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "context"
- "fmt"
- "reflect"
-
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- "k8s.io/utils/ptr"
- "sigs.k8s.io/cluster-api/util/topology"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-)
-
-// AzureMachineTemplateImmutableMsg ...
-const (
- AzureMachineTemplateImmutableMsg = "AzureMachineTemplate spec.template.spec field is immutable. Please create new resource instead. ref doc: https://cluster-api.sigs.k8s.io/tasks/updating-machine-templates.html"
- AzureMachineTemplateRoleAssignmentNameMsg = "AzureMachineTemplate spec.template.spec.roleAssignmentName field can't be set"
- AzureMachineTemplateSystemAssignedIdentityRoleNameMsg = "AzureMachineTemplate spec.template.spec.systemAssignedIdentityRole.name field can't be set"
-)
-
-// SetupWebhookWithManager sets up and registers the webhook with the manager.
-func (r *AzureMachineTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(azureMachineTemplateWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(r).
- WithValidator(w).
- WithDefaulter(w).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta1-azuremachinetemplate,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=azuremachinetemplates,versions=v1beta1,name=default.azuremachinetemplate.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-azuremachinetemplate,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=azuremachinetemplates,versions=v1beta1,name=validation.azuremachinetemplate.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-type azureMachineTemplateWebhook struct{}
-
-var _ webhook.CustomDefaulter = &azureMachineTemplateWebhook{}
-var _ webhook.CustomValidator = &azureMachineTemplateWebhook{}
-
-// ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type.
-func (*azureMachineTemplateWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- r := obj.(*AzureMachineTemplate)
- spec := r.Spec.Template.Spec
-
- allErrs := ValidateAzureMachineSpec(spec)
-
- if spec.RoleAssignmentName != "" {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("AzureMachineTemplate", "spec", "template", "spec", "roleAssignmentName"), r, AzureMachineTemplateRoleAssignmentNameMsg),
- )
- }
-
- if spec.SystemAssignedIdentityRole != nil && spec.SystemAssignedIdentityRole.Name != "" {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("AzureMachineTemplate", "spec", "template", "spec", "systemAssignedIdentityRole", "name"), r, AzureMachineTemplateSystemAssignedIdentityRoleNameMsg),
- )
- }
-
- if (r.Spec.Template.Spec.NetworkInterfaces != nil) && len(r.Spec.Template.Spec.NetworkInterfaces) > 0 && r.Spec.Template.Spec.SubnetName != "" {
- allErrs = append(allErrs, field.Invalid(field.NewPath("AzureMachineTemplate", "spec", "template", "spec", "networkInterfaces"), r.Spec.Template.Spec.NetworkInterfaces, "cannot set both NetworkInterfaces and machine SubnetName"))
- }
-
- if (r.Spec.Template.Spec.NetworkInterfaces != nil) && len(r.Spec.Template.Spec.NetworkInterfaces) > 0 && r.Spec.Template.Spec.AcceleratedNetworking != nil {
- allErrs = append(allErrs, field.Invalid(field.NewPath("AzureMachineTemplate", "spec", "template", "spec", "acceleratedNetworking"), r.Spec.Template.Spec.NetworkInterfaces, "cannot set both NetworkInterfaces and machine AcceleratedNetworking"))
- }
-
- for i, networkInterface := range r.Spec.Template.Spec.NetworkInterfaces {
- if networkInterface.PrivateIPConfigs < 1 {
- allErrs = append(allErrs, field.Invalid(field.NewPath("AzureMachineTemplate", "spec", "template", "spec", "networkInterfaces", "privateIPConfigs"), r.Spec.Template.Spec.NetworkInterfaces[i].PrivateIPConfigs, "networkInterface privateIPConfigs must be set to a minimum value of 1"))
- }
- }
-
- if ptr.Deref(r.Spec.Template.Spec.DisableExtensionOperations, false) && len(r.Spec.Template.Spec.VMExtensions) > 0 {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("AzureMachineTemplate", "spec", "template", "spec", "vmExtensions"), "VMExtensions must be empty when DisableExtensionOperations is true"))
- }
-
- if len(allErrs) == 0 {
- return nil, nil
- }
-
- return nil, apierrors.NewInvalid(GroupVersion.WithKind(AzureMachineTemplateKind).GroupKind(), r.Name, allErrs)
-}
-
-// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
-func (r *azureMachineTemplateWebhook) ValidateUpdate(ctx context.Context, oldRaw runtime.Object, newRaw runtime.Object) (admission.Warnings, error) {
- var allErrs field.ErrorList
- old := oldRaw.(*AzureMachineTemplate)
- t := newRaw.(*AzureMachineTemplate)
-
- req, err := admission.RequestFromContext(ctx)
- if err != nil {
- return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a admission.Request inside context: %v", err))
- }
-
- if !topology.IsDryRunRequest(req, t) &&
- !reflect.DeepEqual(t.Spec.Template.Spec, old.Spec.Template.Spec) {
- // The equality failure could be because of default mismatch between v1alpha3 and v1beta1. This happens because
- // the new object `r` will have run through the default webhooks but the old object `old` would not have so.
- // This means if the old object was in v1alpha3, it would not get the new defaults set in v1beta1 resulting
- // in object inequality. To workaround this, we set the v1beta1 defaults here so that the old object also gets
- // the new defaults.
-
- // We need to set ssh key explicitly, otherwise Default() will create a new one.
- if old.Spec.Template.Spec.SSHPublicKey == "" {
- old.Spec.Template.Spec.SSHPublicKey = t.Spec.Template.Spec.SSHPublicKey
- }
-
- if err := r.Default(ctx, old); err != nil {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("AzureMachineTemplate"), t, fmt.Sprintf("Unable to apply defaults: %v", err)),
- )
- }
-
- // if it's still not equal, return error.
- if !reflect.DeepEqual(t.Spec.Template.Spec, old.Spec.Template.Spec) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("AzureMachineTemplate", "spec", "template", "spec"), t, AzureMachineTemplateImmutableMsg),
- )
- }
- }
-
- if len(allErrs) == 0 {
- return nil, nil
- }
- return nil, apierrors.NewInvalid(GroupVersion.WithKind(AzureMachineTemplateKind).GroupKind(), t.Name, allErrs)
-}
-
-// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
-func (*azureMachineTemplateWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// Default implements webhookutil.defaulter so a webhook will be registered for the type.
-func (*azureMachineTemplateWebhook) Default(_ context.Context, obj runtime.Object) error {
- t := obj.(*AzureMachineTemplate)
- if err := t.Spec.Template.Spec.SetDefaultSSHPublicKey(); err != nil {
- ctrl.Log.WithName("SetDefault").Error(err, "SetDefaultSSHPublicKey failed")
- }
- t.Spec.Template.Spec.SetDataDisksDefaults()
- t.Spec.Template.Spec.SetNetworkInterfacesDefaults()
- return nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcluster_types.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcluster_types.go
index f3da4714fea2..bc669565e36b 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcluster_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcluster_types.go
@@ -66,5 +66,5 @@ type AzureManagedClusterList struct {
}
func init() {
- SchemeBuilder.Register(&AzureManagedCluster{}, &AzureManagedClusterList{})
+ objectTypes = append(objectTypes, &AzureManagedCluster{}, &AzureManagedClusterList{})
}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcluster_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcluster_webhook.go
deleted file mode 100644
index 78c6fe90398a..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcluster_webhook.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Copyright 2023 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "context"
-
- "k8s.io/apimachinery/pkg/runtime"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-)
-
-// SetupWebhookWithManager sets up and registers the webhook with the manager.
-func (r *AzureManagedCluster) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(azureManagedClusterWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(r).
- WithValidator(w).
- Complete()
-}
-
-type azureManagedClusterWebhook struct{}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-azuremanagedcluster,mutating=false,failurePolicy=fail,groups=infrastructure.cluster.x-k8s.io,resources=azuremanagedclusters,versions=v1beta1,name=validation.azuremanagedclusters.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-var _ webhook.CustomValidator = &azureManagedClusterWebhook{}
-
-// ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type.
-func (r *azureManagedClusterWebhook) ValidateCreate(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type.
-func (r *azureManagedClusterWebhook) ValidateUpdate(_ context.Context, _, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type.
-func (r *azureManagedClusterWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedclustertemplate_types.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedclustertemplate_types.go
index 7aedf8b0e606..4705fa96fb89 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedclustertemplate_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedclustertemplate_types.go
@@ -48,7 +48,7 @@ type AzureManagedClusterTemplateList struct {
}
func init() {
- SchemeBuilder.Register(&AzureManagedClusterTemplate{}, &AzureManagedClusterTemplateList{})
+ objectTypes = append(objectTypes, &AzureManagedClusterTemplate{}, &AzureManagedClusterTemplateList{})
}
// AzureManagedClusterTemplateResource describes the data needed to create an AzureManagedCluster from a template.
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedclustertemplate_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedclustertemplate_webhook.go
deleted file mode 100644
index 84888c102c70..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedclustertemplate_webhook.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Copyright 2023 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "context"
-
- "k8s.io/apimachinery/pkg/runtime"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-)
-
-// SetupWebhookWithManager sets up and registers the webhook with the manager.
-func (r *AzureManagedClusterTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(azureManagedClusterTemplateWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(r).
- WithValidator(w).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-azuremanagedclustertemplate,mutating=false,failurePolicy=fail,groups=infrastructure.cluster.x-k8s.io,resources=azuremanagedclustertemplates,versions=v1beta1,name=validation.azuremanagedclustertemplates.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-type azureManagedClusterTemplateWebhook struct{}
-
-var _ webhook.CustomValidator = &azureManagedClusterTemplateWebhook{}
-
-// ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type.
-func (r *azureManagedClusterTemplateWebhook) ValidateCreate(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type.
-func (r *azureManagedClusterTemplateWebhook) ValidateUpdate(_ context.Context, _, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type.
-func (r *azureManagedClusterTemplateWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplane_default.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplane_default.go
deleted file mode 100644
index 65275a89be1e..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplane_default.go
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
-Copyright 2023 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "encoding/base64"
- "fmt"
- "strings"
-
- "golang.org/x/crypto/ssh"
- "k8s.io/utils/ptr"
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
- ctrl "sigs.k8s.io/controller-runtime"
-
- utilSSH "sigs.k8s.io/cluster-api-provider-azure/util/ssh"
-)
-
-const (
- // defaultAKSVnetCIDR is the default Vnet CIDR.
- defaultAKSVnetCIDR = "10.0.0.0/8"
- // defaultAKSNodeSubnetCIDR is the default Node Subnet CIDR.
- defaultAKSNodeSubnetCIDR = "10.240.0.0/16"
- // defaultAKSVnetCIDRForOverlay is the default Vnet CIDR when Azure CNI overlay is enabled.
- defaultAKSVnetCIDRForOverlay = "10.224.0.0/12"
- // defaultAKSNodeSubnetCIDRForOverlay is the default Node Subnet CIDR when Azure CNI overlay is enabled.
- defaultAKSNodeSubnetCIDRForOverlay = "10.224.0.0/16"
-)
-
-// setDefaultResourceGroupName sets the default ResourceGroupName for an AzureManagedControlPlane.
-func (m *AzureManagedControlPlane) setDefaultResourceGroupName() {
- if m.Spec.ResourceGroupName == "" {
- if clusterName, ok := m.Labels[clusterv1.ClusterNameLabel]; ok {
- m.Spec.ResourceGroupName = clusterName
- }
- }
-}
-
-// setDefaultSSHPublicKey sets the default SSHPublicKey for an AzureManagedControlPlane.
-func (m *AzureManagedControlPlane) setDefaultSSHPublicKey() error {
- if sshKey := m.Spec.SSHPublicKey; sshKey != nil && *sshKey == "" {
- _, publicRsaKey, err := utilSSH.GenerateSSHKey()
- if err != nil {
- return err
- }
-
- m.Spec.SSHPublicKey = ptr.To(base64.StdEncoding.EncodeToString(ssh.MarshalAuthorizedKey(publicRsaKey)))
- }
-
- return nil
-}
-
-// setDefaultNodeResourceGroupName sets the default NodeResourceGroup for an AzureManagedControlPlane.
-func (m *AzureManagedControlPlane) setDefaultNodeResourceGroupName() {
- if m.Spec.NodeResourceGroupName == "" {
- m.Spec.NodeResourceGroupName = fmt.Sprintf("MC_%s_%s_%s", m.Spec.ResourceGroupName, m.Name, m.Spec.Location)
- }
-}
-
-// setDefaultVirtualNetwork sets the default VirtualNetwork for an AzureManagedControlPlane.
-func (m *AzureManagedControlPlane) setDefaultVirtualNetwork() {
- if m.Spec.VirtualNetwork.Name == "" {
- m.Spec.VirtualNetwork.Name = m.Name
- }
- if m.Spec.VirtualNetwork.CIDRBlock == "" {
- m.Spec.VirtualNetwork.CIDRBlock = defaultAKSVnetCIDR
- if ptr.Deref(m.Spec.NetworkPluginMode, "") == NetworkPluginModeOverlay {
- m.Spec.VirtualNetwork.CIDRBlock = defaultAKSVnetCIDRForOverlay
- }
- }
- if m.Spec.VirtualNetwork.ResourceGroup == "" {
- m.Spec.VirtualNetwork.ResourceGroup = m.Spec.ResourceGroupName
- }
-}
-
-// setDefaultSubnet sets the default Subnet for an AzureManagedControlPlane.
-func (m *AzureManagedControlPlane) setDefaultSubnet() {
- if m.Spec.VirtualNetwork.Subnet.Name == "" {
- m.Spec.VirtualNetwork.Subnet.Name = m.Name
- }
- if m.Spec.VirtualNetwork.Subnet.CIDRBlock == "" {
- m.Spec.VirtualNetwork.Subnet.CIDRBlock = defaultAKSNodeSubnetCIDR
- if ptr.Deref(m.Spec.NetworkPluginMode, "") == NetworkPluginModeOverlay {
- m.Spec.VirtualNetwork.Subnet.CIDRBlock = defaultAKSNodeSubnetCIDRForOverlay
- }
- }
-}
-
-// setDefaultFleetsMember sets the default FleetsMember for an AzureManagedControlPlane.
-func setDefaultFleetsMember(fleetsMember *FleetsMember, labels map[string]string) *FleetsMember {
- result := fleetsMember.DeepCopy()
- if fleetsMember != nil {
- if clusterName, ok := labels[clusterv1.ClusterNameLabel]; ok && fleetsMember.Name == "" {
- result.Name = clusterName
- }
- }
- return result
-}
-
-func setDefaultSku(sku *AKSSku) *AKSSku {
- result := sku.DeepCopy()
- if sku == nil {
- result = new(AKSSku)
- result.Tier = FreeManagedControlPlaneTier
- } else if sku.Tier == PaidManagedControlPlaneTier {
- result.Tier = StandardManagedControlPlaneTier
- ctrl.Log.WithName("AzureManagedControlPlaneWebHookLogger").Info("Paid SKU tier is deprecated and has been replaced by Standard")
- }
- return result
-}
-
-func setDefaultVersion(version string) string {
- if version != "" && !strings.HasPrefix(version, "v") {
- normalizedVersion := "v" + version
- version = normalizedVersion
- }
- return version
-}
-
-func (m *AzureManagedControlPlane) setDefaultOIDCIssuerProfile() {
- if m.Spec.OIDCIssuerProfile == nil {
- m.Spec.OIDCIssuerProfile = &OIDCIssuerProfile{}
- }
-}
-
-func (m *AzureManagedControlPlane) setDefaultDNSPrefix() {
- if m.Spec.DNSPrefix == nil {
- m.Spec.DNSPrefix = ptr.To(m.Name)
- }
-}
-
-func (m *AzureManagedControlPlane) setDefaultAKSExtensions() {
- for _, extension := range m.Spec.Extensions {
- if extension.Plan != nil && extension.Plan.Name == "" {
- extension.Plan.Name = fmt.Sprintf("%s-%s", m.Name, extension.Plan.Product)
- }
- }
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplane_types.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplane_types.go
index 0f4055684fe6..6d0f824c087f 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplane_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplane_types.go
@@ -709,5 +709,5 @@ func (m *AzureManagedControlPlane) SetFutures(futures Futures) {
}
func init() {
- SchemeBuilder.Register(&AzureManagedControlPlane{}, &AzureManagedControlPlaneList{})
+ objectTypes = append(objectTypes, &AzureManagedControlPlane{}, &AzureManagedControlPlaneList{})
}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplane_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplane_webhook.go
deleted file mode 100644
index 40a1a0f52437..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplane_webhook.go
+++ /dev/null
@@ -1,1259 +0,0 @@
-/*
-Copyright 2023 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "context"
- "fmt"
- "net"
- "reflect"
- "regexp"
- "strconv"
- "strings"
- "time"
-
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- "k8s.io/utils/ptr"
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/client"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-
- "sigs.k8s.io/cluster-api-provider-azure/util/versions"
- webhookutils "sigs.k8s.io/cluster-api-provider-azure/util/webhook"
-)
-
-var (
- kubeSemver = regexp.MustCompile(`^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)([-0-9a-zA-Z_\.+]*)?$`)
- rMaxNodeProvisionTime = regexp.MustCompile(`^(\d+)m$`)
- rScaleDownTime = regexp.MustCompile(`^(\d+)m$`)
- rScaleDownDelayAfterDelete = regexp.MustCompile(`^(\d+)s$`)
- rScanInterval = regexp.MustCompile(`^(\d+)s$`)
-)
-
-// SetupAzureManagedControlPlaneWebhookWithManager sets up and registers the webhook with the manager.
-func SetupAzureManagedControlPlaneWebhookWithManager(mgr ctrl.Manager) error {
- mw := &azureManagedControlPlaneWebhook{Client: mgr.GetClient()}
- return ctrl.NewWebhookManagedBy(mgr).
- For(&AzureManagedControlPlane{}).
- WithDefaulter(mw).
- WithValidator(mw).
- Complete()
-}
-
-// +kubebuilder:webhook:path=/mutate-infrastructure-cluster-x-k8s-io-v1beta1-azuremanagedcontrolplane,mutating=true,failurePolicy=fail,groups=infrastructure.cluster.x-k8s.io,resources=azuremanagedcontrolplanes,verbs=create;update,versions=v1beta1,name=default.azuremanagedcontrolplanes.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-// azureManagedControlPlaneWebhook implements a validating and defaulting webhook for AzureManagedControlPlane.
-type azureManagedControlPlaneWebhook struct {
- Client client.Client
-}
-
-// Default implements webhook.Defaulter so a webhook will be registered for the type.
-func (mw *azureManagedControlPlaneWebhook) Default(_ context.Context, obj runtime.Object) error {
- m, ok := obj.(*AzureManagedControlPlane)
- if !ok {
- return apierrors.NewBadRequest("expected an AzureManagedControlPlane")
- }
-
- m.Spec.Version = setDefaultVersion(m.Spec.Version)
- m.Spec.SKU = setDefaultSku(m.Spec.SKU)
- m.Spec.FleetsMember = setDefaultFleetsMember(m.Spec.FleetsMember, m.Labels)
-
- if err := m.setDefaultSSHPublicKey(); err != nil {
- ctrl.Log.WithName("AzureManagedControlPlaneWebHookLogger").Error(err, "setDefaultSSHPublicKey failed")
- }
-
- m.setDefaultResourceGroupName()
- m.setDefaultNodeResourceGroupName()
- m.setDefaultVirtualNetwork()
- m.setDefaultSubnet()
- m.setDefaultOIDCIssuerProfile()
- m.setDefaultDNSPrefix()
- m.setDefaultAKSExtensions()
-
- return nil
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-azuremanagedcontrolplane,mutating=false,failurePolicy=fail,groups=infrastructure.cluster.x-k8s.io,resources=azuremanagedcontrolplanes,versions=v1beta1,name=validation.azuremanagedcontrolplanes.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
-func (mw *azureManagedControlPlaneWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- m, ok := obj.(*AzureManagedControlPlane)
- if !ok {
- return nil, apierrors.NewBadRequest("expected an AzureManagedControlPlane")
- }
-
- return nil, m.Validate(mw.Client)
-}
-
-// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
-func (mw *azureManagedControlPlaneWebhook) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
- var allErrs field.ErrorList
- old, ok := oldObj.(*AzureManagedControlPlane)
- if !ok {
- return nil, apierrors.NewBadRequest("expected an AzureManagedControlPlane")
- }
- m, ok := newObj.(*AzureManagedControlPlane)
- if !ok {
- return nil, apierrors.NewBadRequest("expected an AzureManagedControlPlane")
- }
-
- immutableFields := []struct {
- path *field.Path
- old any
- new any
- }{
- {field.NewPath("spec", "subscriptionID"), old.Spec.SubscriptionID, m.Spec.SubscriptionID},
- {field.NewPath("spec", "resourceGroupName"), old.Spec.ResourceGroupName, m.Spec.ResourceGroupName},
- {field.NewPath("spec", "nodeResourceGroupName"), old.Spec.NodeResourceGroupName, m.Spec.NodeResourceGroupName},
- {field.NewPath("spec", "location"), old.Spec.Location, m.Spec.Location},
- {field.NewPath("spec", "sshPublicKey"), old.Spec.SSHPublicKey, m.Spec.SSHPublicKey},
- {field.NewPath("spec", "dnsServiceIP"), old.Spec.DNSServiceIP, m.Spec.DNSServiceIP},
- {field.NewPath("spec", "networkPlugin"), old.Spec.NetworkPlugin, m.Spec.NetworkPlugin},
- {field.NewPath("spec", "networkPolicy"), old.Spec.NetworkPolicy, m.Spec.NetworkPolicy},
- {field.NewPath("spec", "networkDataplane"), old.Spec.NetworkDataplane, m.Spec.NetworkDataplane},
- {field.NewPath("spec", "loadBalancerSKU"), old.Spec.LoadBalancerSKU, m.Spec.LoadBalancerSKU},
- {field.NewPath("spec", "httpProxyConfig"), old.Spec.HTTPProxyConfig, m.Spec.HTTPProxyConfig},
- {field.NewPath("spec", "azureEnvironment"), old.Spec.AzureEnvironment, m.Spec.AzureEnvironment},
- }
-
- for _, f := range immutableFields {
- if err := webhookutils.ValidateImmutable(f.path, f.old, f.new); err != nil {
- allErrs = append(allErrs, err)
- }
- }
-
- // This nil check is only to streamline tests from having to define this correctly in every test case.
- // Normally, the defaulting webhooks will always set the new DNSPrefix so users can never entirely unset it.
- if m.Spec.DNSPrefix != nil {
- // Pre-1.12 versions of CAPZ do not set this field while 1.12+ defaults it, so emulate the current
- // defaulting here to avoid unrelated updates from failing this immutability check due to the
- // nil -> non-nil transition.
- oldDNSPrefix := old.Spec.DNSPrefix
- if oldDNSPrefix == nil {
- oldDNSPrefix = ptr.To(old.Name)
- }
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "dnsPrefix"),
- oldDNSPrefix,
- m.Spec.DNSPrefix,
- ); err != nil {
- allErrs = append(allErrs, err)
- }
- }
-
- // Consider removing this once moves out of preview
- // Updating outboundType after cluster creation (PREVIEW)
- // https://learn.microsoft.com/en-us/azure/aks/egress-outboundtype#updating-outboundtype-after-cluster-creation-preview
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "outboundType"),
- old.Spec.OutboundType,
- m.Spec.OutboundType); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if errs := m.validateVirtualNetworkUpdate(old); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := m.validateAddonProfilesUpdate(old); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := m.validateAPIServerAccessProfileUpdate(old); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := m.validateNetworkPluginModeUpdate(old); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := m.validateAADProfileUpdateAndLocalAccounts(old); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := m.validateAutoUpgradeProfile(old); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := m.validateK8sVersionUpdate(old); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := m.validateOIDCIssuerProfileUpdate(old); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := m.validateFleetsMemberUpdate(old); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := validateAKSExtensionsUpdate(old.Spec.Extensions, m.Spec.Extensions); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := m.Spec.AzureManagedControlPlaneClassSpec.validateSecurityProfileUpdate(&old.Spec.AzureManagedControlPlaneClassSpec); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if len(allErrs) == 0 {
- return nil, m.Validate(mw.Client)
- }
-
- return nil, apierrors.NewInvalid(GroupVersion.WithKind(AzureManagedControlPlaneKind).GroupKind(), m.Name, allErrs)
-}
-
-// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
-func (mw *azureManagedControlPlaneWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// Validate the Azure Managed Control Plane and return an aggregate error.
-func (m *AzureManagedControlPlane) Validate(cli client.Client) error {
- var allErrs field.ErrorList
- validators := []func(client client.Client) field.ErrorList{
- m.validateSSHKey,
- m.validateIdentity,
- m.validateNetworkPluginMode,
- m.validateDNSPrefix,
- m.validateDisableLocalAccounts,
- }
- for _, validator := range validators {
- if err := validator(cli); err != nil {
- allErrs = append(allErrs, err...)
- }
- }
-
- allErrs = append(allErrs, validateVersion(
- m.Spec.Version,
- field.NewPath("spec").Child("version"))...)
-
- allErrs = append(allErrs, validateLoadBalancerProfile(
- m.Spec.LoadBalancerProfile,
- field.NewPath("spec").Child("loadBalancerProfile"))...)
-
- allErrs = append(allErrs, validateManagedClusterNetwork(
- cli,
- m.Labels,
- m.Namespace,
- m.Spec.DNSServiceIP,
- m.Spec.VirtualNetwork.Subnet,
- field.NewPath("spec"))...)
-
- allErrs = append(allErrs, validateName(m.Name, field.NewPath("name"))...)
-
- allErrs = append(allErrs, validateAutoScalerProfile(m.Spec.AutoScalerProfile, field.NewPath("spec").Child("autoScalerProfile"))...)
-
- allErrs = append(allErrs, validateAKSExtensions(m.Spec.Extensions, field.NewPath("spec").Child("aksExtensions"))...)
-
- allErrs = append(allErrs, m.Spec.AzureManagedControlPlaneClassSpec.validateSecurityProfile()...)
-
- allErrs = append(allErrs, validateNetworkPolicy(m.Spec.NetworkPolicy, m.Spec.NetworkDataplane, field.NewPath("spec").Child("networkPolicy"))...)
-
- allErrs = append(allErrs, validateNetworkDataplane(m.Spec.NetworkDataplane, m.Spec.NetworkPolicy, m.Spec.NetworkPluginMode, field.NewPath("spec").Child("networkDataplane"))...)
-
- allErrs = append(allErrs, validateAPIServerAccessProfile(m.Spec.APIServerAccessProfile, field.NewPath("spec").Child("apiServerAccessProfile"))...)
-
- allErrs = append(allErrs, validateAMCPVirtualNetwork(m.Spec.VirtualNetwork, field.NewPath("spec").Child("virtualNetwork"))...)
-
- allErrs = append(allErrs, validateFleetsMember(m.Spec.FleetsMember, field.NewPath("spec").Child("fleetsMember"))...)
-
- return allErrs.ToAggregate()
-}
-
-func (m *AzureManagedControlPlane) validateDNSPrefix(_ client.Client) field.ErrorList {
- if m.Spec.DNSPrefix == nil {
- return nil
- }
-
- // Regex pattern for DNS prefix validation
- // 1. Between 1 and 54 characters long: {1,54}
- // 2. Alphanumerics and hyphens: [a-zA-Z0-9-]
- // 3. Start and end with alphanumeric: ^[a-zA-Z0-9].*[a-zA-Z0-9]$
- pattern := `^[a-zA-Z0-9][a-zA-Z0-9-]{0,52}[a-zA-Z0-9]$`
- regex := regexp.MustCompile(pattern)
- if regex.MatchString(ptr.Deref(m.Spec.DNSPrefix, "")) {
- return nil
- }
- allErrs := field.ErrorList{
- field.Invalid(field.NewPath("spec", "dnsPrefix"), *m.Spec.DNSPrefix, "DNSPrefix is invalid, does not match regex: "+pattern),
- }
- return allErrs
-}
-
-// validateSecurityProfile validates SecurityProfile.
-func (m *AzureManagedControlPlaneClassSpec) validateSecurityProfile() field.ErrorList {
- allErrs := field.ErrorList{}
- if err := m.validateAzureKeyVaultKms(); err != nil {
- allErrs = append(allErrs, err...)
- }
- if err := m.validateWorkloadIdentity(); err != nil {
- allErrs = append(allErrs, err...)
- }
- return allErrs
-}
-
-// validateAzureKeyVaultKms validates AzureKeyVaultKms.
-func (m *AzureManagedControlPlaneClassSpec) validateAzureKeyVaultKms() field.ErrorList {
- if m.SecurityProfile != nil && m.SecurityProfile.AzureKeyVaultKms != nil {
- if !m.isUserManagedIdentityEnabled() {
- allErrs := field.ErrorList{
- field.Invalid(field.NewPath("spec", "securityProfile", "azureKeyVaultKms", "keyVaultResourceID"),
- m.SecurityProfile.AzureKeyVaultKms.KeyVaultResourceID,
- "Spec.SecurityProfile.AzureKeyVaultKms can be set only when Spec.Identity.Type is UserAssigned"),
- }
- return allErrs
- }
- keyVaultNetworkAccess := ptr.Deref(m.SecurityProfile.AzureKeyVaultKms.KeyVaultNetworkAccess, KeyVaultNetworkAccessTypesPublic)
- keyVaultResourceID := ptr.Deref(m.SecurityProfile.AzureKeyVaultKms.KeyVaultResourceID, "")
- if keyVaultNetworkAccess == KeyVaultNetworkAccessTypesPrivate && keyVaultResourceID == "" {
- allErrs := field.ErrorList{
- field.Invalid(field.NewPath("spec", "securityProfile", "azureKeyVaultKms", "keyVaultResourceID"),
- m.SecurityProfile.AzureKeyVaultKms.KeyVaultResourceID,
- "Spec.SecurityProfile.AzureKeyVaultKms.KeyVaultResourceID cannot be empty when Spec.SecurityProfile.AzureKeyVaultKms.KeyVaultNetworkAccess is Private"),
- }
- return allErrs
- }
- if keyVaultNetworkAccess == KeyVaultNetworkAccessTypesPublic && keyVaultResourceID != "" {
- allErrs := field.ErrorList{
- field.Invalid(field.NewPath("spec", "securityProfile", "azureKeyVaultKms", "keyVaultResourceID"), m.SecurityProfile.AzureKeyVaultKms.KeyVaultResourceID,
- "Spec.SecurityProfile.AzureKeyVaultKms.KeyVaultResourceID should be empty when Spec.SecurityProfile.AzureKeyVaultKms.KeyVaultNetworkAccess is Public"),
- }
- return allErrs
- }
- }
- return nil
-}
-
-// validateWorkloadIdentity validates WorkloadIdentity.
-func (m *AzureManagedControlPlaneClassSpec) validateWorkloadIdentity() field.ErrorList {
- if m.SecurityProfile != nil && m.SecurityProfile.WorkloadIdentity != nil && !m.isOIDCEnabled() {
- allErrs := field.ErrorList{
- field.Invalid(field.NewPath("spec", "securityProfile", "workloadIdentity"), m.SecurityProfile.WorkloadIdentity,
- "Spec.SecurityProfile.WorkloadIdentity cannot be enabled when Spec.OIDCIssuerProfile is disabled"),
- }
- return allErrs
- }
- return nil
-}
-
-// validateDisableLocalAccounts disabling local accounts for AAD based clusters.
-func (m *AzureManagedControlPlane) validateDisableLocalAccounts(_ client.Client) field.ErrorList {
- if m.Spec.DisableLocalAccounts != nil && m.Spec.AADProfile == nil {
- return field.ErrorList{
- field.Invalid(field.NewPath("spec", "disableLocalAccounts"), *m.Spec.DisableLocalAccounts, "DisableLocalAccounts should be set only for AAD enabled clusters"),
- }
- }
- return nil
-}
-
-// validateVersion validates the Kubernetes version.
-func validateVersion(version string, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- if !kubeSemver.MatchString(version) {
- allErrs = append(allErrs, field.Invalid(fldPath, version, "must be a valid semantic version"))
- }
-
- return allErrs
-}
-
-// validateSSHKey validates an SSHKey.
-func (m *AzureManagedControlPlane) validateSSHKey(_ client.Client) field.ErrorList {
- if sshKey := m.Spec.SSHPublicKey; sshKey != nil && *sshKey != "" {
- if errs := ValidateSSHKey(*sshKey, field.NewPath("sshKey")); len(errs) > 0 {
- return errs
- }
- }
-
- return nil
-}
-
-// validateLoadBalancerProfile validates a LoadBalancerProfile.
-func validateLoadBalancerProfile(loadBalancerProfile *LoadBalancerProfile, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- if loadBalancerProfile != nil {
- numOutboundIPTypes := 0
-
- if loadBalancerProfile.ManagedOutboundIPs != nil {
- if *loadBalancerProfile.ManagedOutboundIPs < 1 || *loadBalancerProfile.ManagedOutboundIPs > 100 {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("ManagedOutboundIPs"), *loadBalancerProfile.ManagedOutboundIPs, "value should be in between 1 and 100"))
- }
- }
-
- if loadBalancerProfile.AllocatedOutboundPorts != nil {
- if *loadBalancerProfile.AllocatedOutboundPorts < 0 || *loadBalancerProfile.AllocatedOutboundPorts > 64000 {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("AllocatedOutboundPorts"), *loadBalancerProfile.AllocatedOutboundPorts, "value should be in between 0 and 64000"))
- }
- }
-
- if loadBalancerProfile.IdleTimeoutInMinutes != nil {
- if *loadBalancerProfile.IdleTimeoutInMinutes < 4 || *loadBalancerProfile.IdleTimeoutInMinutes > 120 {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("IdleTimeoutInMinutes"), *loadBalancerProfile.IdleTimeoutInMinutes, "value should be in between 4 and 120"))
- }
- }
-
- if loadBalancerProfile.ManagedOutboundIPs != nil {
- numOutboundIPTypes++
- }
- if len(loadBalancerProfile.OutboundIPPrefixes) > 0 {
- numOutboundIPTypes++
- }
- if len(loadBalancerProfile.OutboundIPs) > 0 {
- numOutboundIPTypes++
- }
- if numOutboundIPTypes > 1 {
- allErrs = append(allErrs, field.Forbidden(fldPath, "load balancer profile must specify at most one of ManagedOutboundIPs, OutboundIPPrefixes and OutboundIPs"))
- }
- }
-
- return allErrs
-}
-
-func validateAMCPVirtualNetwork(virtualNetwork ManagedControlPlaneVirtualNetwork, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
-
- // VirtualNetwork and the CIDR blocks get defaulted in the defaulting webhook, so we can assume they are always set.
- if !reflect.DeepEqual(virtualNetwork, ManagedControlPlaneVirtualNetwork{}) {
- _, parentNet, vnetErr := net.ParseCIDR(virtualNetwork.CIDRBlock)
- if vnetErr != nil {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("CIDRBlock"), virtualNetwork.CIDRBlock, "pre-existing virtual networks CIDR block is invalid"))
- }
- subnetIP, _, subnetErr := net.ParseCIDR(virtualNetwork.Subnet.CIDRBlock)
- if subnetErr != nil {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("Subnet", "CIDRBlock"), virtualNetwork.CIDRBlock, "pre-existing subnets CIDR block is invalid"))
- }
- if vnetErr == nil && subnetErr == nil && !parentNet.Contains(subnetIP) {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("CIDRBlock"), virtualNetwork.CIDRBlock, "pre-existing virtual networks CIDR block should contain the subnet CIDR block"))
- }
- }
- return allErrs
-}
-
-func validateFleetsMember(fleetsMember *FleetsMember, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
-
- if fleetsMember != nil && fleetsMember.Name != "" {
- match, _ := regexp.MatchString(`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`, fleetsMember.Name)
- if !match {
- allErrs = append(allErrs,
- field.Invalid(
- fldPath.Child("Name"),
- fleetsMember.Name,
- "Name must match ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
- ),
- )
- }
- }
-
- return allErrs
-}
-
-// validateAPIServerAccessProfile validates an APIServerAccessProfile.
-func validateAPIServerAccessProfile(apiServerAccessProfile *APIServerAccessProfile, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- if apiServerAccessProfile != nil {
- for _, ipRange := range apiServerAccessProfile.AuthorizedIPRanges {
- if _, _, err := net.ParseCIDR(ipRange); err != nil {
- allErrs = append(allErrs, field.Invalid(fldPath, ipRange, "invalid CIDR format"))
- }
- }
-
- // privateDNSZone should either be "System" or "None" or the private dns zone name should be in either of these
- // formats: 'private..azmk8s.io,privatelink..azmk8s.io,[a-zA-Z0-9-]{1,32}.private..azmk8s.io,
- // [a-zA-Z0-9-]{1,32}.privatelink..azmk8s.io'. The validation below follows the guidelines mentioned at
- // https://learn.microsoft.com/azure/aks/private-clusters?tabs=azure-portal#configure-a-private-dns-zone.
- // Performing a lower case comparison to avoid case sensitivity.
- if apiServerAccessProfile.PrivateDNSZone != nil {
- privateDNSZone := strings.ToLower(ptr.Deref(apiServerAccessProfile.PrivateDNSZone, ""))
- if !strings.EqualFold(strings.ToLower(privateDNSZone), "system") &&
- !strings.EqualFold(strings.ToLower(privateDNSZone), "none") {
- // Extract substring starting from "privatednszones/"
- startIndex := strings.Index(strings.ToLower(privateDNSZone), "privatednszones/")
- if startIndex == -1 {
- allErrs = append(allErrs, field.Invalid(fldPath, privateDNSZone, "invalid private DNS zone"))
- return allErrs
- }
-
- // Private DNS Zones can only be used by private clusters.
- if !ptr.Deref(apiServerAccessProfile.EnablePrivateCluster, false) {
- allErrs = append(allErrs, field.Invalid(fldPath, apiServerAccessProfile.EnablePrivateCluster, "Private Cluster should be enabled to use PrivateDNSZone"))
- return allErrs
- }
-
- extractedPrivateDNSZone := privateDNSZone[startIndex+len("privatednszones/"):]
-
- patternWithLocation := `^(privatelink|private)\.[a-zA-Z0-9]+\.(azmk8s\.io)$`
- locationRegex := regexp.MustCompile(patternWithLocation)
- patternWithSubzone := `^[a-zA-Z0-9-]{1,32}\.(privatelink|private)\.[a-zA-Z0-9]+\.(azmk8s\.io)$`
- subzoneRegex := regexp.MustCompile(patternWithSubzone)
-
- // check if privateDNSZone is a valid resource ID
- if !locationRegex.MatchString(extractedPrivateDNSZone) && !subzoneRegex.MatchString(extractedPrivateDNSZone) {
- allErrs = append(allErrs, field.Invalid(fldPath, privateDNSZone, "invalid privateDnsZone resource ID. Each label the private dns zone name should be in either of these formats: 'private..azmk8s.io,privatelink..azmk8s.io,[a-zA-Z0-9-]{1,32}.private..azmk8s.io,[a-zA-Z0-9-]{1,32}.privatelink..azmk8s.io'"))
- }
- }
- }
- }
- return allErrs
-}
-
-// validateManagedClusterNetwork validates the Cluster network values.
-func validateManagedClusterNetwork(cli client.Client, labels map[string]string, namespace string, dnsServiceIP *string, subnet ManagedControlPlaneSubnet, fldPath *field.Path) field.ErrorList {
- var (
- allErrs field.ErrorList
- serviceCIDR string
- )
-
- ctx := context.Background()
-
- // Fetch the Cluster.
- clusterName, ok := labels[clusterv1.ClusterNameLabel]
- if !ok {
- return nil
- }
-
- ownerCluster := &clusterv1.Cluster{}
- key := client.ObjectKey{
- Namespace: namespace,
- Name: clusterName,
- }
-
- if err := cli.Get(ctx, key, ownerCluster); err != nil {
- allErrs = append(allErrs, field.InternalError(field.NewPath("Cluster", "spec", "clusterNetwork"), err))
- return allErrs
- }
-
- clusterNetwork := ownerCluster.Spec.ClusterNetwork
- // A user may provide zero or one CIDR blocks. If they provide an empty array,
- // we ignore it and use the default. AKS doesn't support > 1 Service/Pod CIDR.
- if len(clusterNetwork.Services.CIDRBlocks) > 1 {
- allErrs = append(allErrs, field.TooMany(field.NewPath("Cluster", "spec", "clusterNetwork", "services", "cidrBlocks"), len(clusterNetwork.Services.CIDRBlocks), 1))
- }
- if len(clusterNetwork.Services.CIDRBlocks) == 1 {
- serviceCIDR = clusterNetwork.Services.CIDRBlocks[0]
- }
- // A user may provide zero or one CIDR blocks. If they provide an empty array,
- // we ignore it and use the default. AKS doesn't support > 1 Service/Pod CIDR.
- if len(clusterNetwork.Pods.CIDRBlocks) > 1 {
- allErrs = append(allErrs, field.TooMany(field.NewPath("Cluster", "spec", "clusterNetwork", "pods", "cidrBlocks"), len(clusterNetwork.Pods.CIDRBlocks), 1))
- }
-
- if dnsServiceIP != nil {
- if serviceCIDR == "" {
- allErrs = append(allErrs, field.Required(field.NewPath("Cluster", "spec", "clusterNetwork", "services", "cidrBlocks"), "service CIDR must be specified if specifying DNSServiceIP"))
- }
- _, cidr, err := net.ParseCIDR(serviceCIDR)
- if err != nil {
- allErrs = append(allErrs, field.Invalid(field.NewPath("Cluster", "spec", "clusterNetwork", "services", "cidrBlocks"), serviceCIDR, fmt.Sprintf("failed to parse cluster service cidr: %v", err)))
- }
-
- dnsIP := net.ParseIP(*dnsServiceIP)
- if dnsIP == nil { // dnsIP will be nil if the string is not a valid IP
- allErrs = append(allErrs, field.Invalid(field.NewPath("Cluster", "spec", "clusterNetwork", "services", "dnsServiceIP"), *dnsServiceIP, "must be a valid IP address"))
- }
-
- if dnsIP != nil && !cidr.Contains(dnsIP) {
- allErrs = append(allErrs, field.Invalid(field.NewPath("Cluster", "spec", "clusterNetwork", "services", "cidrBlocks"), serviceCIDR, "DNSServiceIP must reside within the associated cluster serviceCIDR"))
- }
-
- // AKS only supports .10 as the last octet for the DNSServiceIP.
- // Refer to: https://learn.microsoft.com/en-us/azure/aks/configure-kubenet#create-an-aks-cluster-with-system-assigned-managed-identities
- targetSuffix := ".10"
- if dnsIP != nil && !strings.HasSuffix(dnsIP.String(), targetSuffix) {
- allErrs = append(allErrs, field.Invalid(field.NewPath("Cluster", "spec", "clusterNetwork", "services", "dnsServiceIP"), *dnsServiceIP, fmt.Sprintf("must end with %q", targetSuffix)))
- }
- }
-
- if errs := validatePrivateEndpoints(subnet.PrivateEndpoints, []string{subnet.CIDRBlock}, fldPath.Child("VirtualNetwork.Subnet.PrivateEndpoints")); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- return allErrs
-}
-
-// validateAutoUpgradeProfile validates auto upgrade profile.
-func (m *AzureManagedControlPlane) validateAutoUpgradeProfile(old *AzureManagedControlPlane) field.ErrorList {
- var allErrs field.ErrorList
- if old.Spec.AutoUpgradeProfile != nil {
- if old.Spec.AutoUpgradeProfile.UpgradeChannel != nil && (m.Spec.AutoUpgradeProfile == nil || m.Spec.AutoUpgradeProfile.UpgradeChannel == nil) {
- // Prevent AutoUpgradeProfile.UpgradeChannel to be set to nil.
- // Unsetting the field is not allowed.
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("Spec", "AutoUpgradeProfile", "UpgradeChannel"),
- old.Spec.AutoUpgradeProfile.UpgradeChannel,
- "field cannot be set to nil, to disable auto upgrades set the channel to none."))
- }
- }
- return allErrs
-}
-
-// validateK8sVersionUpdate validates K8s version.
-func (m *AzureManagedControlPlane) validateK8sVersionUpdate(old *AzureManagedControlPlane) field.ErrorList {
- var allErrs field.ErrorList
- if hv := versions.GetHigherK8sVersion(m.Spec.Version, old.Spec.Version); hv != m.Spec.Version {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "version"),
- m.Spec.Version, "field version cannot be downgraded"),
- )
- }
-
- if old.Status.AutoUpgradeVersion != "" && m.Spec.Version != old.Spec.Version {
- if hv := versions.GetHigherK8sVersion(m.Spec.Version, old.Status.AutoUpgradeVersion); hv != m.Spec.Version {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "version"),
- m.Spec.Version, "version is auto-upgraded to "+old.Status.AutoUpgradeVersion+", cannot be downgraded"),
- )
- }
- }
- return allErrs
-}
-
-// validateAPIServerAccessProfileUpdate validates update to APIServerAccessProfile.
-func (m *AzureManagedControlPlane) validateAPIServerAccessProfileUpdate(old *AzureManagedControlPlane) field.ErrorList {
- var allErrs field.ErrorList
-
- newAPIServerAccessProfileNormalized := &APIServerAccessProfile{}
- oldAPIServerAccessProfileNormalized := &APIServerAccessProfile{}
- if m.Spec.APIServerAccessProfile != nil {
- newAPIServerAccessProfileNormalized = &APIServerAccessProfile{
- APIServerAccessProfileClassSpec: APIServerAccessProfileClassSpec{
- EnablePrivateCluster: m.Spec.APIServerAccessProfile.EnablePrivateCluster,
- PrivateDNSZone: m.Spec.APIServerAccessProfile.PrivateDNSZone,
- EnablePrivateClusterPublicFQDN: m.Spec.APIServerAccessProfile.EnablePrivateClusterPublicFQDN,
- },
- }
- }
- if old.Spec.APIServerAccessProfile != nil {
- oldAPIServerAccessProfileNormalized = &APIServerAccessProfile{
- APIServerAccessProfileClassSpec: APIServerAccessProfileClassSpec{
- EnablePrivateCluster: old.Spec.APIServerAccessProfile.EnablePrivateCluster,
- PrivateDNSZone: old.Spec.APIServerAccessProfile.PrivateDNSZone,
- EnablePrivateClusterPublicFQDN: old.Spec.APIServerAccessProfile.EnablePrivateClusterPublicFQDN,
- },
- }
- }
-
- if !reflect.DeepEqual(newAPIServerAccessProfileNormalized, oldAPIServerAccessProfileNormalized) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "apiServerAccessProfile"),
- m.Spec.APIServerAccessProfile, "fields (except for AuthorizedIPRanges) are immutable"),
- )
- }
-
- return allErrs
-}
-
-// validateAddonProfilesUpdate validates update to AddonProfiles.
-func (m *AzureManagedControlPlane) validateAddonProfilesUpdate(old *AzureManagedControlPlane) field.ErrorList {
- var allErrs field.ErrorList
- newAddonProfileMap := map[string]struct{}{}
- if len(old.Spec.AddonProfiles) != 0 {
- for _, addonProfile := range m.Spec.AddonProfiles {
- newAddonProfileMap[addonProfile.Name] = struct{}{}
- }
- for i, addonProfile := range old.Spec.AddonProfiles {
- if _, ok := newAddonProfileMap[addonProfile.Name]; !ok {
- allErrs = append(allErrs, field.Invalid(
- field.NewPath("spec", "addonProfiles"),
- m.Spec.AddonProfiles,
- fmt.Sprintf("cannot remove addonProfile %s, To disable this AddonProfile, update Spec.AddonProfiles[%v].Enabled to false", addonProfile.Name, i)))
- }
- }
- }
- return allErrs
-}
-
-// validateVirtualNetworkUpdate validates update to VirtualNetwork.
-func (m *AzureManagedControlPlane) validateVirtualNetworkUpdate(old *AzureManagedControlPlane) field.ErrorList {
- var allErrs field.ErrorList
- if old.Spec.VirtualNetwork.Name != m.Spec.VirtualNetwork.Name {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "virtualNetwork", "name"),
- m.Spec.VirtualNetwork.Name,
- "Virtual Network Name is immutable"))
- }
-
- if old.Spec.VirtualNetwork.CIDRBlock != m.Spec.VirtualNetwork.CIDRBlock {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "virtualNetwork", "cidrBlock"),
- m.Spec.VirtualNetwork.CIDRBlock,
- "Virtual Network CIDRBlock is immutable"))
- }
-
- if old.Spec.VirtualNetwork.Subnet.Name != m.Spec.VirtualNetwork.Subnet.Name {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "virtualNetwork", "subnet", "name"),
- m.Spec.VirtualNetwork.Subnet.Name,
- "Subnet Name is immutable"))
- }
-
- // NOTE: This only works because we force the user to set the CIDRBlock for both the
- // managed and unmanaged Vnets. If we ever update the subnet cidr based on what's
- // actually set in the subnet, and it is different from what's in the Spec, for
- // unmanaged Vnets like we do with the AzureCluster this logic will break.
- if old.Spec.VirtualNetwork.Subnet.CIDRBlock != m.Spec.VirtualNetwork.Subnet.CIDRBlock {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "virtualNetwork", "subnet", "cidrBlock"),
- m.Spec.VirtualNetwork.Subnet.CIDRBlock,
- "Subnet CIDRBlock is immutable"))
- }
-
- if old.Spec.VirtualNetwork.ResourceGroup != m.Spec.VirtualNetwork.ResourceGroup {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "virtualNetwork", "resourceGroup"),
- m.Spec.VirtualNetwork.ResourceGroup,
- "Virtual Network Resource Group is immutable"))
- }
- return allErrs
-}
-
-// validateNetworkPluginModeUpdate validates update to NetworkPluginMode.
-func (m *AzureManagedControlPlane) validateNetworkPluginModeUpdate(old *AzureManagedControlPlane) field.ErrorList {
- var allErrs field.ErrorList
-
- if ptr.Deref(old.Spec.NetworkPluginMode, "") != NetworkPluginModeOverlay &&
- ptr.Deref(m.Spec.NetworkPluginMode, "") == NetworkPluginModeOverlay &&
- old.Spec.NetworkPolicy != nil {
- allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "networkPluginMode"), fmt.Sprintf("%q NetworkPluginMode cannot be enabled when NetworkPolicy is set", NetworkPluginModeOverlay)))
- }
-
- return allErrs
-}
-
-// validateAADProfileUpdateAndLocalAccounts validates updates for AADProfile.
-func (m *AzureManagedControlPlane) validateAADProfileUpdateAndLocalAccounts(old *AzureManagedControlPlane) field.ErrorList {
- var allErrs field.ErrorList
- if old.Spec.AADProfile != nil {
- if m.Spec.AADProfile == nil {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "aadProfile"),
- m.Spec.AADProfile,
- "field cannot be nil, cannot disable AADProfile"))
- } else {
- if !m.Spec.AADProfile.Managed && old.Spec.AADProfile.Managed {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "aadProfile", "managed"),
- m.Spec.AADProfile.Managed,
- "cannot set AADProfile.Managed to false"))
- }
- if len(m.Spec.AADProfile.AdminGroupObjectIDs) == 0 {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "aadProfile", "adminGroupObjectIDs"),
- m.Spec.AADProfile.AdminGroupObjectIDs,
- "length of AADProfile.AdminGroupObjectIDs cannot be zero"))
- }
- }
- }
-
- if old.Spec.DisableLocalAccounts == nil &&
- m.Spec.DisableLocalAccounts != nil &&
- m.Spec.AADProfile == nil {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "disableLocalAccounts"),
- m.Spec.DisableLocalAccounts,
- "DisableLocalAccounts can be set only for AAD enabled clusters"))
- }
-
- if old.Spec.DisableLocalAccounts != nil {
- // Prevent DisableLocalAccounts modification if it was already set to some value
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "disableLocalAccounts"),
- m.Spec.DisableLocalAccounts,
- old.Spec.DisableLocalAccounts,
- ); err != nil {
- allErrs = append(allErrs, err)
- }
- }
-
- return allErrs
-}
-
-// validateSecurityProfileUpdate validates a SecurityProfile update.
-func (m *AzureManagedControlPlaneClassSpec) validateSecurityProfileUpdate(old *AzureManagedControlPlaneClassSpec) field.ErrorList {
- var allErrs field.ErrorList
- if old.SecurityProfile != nil {
- if errAzureKeyVaultKms := m.validateAzureKeyVaultKmsUpdate(old); errAzureKeyVaultKms != nil {
- allErrs = append(allErrs, errAzureKeyVaultKms...)
- }
- if errWorkloadIdentity := m.validateWorkloadIdentityUpdate(old); errWorkloadIdentity != nil {
- allErrs = append(allErrs, errWorkloadIdentity...)
- }
- if errWorkloadIdentity := m.validateImageCleanerUpdate(old); errWorkloadIdentity != nil {
- allErrs = append(allErrs, errWorkloadIdentity...)
- }
- if errWorkloadIdentity := m.validateDefender(old); errWorkloadIdentity != nil {
- allErrs = append(allErrs, errWorkloadIdentity...)
- }
- }
- return allErrs
-}
-
-// validateAzureKeyVaultKmsUpdate validates AzureKeyVaultKmsUpdate profile.
-func (m *AzureManagedControlPlaneClassSpec) validateAzureKeyVaultKmsUpdate(old *AzureManagedControlPlaneClassSpec) field.ErrorList {
- var allErrs field.ErrorList
- if old.SecurityProfile.AzureKeyVaultKms != nil {
- if m.SecurityProfile == nil || m.SecurityProfile.AzureKeyVaultKms == nil {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "securityProfile", "azureKeyVaultKms"),
- nil, "cannot unset Spec.SecurityProfile.AzureKeyVaultKms profile to disable the profile please set Spec.SecurityProfile.AzureKeyVaultKms.Enabled to false"))
- return allErrs
- }
- }
- return allErrs
-}
-
-// validateWorkloadIdentityUpdate validates WorkloadIdentityUpdate profile.
-func (m *AzureManagedControlPlaneClassSpec) validateWorkloadIdentityUpdate(old *AzureManagedControlPlaneClassSpec) field.ErrorList {
- var allErrs field.ErrorList
- if old.SecurityProfile.WorkloadIdentity != nil {
- if m.SecurityProfile == nil || m.SecurityProfile.WorkloadIdentity == nil {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "securityProfile", "workloadIdentity"),
- nil, "cannot unset Spec.SecurityProfile.WorkloadIdentity, to disable workloadIdentity please set Spec.SecurityProfile.WorkloadIdentity.Enabled to false"))
- }
- }
- return allErrs
-}
-
-// validateImageCleanerUpdate validates ImageCleanerUpdate profile.
-func (m *AzureManagedControlPlaneClassSpec) validateImageCleanerUpdate(old *AzureManagedControlPlaneClassSpec) field.ErrorList {
- var allErrs field.ErrorList
- if old.SecurityProfile.ImageCleaner != nil {
- if m.SecurityProfile == nil || m.SecurityProfile.ImageCleaner == nil {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "securityProfile", "imageCleaner"),
- nil, "cannot unset Spec.SecurityProfile.ImageCleaner, to disable imageCleaner please set Spec.SecurityProfile.ImageCleaner.Enabled to false"))
- }
- }
- return allErrs
-}
-
-// validateDefender validates defender profile.
-func (m *AzureManagedControlPlaneClassSpec) validateDefender(old *AzureManagedControlPlaneClassSpec) field.ErrorList {
- var allErrs field.ErrorList
- if old.SecurityProfile.Defender != nil {
- if m.SecurityProfile == nil || m.SecurityProfile.Defender == nil {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "securityProfile", "defender"),
- nil, "cannot unset Spec.SecurityProfile.Defender, to disable defender please set Spec.SecurityProfile.Defender.SecurityMonitoring.Enabled to false"))
- }
- }
- return allErrs
-}
-
-// validateOIDCIssuerProfile validates an OIDCIssuerProfile.
-func (m *AzureManagedControlPlane) validateOIDCIssuerProfileUpdate(old *AzureManagedControlPlane) field.ErrorList {
- var allErrs field.ErrorList
- if m.Spec.OIDCIssuerProfile != nil && old.Spec.OIDCIssuerProfile != nil {
- if m.Spec.OIDCIssuerProfile.Enabled != nil && old.Spec.OIDCIssuerProfile.Enabled != nil &&
- !*m.Spec.OIDCIssuerProfile.Enabled && *old.Spec.OIDCIssuerProfile.Enabled {
- allErrs = append(allErrs,
- field.Forbidden(
- field.NewPath("spec", "oidcIssuerProfile", "enabled"),
- "cannot be disabled",
- ),
- )
- }
- }
- return allErrs
-}
-
-// validateFleetsMemberUpdate validates a FleetsMember.
-func (m *AzureManagedControlPlane) validateFleetsMemberUpdate(old *AzureManagedControlPlane) field.ErrorList {
- var allErrs field.ErrorList
-
- if old.Spec.FleetsMember == nil || m.Spec.FleetsMember == nil {
- return allErrs
- }
- if old.Spec.FleetsMember.Name != "" && old.Spec.FleetsMember.Name != m.Spec.FleetsMember.Name {
- allErrs = append(allErrs,
- field.Forbidden(
- field.NewPath("spec", "fleetsMember", "name"),
- "Name is immutable",
- ),
- )
- }
-
- return allErrs
-}
-
-// validateAKSExtensionsUpdate validates update to AKS extensions.
-func validateAKSExtensionsUpdate(old []AKSExtension, current []AKSExtension) field.ErrorList {
- var allErrs field.ErrorList
-
- oldAKSExtensionsMap := make(map[string]AKSExtension, len(old))
- oldAKSExtensionsIndex := make(map[string]int, len(old))
- for i, extension := range old {
- oldAKSExtensionsMap[extension.Name] = extension
- oldAKSExtensionsIndex[extension.Name] = i
- }
- for i, extension := range current {
- oldExtension, ok := oldAKSExtensionsMap[extension.Name]
- if !ok {
- continue
- }
- if extension.Name != oldExtension.Name {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "extensions", fmt.Sprintf("[%d]", i), "name"),
- extension.Name,
- "field is immutable",
- ),
- )
- }
- if (oldExtension.ExtensionType != nil && extension.ExtensionType != nil) && *extension.ExtensionType != *oldExtension.ExtensionType {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "extensions", fmt.Sprintf("[%d]", i), "extensionType"),
- extension.ExtensionType,
- "field is immutable",
- ),
- )
- }
- if (extension.Plan != nil && oldExtension.Plan != nil) && *extension.Plan != *oldExtension.Plan {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "extensions", fmt.Sprintf("[%d]", i), "plan"),
- extension.Plan,
- "field is immutable",
- ),
- )
- }
- if extension.Scope != oldExtension.Scope {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "extensions", fmt.Sprintf("[%d]", i), "scope"),
- extension.Scope,
- "field is immutable",
- ),
- )
- }
- if (extension.ReleaseTrain != nil && oldExtension.ReleaseTrain != nil) && *extension.ReleaseTrain != *oldExtension.ReleaseTrain {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "extensions", fmt.Sprintf("[%d]", i), "releaseTrain"),
- extension.ReleaseTrain,
- "field is immutable",
- ),
- )
- }
- if (extension.Version != nil && oldExtension.Version != nil) && *extension.Version != *oldExtension.Version {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "extensions", fmt.Sprintf("[%d]", i), "version"),
- extension.Version,
- "field is immutable",
- ),
- )
- }
- if extension.Identity != oldExtension.Identity {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "extensions", fmt.Sprintf("[%d]", i), "identity"),
- extension.Identity,
- "field is immutable",
- ),
- )
- }
- }
-
- return allErrs
-}
-
-func validateName(name string, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- if lName := strings.ToLower(name); strings.Contains(lName, "microsoft") ||
- strings.Contains(lName, "windows") {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("Name"), name,
- "cluster name is invalid because 'MICROSOFT' and 'WINDOWS' can't be used as either a whole word or a substring in the name"))
- }
-
- return allErrs
-}
-
-// validateAKSExtensions validates the AKS extensions.
-func validateAKSExtensions(extensions []AKSExtension, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- for _, extension := range extensions {
- if extension.Version != nil && (extension.AutoUpgradeMinorVersion == nil || (extension.AutoUpgradeMinorVersion != nil && *extension.AutoUpgradeMinorVersion)) {
- allErrs = append(allErrs, field.Forbidden(fldPath.Child("Version"), "Version must not be given if AutoUpgradeMinorVersion is true (or not provided, as it is true by default)"))
- }
- if extension.AutoUpgradeMinorVersion == ptr.To(false) && extension.ReleaseTrain != nil {
- allErrs = append(allErrs, field.Forbidden(fldPath.Child("ReleaseTrain"), "ReleaseTrain must not be given if AutoUpgradeMinorVersion is false"))
- }
- if extension.Scope != nil {
- switch extension.Scope.ScopeType {
- case ExtensionScopeCluster:
- if extension.Scope.ReleaseNamespace == "" {
- allErrs = append(allErrs, field.Required(fldPath.Child("Scope", "ReleaseNamespace"), "ReleaseNamespace must be provided if Scope is Cluster"))
- }
- if extension.Scope.TargetNamespace != "" {
- allErrs = append(allErrs, field.Forbidden(fldPath.Child("Scope", "TargetNamespace"), "TargetNamespace can only be given if Scope is Namespace"))
- }
- case ExtensionScopeNamespace:
- if extension.Scope.TargetNamespace == "" {
- allErrs = append(allErrs, field.Required(fldPath.Child("Scope", "TargetNamespace"), "TargetNamespace must be provided if Scope is Namespace"))
- }
- if extension.Scope.ReleaseNamespace != "" {
- allErrs = append(allErrs, field.Forbidden(fldPath.Child("Scope", "ReleaseNamespace"), "ReleaseNamespace can only be given if Scope is Cluster"))
- }
- }
- }
- }
-
- return allErrs
-}
-
-// validateNetworkPolicy validates the networkPolicy.
-func validateNetworkPolicy(networkPolicy *string, networkDataplane *NetworkDataplaneType, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
-
- if networkPolicy == nil {
- return nil
- }
-
- if *networkPolicy == "cilium" && networkDataplane != nil && *networkDataplane != NetworkDataplaneTypeCilium {
- allErrs = append(allErrs, field.Invalid(fldPath, networkPolicy, "cilium network policy can only be used with cilium network dataplane"))
- }
-
- return allErrs
-}
-
-// validateNetworkDataplane validates the NetworkDataplane.
-func validateNetworkDataplane(networkDataplane *NetworkDataplaneType, networkPolicy *string, networkPluginMode *NetworkPluginMode, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
-
- if networkDataplane == nil {
- return nil
- }
-
- if *networkDataplane == NetworkDataplaneTypeCilium && (networkPluginMode == nil || *networkPluginMode != NetworkPluginModeOverlay) {
- allErrs = append(allErrs, field.Invalid(fldPath, networkDataplane, "cilium network dataplane can only be used with overlay network plugin mode"))
- }
- if *networkDataplane == NetworkDataplaneTypeCilium && (networkPolicy == nil || *networkPolicy != "cilium") {
- allErrs = append(allErrs, field.Invalid(fldPath, networkDataplane, "cilium dataplane requires network policy cilium."))
- }
-
- return allErrs
-}
-
-// validateAutoScalerProfile validates an AutoScalerProfile.
-func validateAutoScalerProfile(autoScalerProfile *AutoScalerProfile, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
-
- if autoScalerProfile == nil {
- return nil
- }
-
- if errs := validateIntegerStringGreaterThanZero(autoScalerProfile.MaxEmptyBulkDelete, fldPath, "MaxEmptyBulkDelete"); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := validateIntegerStringGreaterThanZero(autoScalerProfile.MaxGracefulTerminationSec, fldPath, "MaxGracefulTerminationSec"); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := validateMaxNodeProvisionTime(autoScalerProfile.MaxNodeProvisionTime, fldPath); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if autoScalerProfile.MaxTotalUnreadyPercentage != nil {
- val, err := strconv.Atoi(*autoScalerProfile.MaxTotalUnreadyPercentage)
- if err != nil || val < 0 || val > 100 {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "autoscalerProfile", "maxTotalUnreadyPercentage"), autoScalerProfile.MaxTotalUnreadyPercentage, "invalid value"))
- }
- }
-
- if errs := validateNewPodScaleUpDelay(autoScalerProfile.NewPodScaleUpDelay, fldPath); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := validateIntegerStringGreaterThanZero(autoScalerProfile.OkTotalUnreadyCount, fldPath, "okTotalUnreadyCount"); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := validateScanInterval(autoScalerProfile.ScanInterval, fldPath); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := validateScaleDownTime(autoScalerProfile.ScaleDownDelayAfterAdd, fldPath, "scaleDownDelayAfterAdd"); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := validateScaleDownDelayAfterDelete(autoScalerProfile.ScaleDownDelayAfterDelete, fldPath); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := validateScaleDownTime(autoScalerProfile.ScaleDownDelayAfterFailure, fldPath, "scaleDownDelayAfterFailure"); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := validateScaleDownTime(autoScalerProfile.ScaleDownUnneededTime, fldPath, "scaleDownUnneededTime"); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := validateScaleDownTime(autoScalerProfile.ScaleDownUnreadyTime, fldPath, "scaleDownUnreadyTime"); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if autoScalerProfile.ScaleDownUtilizationThreshold != nil {
- val, err := strconv.ParseFloat(*autoScalerProfile.ScaleDownUtilizationThreshold, 32)
- if err != nil || val < 0 || val > 1 {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "autoscalerProfile", "scaleDownUtilizationThreshold"), autoScalerProfile.ScaleDownUtilizationThreshold, "invalid value"))
- }
- }
-
- return allErrs
-}
-
-// validateMaxNodeProvisionTime validates update to AutoscalerProfile.MaxNodeProvisionTime.
-func validateMaxNodeProvisionTime(maxNodeProvisionTime *string, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- if ptr.Deref(maxNodeProvisionTime, "") != "" {
- if !rMaxNodeProvisionTime.MatchString(ptr.Deref(maxNodeProvisionTime, "")) {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("MaxNodeProvisionTime"), maxNodeProvisionTime, "invalid value"))
- }
- }
- return allErrs
-}
-
-// validateScanInterval validates update to AutoscalerProfile.ScanInterval.
-func validateScanInterval(scanInterval *string, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- if ptr.Deref(scanInterval, "") != "" {
- if !rScanInterval.MatchString(ptr.Deref(scanInterval, "")) {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("ScanInterval"), scanInterval, "invalid value"))
- }
- }
- return allErrs
-}
-
-// validateNewPodScaleUpDelay validates update to AutoscalerProfile.NewPodScaleUpDelay.
-func validateNewPodScaleUpDelay(newPodScaleUpDelay *string, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- if ptr.Deref(newPodScaleUpDelay, "") != "" {
- _, err := time.ParseDuration(ptr.Deref(newPodScaleUpDelay, ""))
- if err != nil {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("NewPodScaleUpDelay"), newPodScaleUpDelay, "invalid value"))
- }
- }
- return allErrs
-}
-
-// validateScaleDownDelayAfterDelete validates update to AutoscalerProfile.ScaleDownDelayAfterDelete value.
-func validateScaleDownDelayAfterDelete(scaleDownDelayAfterDelete *string, fldPath *field.Path) field.ErrorList {
- var allErrs field.ErrorList
- if ptr.Deref(scaleDownDelayAfterDelete, "") != "" {
- if !rScaleDownDelayAfterDelete.MatchString(ptr.Deref(scaleDownDelayAfterDelete, "")) {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("ScaleDownDelayAfterDelete"), ptr.Deref(scaleDownDelayAfterDelete, ""), "invalid value"))
- }
- }
- return allErrs
-}
-
-// validateScaleDownTime validates update to AutoscalerProfile.ScaleDown* values.
-func validateScaleDownTime(scaleDownValue *string, fldPath *field.Path, fieldName string) field.ErrorList {
- var allErrs field.ErrorList
- if ptr.Deref(scaleDownValue, "") != "" {
- if !rScaleDownTime.MatchString(ptr.Deref(scaleDownValue, "")) {
- allErrs = append(allErrs, field.Invalid(fldPath.Child(fieldName), ptr.Deref(scaleDownValue, ""), "invalid value"))
- }
- }
- return allErrs
-}
-
-// validateIntegerStringGreaterThanZero validates that a string value is an integer greater than zero.
-func validateIntegerStringGreaterThanZero(input *string, fldPath *field.Path, fieldName string) field.ErrorList {
- var allErrs field.ErrorList
-
- if input != nil {
- val, err := strconv.Atoi(*input)
- if err != nil || val < 0 {
- allErrs = append(allErrs, field.Invalid(fldPath.Child(fieldName), input, "invalid value"))
- }
- }
-
- return allErrs
-}
-
-// validateIdentity validates an Identity.
-func (m *AzureManagedControlPlane) validateIdentity(_ client.Client) field.ErrorList {
- var allErrs field.ErrorList
-
- if m.Spec.Identity != nil {
- if m.Spec.Identity.Type == ManagedControlPlaneIdentityTypeUserAssigned {
- if m.Spec.Identity.UserAssignedIdentityResourceID == "" {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "identity", "userAssignedIdentityResourceID"), m.Spec.Identity.UserAssignedIdentityResourceID, "cannot be empty if Identity.Type is UserAssigned"))
- }
- } else {
- if m.Spec.Identity.UserAssignedIdentityResourceID != "" {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "identity", "userAssignedIdentityResourceID"), m.Spec.Identity.UserAssignedIdentityResourceID, "should be empty if Identity.Type is SystemAssigned"))
- }
- }
- }
-
- if len(allErrs) > 0 {
- return allErrs
- }
-
- return nil
-}
-
-// validateNetworkPluginMode validates a NetworkPluginMode.
-func (m *AzureManagedControlPlane) validateNetworkPluginMode(_ client.Client) field.ErrorList {
- var allErrs field.ErrorList
-
- const kubenet = "kubenet"
- if ptr.Deref(m.Spec.NetworkPluginMode, "") == NetworkPluginModeOverlay &&
- ptr.Deref(m.Spec.NetworkPlugin, "") == kubenet {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "networkPluginMode"), m.Spec.NetworkPluginMode, fmt.Sprintf("cannot be set to %q when NetworkPlugin is %q", NetworkPluginModeOverlay, kubenet)))
- }
-
- if len(allErrs) > 0 {
- return allErrs
- }
-
- return nil
-}
-
-// isOIDCEnabled return true if OIDC issuer is enabled.
-func (m *AzureManagedControlPlaneClassSpec) isOIDCEnabled() bool {
- if m.OIDCIssuerProfile == nil {
- return false
- }
- if m.OIDCIssuerProfile.Enabled == nil {
- return false
- }
- return *m.OIDCIssuerProfile.Enabled
-}
-
-// isUserManagedIdentityEnabled checks if user assigned identity is set.
-func (m *AzureManagedControlPlaneClassSpec) isUserManagedIdentityEnabled() bool {
- if m.Identity == nil {
- return false
- }
- if m.Identity.Type != ManagedControlPlaneIdentityTypeUserAssigned {
- return false
- }
- return true
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplanetemplate_default.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplanetemplate_default.go
deleted file mode 100644
index 02255c27a59d..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplanetemplate_default.go
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-Copyright 2023 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "strings"
-
- "k8s.io/utils/ptr"
- ctrl "sigs.k8s.io/controller-runtime"
-)
-
-func (mcp *AzureManagedControlPlaneTemplate) setDefaults() {
- setDefault[*string](&mcp.Spec.Template.Spec.NetworkPlugin, ptr.To(AzureNetworkPluginName))
- setDefault[*string](&mcp.Spec.Template.Spec.LoadBalancerSKU, ptr.To("Standard"))
- setDefault[*bool](&mcp.Spec.Template.Spec.EnablePreviewFeatures, ptr.To(false))
-
- if mcp.Spec.Template.Spec.Version != "" && !strings.HasPrefix(mcp.Spec.Template.Spec.Version, "v") {
- mcp.Spec.Template.Spec.Version = setDefaultVersion(mcp.Spec.Template.Spec.Version)
- }
-
- mcp.setDefaultVirtualNetwork()
- mcp.setDefaultSubnet()
- mcp.Spec.Template.Spec.SKU = setDefaultSku(mcp.Spec.Template.Spec.SKU)
-}
-
-// setDefaultVirtualNetwork sets the default VirtualNetwork for an AzureManagedControlPlaneTemplate.
-func (mcp *AzureManagedControlPlaneTemplate) setDefaultVirtualNetwork() {
- if mcp.Spec.Template.Spec.VirtualNetwork.Name != "" {
- // Being able to set the vnet name in the template type is a bug, as vnet names cannot be reused across clusters.
- // To avoid a breaking API change, a warning is logged.
- ctrl.Log.WithName("AzureManagedControlPlaneTemplateWebHookLogger").Info("WARNING: VirtualNetwork.Name should not be set in the template. Virtual Network names cannot be shared across clusters.")
- }
- if mcp.Spec.Template.Spec.VirtualNetwork.CIDRBlock == "" {
- mcp.Spec.Template.Spec.VirtualNetwork.CIDRBlock = defaultAKSVnetCIDR
- }
-}
-
-// setDefaultSubnet sets the default Subnet for an AzureManagedControlPlaneTemplate.
-func (mcp *AzureManagedControlPlaneTemplate) setDefaultSubnet() {
- if mcp.Spec.Template.Spec.VirtualNetwork.Subnet.Name == "" {
- mcp.Spec.Template.Spec.VirtualNetwork.Subnet.Name = mcp.Name
- }
- if mcp.Spec.Template.Spec.VirtualNetwork.Subnet.CIDRBlock == "" {
- mcp.Spec.Template.Spec.VirtualNetwork.Subnet.CIDRBlock = defaultAKSNodeSubnetCIDR
- }
-}
-
-// setDefault sets the default value for a pointer to a value for any comparable type.
-func setDefault[T comparable](field *T, value T) {
- if field == nil {
- // shouldn't happen with proper use
- return
- }
- var zero T
- if *field == zero {
- *field = value
- }
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplanetemplate_types.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplanetemplate_types.go
index b722493b0c95..8efa53535526 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplanetemplate_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplanetemplate_types.go
@@ -48,7 +48,7 @@ type AzureManagedControlPlaneTemplateList struct {
}
func init() {
- SchemeBuilder.Register(&AzureManagedControlPlaneTemplate{}, &AzureManagedControlPlaneTemplateList{})
+ objectTypes = append(objectTypes, &AzureManagedControlPlaneTemplate{}, &AzureManagedControlPlaneTemplateList{})
}
// AzureManagedControlPlaneTemplateResource describes the data needed to create an AzureManagedCluster from a template.
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplanetemplate_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplanetemplate_webhook.go
deleted file mode 100644
index b249f3ff8336..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplanetemplate_webhook.go
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
-Copyright 2023 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "context"
- "reflect"
-
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/client"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-
- "sigs.k8s.io/cluster-api-provider-azure/util/versions"
- webhookutils "sigs.k8s.io/cluster-api-provider-azure/util/webhook"
-)
-
-// SetupAzureManagedControlPlaneTemplateWebhookWithManager will set up the webhook to be managed by the specified manager.
-func SetupAzureManagedControlPlaneTemplateWebhookWithManager(mgr ctrl.Manager) error {
- mcpw := &azureManagedControlPlaneTemplateWebhook{Client: mgr.GetClient()}
- return ctrl.NewWebhookManagedBy(mgr).
- For(&AzureManagedControlPlaneTemplate{}).
- WithDefaulter(mcpw).
- WithValidator(mcpw).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-azuremanagedcontrolplanetemplate,mutating=false,failurePolicy=fail,groups=infrastructure.cluster.x-k8s.io,resources=azuremanagedcontrolplanetemplates,versions=v1beta1,name=validation.azuremanagedcontrolplanetemplates.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta1-azuremanagedcontrolplanetemplate,mutating=true,failurePolicy=fail,groups=infrastructure.cluster.x-k8s.io,resources=azuremanagedcontrolplanetemplates,versions=v1beta1,name=default.azuremanagedcontrolplanetemplates.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-type azureManagedControlPlaneTemplateWebhook struct {
- Client client.Client
-}
-
-// Default implements webhook.Defaulter so a webhook will be registered for the type.
-func (mcpw *azureManagedControlPlaneTemplateWebhook) Default(_ context.Context, obj runtime.Object) error {
- mcp, ok := obj.(*AzureManagedControlPlaneTemplate)
- if !ok {
- return apierrors.NewBadRequest("expected an AzureManagedControlPlaneTemplate")
- }
- mcp.setDefaults()
- return nil
-}
-
-// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
-func (mcpw *azureManagedControlPlaneTemplateWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- mcp, ok := obj.(*AzureManagedControlPlaneTemplate)
- if !ok {
- return nil, apierrors.NewBadRequest("expected an AzureManagedControlPlaneTemplate")
- }
-
- return nil, mcp.validateManagedControlPlaneTemplate(mcpw.Client)
-}
-
-// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
-func (mcpw *azureManagedControlPlaneTemplateWebhook) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
- var allErrs field.ErrorList
- old, ok := oldObj.(*AzureManagedControlPlaneTemplate)
- if !ok {
- return nil, apierrors.NewBadRequest("expected an AzureManagedControlPlaneTemplate")
- }
- mcp, ok := newObj.(*AzureManagedControlPlaneTemplate)
- if !ok {
- return nil, apierrors.NewBadRequest("expected an AzureManagedControlPlaneTemplate")
- }
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "subscriptionID"),
- old.Spec.Template.Spec.SubscriptionID,
- mcp.Spec.Template.Spec.SubscriptionID); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "location"),
- old.Spec.Template.Spec.Location,
- mcp.Spec.Template.Spec.Location); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "dnsServiceIP"),
- old.Spec.Template.Spec.DNSServiceIP,
- mcp.Spec.Template.Spec.DNSServiceIP); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "networkPlugin"),
- old.Spec.Template.Spec.NetworkPlugin,
- mcp.Spec.Template.Spec.NetworkPlugin); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "networkPolicy"),
- old.Spec.Template.Spec.NetworkPolicy,
- mcp.Spec.Template.Spec.NetworkPolicy); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "networkDataplane"),
- old.Spec.Template.Spec.NetworkDataplane,
- mcp.Spec.Template.Spec.NetworkDataplane); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "loadBalancerSKU"),
- old.Spec.Template.Spec.LoadBalancerSKU,
- mcp.Spec.Template.Spec.LoadBalancerSKU); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if old.Spec.Template.Spec.AADProfile != nil {
- if mcp.Spec.Template.Spec.AADProfile == nil {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "template", "spec", "aadProfile"),
- mcp.Spec.Template.Spec.AADProfile,
- "field cannot be nil, cannot disable AADProfile"))
- } else {
- if !mcp.Spec.Template.Spec.AADProfile.Managed && old.Spec.Template.Spec.AADProfile.Managed {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "template", "spec", "aadProfile", "managed"),
- mcp.Spec.Template.Spec.AADProfile.Managed,
- "cannot set AADProfile.Managed to false"))
- }
- if len(mcp.Spec.Template.Spec.AADProfile.AdminGroupObjectIDs) == 0 {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "template", "spec", "aadProfile", "adminGroupObjectIDs"),
- mcp.Spec.Template.Spec.AADProfile.AdminGroupObjectIDs,
- "length of AADProfile.AdminGroupObjectIDs cannot be zero"))
- }
- }
- }
-
- // Consider removing this once moves out of preview
- // Updating outboundType after cluster creation (PREVIEW)
- // https://learn.microsoft.com/en-us/azure/aks/egress-outboundtype#updating-outboundtype-after-cluster-creation-preview
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "outboundType"),
- old.Spec.Template.Spec.OutboundType,
- mcp.Spec.Template.Spec.OutboundType); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if errs := mcp.validateVirtualNetworkTemplateUpdate(old); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := mcp.validateAPIServerAccessProfileTemplateUpdate(old); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if errs := validateAKSExtensionsUpdate(old.Spec.Template.Spec.Extensions, mcp.Spec.Template.Spec.Extensions); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
- if errs := mcp.validateK8sVersionUpdate(old); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- if len(allErrs) == 0 {
- return nil, mcp.validateManagedControlPlaneTemplate(mcpw.Client)
- }
-
- return nil, apierrors.NewInvalid(GroupVersion.WithKind(AzureManagedControlPlaneTemplateKind).GroupKind(), mcp.Name, allErrs)
-}
-
-// Validate the Azure Managed Control Plane Template and return an aggregate error.
-func (mcp *AzureManagedControlPlaneTemplate) validateManagedControlPlaneTemplate(cli client.Client) error {
- var allErrs field.ErrorList
-
- allErrs = append(allErrs, validateVersion(
- mcp.Spec.Template.Spec.Version,
- field.NewPath("spec").Child("template").Child("spec").Child("version"))...)
-
- allErrs = append(allErrs, validateLoadBalancerProfile(
- mcp.Spec.Template.Spec.LoadBalancerProfile,
- field.NewPath("spec").Child("template").Child("spec").Child("loadBalancerProfile"))...)
-
- allErrs = append(allErrs, validateManagedClusterNetwork(
- cli,
- mcp.Labels,
- mcp.Namespace,
- mcp.Spec.Template.Spec.DNSServiceIP,
- mcp.Spec.Template.Spec.VirtualNetwork.Subnet,
- field.NewPath("spec").Child("template").Child("spec"))...)
-
- allErrs = append(allErrs, validateName(mcp.Name, field.NewPath("name"))...)
-
- allErrs = append(allErrs, validateAutoScalerProfile(mcp.Spec.Template.Spec.AutoScalerProfile, field.NewPath("spec").Child("template").Child("spec").Child("autoScalerProfile"))...)
-
- allErrs = append(allErrs, validateAKSExtensions(mcp.Spec.Template.Spec.Extensions, field.NewPath("spec").Child("extensions"))...)
-
- allErrs = append(allErrs, mcp.Spec.Template.Spec.AzureManagedControlPlaneClassSpec.validateSecurityProfile()...)
-
- allErrs = append(allErrs, validateNetworkPolicy(mcp.Spec.Template.Spec.NetworkPolicy, mcp.Spec.Template.Spec.NetworkDataplane, field.NewPath("spec").Child("template").Child("spec").Child("networkPolicy"))...)
-
- allErrs = append(allErrs, validateNetworkDataplane(mcp.Spec.Template.Spec.NetworkDataplane, mcp.Spec.Template.Spec.NetworkPolicy, mcp.Spec.Template.Spec.NetworkPluginMode, field.NewPath("spec").Child("template").Child("spec").Child("networkDataplane"))...)
-
- allErrs = append(allErrs, validateAPIServerAccessProfile(mcp.Spec.Template.Spec.APIServerAccessProfile, field.NewPath("spec").Child("template").Child("spec").Child("apiServerAccessProfile"))...)
-
- allErrs = append(allErrs, validateAMCPVirtualNetwork(mcp.Spec.Template.Spec.VirtualNetwork, field.NewPath("spec").Child("template").Child("spec").Child("virtualNetwork"))...)
-
- return allErrs.ToAggregate()
-}
-
-// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
-func (mcpw *azureManagedControlPlaneTemplateWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// validateK8sVersionUpdate validates K8s version.
-func (mcp *AzureManagedControlPlaneTemplate) validateK8sVersionUpdate(old *AzureManagedControlPlaneTemplate) field.ErrorList {
- var allErrs field.ErrorList
- if hv := versions.GetHigherK8sVersion(mcp.Spec.Template.Spec.Version, old.Spec.Template.Spec.Version); hv != mcp.Spec.Template.Spec.Version {
- allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "template", "spec", "version"),
- mcp.Spec.Template.Spec.Version, "field version cannot be downgraded"),
- )
- }
- return allErrs
-}
-
-// validateVirtualNetworkTemplateUpdate validates update to VirtualNetworkTemplate.
-func (mcp *AzureManagedControlPlaneTemplate) validateVirtualNetworkTemplateUpdate(old *AzureManagedControlPlaneTemplate) field.ErrorList {
- var allErrs field.ErrorList
-
- if old.Spec.Template.Spec.VirtualNetwork.CIDRBlock != mcp.Spec.Template.Spec.VirtualNetwork.CIDRBlock {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "template", "spec", "virtualNetwork", "cidrBlock"),
- mcp.Spec.Template.Spec.VirtualNetwork.CIDRBlock,
- "Virtual Network CIDRBlock is immutable"))
- }
-
- if old.Spec.Template.Spec.VirtualNetwork.Subnet.Name != mcp.Spec.Template.Spec.VirtualNetwork.Subnet.Name {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "template", "spec", "virtualNetwork", "subnet", "name"),
- mcp.Spec.Template.Spec.VirtualNetwork.Subnet.Name,
- "Subnet Name is immutable"))
- }
-
- // NOTE: This only works because we force the user to set the CIDRBlock for both the
- // managed and unmanaged Vnets. If we ever update the subnet cidr based on what's
- // actually set in the subnet, and it is different from what's in the Spec, for
- // unmanaged Vnets like we do with the AzureCluster this logic will break.
- if old.Spec.Template.Spec.VirtualNetwork.Subnet.CIDRBlock != mcp.Spec.Template.Spec.VirtualNetwork.Subnet.CIDRBlock {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "template", "spec", "virtualNetwork", "subnet", "cidrBlock"),
- mcp.Spec.Template.Spec.VirtualNetwork.Subnet.CIDRBlock,
- "Subnet CIDRBlock is immutable"))
- }
-
- if errs := mcp.Spec.Template.Spec.AzureManagedControlPlaneClassSpec.validateSecurityProfileUpdate(&old.Spec.Template.Spec.AzureManagedControlPlaneClassSpec); len(errs) > 0 {
- allErrs = append(allErrs, errs...)
- }
-
- return allErrs
-}
-
-// validateAPIServerAccessProfileTemplateUpdate validates update to APIServerAccessProfileTemplate.
-func (mcp *AzureManagedControlPlaneTemplate) validateAPIServerAccessProfileTemplateUpdate(old *AzureManagedControlPlaneTemplate) field.ErrorList {
- var allErrs field.ErrorList
-
- newAPIServerAccessProfileNormalized := &APIServerAccessProfile{}
- oldAPIServerAccessProfileNormalized := &APIServerAccessProfile{}
- if mcp.Spec.Template.Spec.APIServerAccessProfile != nil {
- newAPIServerAccessProfileNormalized = &APIServerAccessProfile{
- APIServerAccessProfileClassSpec: APIServerAccessProfileClassSpec{
- EnablePrivateCluster: mcp.Spec.Template.Spec.APIServerAccessProfile.EnablePrivateCluster,
- PrivateDNSZone: mcp.Spec.Template.Spec.APIServerAccessProfile.PrivateDNSZone,
- EnablePrivateClusterPublicFQDN: mcp.Spec.Template.Spec.APIServerAccessProfile.EnablePrivateClusterPublicFQDN,
- },
- }
- }
- if old.Spec.Template.Spec.APIServerAccessProfile != nil {
- oldAPIServerAccessProfileNormalized = &APIServerAccessProfile{
- APIServerAccessProfileClassSpec: APIServerAccessProfileClassSpec{
- EnablePrivateCluster: old.Spec.Template.Spec.APIServerAccessProfile.EnablePrivateCluster,
- PrivateDNSZone: old.Spec.Template.Spec.APIServerAccessProfile.PrivateDNSZone,
- EnablePrivateClusterPublicFQDN: old.Spec.Template.Spec.APIServerAccessProfile.EnablePrivateClusterPublicFQDN,
- },
- }
- }
-
- if !reflect.DeepEqual(newAPIServerAccessProfileNormalized, oldAPIServerAccessProfileNormalized) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "template", "spec", "apiServerAccessProfile"),
- mcp.Spec.Template.Spec.APIServerAccessProfile, "fields are immutable"),
- )
- }
-
- return allErrs
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedmachinepool_types.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedmachinepool_types.go
index de21f87f5d54..ebd3a4701c8a 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedmachinepool_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedmachinepool_types.go
@@ -533,5 +533,5 @@ func (m *AzureManagedMachinePool) SetFutures(futures Futures) {
}
func init() {
- SchemeBuilder.Register(&AzureManagedMachinePool{}, &AzureManagedMachinePoolList{})
+ objectTypes = append(objectTypes, &AzureManagedMachinePool{}, &AzureManagedMachinePoolList{})
}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedmachinepool_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedmachinepool_webhook.go
deleted file mode 100644
index 84560b083712..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedmachinepool_webhook.go
+++ /dev/null
@@ -1,587 +0,0 @@
-/*
-Copyright 2023 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "context"
- "fmt"
- "regexp"
- "strconv"
- "strings"
- "unicode"
-
- "github.com/pkg/errors"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- kerrors "k8s.io/apimachinery/pkg/util/errors"
- "k8s.io/apimachinery/pkg/util/validation/field"
- "k8s.io/utils/ptr"
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
- clusterctlv1alpha3 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/client"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-
- azureutil "sigs.k8s.io/cluster-api-provider-azure/util/azure"
- webhookutils "sigs.k8s.io/cluster-api-provider-azure/util/webhook"
-)
-
-var validNodePublicPrefixID = regexp.MustCompile(`(?i)^/?subscriptions/[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}/resourcegroups/[^/]+/providers/microsoft\.network/publicipprefixes/[^/]+$`)
-
-// SetupAzureManagedMachinePoolWebhookWithManager sets up and registers the webhook with the manager.
-func SetupAzureManagedMachinePoolWebhookWithManager(mgr ctrl.Manager) error {
- mw := &azureManagedMachinePoolWebhook{Client: mgr.GetClient()}
- return ctrl.NewWebhookManagedBy(mgr).
- For(&AzureManagedMachinePool{}).
- WithDefaulter(mw).
- WithValidator(mw).
- Complete()
-}
-
-//+kubebuilder:webhook:path=/mutate-infrastructure-cluster-x-k8s-io-v1beta1-azuremanagedmachinepool,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=azuremanagedmachinepools,verbs=create;update,versions=v1beta1,name=default.azuremanagedmachinepools.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-// azureManagedMachinePoolWebhook implements a validating and defaulting webhook for AzureManagedMachinePool.
-type azureManagedMachinePoolWebhook struct {
- Client client.Client
-}
-
-// Default implements webhook.Defaulter so a webhook will be registered for the type.
-func (mw *azureManagedMachinePoolWebhook) Default(_ context.Context, obj runtime.Object) error {
- m, ok := obj.(*AzureManagedMachinePool)
- if !ok {
- return apierrors.NewBadRequest("expected an AzureManagedMachinePool")
- }
- if m.Labels == nil {
- m.Labels = make(map[string]string)
- }
- m.Labels[LabelAgentPoolMode] = m.Spec.Mode
-
- if m.Spec.Name == nil || *m.Spec.Name == "" {
- m.Spec.Name = &m.Name
- }
-
- if m.Spec.OSType == nil {
- m.Spec.OSType = ptr.To(DefaultOSType)
- }
-
- return nil
-}
-
-//+kubebuilder:webhook:verbs=create;update;delete,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-azuremanagedmachinepool,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=azuremanagedmachinepools,versions=v1beta1,name=validation.azuremanagedmachinepools.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
-func (mw *azureManagedMachinePoolWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- m, ok := obj.(*AzureManagedMachinePool)
- if !ok {
- return nil, apierrors.NewBadRequest("expected an AzureManagedMachinePool")
- }
-
- var errs []error
-
- errs = append(errs, validateMaxPods(
- m.Spec.MaxPods,
- field.NewPath("spec", "maxPods")))
-
- errs = append(errs, validateOSType(
- m.Spec.Mode,
- m.Spec.OSType,
- field.NewPath("spec", "osType")))
-
- errs = append(errs, validateMPName(
- m.Name,
- m.Spec.Name,
- m.Spec.OSType,
- field.NewPath("spec", "name")))
-
- errs = append(errs, validateNodeLabels(
- m.Spec.NodeLabels,
- field.NewPath("spec", "nodeLabels")))
-
- errs = append(errs, validateNodePublicIPPrefixID(
- m.Spec.NodePublicIPPrefixID,
- field.NewPath("spec", "nodePublicIPPrefixID")))
-
- errs = append(errs, validateEnableNodePublicIP(
- m.Spec.EnableNodePublicIP,
- m.Spec.NodePublicIPPrefixID,
- field.NewPath("spec", "enableNodePublicIP")))
-
- errs = append(errs, validateKubeletConfig(
- m.Spec.KubeletConfig,
- field.NewPath("spec", "kubeletConfig")))
-
- errs = append(errs, validateLinuxOSConfig(
- m.Spec.LinuxOSConfig,
- m.Spec.KubeletConfig,
- field.NewPath("spec", "linuxOSConfig")))
-
- errs = append(errs, validateMPSubnetName(
- m.Spec.SubnetName,
- field.NewPath("spec", "subnetName")))
-
- return nil, kerrors.NewAggregate(errs)
-}
-
-// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
-func (mw *azureManagedMachinePoolWebhook) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
- old, ok := oldObj.(*AzureManagedMachinePool)
- if !ok {
- return nil, apierrors.NewBadRequest("expected an AzureManagedMachinePool")
- }
- m, ok := newObj.(*AzureManagedMachinePool)
- if !ok {
- return nil, apierrors.NewBadRequest("expected an AzureManagedMachinePool")
- }
- var allErrs field.ErrorList
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "name"),
- old.Spec.Name,
- m.Spec.Name); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := validateNodeLabels(m.Spec.NodeLabels, field.NewPath("spec", "nodeLabels")); err != nil {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "nodeLabels"),
- m.Spec.NodeLabels,
- err.Error()))
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "osType"),
- old.Spec.OSType,
- m.Spec.OSType); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "sku"),
- old.Spec.SKU,
- m.Spec.SKU); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "osDiskSizeGB"),
- old.Spec.OSDiskSizeGB,
- m.Spec.OSDiskSizeGB); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "subnetName"),
- old.Spec.SubnetName,
- m.Spec.SubnetName); err != nil && old.Spec.SubnetName != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "enableFIPS"),
- old.Spec.EnableFIPS,
- m.Spec.EnableFIPS); err != nil && old.Spec.EnableFIPS != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "enableEncryptionAtHost"),
- old.Spec.EnableEncryptionAtHost,
- m.Spec.EnableEncryptionAtHost); err != nil && old.Spec.EnableEncryptionAtHost != nil {
- allErrs = append(allErrs, err)
- }
-
- if !webhookutils.EnsureStringSlicesAreEquivalent(m.Spec.AvailabilityZones, old.Spec.AvailabilityZones) {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "availabilityZones"),
- m.Spec.AvailabilityZones,
- "field is immutable"))
- }
-
- if m.Spec.Mode != string(NodePoolModeSystem) && old.Spec.Mode == string(NodePoolModeSystem) {
- // validate for last system node pool
- if err := validateLastSystemNodePool(mw.Client, m.Labels, m.Namespace, m.Annotations); err != nil {
- allErrs = append(allErrs, field.Forbidden(
- field.NewPath("spec", "mode"),
- "Cannot change node pool mode to User, you must have at least one System node pool in your cluster"))
- }
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "maxPods"),
- old.Spec.MaxPods,
- m.Spec.MaxPods); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "osDiskType"),
- old.Spec.OsDiskType,
- m.Spec.OsDiskType); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "scaleSetPriority"),
- old.Spec.ScaleSetPriority,
- m.Spec.ScaleSetPriority); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "enableUltraSSD"),
- old.Spec.EnableUltraSSD,
- m.Spec.EnableUltraSSD); err != nil {
- allErrs = append(allErrs, err)
- }
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "enableNodePublicIP"),
- old.Spec.EnableNodePublicIP,
- m.Spec.EnableNodePublicIP); err != nil {
- allErrs = append(allErrs, err)
- }
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "nodePublicIPPrefixID"),
- old.Spec.NodePublicIPPrefixID,
- m.Spec.NodePublicIPPrefixID); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "kubeletConfig"),
- old.Spec.KubeletConfig,
- m.Spec.KubeletConfig); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "kubeletDiskType"),
- old.Spec.KubeletDiskType,
- m.Spec.KubeletDiskType); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "linuxOSConfig"),
- old.Spec.LinuxOSConfig,
- m.Spec.LinuxOSConfig); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if len(allErrs) != 0 {
- return nil, apierrors.NewInvalid(GroupVersion.WithKind(AzureManagedMachinePoolKind).GroupKind(), m.Name, allErrs)
- }
-
- return nil, nil
-}
-
-// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
-func (mw *azureManagedMachinePoolWebhook) ValidateDelete(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- m, ok := obj.(*AzureManagedMachinePool)
- if !ok {
- return nil, apierrors.NewBadRequest("expected an AzureManagedMachinePool")
- }
- if m.Spec.Mode != string(NodePoolModeSystem) {
- return nil, nil
- }
-
- return nil, errors.Wrapf(validateLastSystemNodePool(mw.Client, m.Labels, m.Namespace, m.Annotations), "if the delete is triggered via owner MachinePool please refer to trouble shooting section in https://capz.sigs.k8s.io/topics/managedcluster.html")
-}
-
-// validateLastSystemNodePool is used to check if the existing system node pool is the last system node pool.
-// If it is a last system node pool it cannot be deleted or mutated to user node pool as AKS expects min 1 system node pool.
-func validateLastSystemNodePool(cli client.Client, labels map[string]string, namespace string, annotations map[string]string) error {
- ctx := context.Background()
-
- // Fetch the Cluster.
- clusterName, ok := labels[clusterv1.ClusterNameLabel]
- if !ok {
- return nil
- }
-
- ownerCluster := &clusterv1.Cluster{}
- key := client.ObjectKey{
- Namespace: namespace,
- Name: clusterName,
- }
-
- if err := cli.Get(ctx, key, ownerCluster); err != nil {
- return err
- }
-
- if !ownerCluster.DeletionTimestamp.IsZero() {
- return nil
- }
-
- // checking if this AzureManagedMachinePool is going to be deleted for clusterctl move operation
- if _, ok := annotations[clusterctlv1alpha3.DeleteForMoveAnnotation]; ok {
- return nil
- }
-
- opt1 := client.InNamespace(namespace)
- opt2 := client.MatchingLabels(map[string]string{
- clusterv1.ClusterNameLabel: clusterName,
- LabelAgentPoolMode: string(NodePoolModeSystem),
- })
-
- ammpList := &AzureManagedMachinePoolList{}
- if err := cli.List(ctx, ammpList, opt1, opt2); err != nil {
- return err
- }
-
- if len(ammpList.Items) <= 1 {
- return errors.New("AKS Cluster must have at least one system pool")
- }
- return nil
-}
-
-func validateMaxPods(maxPods *int, fldPath *field.Path) error {
- if maxPods != nil {
- if ptr.Deref(maxPods, 0) < 10 || ptr.Deref(maxPods, 0) > 250 {
- return field.Invalid(
- fldPath,
- maxPods,
- "MaxPods must be between 10 and 250")
- }
- }
-
- return nil
-}
-
-func validateOSType(mode string, osType *string, fldPath *field.Path) error {
- if mode == string(NodePoolModeSystem) {
- if osType != nil && *osType != LinuxOS {
- return field.Forbidden(
- fldPath,
- "System node pooll must have OSType 'Linux'")
- }
- }
-
- return nil
-}
-
-func validateMPName(mpName string, specName *string, osType *string, fldPath *field.Path) error {
- var name *string
- var fieldNameMessage string
- if specName == nil || *specName == "" {
- name = &mpName
- fieldNameMessage = "when spec.name is empty, metadata.name"
- } else {
- name = specName
- fieldNameMessage = "spec.name"
- }
-
- if err := validateNameLength(osType, name, fieldNameMessage, fldPath); err != nil {
- return err
- }
- return validateNamePattern(name, fieldNameMessage, fldPath)
-}
-
-func validateNameLength(osType *string, name *string, fieldNameMessage string, fldPath *field.Path) error {
- if osType != nil && *osType == WindowsOS &&
- name != nil && len(*name) > 6 {
- return field.Invalid(
- fldPath,
- name,
- fmt.Sprintf("For OSType Windows, %s can not be longer than 6 characters.", fieldNameMessage))
- } else if (osType == nil || *osType == LinuxOS) &&
- (name != nil && len(*name) > 12) {
- return field.Invalid(
- fldPath,
- osType,
- fmt.Sprintf("For OSType Linux, %s can not be longer than 12 characters.", fieldNameMessage))
- }
- return nil
-}
-
-func validateNamePattern(name *string, fieldNameMessage string, fldPath *field.Path) error {
- if name == nil || *name == "" {
- return nil
- }
-
- if !unicode.IsLower(rune((*name)[0])) {
- return field.Invalid(
- fldPath,
- name,
- fmt.Sprintf("%s must begin with a lowercase letter.", fieldNameMessage))
- }
-
- for _, char := range *name {
- if !unicode.IsLower(char) && !unicode.IsNumber(char) {
- return field.Invalid(
- fldPath,
- name,
- fmt.Sprintf("%s may only contain lowercase alphanumeric characters.", fieldNameMessage))
- }
- }
- return nil
-}
-
-func validateNodeLabels(nodeLabels map[string]string, fldPath *field.Path) error {
- for key := range nodeLabels {
- if azureutil.IsAzureSystemNodeLabelKey(key) {
- return field.Invalid(
- fldPath,
- key,
- fmt.Sprintf("Node pool label key must not start with %s", azureutil.AzureSystemNodeLabelPrefix))
- }
- }
-
- return nil
-}
-
-func validateNodePublicIPPrefixID(nodePublicIPPrefixID *string, fldPath *field.Path) error {
- if nodePublicIPPrefixID != nil && !validNodePublicPrefixID.MatchString(*nodePublicIPPrefixID) {
- return field.Invalid(
- fldPath,
- nodePublicIPPrefixID,
- fmt.Sprintf("resource ID must match %q", validNodePublicPrefixID.String()))
- }
- return nil
-}
-
-func validateEnableNodePublicIP(enableNodePublicIP *bool, nodePublicIPPrefixID *string, fldPath *field.Path) error {
- if (enableNodePublicIP == nil || !*enableNodePublicIP) &&
- nodePublicIPPrefixID != nil {
- return field.Invalid(
- fldPath,
- enableNodePublicIP,
- "must be set to true when NodePublicIPPrefixID is set")
- }
- return nil
-}
-
-func validateMPSubnetName(subnetName *string, fldPath *field.Path) error {
- if subnetName != nil {
- subnetRegex := "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,78}[a-zA-Z0-9]$"
- regex := regexp.MustCompile(subnetRegex)
- if success := regex.MatchString(ptr.Deref(subnetName, "")); !success {
- return field.Invalid(fldPath, subnetName,
- fmt.Sprintf("name of subnet doesn't match regex %s", subnetRegex))
- }
- }
- return nil
-}
-
-// validateKubeletConfig enforces the AKS API configuration for KubeletConfig.
-// See: https://learn.microsoft.com/en-us/azure/aks/custom-node-configuration.
-func validateKubeletConfig(kubeletConfig *KubeletConfig, fldPath *field.Path) error {
- var allowedUnsafeSysctlsPatterns = []string{
- `^kernel\.shm.+$`,
- `^kernel\.msg.+$`,
- `^kernel\.sem$`,
- `^fs\.mqueue\..+$`,
- `^net\..+$`,
- }
- if kubeletConfig != nil {
- if kubeletConfig.CPUCfsQuotaPeriod != nil {
- if !strings.HasSuffix(ptr.Deref(kubeletConfig.CPUCfsQuotaPeriod, ""), "ms") {
- return field.Invalid(
- fldPath.Child("CPUfsQuotaPeriod"),
- kubeletConfig.CPUCfsQuotaPeriod,
- "must be a string value in milliseconds with a 'ms' suffix, e.g., '100ms'")
- }
- }
- if kubeletConfig.ImageGcHighThreshold != nil && kubeletConfig.ImageGcLowThreshold != nil {
- if ptr.Deref(kubeletConfig.ImageGcLowThreshold, 0) > ptr.Deref(kubeletConfig.ImageGcHighThreshold, 0) {
- return field.Invalid(
- fldPath.Child("ImageGcLowThreshold"),
- kubeletConfig.ImageGcLowThreshold,
- fmt.Sprintf("must not be greater than ImageGcHighThreshold, ImageGcLowThreshold=%d, ImageGcHighThreshold=%d",
- ptr.Deref(kubeletConfig.ImageGcLowThreshold, 0), ptr.Deref(kubeletConfig.ImageGcHighThreshold, 0)))
- }
- }
- for _, val := range kubeletConfig.AllowedUnsafeSysctls {
- var hasMatch bool
- for _, p := range allowedUnsafeSysctlsPatterns {
- if m, _ := regexp.MatchString(p, val); m {
- hasMatch = true
- break
- }
- }
- if !hasMatch {
- return field.Invalid(
- fldPath.Child("AllowedUnsafeSysctls"),
- kubeletConfig.AllowedUnsafeSysctls,
- fmt.Sprintf("%s is not a supported AllowedUnsafeSysctls configuration", val))
- }
- }
- }
- return nil
-}
-
-// validateLinuxOSConfig enforces AKS API configuration for Linux OS custom configuration
-// See: https://learn.microsoft.com/en-us/azure/aks/custom-node-configuration#linux-os-custom-configuration for detailed information.
-func validateLinuxOSConfig(linuxOSConfig *LinuxOSConfig, kubeletConfig *KubeletConfig, fldPath *field.Path) error {
- var errs []error
- if linuxOSConfig == nil {
- return nil
- }
-
- if linuxOSConfig.SwapFileSizeMB != nil {
- if kubeletConfig == nil || ptr.Deref(kubeletConfig.FailSwapOn, true) {
- errs = append(errs, field.Invalid(
- fldPath.Child("SwapFileSizeMB"),
- linuxOSConfig.SwapFileSizeMB,
- "KubeletConfig.FailSwapOn must be set to false to enable swap file on nodes"))
- }
- }
-
- if linuxOSConfig.Sysctls != nil && linuxOSConfig.Sysctls.NetIpv4IPLocalPortRange != nil {
- // match numbers separated by a space
- portRangeRegex := `^[0-9]+ [0-9]+$`
- portRange := *linuxOSConfig.Sysctls.NetIpv4IPLocalPortRange
-
- match, matchErr := regexp.MatchString(portRangeRegex, portRange)
- if matchErr != nil {
- errs = append(errs, matchErr)
- }
- if !match {
- errs = append(errs, field.Invalid(
- fldPath.Child("NetIpv4IpLocalPortRange"),
- linuxOSConfig.Sysctls.NetIpv4IPLocalPortRange,
- "LinuxOSConfig.Sysctls.NetIpv4IpLocalPortRange must be of the format \" \""))
- } else {
- ports := strings.Split(portRange, " ")
- firstPort, _ := strconv.Atoi(ports[0])
- lastPort, _ := strconv.Atoi(ports[1])
-
- if firstPort < 1024 || firstPort > 60999 {
- errs = append(errs, field.Invalid(
- fldPath.Child("NetIpv4IpLocalPortRange", "First"),
- linuxOSConfig.Sysctls.NetIpv4IPLocalPortRange,
- fmt.Sprintf("first port of NetIpv4IpLocalPortRange=%d must be in between [1024 - 60999]", firstPort)))
- }
-
- if lastPort < 32768 || lastPort > 65000 {
- errs = append(errs, field.Invalid(
- fldPath.Child("NetIpv4IpLocalPortRange", "Last"),
- linuxOSConfig.Sysctls.NetIpv4IPLocalPortRange,
- fmt.Sprintf("last port of NetIpv4IpLocalPortRange=%d must be in between [32768 -65000]", lastPort)))
- }
-
- if firstPort > lastPort {
- errs = append(errs, field.Invalid(
- fldPath.Child("NetIpv4IpLocalPortRange", "First"),
- linuxOSConfig.Sysctls.NetIpv4IPLocalPortRange,
- fmt.Sprintf("first port of NetIpv4IpLocalPortRange=%d cannot be greater than last port of NetIpv4IpLocalPortRange=%d", firstPort, lastPort)))
- }
- }
- }
- return kerrors.NewAggregate(errs)
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedmachinepooltemplate_types.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedmachinepooltemplate_types.go
index 7a8bf4328777..f68eb54af292 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedmachinepooltemplate_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedmachinepooltemplate_types.go
@@ -48,7 +48,7 @@ type AzureManagedMachinePoolTemplateList struct {
}
func init() {
- SchemeBuilder.Register(&AzureManagedMachinePoolTemplate{}, &AzureManagedMachinePoolTemplateList{})
+ objectTypes = append(objectTypes, &AzureManagedMachinePoolTemplate{}, &AzureManagedMachinePoolTemplateList{})
}
// AzureManagedMachinePoolTemplateResource describes the data needed to create an AzureManagedCluster from a template.
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedmachinepooltemplate_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedmachinepooltemplate_webhook.go
deleted file mode 100644
index c976648a52f3..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedmachinepooltemplate_webhook.go
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
-Copyright 2023 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "context"
-
- "github.com/pkg/errors"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- kerrors "k8s.io/apimachinery/pkg/util/errors"
- "k8s.io/apimachinery/pkg/util/validation/field"
- "k8s.io/utils/ptr"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/client"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-
- webhookutils "sigs.k8s.io/cluster-api-provider-azure/util/webhook"
-)
-
-// SetupAzureManagedMachinePoolTemplateWebhookWithManager will set up the webhook to be managed by the specified manager.
-func SetupAzureManagedMachinePoolTemplateWebhookWithManager(mgr ctrl.Manager) error {
- mpw := &azureManagedMachinePoolTemplateWebhook{Client: mgr.GetClient()}
- return ctrl.NewWebhookManagedBy(mgr).
- For(&AzureManagedMachinePoolTemplate{}).
- WithDefaulter(mpw).
- WithValidator(mpw).
- Complete()
-}
-
-//+kubebuilder:webhook:path=/mutate-infrastructure-cluster-x-k8s-io-v1beta1-azuremanagedmachinepooltemplate,mutating=true,failurePolicy=fail,groups=infrastructure.cluster.x-k8s.io,resources=azuremanagedmachinepooltemplates,verbs=create;update,versions=v1beta1,name=default.azuremanagedmachinepooltemplates.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-type azureManagedMachinePoolTemplateWebhook struct {
- Client client.Client
-}
-
-// Default implements webhook.Defaulter so a webhook will be registered for the type.
-func (mpw *azureManagedMachinePoolTemplateWebhook) Default(_ context.Context, obj runtime.Object) error {
- mp, ok := obj.(*AzureManagedMachinePoolTemplate)
- if !ok {
- return apierrors.NewBadRequest("expected an AzureManagedMachinePoolTemplate")
- }
- if mp.Labels == nil {
- mp.Labels = make(map[string]string)
- }
- mp.Labels[LabelAgentPoolMode] = mp.Spec.Template.Spec.Mode
-
- if mp.Spec.Template.Spec.Name == nil || *mp.Spec.Template.Spec.Name == "" {
- mp.Spec.Template.Spec.Name = &mp.Name
- }
-
- setDefault[*string](&mp.Spec.Template.Spec.OSType, ptr.To(DefaultOSType))
-
- return nil
-}
-
-//+kubebuilder:webhook:verbs=create;update;delete,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-azuremanagedmachinepooltemplate,mutating=false,failurePolicy=fail,groups=infrastructure.cluster.x-k8s.io,resources=azuremanagedmachinepooltemplates,versions=v1beta1,name=validation.azuremanagedmachinepooltemplates.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1;v1beta1
-
-// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
-func (mpw *azureManagedMachinePoolTemplateWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- mp, ok := obj.(*AzureManagedMachinePoolTemplate)
- if !ok {
- return nil, apierrors.NewBadRequest("expected an AzureManagedMachinePoolTemplate")
- }
-
- var errs []error
-
- errs = append(errs, validateMaxPods(
- mp.Spec.Template.Spec.MaxPods,
- field.NewPath("spec", "template", "spec", "maxPods")))
-
- errs = append(errs, validateOSType(
- mp.Spec.Template.Spec.Mode,
- mp.Spec.Template.Spec.OSType,
- field.NewPath("spec", "template", "spec", "osType")))
-
- errs = append(errs, validateMPName(
- mp.Name,
- mp.Spec.Template.Spec.Name,
- mp.Spec.Template.Spec.OSType,
- field.NewPath("spec", "template", "spec", "name")))
-
- errs = append(errs, validateNodeLabels(
- mp.Spec.Template.Spec.NodeLabels,
- field.NewPath("spec", "template", "spec", "nodeLabels")))
-
- errs = append(errs, validateNodePublicIPPrefixID(
- mp.Spec.Template.Spec.NodePublicIPPrefixID,
- field.NewPath("spec", "template", "spec", "nodePublicIPPrefixID")))
-
- errs = append(errs, validateEnableNodePublicIP(
- mp.Spec.Template.Spec.EnableNodePublicIP,
- mp.Spec.Template.Spec.NodePublicIPPrefixID,
- field.NewPath("spec", "template", "spec", "enableNodePublicIP")))
-
- errs = append(errs, validateKubeletConfig(
- mp.Spec.Template.Spec.KubeletConfig,
- field.NewPath("spec", "template", "spec", "kubeletConfig")))
-
- errs = append(errs, validateLinuxOSConfig(
- mp.Spec.Template.Spec.LinuxOSConfig,
- mp.Spec.Template.Spec.KubeletConfig,
- field.NewPath("spec", "template", "spec", "linuxOSConfig")))
-
- return nil, kerrors.NewAggregate(errs)
-}
-
-// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
-func (mpw *azureManagedMachinePoolTemplateWebhook) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
- var allErrs field.ErrorList
- old, ok := oldObj.(*AzureManagedMachinePoolTemplate)
- if !ok {
- return nil, apierrors.NewBadRequest("expected an AzureManagedMachinePoolTemplate")
- }
- mp, ok := newObj.(*AzureManagedMachinePoolTemplate)
- if !ok {
- return nil, apierrors.NewBadRequest("expected an AzureManagedMachinePoolTemplate")
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "name"),
- old.Spec.Template.Spec.Name,
- mp.Spec.Template.Spec.Name); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := validateNodeLabels(mp.Spec.Template.Spec.NodeLabels, field.NewPath("spec", "template", "spec", "nodeLabels")); err != nil {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "template", "spec", "nodeLabels"),
- mp.Spec.Template.Spec.NodeLabels,
- err.Error()))
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "osType"),
- old.Spec.Template.Spec.OSType,
- mp.Spec.Template.Spec.OSType); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "sku"),
- old.Spec.Template.Spec.SKU,
- mp.Spec.Template.Spec.SKU); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "osDiskSizeGB"),
- old.Spec.Template.Spec.OSDiskSizeGB,
- mp.Spec.Template.Spec.OSDiskSizeGB); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "subnetName"),
- old.Spec.Template.Spec.SubnetName,
- mp.Spec.Template.Spec.SubnetName); err != nil && old.Spec.Template.Spec.SubnetName != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "enableFIPS"),
- old.Spec.Template.Spec.EnableFIPS,
- mp.Spec.Template.Spec.EnableFIPS); err != nil && old.Spec.Template.Spec.EnableFIPS != nil {
- allErrs = append(allErrs, err)
- }
-
- if !webhookutils.EnsureStringSlicesAreEquivalent(mp.Spec.Template.Spec.AvailabilityZones, old.Spec.Template.Spec.AvailabilityZones) {
- allErrs = append(allErrs,
- field.Invalid(
- field.NewPath("spec", "template", "spec", "availabilityZones"),
- mp.Spec.Template.Spec.AvailabilityZones,
- "field is immutable"))
- }
-
- if mp.Spec.Template.Spec.Mode != string(NodePoolModeSystem) && old.Spec.Template.Spec.Mode == string(NodePoolModeSystem) {
- // validate for last system node pool
- if err := validateLastSystemNodePool(mpw.Client, mp.Spec.Template.Spec.NodeLabels, mp.Namespace, mp.Annotations); err != nil {
- allErrs = append(allErrs, field.Forbidden(
- field.NewPath("spec", "template", "spec", "mode"),
- "Cannot change node pool mode to User, you must have at least one System node pool in your cluster"))
- }
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "maxPods"),
- old.Spec.Template.Spec.MaxPods,
- mp.Spec.Template.Spec.MaxPods); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "osDiskType"),
- old.Spec.Template.Spec.OsDiskType,
- mp.Spec.Template.Spec.OsDiskType); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "scaleSetPriority"),
- old.Spec.Template.Spec.ScaleSetPriority,
- mp.Spec.Template.Spec.ScaleSetPriority); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "enableUltraSSD"),
- old.Spec.Template.Spec.EnableUltraSSD,
- mp.Spec.Template.Spec.EnableUltraSSD); err != nil {
- allErrs = append(allErrs, err)
- }
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "enableNodePublicIP"),
- old.Spec.Template.Spec.EnableNodePublicIP,
- mp.Spec.Template.Spec.EnableNodePublicIP); err != nil {
- allErrs = append(allErrs, err)
- }
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "nodePublicIPPrefixID"),
- old.Spec.Template.Spec.NodePublicIPPrefixID,
- mp.Spec.Template.Spec.NodePublicIPPrefixID); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "kubeletConfig"),
- old.Spec.Template.Spec.KubeletConfig,
- mp.Spec.Template.Spec.KubeletConfig); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "kubeletDiskType"),
- old.Spec.Template.Spec.KubeletDiskType,
- mp.Spec.Template.Spec.KubeletDiskType); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if err := webhookutils.ValidateImmutable(
- field.NewPath("spec", "template", "spec", "linuxOSConfig"),
- old.Spec.Template.Spec.LinuxOSConfig,
- mp.Spec.Template.Spec.LinuxOSConfig); err != nil {
- allErrs = append(allErrs, err)
- }
-
- if len(allErrs) == 0 {
- return nil, nil
- }
- return nil, apierrors.NewInvalid(GroupVersion.WithKind(AzureManagedMachinePoolTemplateKind).GroupKind(), mp.Name, allErrs)
-}
-
-// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
-func (mpw *azureManagedMachinePoolTemplateWebhook) ValidateDelete(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- mp, ok := obj.(*AzureManagedMachinePoolTemplate)
- if !ok {
- return nil, apierrors.NewBadRequest("expected an AzureManagedMachinePoolTemplate")
- }
- if mp.Spec.Template.Spec.Mode != string(NodePoolModeSystem) {
- return nil, nil
- }
-
- return nil, errors.Wrapf(validateLastSystemNodePool(mpw.Client, mp.Spec.Template.Spec.NodeLabels, mp.Namespace, mp.Annotations), "if the delete is triggered via owner MachinePool please refer to trouble shooting section in https://capz.sigs.k8s.io/topics/managedcluster.html")
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/groupversion_info.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/groupversion_info.go
index 3d638832dc37..1fd8077dd011 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/groupversion_info.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/groupversion_info.go
@@ -19,17 +19,26 @@ limitations under the License.
package v1beta1
import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
- "sigs.k8s.io/controller-runtime/pkg/scheme"
)
var (
// GroupVersion is group version used to register these objects.
GroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1beta1"}
- // SchemeBuilder is used to add go types to the GroupVersionKind scheme.
- SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
+ // schemeBuilder is used to add go types to the GroupVersionKind scheme.
+ schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
// AddToScheme adds the types in this group-version to the given scheme.
- AddToScheme = SchemeBuilder.AddToScheme
+ AddToScheme = schemeBuilder.AddToScheme
+
+ objectTypes = []runtime.Object{}
)
+
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(GroupVersion, objectTypes...)
+ metav1.AddToGroupVersion(scheme, GroupVersion)
+ return nil
+}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/tags.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/tags.go
index 2b7a41aa9e96..ca90726b0de4 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/tags.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/tags.go
@@ -138,6 +138,7 @@ const (
// which tracks the AdditionalTags in the Machine Provider Config.
// See https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
// for annotation formatting rules.
+ //
// Deprecated: use azure.VMTagsLastAppliedAnnotation instead. This constant will be removed in v1beta2.
VMTagsLastAppliedAnnotation = "sigs.k8s.io/cluster-api-provider-azure-last-applied-tags-vm"
@@ -145,6 +146,7 @@ const (
// which tracks the AdditionalTags for Resource Group which is part in the Azure Cluster.
// See https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
// for annotation formatting rules.
+ //
// Deprecated: use azure.RGTagsLastAppliedAnnotation instead. This constant will be removed in v1beta2.
RGTagsLastAppliedAnnotation = "sigs.k8s.io/cluster-api-provider-azure-last-applied-tags-rg"
)
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/types.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/types.go
index 9a861d38e2a3..e8b71df616ec 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/types.go
@@ -368,6 +368,16 @@ type LoadBalancerSpec struct {
BackendPool BackendPool `json:"backendPool,omitempty"`
LoadBalancerClassSpec `json:",inline"`
+
+ // AvailabilityZones is a list of availability zones for the load balancer.
+ // When specified for an internal load balancer, the frontend IP configuration
+ // will be zone-redundant across the specified zones.
+ // For public load balancers, this should be set on the associated public IP addresses instead.
+ // +optional
+ // +listType=set
+ // +kubebuilder:validation:MaxItems=3
+ // +kubebuilder:validation:items:Pattern=`^[1-3]$`
+ AvailabilityZones []string `json:"availabilityZones,omitempty"`
}
// SKU defines an Azure load balancer SKU.
@@ -416,6 +426,7 @@ type IPTag struct {
}
// VMState describes the state of an Azure virtual machine.
+//
// Deprecated: use ProvisioningState.
type VMState string
@@ -451,6 +462,7 @@ type Image struct {
ID *string `json:"id,omitempty"`
// SharedGallery specifies an image to use from an Azure Shared Image Gallery
+ //
// Deprecated: use ComputeGallery instead.
// +optional
SharedGallery *AzureSharedGalleryImage `json:"sharedGallery,omitempty"`
@@ -946,7 +958,6 @@ type SecurityProfile struct {
// UefiSettings specifies the security settings like secure boot and vTPM used while creating the virtual
// machine.
-// +optional
type UefiSettings struct {
// SecureBootEnabled specifies whether secure boot should be enabled on the virtual machine.
// Secure Boot verifies the digital signature of all boot components and halts the boot process if signature verification fails.
@@ -964,8 +975,8 @@ type UefiSettings struct {
// AddressRecord specifies a DNS record mapping a hostname to an IPV4 or IPv6 address.
type AddressRecord struct {
- Hostname string
- IP string
+ Hostname string `json:"hostname"`
+ IP string `json:"ip"`
}
// CloudProviderConfigOverrides represents the fields that can be overridden in azure cloud provider config.
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/types_class.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/types_class.go
index 358cb1e60824..58b73192059a 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/types_class.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/types_class.go
@@ -536,33 +536,3 @@ type FrontendIPClass struct {
// +optional
PrivateIPAddress string `json:"privateIP,omitempty"`
}
-
-// setDefaults sets default values for AzureClusterClassSpec.
-func (acc *AzureClusterClassSpec) setDefaults() {
- if acc.AzureEnvironment == "" {
- acc.AzureEnvironment = DefaultAzureCloud
- }
-}
-
-// setDefaults sets default values for VnetClassSpec.
-func (vc *VnetClassSpec) setDefaults() {
- if len(vc.CIDRBlocks) == 0 {
- vc.CIDRBlocks = []string{DefaultVnetCIDR}
- }
-}
-
-// setDefaults sets default values for SubnetClassSpec.
-func (sc *SubnetClassSpec) setDefaults(cidr string) {
- if len(sc.CIDRBlocks) == 0 {
- sc.CIDRBlocks = []string{cidr}
- }
-}
-
-// setDefaults sets default values for SecurityGroupClass.
-func (sgc *SecurityGroupClass) setDefaults() {
- for i := range sgc.SecurityRules {
- if sgc.SecurityRules[i].Direction == "" {
- sgc.SecurityRules[i].Direction = SecurityRuleDirectionInbound
- }
- }
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/zz_generated.deepcopy.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/zz_generated.deepcopy.go
index e806a35a1124..60f3f0cfcb2e 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/zz_generated.deepcopy.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/zz_generated.deepcopy.go
@@ -1374,21 +1374,6 @@ func (in *AzureClusterTemplateSpec) DeepCopy() *AzureClusterTemplateSpec {
return out
}
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *AzureClusterWebhook) DeepCopyInto(out *AzureClusterWebhook) {
- *out = *in
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureClusterWebhook.
-func (in *AzureClusterWebhook) DeepCopy() *AzureClusterWebhook {
- if in == nil {
- return nil
- }
- out := new(AzureClusterWebhook)
- in.DeepCopyInto(out)
- return out
-}
-
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AzureComputeGalleryImage) DeepCopyInto(out *AzureComputeGalleryImage) {
*out = *in
@@ -3470,6 +3455,11 @@ func (in *LoadBalancerSpec) DeepCopyInto(out *LoadBalancerSpec) {
}
out.BackendPool = in.BackendPool
in.LoadBalancerClassSpec.DeepCopyInto(&out.LoadBalancerClassSpec)
+ if in.AvailabilityZones != nil {
+ in, out := &in.AvailabilityZones, &out.AvailabilityZones
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerSpec.
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/feature/feature.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/feature/feature.go
deleted file mode 100644
index 31ca915e0a60..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/feature/feature.go
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-Copyright 2020 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package feature
-
-import (
- "k8s.io/apimachinery/pkg/util/runtime"
- "k8s.io/component-base/featuregate"
-)
-
-const (
- //nolint:godot // Ignore "Comment should end in a period" check.
- // Every capz-specific feature gate should add a method here following this template:
- //
- // // MyFeature is the feature gate for my feature.
- // // owner: @username
- // // alpha: v1.X
- // MyFeature featuregate.Feature = "MyFeature"
-
- //nolint:godot // Ignore "Comment should end in a period" check.
- // AKS is the feature gate for AKS managed clusters.
- // owner: @jackfrancis @nojnhuh
- // alpha: v0.4
- // GA: v1.8
- AKS featuregate.Feature = "AKS"
-
- // AKSResourceHealth is the feature gate for reporting Azure Resource Health
- // on AKS managed clusters.
- // owner: @nojnhuh
- // alpha: v1.7
- AKSResourceHealth featuregate.Feature = "AKSResourceHealth"
-
- // EdgeZone is the feature gate for creating clusters on public MEC.
- // owner: @upxinxin
- // alpha: v1.8
- EdgeZone featuregate.Feature = "EdgeZone"
-
- // ASOAPI is the feature gate for enabling the AzureASO... APIs.
- // owner: @nojnhuh
- // alpha: v1.15
- ASOAPI featuregate.Feature = "ASOAPI"
-
- // APIServerILB is a CAPZ feature gate to create an internal LB for the API Server of the workload cluster.
- // Defaults to false.
- // owner: @nawazkh
- // alpha: v1.18
- APIServerILB featuregate.Feature = "APIServerILB"
-)
-
-func init() {
- runtime.Must(MutableGates.Add(defaultCAPZFeatureGates))
-}
-
-// defaultCAPZFeatureGates consists of all known capz-specific feature keys.
-// To add a new feature, define a key for it above and add it here.
-var defaultCAPZFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{
- // Every feature should be initiated here:
- AKS: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // Remove in 1.12
- AKSResourceHealth: {Default: false, PreRelease: featuregate.Alpha},
- EdgeZone: {Default: false, PreRelease: featuregate.Alpha},
- ASOAPI: {Default: true, PreRelease: featuregate.GA},
- APIServerILB: {Default: false, PreRelease: featuregate.Alpha},
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/feature/gates.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/feature/gates.go
deleted file mode 100644
index bf73fb3ff0b5..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/feature/gates.go
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-Copyright 2020 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package feature
-
-import (
- "k8s.io/component-base/featuregate"
- "sigs.k8s.io/cluster-api/feature"
-)
-
-var (
- // MutableGates is a mutable version of DefaultFeatureGate.
- // Only top-level commands/options setup and the k8s.io/component-base/featuregate/testing package should make use of this.
- // Tests that need to modify featuregate gates for the duration of their test should use:
- // defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features., )()
- MutableGates featuregate.MutableFeatureGate = feature.MutableGates
-
- // Gates is a shared global FeatureGate.
- // Top-level commands/options setup that needs to modify this featuregate gate should use DefaultMutableFeatureGate.
- Gates featuregate.FeatureGate = MutableGates
-)
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/util/ssh/ssh.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/util/ssh/ssh.go
deleted file mode 100644
index 48c8188ae7e8..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/util/ssh/ssh.go
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-Copyright 2020 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package ssh
-
-import (
- "crypto/rand"
- "crypto/rsa"
-
- "github.com/pkg/errors"
- "golang.org/x/crypto/ssh"
-)
-
-// GenerateSSHKey generates a private and public ssh key.
-func GenerateSSHKey() (*rsa.PrivateKey, ssh.PublicKey, error) {
- privateKey, perr := rsa.GenerateKey(rand.Reader, 2048)
- if perr != nil {
- return nil, nil, errors.Wrap(perr, "Failed to generate private key")
- }
-
- publicRsaKey, perr := ssh.NewPublicKey(&privateKey.PublicKey)
- if perr != nil {
- return nil, nil, errors.Wrap(perr, "Failed to generate public key")
- }
-
- return privateKey, publicRsaKey, nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/util/webhook/validator.go b/vendor/sigs.k8s.io/cluster-api-provider-azure/util/webhook/validator.go
deleted file mode 100644
index cfb3228e792b..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/util/webhook/validator.go
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-Copyright 2021 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package webhook
-
-import (
- "reflect"
- "sort"
-
- "k8s.io/apimachinery/pkg/util/validation/field"
-)
-
-const (
- unsetMessage = "field is immutable, unable to set an empty value if it was already set"
- setMessage = "field is immutable, unable to assign a value if it was already empty"
- immutableMessage = "field is immutable"
-)
-
-// ValidateImmutable validates equality across two values,
-// and returns a meaningful error to indicate a changed value, a newly set value, or a newly unset value.
-func ValidateImmutable(path *field.Path, oldVal, newVal any) *field.Error {
- if reflect.TypeOf(oldVal) != reflect.TypeOf(newVal) {
- return field.Invalid(path, newVal, "unexpected error")
- }
- if !reflect.ValueOf(oldVal).IsZero() {
- // Prevent modification if it was already set to some value
- if reflect.ValueOf(newVal).IsZero() {
- // unsetting the field is not allowed
- return field.Invalid(path, newVal, unsetMessage)
- }
- if !reflect.DeepEqual(oldVal, newVal) {
- // changing the field is not allowed
- return field.Invalid(path, newVal, immutableMessage)
- }
- } else if !reflect.ValueOf(newVal).IsZero() {
- return field.Invalid(path, newVal, setMessage)
- }
-
- return nil
-}
-
-// ValidateZeroTransition validates equality across two values, with only exception to allow
-// the value to transition of a zero value.
-func ValidateZeroTransition(path *field.Path, oldVal, newVal any) *field.Error {
- if reflect.ValueOf(newVal).IsZero() {
- // unsetting the field is allowed
- return nil
- }
- return ValidateImmutable(path, oldVal, newVal)
-}
-
-// EnsureStringSlicesAreEquivalent returns if two string slices have equal lengths,
-// and that they have the exact same items; it does not enforce strict ordering of items.
-func EnsureStringSlicesAreEquivalent(a []string, b []string) bool {
- if len(a) != len(b) {
- return false
- }
-
- sort.Strings(a)
- sort.Strings(b)
-
- for i := range a {
- if a[i] != b[i] {
- return false
- }
- }
-
- return true
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-azure/util/versions/version.go b/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/conditions_consts.go
similarity index 50%
rename from vendor/sigs.k8s.io/cluster-api-provider-azure/util/versions/version.go
rename to vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/conditions_consts.go
index 0e2dd23d6751..880809aa3d12 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-azure/util/versions/version.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/conditions_consts.go
@@ -1,11 +1,11 @@
/*
-Copyright 2023 The Kubernetes Authors.
+Copyright 2025 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+ http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,27 +14,11 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package versions
+package v1beta1
-import (
- "strings"
-
- "golang.org/x/mod/semver"
+const (
+ // WaitingForClusterInfrastructureReason used when machine is waiting for cluster infrastructure to be ready before proceeding.
+ WaitingForClusterInfrastructureReason = "WaitingForClusterInfrastructure"
+ // WaitingForBootstrapDataReason used when machine is waiting for bootstrap data to be ready before proceeding.
+ WaitingForBootstrapDataReason = "WaitingForBootstrapData"
)
-
-// GetHigherK8sVersion returns the higher k8s version out of a and b.
-func GetHigherK8sVersion(a, b string) string {
- v1 := a
- if !strings.HasPrefix(a, "v") {
- v1 = "v" + a
- }
- v2 := b
- if !strings.HasPrefix(b, "v") {
- v2 = "v" + b
- }
-
- if comp := semver.Compare(v1, v2); comp < 0 {
- return b
- }
- return a
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/gcpcluster_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/gcpcluster_webhook.go
deleted file mode 100644
index 953221c433f0..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/gcpcluster_webhook.go
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
-Copyright 2021 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "context"
- "fmt"
- "reflect"
-
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- logf "sigs.k8s.io/controller-runtime/pkg/log"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-)
-
-// clusterlog is for logging in this package.
-var clusterlog = logf.Log.WithName("gcpcluster-resource")
-
-// SetupWebhookWithManager sets up and registers the webhook with the manager.
-func (c *GCPCluster) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(gcpClusterWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(c).
- WithValidator(w).
- WithDefaulter(w).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-gcpcluster,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=gcpclusters,versions=v1beta1,name=validation.gcpcluster.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta1-gcpcluster,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=gcpclusters,versions=v1beta1,name=default.gcpcluster.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1beta1
-
-type gcpClusterWebhook struct{}
-
-var (
- _ webhook.CustomValidator = &gcpClusterWebhook{}
- _ webhook.CustomDefaulter = &gcpClusterWebhook{}
-)
-
-// Default implements webhook.CustomDefaulter so a webhook will be registered for the type.
-func (*gcpClusterWebhook) Default(_ context.Context, _ runtime.Object) error {
- return nil
-}
-
-// ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type.
-func (*gcpClusterWebhook) ValidateCreate(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type.
-func (*gcpClusterWebhook) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
- c, ok := newObj.(*GCPCluster)
- if !ok {
- return nil, fmt.Errorf("expected an GCPCluster object but got %T", c)
- }
-
- clusterlog.Info("validate update", "name", c.Name)
- var allErrs field.ErrorList
- old := oldObj.(*GCPCluster)
-
- if !reflect.DeepEqual(c.Spec.Project, old.Spec.Project) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "Project"),
- c.Spec.Project, "field is immutable"),
- )
- }
-
- if !reflect.DeepEqual(c.Spec.Region, old.Spec.Region) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "Region"),
- c.Spec.Region, "field is immutable"),
- )
- }
-
- if !reflect.DeepEqual(c.Spec.CredentialsRef, old.Spec.CredentialsRef) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "CredentialsRef"),
- c.Spec.CredentialsRef, "field is immutable"),
- )
- }
-
- if !reflect.DeepEqual(c.Spec.LoadBalancer, old.Spec.LoadBalancer) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "LoadBalancer"),
- c.Spec.LoadBalancer, "field is immutable"),
- )
- }
-
- if c.Spec.Network.Mtu < int64(1300) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "Network", "Mtu"),
- c.Spec.Network.Mtu, "field cannot be lesser than 1300"),
- )
- }
-
- if c.Spec.Network.Mtu > int64(8896) {
- allErrs = append(allErrs,
- field.Invalid(field.NewPath("spec", "Network", "Mtu"),
- c.Spec.Network.Mtu, "field cannot be greater than 8896"),
- )
- }
-
- if len(allErrs) == 0 {
- return nil, nil
- }
-
- return nil, apierrors.NewInvalid(GroupVersion.WithKind("GCPCluster").GroupKind(), c.Name, allErrs)
-}
-
-// ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type.
-func (*gcpClusterWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/gcpclustertemplate_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/gcpclustertemplate_webhook.go
deleted file mode 100644
index 2ba5c126cedd..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/gcpclustertemplate_webhook.go
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-Copyright 2021 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "context"
- "fmt"
- "reflect"
-
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-)
-
-func (r *GCPClusterTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(gcpClusterTemplateWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(r).
- WithValidator(w).
- WithDefaulter(w).
- Complete()
-}
-
-//+kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta1-gcpclustertemplate,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=gcpclustertemplates,versions=v1beta1,name=default.gcpclustertemplate.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1beta1
-//+kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-gcpclustertemplate,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=gcpclustertemplates,versions=v1beta1,name=validation.gcpclustertemplate.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1beta1
-
-type gcpClusterTemplateWebhook struct{}
-
-var (
- _ webhook.CustomDefaulter = &gcpClusterTemplateWebhook{}
- _ webhook.CustomValidator = &gcpClusterTemplateWebhook{}
-)
-
-// Default implements webhook.CustomDefaulter so a webhook will be registered for the type.
-func (*gcpClusterTemplateWebhook) Default(_ context.Context, _ runtime.Object) error {
- return nil
-}
-
-// ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type.
-func (*gcpClusterTemplateWebhook) ValidateCreate(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type.
-func (*gcpClusterTemplateWebhook) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
- r, ok := newObj.(*GCPClusterTemplate)
- if !ok {
- return nil, fmt.Errorf("expected an GCPClusterTemplate object but got %T", r)
- }
-
- old, ok := oldObj.(*GCPClusterTemplate)
- if !ok {
- return nil, apierrors.NewBadRequest(fmt.Sprintf("expected an GCPClusterTemplate but got a %T", oldObj))
- }
-
- if !reflect.DeepEqual(r.Spec, old.Spec) {
- return nil, apierrors.NewBadRequest("GCPClusterTemplate.Spec is immutable")
- }
- return nil, nil
-}
-
-// ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type.
-func (*gcpClusterTemplateWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/gcpmachine_types.go b/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/gcpmachine_types.go
index b0659ab767ba..52c18ec07406 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/gcpmachine_types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/gcpmachine_types.go
@@ -142,14 +142,6 @@ const (
ConfidentialComputePolicyTDX ConfidentialComputePolicy = "IntelTrustedDomainExtensions"
)
-// Confidential VM Technology support depends on the configured machine types.
-// reference: https://cloud.google.com/compute/confidential-vm/docs/os-and-machine-type#machine-type
-var (
- confidentialMachineSeriesSupportingSev = []string{"n2d", "c2d", "c3d"}
- confidentialMachineSeriesSupportingSevsnp = []string{"n2d"}
- confidentialMachineSeriesSupportingTdx = []string{"c3"}
-)
-
// HostMaintenancePolicy represents the desired behavior ase of a host maintenance event.
type HostMaintenancePolicy string
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/gcpmachine_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/gcpmachine_webhook.go
deleted file mode 100644
index aad3fbbb35fe..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/gcpmachine_webhook.go
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
-Copyright 2021 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "context"
- "fmt"
- "reflect"
- "strings"
-
- "k8s.io/utils/strings/slices"
-
- "github.com/pkg/errors"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- logf "sigs.k8s.io/controller-runtime/pkg/log"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-)
-
-// log is for logging in this package.
-var _ = logf.Log.WithName("gcpmachine-resource")
-
-func (m *GCPMachine) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(gcpMachineWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(m).
- WithValidator(w).
- WithDefaulter(w).
- Complete()
-}
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-gcpmachine,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=gcpmachines,versions=v1beta1,name=validation.gcpmachine.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta1-gcpmachine,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=gcpmachines,versions=v1beta1,name=default.gcpmachine.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1beta1
-
-type gcpMachineWebhook struct{}
-
-var (
- _ webhook.CustomValidator = &gcpMachineWebhook{}
- _ webhook.CustomDefaulter = &gcpMachineWebhook{}
-)
-
-// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
-func (*gcpMachineWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- m, ok := obj.(*GCPMachine)
- if !ok {
- return nil, fmt.Errorf("expected an GCPMachine object but got %T", m)
- }
-
- clusterlog.Info("validate create", "name", m.Name)
-
- if err := validateConfidentialCompute(m.Spec); err != nil {
- return nil, err
- }
- return nil, validateCustomerEncryptionKey(m.Spec)
-}
-
-// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
-func (*gcpMachineWebhook) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
- m, ok := newObj.(*GCPMachine)
- if !ok {
- return nil, fmt.Errorf("expected an GCPMachine object but got %T", m)
- }
-
- newGCPMachine, err := runtime.DefaultUnstructuredConverter.ToUnstructured(m)
- if err != nil {
- return nil, apierrors.NewInvalid(GroupVersion.WithKind("GCPMachine").GroupKind(), m.Name, field.ErrorList{
- field.InternalError(nil, errors.Wrap(err, "failed to convert new GCPMachine to unstructured object")),
- })
- }
- oldGCPMachine, err := runtime.DefaultUnstructuredConverter.ToUnstructured(oldObj)
- if err != nil {
- return nil, apierrors.NewInvalid(GroupVersion.WithKind("GCPMachine").GroupKind(), m.Name, field.ErrorList{
- field.InternalError(nil, errors.Wrap(err, "failed to convert old GCPMachine to unstructured object")),
- })
- }
-
- newGCPMachineSpec := newGCPMachine["spec"].(map[string]interface{})
- oldGCPMachineSpec := oldGCPMachine["spec"].(map[string]interface{})
-
- // allow changes to providerID
- delete(oldGCPMachineSpec, "providerID")
- delete(newGCPMachineSpec, "providerID")
-
- // allow changes to additionalLabels
- delete(oldGCPMachineSpec, "additionalLabels")
- delete(newGCPMachineSpec, "additionalLabels")
-
- // allow changes to additionalNetworkTags
- delete(oldGCPMachineSpec, "additionalNetworkTags")
- delete(newGCPMachineSpec, "additionalNetworkTags")
-
- if !reflect.DeepEqual(oldGCPMachineSpec, newGCPMachineSpec) {
- return nil, apierrors.NewInvalid(GroupVersion.WithKind("GCPMachine").GroupKind(), m.Name, field.ErrorList{
- field.Forbidden(field.NewPath("spec"), "cannot be modified"),
- })
- }
-
- return nil, nil
-}
-
-// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
-func (*gcpMachineWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// Default implements webhookutil.defaulter so a webhook will be registered for the type.
-func (*gcpMachineWebhook) Default(_ context.Context, _ runtime.Object) error {
- return nil
-}
-
-func validateConfidentialCompute(spec GCPMachineSpec) error {
- if spec.ConfidentialCompute != nil && *spec.ConfidentialCompute != ConfidentialComputePolicyDisabled {
- if spec.OnHostMaintenance == nil || *spec.OnHostMaintenance == HostMaintenancePolicyMigrate {
- return fmt.Errorf("ConfidentialCompute require OnHostMaintenance to be set to %s, the current value is: %s", HostMaintenancePolicyTerminate, HostMaintenancePolicyMigrate)
- }
-
- machineSeries := strings.Split(spec.InstanceType, "-")[0]
- switch *spec.ConfidentialCompute {
- case ConfidentialComputePolicyEnabled, ConfidentialComputePolicySEV:
- if !slices.Contains(confidentialMachineSeriesSupportingSev, machineSeries) {
- return fmt.Errorf("ConfidentialCompute %s requires any of the following machine series: %s. %s was found instead", *spec.ConfidentialCompute, strings.Join(confidentialMachineSeriesSupportingSev, ", "), spec.InstanceType)
- }
- case ConfidentialComputePolicySEVSNP:
- if !slices.Contains(confidentialMachineSeriesSupportingSevsnp, machineSeries) {
- return fmt.Errorf("ConfidentialCompute %s requires any of the following machine series: %s. %s was found instead", *spec.ConfidentialCompute, strings.Join(confidentialMachineSeriesSupportingSevsnp, ", "), spec.InstanceType)
- }
- case ConfidentialComputePolicyTDX:
- if !slices.Contains(confidentialMachineSeriesSupportingTdx, machineSeries) {
- return fmt.Errorf("ConfidentialCompute %s requires any of the following machine series: %s. %s was found instead", *spec.ConfidentialCompute, strings.Join(confidentialMachineSeriesSupportingTdx, ", "), spec.InstanceType)
- }
- default:
- return fmt.Errorf("invalid ConfidentialCompute %s", *spec.ConfidentialCompute)
- }
- }
- return nil
-}
-
-func checkKeyType(key *CustomerEncryptionKey) error {
- switch key.KeyType {
- case CustomerManagedKey:
- if key.ManagedKey == nil || key.SuppliedKey != nil {
- return errors.New("CustomerEncryptionKey KeyType of Managed requires only ManagedKey to be set")
- }
- case CustomerSuppliedKey:
- if key.SuppliedKey == nil || key.ManagedKey != nil {
- return errors.New("CustomerEncryptionKey KeyType of Supplied requires only SuppliedKey to be set")
- }
- if len(key.SuppliedKey.RawKey) > 0 && len(key.SuppliedKey.RSAEncryptedKey) > 0 {
- return errors.New("CustomerEncryptionKey KeyType of Supplied requires either RawKey or RSAEncryptedKey to be set, not both")
- }
- default:
- return fmt.Errorf("invalid value for CustomerEncryptionKey KeyType %s", key.KeyType)
- }
- return nil
-}
-
-func validateCustomerEncryptionKey(spec GCPMachineSpec) error {
- if spec.RootDiskEncryptionKey != nil {
- if err := checkKeyType(spec.RootDiskEncryptionKey); err != nil {
- return err
- }
- }
-
- for _, disk := range spec.AdditionalDisks {
- if disk.EncryptionKey != nil {
- if err := checkKeyType(disk.EncryptionKey); err != nil {
- return err
- }
- }
- }
- return nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/gcpmachinetemplate_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/gcpmachinetemplate_webhook.go
deleted file mode 100644
index c776b49a8764..000000000000
--- a/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/gcpmachinetemplate_webhook.go
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
-Copyright 2021 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package v1beta1
-
-import (
- "context"
- "fmt"
- "reflect"
-
- "github.com/pkg/errors"
- apierrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
- ctrl "sigs.k8s.io/controller-runtime"
- logf "sigs.k8s.io/controller-runtime/pkg/log"
- "sigs.k8s.io/controller-runtime/pkg/webhook"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-)
-
-// +kubebuilder:webhook:verbs=create;update,path=/validate-infrastructure-cluster-x-k8s-io-v1beta1-gcpmachinetemplate,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=gcpmachinetemplates,versions=v1beta1,name=validation.gcpmachinetemplate.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1beta1
-// +kubebuilder:webhook:verbs=create;update,path=/mutate-infrastructure-cluster-x-k8s-io-v1beta1-gcpmachinetemplate,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=infrastructure.cluster.x-k8s.io,resources=gcpmachinetemplates,versions=v1beta1,name=default.gcpmachinetemplate.infrastructure.cluster.x-k8s.io,sideEffects=None,admissionReviewVersions=v1beta1
-
-// log is for logging in this package.
-var _ = logf.Log.WithName("gcpmachinetemplate-resource")
-
-func (r *GCPMachineTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error {
- w := new(gcpMachineTemplateWebhook)
- return ctrl.NewWebhookManagedBy(mgr).
- For(r).
- WithValidator(w).
- WithDefaulter(w).
- Complete()
-}
-
-type gcpMachineTemplateWebhook struct{}
-
-var (
- _ webhook.CustomValidator = &gcpMachineTemplateWebhook{}
- _ webhook.CustomDefaulter = &gcpMachineTemplateWebhook{}
-)
-
-// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
-func (*gcpMachineTemplateWebhook) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error) {
- r, ok := obj.(*GCPMachineTemplate)
- if !ok {
- return nil, fmt.Errorf("expected an GCPMachineTemplate object but got %T", r)
- }
-
- clusterlog.Info("validate create", "name", r.Name)
-
- return nil, validateConfidentialCompute(r.Spec.Template.Spec)
-}
-
-// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
-func (*gcpMachineTemplateWebhook) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
- r, ok := newObj.(*GCPMachineTemplate)
- if !ok {
- return nil, fmt.Errorf("expected an GCPMachineTemplate object but got %T", r)
- }
-
- newGCPMachineTemplate, err := runtime.DefaultUnstructuredConverter.ToUnstructured(r)
- if err != nil {
- return nil, apierrors.NewInvalid(GroupVersion.WithKind("GCPMachineTemplate").GroupKind(), r.Name, field.ErrorList{
- field.InternalError(nil, errors.Wrap(err, "failed to convert new GCPMachineTemplate to unstructured object")),
- })
- }
- oldGCPMachineTemplate, err := runtime.DefaultUnstructuredConverter.ToUnstructured(oldObj)
- if err != nil {
- return nil, apierrors.NewInvalid(GroupVersion.WithKind("GCPMachineTemplate").GroupKind(), r.Name, field.ErrorList{
- field.InternalError(nil, errors.Wrap(err, "failed to convert old GCPMachineTemplate to unstructured object")),
- })
- }
-
- newGCPMachineTemplateSpec := newGCPMachineTemplate["spec"].(map[string]interface{})
- oldGCPMachineTemplateSpec := oldGCPMachineTemplate["spec"].(map[string]interface{})
-
- // allow changes to providerID
- delete(oldGCPMachineTemplateSpec, "providerID")
- delete(newGCPMachineTemplateSpec, "providerID")
-
- // allow changes to additionalLabels
- delete(oldGCPMachineTemplateSpec, "additionalLabels")
- delete(newGCPMachineTemplateSpec, "additionalLabels")
-
- // allow changes to additionalNetworkTags
- delete(oldGCPMachineTemplateSpec, "additionalNetworkTags")
- delete(newGCPMachineTemplateSpec, "additionalNetworkTags")
-
- if !reflect.DeepEqual(oldGCPMachineTemplateSpec, newGCPMachineTemplateSpec) {
- return nil, apierrors.NewInvalid(GroupVersion.WithKind("GCPMachineTemplate").GroupKind(), r.Name, field.ErrorList{
- field.Forbidden(field.NewPath("spec"), "cannot be modified"),
- })
- }
-
- return nil, nil
-}
-
-// ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
-func (*gcpMachineTemplateWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
- return nil, nil
-}
-
-// Default implements webhookutil.defaulter so a webhook will be registered for the type.
-func (*gcpMachineTemplateWebhook) Default(_ context.Context, _ runtime.Object) error {
- return nil
-}
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/labels.go b/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/labels.go
index eded27abf23c..dc3c9b7ecc65 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/labels.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/labels.go
@@ -114,6 +114,11 @@ const (
// InternalRoleTagValue describes the value for the internal role.
InternalRoleTagValue = "api-internal"
+
+ // ConfigHashKey holds the full hash of the desired state of a resource.
+ // Note that label values are limited to 63 characters in GCP, so we can use
+ // base32 encoding if we want to store a full sha256 hash.
+ ConfigHashKey = NameGCPProviderPrefix + "config-hash"
)
// ClusterTagKey generates the key for resources associated with a cluster.
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/types.go b/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/types.go
index 4d94c8f2ca89..d7374a022730 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/types.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/types.go
@@ -107,6 +107,160 @@ type Network struct {
APIInternalForwardingRule *string `json:"apiInternalForwardingRule,omitempty"`
}
+// FirewallProtocol is a string enum type representing the IP Protocol for the firewall rule.
+// +kubebuilder:validation:Enum=TCP;UDP;ICMP;ESP;AH;IPIP;SCTP
+type FirewallProtocol string
+
+const (
+ // FirewallProtocolTCP indicates that the firewall rule applies to TCP.
+ FirewallProtocolTCP FirewallProtocol = "TCP"
+
+ // FirewallProtocolUDP indicates that the firewall rule applies to UDP.
+ FirewallProtocolUDP FirewallProtocol = "UDP"
+
+ // FirewallProtocolICMP indicates that the firewall rule applies to ICMP.
+ FirewallProtocolICMP FirewallProtocol = "ICMP"
+
+ // FirewallProtocolESP indicates that the firewall rule applies to ESP.
+ FirewallProtocolESP FirewallProtocol = "ESP"
+
+ // FirewallProtocolAH indicates that the firewall rule applies to AH.
+ FirewallProtocolAH FirewallProtocol = "AH"
+
+ // FirewallProtocolIPIP indicates that the firewall rule applies to IPIP.
+ FirewallProtocolIPIP FirewallProtocol = "IPIP"
+
+ // FirewallProtocolSCTP indicates that the firewall rule applies to SCTP.
+ FirewallProtocolSCTP FirewallProtocol = "SCTP"
+)
+
+// FirewallDescriptor describes a GCP firewall rule.
+type FirewallDescriptor struct {
+ // IPProtocol is the IP protocol to which this rule applies. The protocol type is
+ // required when creating a firewall rule. This value can either be one of the
+ // following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp)
+ // or the IP protocol number.
+ // +kubebuilder:validation:Required
+ IPProtocol FirewallProtocol `json:"IPProtocol,omitempty"`
+ // Ports is an optional list of ports to which this rule applies. This field is
+ // only applicable for the UDP or TCP protocol. Each entry must be either an
+ // integer or a range. If not specified, this rule applies to connections
+ // through any port. Example inputs include: ["22"], ["80","443"], and
+ // ["12345-12349"].
+ // +kubebuilder:validation:MaxItems:=500
+ // +kubebuilder:validation:items:Pattern=`^[0-9]+(-[0-9]+)?$`
+ // +kubebuilder:validation:Optional
+ // +optional
+ Ports []string `json:"ports,omitempty"`
+}
+
+// FirewallRule describes a GCP firewall rule.
+type FirewallRule struct {
+ // Allowed is the list of ALLOW rules specified by this firewall. Each rule
+ // specifies a protocol and port-range tuple that describes a permitted
+ // connection.
+ // +kubebuilder:validation:MinItems=0
+ // +kubebuilder:validation:MaxItems=1024
+ Allowed []FirewallDescriptor `json:"allowed,omitempty"`
+ // Denied is the list of DENY rules specified by this firewall. Each rule
+ // specifies a protocol and port-range tuple that describes a denied
+ // connection. When a conflict applies between the Denied and Allowed fields,
+ // the Denied field will take precedent.
+ // +kubebuilder:validation:MinItems=0
+ // +kubebuilder:validation:MaxItems=1024
+ Denied []FirewallDescriptor `json:"denied,omitempty"`
+ // Description is an optional description of this resource. Provide this field
+ // when you create the resource.
+ // +kubebuilder:validation:Optional
+ // +kubebuilder:validation:MinLength=0
+ // +kubebuilder:validation:MaxLength=2000
+ Description string `json:"description,omitempty"`
+ // DestinationRanges is the list of IP addresses where traffic applies. An empty
+ // list means all destinations. These ranges must be expressed in CIDR format.
+ // Both IPv4 and IPv6 are supported.
+ // +kubebuilder:validation:MinItems=0
+ // +kubebuilder:validation:MaxItems=1024
+ // +kubebuilder:validation:items:MinLength=1
+ // +kubebuilder:validation:items:MaxLength=43
+ // +kubebuilder:validation:XValidation:rule="self.all(i, isIP(i) || isCIDR(i))",message="must be a valid IPv4/IPv6 address or CIDR/Prefix"
+ DestinationRanges []string `json:"destinationRanges,omitempty"`
+ // Direction is the direction of traffic to which this firewall applies, either
+ // `Ingress` or `Egress`. The default is `Ingress`. For `Egress` traffic, you
+ // cannot specify the sourceTags fields.
+ //
+ // Possible values:
+ // "Egress" - Indicates that firewall should apply to outgoing traffic.
+ // "Ingress" - Indicates that firewall should apply to incoming traffic.
+ // +kubebuilder:validation:Enum=Ingress;Egress
+ // +kubebuilder:default=Ingress
+ // +optional
+ Direction FirewallRuleDirection `json:"direction,omitempty"`
+ // Name is the name of the resource; provided by the client when the resource is
+ // created. The name must be 1-63 characters long, and comply with RFC1035.
+ // Specifically, the name must be 1-63 characters long and match the regular
+ // expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a
+ // lowercase letter, and all following characters (except for the last
+ // character) must be a dash, lowercase letter, or digit. The last character
+ // must be a lowercase letter or digit.
+ // If the firewall does not begin with the cluster name, then the cluster name
+ // will be prepended during the creation of the firewall rule.
+ // +kubebuilder:validation:Optional
+ Name string `json:"name,omitempty"`
+ // Priority is the priority for this rule. This is an integer between `0` and
+ // `65535`, both inclusive. The default value is `1000`. Relative priorities
+ // determine which rule takes effect if multiple rules apply. Lower values
+ // indicate higher priority. For example, a rule with priority `0` has higher
+ // precedence than a rule with priority `1`. DENY rules take precedence over
+ // ALLOW rules if they have equal priority. Note that VPC networks have implied
+ // rules with a priority of `65535`. To avoid conflicts with the implied rules,
+ // use a priority number less than `65535`.
+ // +kubebuilder:validation:Optional
+ // +default:value=1000
+ // +kubebuilder:validation:Minimum=1
+ // +kubebuilder:validation:Maximum=65535
+ Priority int `json:"priority,omitempty"`
+ // SourceRanges: If source ranges are specified, the firewall rule applies only
+ // to traffic that has a source IP address in these ranges. These ranges must
+ // be expressed in CIDR format. One or both of sourceRanges and sourceTags may
+ // be set. If both fields are set, the rule applies to traffic that has a
+ // source IP address within sourceRanges OR a source IP from a resource with a
+ // matching tag listed in the sourceTags field. The connection does not need to
+ // match both fields for the rule to apply. Both IPv4 and IPv6 are supported.
+ // +kubebuilder:validation:MinItems=0
+ // +kubebuilder:validation:MaxItems=1024
+ // +kubebuilder:validation:items:MinLength=1
+ // +kubebuilder:validation:items:MaxLength=43
+ // +kubebuilder:validation:XValidation:rule="self.all(i, isIP(i) || isCIDR(i))",message="must be a valid IPv4/IPv6 address or CIDR/Prefix"
+ SourceRanges []string `json:"sourceRanges,omitempty"`
+ // SourceTags are the rules applies only to traffic with source IPs that
+ // match the primary network interfaces of VM instances that have the tag and
+ // are in the same VPC network. Source tags cannot be used to control traffic
+ // to an instance's external IP address, it only applies to traffic between
+ // instances in the same virtual network. Because tags are associated with
+ // instances, not IP addresses. One or both of sourceRanges and sourceTags may be
+ // set. If both fields are set, the firewall applies to traffic that has a source
+ // IP address within sourceRanges OR a source IP from a resource with a matching
+ // tag listed in the sourceTags field. The connection does not need to match both
+ // fields for the firewall to apply.
+ // +kubebuilder:validation:MinItems=0
+ // +kubebuilder:validation:MaxItems=30
+ // +kubebuilder:validation:items:MinLength=1
+ // +kubebuilder:validation:items:MaxLength=63
+ // +kubebuilder:validation:items:Pattern=`^([a-z0-9]+-)*[a-z0-9]+$`
+ SourceTags []string `json:"sourceTags,omitempty"`
+ // TargetTags is a list of tags that controls which instances the firewall rule
+ // applies to. If targetTags are specified, then the firewall rule applies only
+ // to instances in the VPC network that have one of those tags. If no
+ // targetTags are specified, the firewall rule applies to all instances on the
+ // specified network.
+ // +kubebuilder:validation:MinItems=0
+ // +kubebuilder:validation:MaxItems=70
+ // +kubebuilder:validation:items:MinLength=1
+ // +kubebuilder:validation:items:MaxLength=63
+ // +kubebuilder:validation:items:Pattern=`^([a-z0-9]+-)*[a-z0-9]+$`
+ TargetTags []string `json:"targetTags,omitempty"`
+}
+
// FirewallSpec contains configuration for the firewall.
type FirewallSpec struct {
// DefaultRulesManagement determines the management policy for the default firewall rules
@@ -121,8 +275,26 @@ type FirewallSpec struct {
// +optional
// +kubebuilder:default:="Managed"
DefaultRulesManagement RulesManagementPolicy `json:"defaultRulesManagement,omitempty"`
+
+ // FirewallRules is a list of additional firewall rules to create. FirewallRules has no effect
+ // when a HostProject is specified.
+ // +kubebuilder:validation:MaxItems=50
+ // +optional
+ FirewallRules []FirewallRule `json:"firewallRules,omitempty"`
}
+// FirewallRuleDirection is a string enum type for the direction of a firewall rule.
+// +kubebuilder:validation:Enum=Ingress;Egress
+type FirewallRuleDirection string
+
+const (
+ // FirewallRuleDirectionIngress indicates that the firewall rule applies to incoming traffic.
+ FirewallRuleDirectionIngress FirewallRuleDirection = "Ingress"
+
+ // FirewallRuleDirectionEgress indicates that the firewall rule applies to outgoing traffic.
+ FirewallRuleDirectionEgress FirewallRuleDirection = "Egress"
+)
+
// RulesManagementPolicy is a string enum type for managing firewall rules.
// +kubebuilder:validation:Enum=Managed;Unmanaged
type RulesManagementPolicy string
@@ -167,7 +339,7 @@ type NetworkSpec struct {
// +optional
HostProject *string `json:"hostProject,omitempty"`
- // Firewall configuration.
+ // Firewall contains the firewall configuration associated with this network.
// +optional
Firewall FirewallSpec `json:"firewall,omitempty,omitzero"`
diff --git a/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/zz_generated.deepcopy.go b/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/zz_generated.deepcopy.go
index 9f1502661a7d..cbcc7483777c 100644
--- a/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/zz_generated.deepcopy.go
+++ b/vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/zz_generated.deepcopy.go
@@ -22,7 +22,7 @@ package v1beta1
import (
"k8s.io/api/core/v1"
- "k8s.io/apimachinery/pkg/runtime"
+ runtime "k8s.io/apimachinery/pkg/runtime"
corev1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
)
@@ -163,9 +163,85 @@ func (in *Filter) DeepCopy() *Filter {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *FirewallDescriptor) DeepCopyInto(out *FirewallDescriptor) {
+ *out = *in
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirewallDescriptor.
+func (in *FirewallDescriptor) DeepCopy() *FirewallDescriptor {
+ if in == nil {
+ return nil
+ }
+ out := new(FirewallDescriptor)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *FirewallRule) DeepCopyInto(out *FirewallRule) {
+ *out = *in
+ if in.Allowed != nil {
+ in, out := &in.Allowed, &out.Allowed
+ *out = make([]FirewallDescriptor, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Denied != nil {
+ in, out := &in.Denied, &out.Denied
+ *out = make([]FirewallDescriptor, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.DestinationRanges != nil {
+ in, out := &in.DestinationRanges, &out.DestinationRanges
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.SourceRanges != nil {
+ in, out := &in.SourceRanges, &out.SourceRanges
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.SourceTags != nil {
+ in, out := &in.SourceTags, &out.SourceTags
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.TargetTags != nil {
+ in, out := &in.TargetTags, &out.TargetTags
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirewallRule.
+func (in *FirewallRule) DeepCopy() *FirewallRule {
+ if in == nil {
+ return nil
+ }
+ out := new(FirewallRule)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *FirewallSpec) DeepCopyInto(out *FirewallSpec) {
*out = *in
+ if in.FirewallRules != nil {
+ in, out := &in.FirewallRules, &out.FirewallRules
+ *out = make([]FirewallRule, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirewallSpec.
@@ -947,7 +1023,7 @@ func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec) {
*out = new(string)
**out = **in
}
- out.Firewall = in.Firewall
+ in.Firewall.DeepCopyInto(&out.Firewall)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkSpec.
diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/cluster_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/cluster_types.go
index 5d6d69a9b36d..ab232262de63 100644
--- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/cluster_types.go
+++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/cluster_types.go
@@ -484,8 +484,7 @@ type ClusterSpec struct {
// topology encapsulates the topology for the cluster.
// NOTE: It is required to enable the ClusterTopology
- // feature gate flag to activate managed topologies support;
- // this feature is highly experimental, and parts of it might still be not implemented.
+ // feature gate flag to activate managed topologies support.
// +optional
Topology *Topology `json:"topology,omitempty"`
@@ -604,6 +603,10 @@ type ControlPlaneTopology struct {
// +optional
Replicas *int32 `json:"replicas,omitempty"`
+ // rollout allows you to configure the behavior of rolling updates to the control plane.
+ // +optional
+ Rollout ControlPlaneTopologyRolloutSpec `json:"rollout,omitempty,omitzero"`
+
// machineHealthCheck allows to enable, disable and override
// the MachineHealthCheck configuration in the ClusterClass for this control plane.
// +optional
@@ -626,6 +629,23 @@ type ControlPlaneTopology struct {
// +optional
NodeDeletionTimeout *metav1.Duration `json:"nodeDeletionTimeout,omitempty"`
+ // taints are the node taints that Cluster API will manage.
+ // This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes,
+ // e.g. the node controller might add the node.kubernetes.io/not-ready taint.
+ // Only those taints defined in this list will be added or removed by core Cluster API controllers.
+ //
+ // There can be at most 64 taints.
+ // A pod would have to tolerate all existing taints to run on the corresponding node.
+ //
+ // NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
+ // +optional
+ // +listType=map
+ // +listMapKey=key
+ // +listMapKey=effect
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=64
+ Taints []MachineTaint `json:"taints,omitempty"`
+
// readinessGates specifies additional conditions to include when evaluating Machine Ready condition.
//
// This field can be used e.g. to instruct the machine controller to include in the computation for Machine's ready
@@ -647,6 +667,18 @@ type ControlPlaneTopology struct {
Variables *ControlPlaneVariables `json:"variables,omitempty"`
}
+// ControlPlaneTopologyRolloutSpec defines the rollout behavior.
+// +kubebuilder:validation:MinProperties=1
+type ControlPlaneTopologyRolloutSpec struct {
+ // after is a field to indicate a rollout should be performed
+ // after the specified time even if no changes have been made to the ControlPlane.
+ // Example: In the YAML the time can be specified in the RFC3339 format.
+ // To specify the rolloutAfter target as March 9, 2023, at 9 am UTC
+ // use "2023-03-09T09:00:00Z".
+ // +optional
+ After metav1.Time `json:"after,omitempty,omitzero"`
+}
+
// WorkersTopology represents the different sets of worker nodes in the cluster.
type WorkersTopology struct {
// machineDeployments is a list of machine deployments in the cluster.
@@ -725,6 +757,23 @@ type MachineDeploymentTopology struct {
// +optional
NodeDeletionTimeout *metav1.Duration `json:"nodeDeletionTimeout,omitempty"`
+ // taints are the node taints that Cluster API will manage.
+ // This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes,
+ // e.g. the node controller might add the node.kubernetes.io/not-ready taint.
+ // Only those taints defined in this list will be added or removed by core Cluster API controllers.
+ //
+ // There can be at most 64 taints.
+ // A pod would have to tolerate all existing taints to run on the corresponding node.
+ //
+ // NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
+ // +optional
+ // +listType=map
+ // +listMapKey=key
+ // +listMapKey=effect
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=64
+ Taints []MachineTaint `json:"taints,omitempty"`
+
// minReadySeconds is the minimum number of seconds for which a newly created machine should
// be ready.
// Defaults to 0 (machine will be considered available as soon as it
@@ -746,6 +795,11 @@ type MachineDeploymentTopology struct {
// +kubebuilder:validation:MaxItems=32
ReadinessGates []MachineReadinessGate `json:"readinessGates,omitempty"`
+ // rollout allows you to configure the behaviour of rolling updates to the MachineDeployment Machines.
+ // It allows you to define the strategy used during rolling replacements.
+ // +optional
+ Rollout MachineDeploymentTopologyRolloutSpec `json:"rollout,omitempty,omitzero"`
+
// strategy is the deployment strategy to use to replace existing machines with
// new ones.
// +optional
@@ -756,6 +810,19 @@ type MachineDeploymentTopology struct {
Variables *MachineDeploymentVariables `json:"variables,omitempty"`
}
+// MachineDeploymentTopologyRolloutSpec defines the rollout behavior.
+// +kubebuilder:validation:MinProperties=1
+type MachineDeploymentTopologyRolloutSpec struct {
+ // after is a field to indicate a rollout should be performed
+ // after the specified time even if no changes have been made to the
+ // MachineDeployment.
+ // Example: In the YAML the time can be specified in the RFC3339 format.
+ // To specify the rolloutAfter target as March 9, 2023, at 9 am UTC
+ // use "2023-03-09T09:00:00Z".
+ // +optional
+ After metav1.Time `json:"after,omitempty,omitzero"`
+}
+
// MachineHealthCheckTopology defines a MachineHealthCheck for a group of machines.
type MachineHealthCheckTopology struct {
// enable controls if a MachineHealthCheck should be created for the target machines.
@@ -825,6 +892,23 @@ type MachinePoolTopology struct {
// +optional
NodeDeletionTimeout *metav1.Duration `json:"nodeDeletionTimeout,omitempty"`
+ // taints are the node taints that Cluster API will manage.
+ // This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes,
+ // e.g. the node controller might add the node.kubernetes.io/not-ready taint.
+ // Only those taints defined in this list will be added or removed by core Cluster API controllers.
+ //
+ // There can be at most 64 taints.
+ // A pod would have to tolerate all existing taints to run on the corresponding node.
+ //
+ // NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
+ // +optional
+ // +listType=map
+ // +listMapKey=key
+ // +listMapKey=effect
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=64
+ Taints []MachineTaint `json:"taints,omitempty"`
+
// minReadySeconds is the minimum number of seconds for which a newly created machine pool should
// be ready.
// Defaults to 0 (machine will be considered available as soon as it
diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/clusterclass_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/clusterclass_types.go
index 058507504fe0..9bee4bb133f9 100644
--- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/clusterclass_types.go
+++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/clusterclass_types.go
@@ -134,6 +134,22 @@ type ClusterClassSpec struct {
// +optional
// +kubebuilder:validation:MaxItems=1000
Patches []ClusterClassPatch `json:"patches,omitempty"`
+
+ // upgrade defines the upgrade configuration for clusters using this ClusterClass.
+ // +optional
+ Upgrade ClusterClassUpgrade `json:"upgrade,omitempty,omitzero"`
+
+ // kubernetesVersions is the list of Kubernetes versions that can be
+ // used for clusters using this ClusterClass.
+ // The list of version must be ordered from the older to the newer version, and there should be
+ // at least one version for every minor in between the first and the last version.
+ // +optional
+ // +listType=atomic
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=100
+ // +kubebuilder:validation:items:MinLength=1
+ // +kubebuilder:validation:items:MaxLength=256
+ KubernetesVersions []string `json:"kubernetesVersions,omitempty"`
}
// ControlPlaneClass defines the class for the control plane.
@@ -190,6 +206,23 @@ type ControlPlaneClass struct {
// +optional
NodeDeletionTimeout *metav1.Duration `json:"nodeDeletionTimeout,omitempty"`
+ // taints are the node taints that Cluster API will manage.
+ // This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes,
+ // e.g. the node controller might add the node.kubernetes.io/not-ready taint.
+ // Only those taints defined in this list will be added or removed by core Cluster API controllers.
+ //
+ // There can be at most 64 taints.
+ // A pod would have to tolerate all existing taints to run on the corresponding node.
+ //
+ // NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
+ // +optional
+ // +listType=map
+ // +listMapKey=key
+ // +listMapKey=effect
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=64
+ Taints []MachineTaint `json:"taints,omitempty"`
+
// readinessGates specifies additional conditions to include when evaluating Machine Ready condition.
//
// This field can be used e.g. to instruct the machine controller to include in the computation for Machine's ready
@@ -308,6 +341,23 @@ type MachineDeploymentClass struct {
// +optional
NodeDeletionTimeout *metav1.Duration `json:"nodeDeletionTimeout,omitempty"`
+ // taints are the node taints that Cluster API will manage.
+ // This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes,
+ // e.g. the node controller might add the node.kubernetes.io/not-ready taint.
+ // Only those taints defined in this list will be added or removed by core Cluster API controllers.
+ //
+ // There can be at most 64 taints.
+ // A pod would have to tolerate all existing taints to run on the corresponding node.
+ //
+ // NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
+ // +optional
+ // +listType=map
+ // +listMapKey=key
+ // +listMapKey=effect
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=64
+ Taints []MachineTaint `json:"taints,omitempty"`
+
// minReadySeconds is the minimum number of seconds for which a newly created machine should
// be ready.
// Defaults to 0 (machine will be considered available as soon as it
@@ -382,6 +432,16 @@ type MachineHealthCheckClass struct {
// +kubebuilder:validation:MaxItems=100
UnhealthyConditions []UnhealthyCondition `json:"unhealthyConditions,omitempty"`
+ // unhealthyMachineConditions contains a list of the machine conditions that determine
+ // whether a machine is considered unhealthy. The conditions are combined in a
+ // logical OR, i.e. if any of the conditions is met, the machine is unhealthy.
+ //
+ // +optional
+ // +listType=atomic
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=100
+ UnhealthyMachineConditions []UnhealthyMachineCondition `json:"unhealthyMachineConditions,omitempty"`
+
// maxUnhealthy specifies the maximum number of unhealthy machines allowed.
// Any further remediation is only allowed if at most "maxUnhealthy" machines selected by
// "selector" are not healthy.
@@ -474,6 +534,23 @@ type MachinePoolClass struct {
// +optional
NodeDeletionTimeout *metav1.Duration `json:"nodeDeletionTimeout,omitempty"`
+ // taints are the node taints that Cluster API will manage.
+ // This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes,
+ // e.g. the node controller might add the node.kubernetes.io/not-ready taint.
+ // Only those taints defined in this list will be added or removed by core Cluster API controllers.
+ //
+ // There can be at most 64 taints.
+ // A pod would have to tolerate all existing taints to run on the corresponding node.
+ //
+ // NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
+ // +optional
+ // +listType=map
+ // +listMapKey=key
+ // +listMapKey=effect
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=64
+ Taints []MachineTaint `json:"taints,omitempty"`
+
// minReadySeconds is the minimum number of seconds for which a newly created machine pool should
// be ready.
// Defaults to 0 (machine will be considered available as soon as it
@@ -962,6 +1039,24 @@ type ClusterClassPatch struct {
External *ExternalPatchDefinition `json:"external,omitempty"`
}
+// ClusterClassUpgrade defines the upgrade configuration for clusters using the ClusterClass.
+// +kubebuilder:validation:MinProperties=1
+type ClusterClassUpgrade struct {
+ // external defines external runtime extensions for upgrade operations.
+ // +optional
+ External ClusterClassUpgradeExternal `json:"external,omitempty,omitzero"`
+}
+
+// ClusterClassUpgradeExternal defines external runtime extensions for upgrade operations.
+// +kubebuilder:validation:MinProperties=1
+type ClusterClassUpgradeExternal struct {
+ // generateUpgradePlanExtension references an extension which is called to generate upgrade plan.
+ // +optional
+ // +kubebuilder:validation:MinLength=1
+ // +kubebuilder:validation:MaxLength=512
+ GenerateUpgradePlanExtension string `json:"generateUpgradePlanExtension,omitempty"`
+}
+
// PatchDefinition defines a patch which is applied to customize the referenced templates.
type PatchDefinition struct {
// selector defines on which templates the patch should be applied.
diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/common_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/common_types.go
index 2006bb88ce91..66af86b77958 100644
--- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/common_types.go
+++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/common_types.go
@@ -358,3 +358,59 @@ func (metadata *ObjectMeta) Validate(parent *field.Path) field.ErrorList {
)...)
return allErrs
}
+
+// MachineTaint defines a taint equivalent to corev1.Taint, but additionally having a propagation field.
+type MachineTaint struct {
+ // Note: we do not use CEL for validating the key as qualified name, because it would be too expensive for Cluster and ClusterClass objects.
+
+ // key is the taint key to be applied to a node.
+ // Must be a valid qualified name of maximum size 63 characters
+ // with an optional subdomain prefix of maximum size 253 characters,
+ // separated by a `/`.
+ // +required
+ // +kubebuilder:validation:MinLength=1
+ // +kubebuilder:validation:MaxLength=317
+ // +kubebuilder:validation:Pattern=^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$
+ Key string `json:"key,omitempty"`
+
+ // value is the taint value corresponding to the taint key.
+ // It must be a valid label value of maximum size 63 characters.
+ // +optional
+ // +kubebuilder:validation:MinLength=1
+ // +kubebuilder:validation:MaxLength=63
+ // +kubebuilder:validation:Pattern=^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
+ Value string `json:"value,omitempty"`
+
+ // effect is the effect for the taint. Valid values are NoSchedule, PreferNoSchedule and NoExecute.
+ // +required
+ // +kubebuilder:validation:Enum=NoSchedule;PreferNoSchedule;NoExecute
+ Effect corev1.TaintEffect `json:"effect,omitempty"`
+
+ // propagation defines how this taint should be propagated to nodes.
+ // Valid values are 'Always' and 'OnInitialization'.
+ // Always: The taint will be continuously reconciled. If it is not set for a node, it will be added during reconciliation.
+ // OnInitialization: The taint will be added during node initialization. If it gets removed from the node later on it will not get added again.
+ // +required
+ Propagation MachineTaintPropagation `json:"propagation,omitempty"`
+}
+
+// MachineTaintPropagation defines when a taint should be propagated to nodes.
+// +kubebuilder:validation:Enum=Always;OnInitialization
+type MachineTaintPropagation string
+
+const (
+ // MachineTaintPropagationAlways means the taint should be continuously reconciled and kept on the node.
+ // - If an Always taint is added to the Machine, the taint will be added to the node.
+ // - If an Always taint is removed from the Machine, the taint will be removed from the node.
+ // - If an OnInitialization taint is changed to Always, the Machine controller will ensure the taint is set on the node.
+ // - If an Always taint is removed from the node, it will be re-added during reconciliation.
+ MachineTaintPropagationAlways MachineTaintPropagation = "Always"
+
+ // MachineTaintPropagationOnInitialization means the taint should be set once during initialization and then
+ // left alone.
+ // - If an OnInitialization taint is added to the Machine, the taint will only be added to the node on initialization.
+ // - If an OnInitialization taint is removed from the Machine nothing will be changed on the node.
+ // - If an Always taint is changed to OnInitialization, the taint will only be added to the node on initialization.
+ // - If an OnInitialization taint is removed from the node, it will not be re-added during reconciliation.
+ MachineTaintPropagationOnInitialization MachineTaintPropagation = "OnInitialization"
+)
diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/conversion.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/conversion.go
index 7d289566db89..9eada94f54cb 100644
--- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/conversion.go
+++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/conversion.go
@@ -73,17 +73,6 @@ func (src *Cluster) ConvertTo(dstRaw conversion.Hub) error {
return err
}
- if ok {
- dst.Spec.Topology.ControlPlane.HealthCheck.Checks.UnhealthyMachineConditions = restored.Spec.Topology.ControlPlane.HealthCheck.Checks.UnhealthyMachineConditions
- for _, restoredMD := range restored.Spec.Topology.Workers.MachineDeployments {
- for i, dstMD := range dst.Spec.Topology.Workers.MachineDeployments {
- if restoredMD.Name == dstMD.Name {
- dst.Spec.Topology.Workers.MachineDeployments[i].HealthCheck.Checks.UnhealthyMachineConditions = restoredMD.HealthCheck.Checks.UnhealthyMachineConditions
- }
- }
- }
- }
-
// Recover intent for bool values converted to *bool.
clusterv1.Convert_bool_To_Pointer_bool(src.Spec.Paused, ok, restored.Spec.Paused, &dst.Spec.Paused)
@@ -140,7 +129,7 @@ func (dst *Cluster) ConvertFrom(srcRaw conversion.Hub) error {
dropEmptyStringsCluster(dst)
- return utilconversion.MarshalData(src, dst)
+ return utilconversion.MarshalDataUnsafeNoCopy(src, dst)
}
func (src *ClusterClass) ConvertTo(dstRaw conversion.Hub) error {
@@ -156,17 +145,6 @@ func (src *ClusterClass) ConvertTo(dstRaw conversion.Hub) error {
return err
}
- if ok {
- dst.Spec.ControlPlane.HealthCheck.Checks.UnhealthyMachineConditions = restored.Spec.ControlPlane.HealthCheck.Checks.UnhealthyMachineConditions
- for _, restoredMD := range restored.Spec.Workers.MachineDeployments {
- for i, dstMD := range dst.Spec.Workers.MachineDeployments {
- if restoredMD.Class == dstMD.Class {
- dst.Spec.Workers.MachineDeployments[i].HealthCheck.Checks.UnhealthyMachineConditions = restoredMD.HealthCheck.Checks.UnhealthyMachineConditions
- }
- }
- }
- }
-
// Recover intent for bool values converted to *bool.
for i, patch := range dst.Spec.Patches {
for j, definition := range patch.Definitions {
@@ -270,10 +248,6 @@ func (src *ClusterClass) ConvertTo(dstRaw conversion.Hub) error {
dst.Status.Variables[i] = variable
}
- dst.Spec.KubernetesVersions = restored.Spec.KubernetesVersions
-
- dst.Spec.Upgrade.External.GenerateUpgradePlanExtension = restored.Spec.Upgrade.External.GenerateUpgradePlanExtension
-
return nil
}
@@ -387,7 +361,7 @@ func (dst *ClusterClass) ConvertFrom(srcRaw conversion.Hub) error {
}
dropEmptyStringsClusterClass(dst)
- return utilconversion.MarshalData(src, dst)
+ return utilconversion.MarshalDataUnsafeNoCopy(src, dst)
}
func (src *Machine) ConvertTo(dstRaw conversion.Hub) error {
@@ -419,12 +393,14 @@ func (src *Machine) ConvertTo(dstRaw conversion.Hub) error {
// Recover other values.
if ok {
+ // Note: Using the conversion annotation here because backporting the field into MachineSpec
+ // would mean that it also shows up as a duplicate MinReadySeconds field in MachineSet & MachineDeployment.
dst.Spec.MinReadySeconds = restored.Spec.MinReadySeconds
- dst.Spec.Taints = restored.Spec.Taints
// Restore the phase, this also means that any client using v1beta1 during a round-trip
// won't be able to write the Phase field. But that's okay as the only client writing the Phase
// field should be the Machine controller.
dst.Status.Phase = restored.Status.Phase
+ dst.Status.FailureDomain = restored.Status.FailureDomain
}
return nil
@@ -443,7 +419,7 @@ func (dst *Machine) ConvertFrom(srcRaw conversion.Hub) error {
dropEmptyStringsMachineSpec(&dst.Spec)
- return utilconversion.MarshalData(src, dst)
+ return utilconversion.MarshalDataUnsafeNoCopy(src, dst)
}
func (src *MachineSet) ConvertTo(dstRaw conversion.Hub) error {
@@ -463,17 +439,6 @@ func (src *MachineSet) ConvertTo(dstRaw conversion.Hub) error {
dst.Spec.Template.Spec.MinReadySeconds = &src.Spec.MinReadySeconds
}
- restored := &clusterv1.MachineSet{}
- ok, err := utilconversion.UnmarshalData(src, restored)
- if err != nil {
- return err
- }
-
- // Recover other values
- if ok {
- dst.Spec.Template.Spec.Taints = restored.Spec.Template.Spec.Taints
- }
-
return nil
}
@@ -492,7 +457,7 @@ func (dst *MachineSet) ConvertFrom(srcRaw conversion.Hub) error {
dropEmptyStringsMachineSpec(&dst.Spec.Template.Spec)
- return utilconversion.MarshalData(src, dst)
+ return nil
}
func (src *MachineDeployment) ConvertTo(dstRaw conversion.Hub) error {
@@ -517,11 +482,6 @@ func (src *MachineDeployment) ConvertTo(dstRaw conversion.Hub) error {
// Recover intent for bool values converted to *bool.
clusterv1.Convert_bool_To_Pointer_bool(src.Spec.Paused, ok, restored.Spec.Paused, &dst.Spec.Paused)
- // Recover other values
- if ok {
- dst.Spec.Template.Spec.Taints = restored.Spec.Template.Spec.Taints
- }
-
return nil
}
@@ -540,7 +500,7 @@ func (dst *MachineDeployment) ConvertFrom(srcRaw conversion.Hub) error {
dropEmptyStringsMachineSpec(&dst.Spec.Template.Spec)
- return utilconversion.MarshalData(src, dst)
+ return utilconversion.MarshalDataUnsafeNoCopy(src, dst)
}
func (src *MachineHealthCheck) ConvertTo(dstRaw conversion.Hub) error {
@@ -557,8 +517,6 @@ func (src *MachineHealthCheck) ConvertTo(dstRaw conversion.Hub) error {
return err
}
- dst.Spec.Checks.UnhealthyMachineConditions = restored.Spec.Checks.UnhealthyMachineConditions
-
clusterv1.Convert_int32_To_Pointer_int32(src.Status.ExpectedMachines, ok, restored.Status.ExpectedMachines, &dst.Status.ExpectedMachines)
clusterv1.Convert_int32_To_Pointer_int32(src.Status.CurrentHealthy, ok, restored.Status.CurrentHealthy, &dst.Status.CurrentHealthy)
clusterv1.Convert_int32_To_Pointer_int32(src.Status.RemediationsAllowed, ok, restored.Status.RemediationsAllowed, &dst.Status.RemediationsAllowed)
@@ -576,7 +534,7 @@ func (dst *MachineHealthCheck) ConvertFrom(srcRaw conversion.Hub) error {
dst.Spec.RemediationTemplate.Namespace = src.Namespace
}
- return utilconversion.MarshalData(src, dst)
+ return utilconversion.MarshalDataUnsafeNoCopy(src, dst)
}
func (src *MachinePool) ConvertTo(dstRaw conversion.Hub) error {
@@ -608,11 +566,6 @@ func (src *MachinePool) ConvertTo(dstRaw conversion.Hub) error {
dst.Status.Initialization = initialization
}
- // Recover other values
- if ok {
- dst.Spec.Template.Spec.Taints = restored.Spec.Template.Spec.Taints
- }
-
return nil
}
@@ -631,7 +584,7 @@ func (dst *MachinePool) ConvertFrom(srcRaw conversion.Hub) error {
dropEmptyStringsMachineSpec(&dst.Spec.Template.Spec)
- return utilconversion.MarshalData(src, dst)
+ return utilconversion.MarshalDataUnsafeNoCopy(src, dst)
}
func (src *MachineDrainRule) ConvertTo(dstRaw conversion.Hub) error {
@@ -739,6 +692,13 @@ func Convert_v1beta1_ControlPlaneClass_To_v1beta2_ControlPlaneClass(in *ControlP
TimeoutSeconds: clusterv1.ConvertToSeconds(&c.Timeout),
})
}
+ for _, c := range in.MachineHealthCheck.UnhealthyMachineConditions {
+ out.HealthCheck.Checks.UnhealthyMachineConditions = append(out.HealthCheck.Checks.UnhealthyMachineConditions, clusterv1.UnhealthyMachineCondition{
+ Type: c.Type,
+ Status: c.Status,
+ TimeoutSeconds: clusterv1.ConvertToSeconds(&c.Timeout),
+ })
+ }
out.HealthCheck.Checks.NodeStartupTimeoutSeconds = clusterv1.ConvertToSeconds(in.MachineHealthCheck.NodeStartupTimeout)
out.HealthCheck.Remediation.TriggerIf.UnhealthyLessThanOrEqualTo = in.MachineHealthCheck.MaxUnhealthy
out.HealthCheck.Remediation.TriggerIf.UnhealthyInRange = ptr.Deref(in.MachineHealthCheck.UnhealthyRange, "")
@@ -779,6 +739,13 @@ func Convert_v1beta2_ControlPlaneClass_To_v1beta1_ControlPlaneClass(in *clusterv
Timeout: ptr.Deref(clusterv1.ConvertFromSeconds(c.TimeoutSeconds), metav1.Duration{}),
})
}
+ for _, c := range in.HealthCheck.Checks.UnhealthyMachineConditions {
+ out.MachineHealthCheck.UnhealthyMachineConditions = append(out.MachineHealthCheck.UnhealthyMachineConditions, UnhealthyMachineCondition{
+ Type: c.Type,
+ Status: c.Status,
+ Timeout: ptr.Deref(clusterv1.ConvertFromSeconds(c.TimeoutSeconds), metav1.Duration{}),
+ })
+ }
out.MachineHealthCheck.NodeStartupTimeout = clusterv1.ConvertFromSeconds(in.HealthCheck.Checks.NodeStartupTimeoutSeconds)
out.MachineHealthCheck.MaxUnhealthy = in.HealthCheck.Remediation.TriggerIf.UnhealthyLessThanOrEqualTo
if in.HealthCheck.Remediation.TriggerIf.UnhealthyInRange != "" {
@@ -827,6 +794,13 @@ func Convert_v1beta1_ControlPlaneTopology_To_v1beta2_ControlPlaneTopology(in *Co
TimeoutSeconds: clusterv1.ConvertToSeconds(&c.Timeout),
})
}
+ for _, c := range in.MachineHealthCheck.UnhealthyMachineConditions {
+ out.HealthCheck.Checks.UnhealthyMachineConditions = append(out.HealthCheck.Checks.UnhealthyMachineConditions, clusterv1.UnhealthyMachineCondition{
+ Type: c.Type,
+ Status: c.Status,
+ TimeoutSeconds: clusterv1.ConvertToSeconds(&c.Timeout),
+ })
+ }
out.HealthCheck.Checks.NodeStartupTimeoutSeconds = clusterv1.ConvertToSeconds(in.MachineHealthCheck.NodeStartupTimeout)
out.HealthCheck.Remediation.TriggerIf.UnhealthyLessThanOrEqualTo = in.MachineHealthCheck.MaxUnhealthy
out.HealthCheck.Remediation.TriggerIf.UnhealthyInRange = ptr.Deref(in.MachineHealthCheck.UnhealthyRange, "")
@@ -863,6 +837,13 @@ func Convert_v1beta2_ControlPlaneTopology_To_v1beta1_ControlPlaneTopology(in *cl
Timeout: ptr.Deref(clusterv1.ConvertFromSeconds(c.TimeoutSeconds), metav1.Duration{}),
})
}
+ for _, c := range in.HealthCheck.Checks.UnhealthyMachineConditions {
+ out.MachineHealthCheck.UnhealthyMachineConditions = append(out.MachineHealthCheck.UnhealthyMachineConditions, UnhealthyMachineCondition{
+ Type: c.Type,
+ Status: c.Status,
+ Timeout: ptr.Deref(clusterv1.ConvertFromSeconds(c.TimeoutSeconds), metav1.Duration{}),
+ })
+ }
out.MachineHealthCheck.NodeStartupTimeout = clusterv1.ConvertFromSeconds(in.HealthCheck.Checks.NodeStartupTimeoutSeconds)
out.MachineHealthCheck.MaxUnhealthy = in.HealthCheck.Remediation.TriggerIf.UnhealthyLessThanOrEqualTo
if in.HealthCheck.Remediation.TriggerIf.UnhealthyInRange != "" {
@@ -916,6 +897,13 @@ func Convert_v1beta1_MachineDeploymentClass_To_v1beta2_MachineDeploymentClass(in
TimeoutSeconds: clusterv1.ConvertToSeconds(&c.Timeout),
})
}
+ for _, c := range in.MachineHealthCheck.UnhealthyMachineConditions {
+ out.HealthCheck.Checks.UnhealthyMachineConditions = append(out.HealthCheck.Checks.UnhealthyMachineConditions, clusterv1.UnhealthyMachineCondition{
+ Type: c.Type,
+ Status: c.Status,
+ TimeoutSeconds: clusterv1.ConvertToSeconds(&c.Timeout),
+ })
+ }
out.HealthCheck.Checks.NodeStartupTimeoutSeconds = clusterv1.ConvertToSeconds(in.MachineHealthCheck.NodeStartupTimeout)
out.HealthCheck.Remediation.TriggerIf.UnhealthyLessThanOrEqualTo = in.MachineHealthCheck.MaxUnhealthy
out.HealthCheck.Remediation.TriggerIf.UnhealthyInRange = ptr.Deref(in.MachineHealthCheck.UnhealthyRange, "")
@@ -989,6 +977,13 @@ func Convert_v1beta2_MachineDeploymentClass_To_v1beta1_MachineDeploymentClass(in
Timeout: ptr.Deref(clusterv1.ConvertFromSeconds(c.TimeoutSeconds), metav1.Duration{}),
})
}
+ for _, c := range in.HealthCheck.Checks.UnhealthyMachineConditions {
+ out.MachineHealthCheck.UnhealthyMachineConditions = append(out.MachineHealthCheck.UnhealthyMachineConditions, UnhealthyMachineCondition{
+ Type: c.Type,
+ Status: c.Status,
+ Timeout: ptr.Deref(clusterv1.ConvertFromSeconds(c.TimeoutSeconds), metav1.Duration{}),
+ })
+ }
out.MachineHealthCheck.NodeStartupTimeout = clusterv1.ConvertFromSeconds(in.HealthCheck.Checks.NodeStartupTimeoutSeconds)
out.MachineHealthCheck.MaxUnhealthy = in.HealthCheck.Remediation.TriggerIf.UnhealthyLessThanOrEqualTo
if in.HealthCheck.Remediation.TriggerIf.UnhealthyInRange != "" {
@@ -1044,6 +1039,13 @@ func Convert_v1beta1_MachineDeploymentTopology_To_v1beta2_MachineDeploymentTopol
TimeoutSeconds: clusterv1.ConvertToSeconds(&c.Timeout),
})
}
+ for _, c := range in.MachineHealthCheck.UnhealthyMachineConditions {
+ out.HealthCheck.Checks.UnhealthyMachineConditions = append(out.HealthCheck.Checks.UnhealthyMachineConditions, clusterv1.UnhealthyMachineCondition{
+ Type: c.Type,
+ Status: c.Status,
+ TimeoutSeconds: clusterv1.ConvertToSeconds(&c.Timeout),
+ })
+ }
out.HealthCheck.Checks.NodeStartupTimeoutSeconds = clusterv1.ConvertToSeconds(in.MachineHealthCheck.NodeStartupTimeout)
out.HealthCheck.Remediation.TriggerIf.UnhealthyLessThanOrEqualTo = in.MachineHealthCheck.MaxUnhealthy
out.HealthCheck.Remediation.TriggerIf.UnhealthyInRange = ptr.Deref(in.MachineHealthCheck.UnhealthyRange, "")
@@ -1110,6 +1112,13 @@ func Convert_v1beta2_MachineDeploymentTopology_To_v1beta1_MachineDeploymentTopol
Timeout: ptr.Deref(clusterv1.ConvertFromSeconds(c.TimeoutSeconds), metav1.Duration{}),
})
}
+ for _, c := range in.HealthCheck.Checks.UnhealthyMachineConditions {
+ out.MachineHealthCheck.UnhealthyMachineConditions = append(out.MachineHealthCheck.UnhealthyMachineConditions, UnhealthyMachineCondition{
+ Type: c.Type,
+ Status: c.Status,
+ Timeout: ptr.Deref(clusterv1.ConvertFromSeconds(c.TimeoutSeconds), metav1.Duration{}),
+ })
+ }
out.MachineHealthCheck.NodeStartupTimeout = clusterv1.ConvertFromSeconds(in.HealthCheck.Checks.NodeStartupTimeoutSeconds)
out.MachineHealthCheck.MaxUnhealthy = in.HealthCheck.Remediation.TriggerIf.UnhealthyLessThanOrEqualTo
if in.HealthCheck.Remediation.TriggerIf.UnhealthyInRange != "" {
@@ -1125,6 +1134,11 @@ func Convert_v1beta2_MachineDeploymentTopology_To_v1beta1_MachineDeploymentTopol
return nil
}
+func Convert_v1beta2_MachineDeploymentTopologyRolloutSpec_To_v1beta1_MachineDeploymentTopologyRolloutSpec(in *clusterv1.MachineDeploymentTopologyRolloutSpec, out *MachineDeploymentTopologyRolloutSpec, _ apimachineryconversion.Scope) error {
+ out.After = in.After
+ return nil
+}
+
func Convert_v1beta1_MachinePoolClass_To_v1beta2_MachinePoolClass(in *MachinePoolClass, out *clusterv1.MachinePoolClass, s apimachineryconversion.Scope) error {
if err := autoConvert_v1beta1_MachinePoolClass_To_v1beta2_MachinePoolClass(in, out, s); err != nil {
return err
@@ -1515,6 +1529,13 @@ func Convert_v1beta1_MachineHealthCheckSpec_To_v1beta2_MachineHealthCheckSpec(in
TimeoutSeconds: clusterv1.ConvertToSeconds(&c.Timeout),
})
}
+ for _, c := range in.UnhealthyMachineConditions {
+ out.Checks.UnhealthyMachineConditions = append(out.Checks.UnhealthyMachineConditions, clusterv1.UnhealthyMachineCondition{
+ Type: c.Type,
+ Status: c.Status,
+ TimeoutSeconds: clusterv1.ConvertToSeconds(&c.Timeout),
+ })
+ }
out.Checks.NodeStartupTimeoutSeconds = clusterv1.ConvertToSeconds(in.NodeStartupTimeout)
out.Remediation.TriggerIf.UnhealthyLessThanOrEqualTo = in.MaxUnhealthy
out.Remediation.TriggerIf.UnhealthyInRange = ptr.Deref(in.UnhealthyRange, "")
@@ -1539,6 +1560,13 @@ func Convert_v1beta2_MachineHealthCheckSpec_To_v1beta1_MachineHealthCheckSpec(in
Timeout: ptr.Deref(clusterv1.ConvertFromSeconds(c.TimeoutSeconds), metav1.Duration{}),
})
}
+ for _, c := range in.Checks.UnhealthyMachineConditions {
+ out.UnhealthyMachineConditions = append(out.UnhealthyMachineConditions, UnhealthyMachineCondition{
+ Type: c.Type,
+ Status: c.Status,
+ Timeout: ptr.Deref(clusterv1.ConvertFromSeconds(c.TimeoutSeconds), metav1.Duration{}),
+ })
+ }
out.NodeStartupTimeout = clusterv1.ConvertFromSeconds(in.Checks.NodeStartupTimeoutSeconds)
out.MaxUnhealthy = in.Remediation.TriggerIf.UnhealthyLessThanOrEqualTo
if in.Remediation.TriggerIf.UnhealthyInRange != "" {
@@ -1554,6 +1582,20 @@ func Convert_v1beta2_MachineHealthCheckSpec_To_v1beta1_MachineHealthCheckSpec(in
return nil
}
+func Convert_v1beta1_UnhealthyMachineCondition_To_v1beta2_UnhealthyMachineCondition(in *UnhealthyMachineCondition, out *clusterv1.UnhealthyMachineCondition, _ apimachineryconversion.Scope) error {
+ out.Type = in.Type
+ out.Status = in.Status
+ out.TimeoutSeconds = clusterv1.ConvertToSeconds(ptr.To(in.Timeout))
+ return nil
+}
+
+func Convert_v1beta2_UnhealthyMachineCondition_To_v1beta1_UnhealthyMachineCondition(in *clusterv1.UnhealthyMachineCondition, out *UnhealthyMachineCondition, _ apimachineryconversion.Scope) error {
+ out.Type = in.Type
+ out.Status = in.Status
+ out.Timeout = ptr.Deref(clusterv1.ConvertFromSeconds(in.TimeoutSeconds), metav1.Duration{})
+ return nil
+}
+
func Convert_v1beta2_MachineHealthCheckStatus_To_v1beta1_MachineHealthCheckStatus(in *clusterv1.MachineHealthCheckStatus, out *MachineHealthCheckStatus, s apimachineryconversion.Scope) error {
if err := autoConvert_v1beta2_MachineHealthCheckStatus_To_v1beta1_MachineHealthCheckStatus(in, out, s); err != nil {
return err
diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/machine_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/machine_types.go
index 5a37f75427e4..5ec584c238e3 100644
--- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/machine_types.go
+++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/machine_types.go
@@ -458,6 +458,23 @@ type MachineSpec struct {
// Defaults to 10 seconds.
// +optional
NodeDeletionTimeout *metav1.Duration `json:"nodeDeletionTimeout,omitempty"`
+
+ // taints are the node taints that Cluster API will manage.
+ // This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes,
+ // e.g. the node controller might add the node.kubernetes.io/not-ready taint.
+ // Only those taints defined in this list will be added or removed by core Cluster API controllers.
+ //
+ // There can be at most 64 taints.
+ // A pod would have to tolerate all existing taints to run on the corresponding node.
+ //
+ // NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
+ // +optional
+ // +listType=map
+ // +listMapKey=key
+ // +listMapKey=effect
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=64
+ Taints []MachineTaint `json:"taints,omitempty"`
}
// MachineReadinessGate contains the type of a Machine condition to be used as a readiness gate.
diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/machinehealthcheck_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/machinehealthcheck_types.go
index c8e4d27046a1..19561920715e 100644
--- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/machinehealthcheck_types.go
+++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/machinehealthcheck_types.go
@@ -67,6 +67,16 @@ type MachineHealthCheckSpec struct {
// +kubebuilder:validation:MaxItems=100
UnhealthyConditions []UnhealthyCondition `json:"unhealthyConditions,omitempty"`
+ // unhealthyMachineConditions contains a list of the machine conditions that determine
+ // whether a machine is considered unhealthy. The conditions are combined in a
+ // logical OR, i.e. if any of the conditions is met, the machine is unhealthy.
+ //
+ // +optional
+ // +listType=atomic
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=100
+ UnhealthyMachineConditions []UnhealthyMachineCondition `json:"unhealthyMachineConditions,omitempty"`
+
// maxUnhealthy specifies the maximum number of unhealthy machines allowed.
// Any further remediation is only allowed if at most "maxUnhealthy" machines selected by
// "selector" are not healthy.
@@ -140,6 +150,31 @@ type UnhealthyCondition struct {
Timeout metav1.Duration `json:"timeout"`
}
+// UnhealthyMachineCondition represents a Machine condition type and value with a timeout
+// specified as a duration. When the named condition has been in the given
+// status for at least the timeout value, a machine is considered unhealthy.
+type UnhealthyMachineCondition struct {
+ // type of Machine condition
+ // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$`
+ // +kubebuilder:validation:MinLength=1
+ // +kubebuilder:validation:MaxLength=316
+ // +kubebuilder:validation:XValidation:rule="!(self in ['Ready','Available','HealthCheckSucceeded','OwnerRemediated','ExternallyRemediated'])",message="type must not be one of: Ready, Available, HealthCheckSucceeded, OwnerRemediated, ExternallyRemediated"
+ // +required
+ Type string `json:"type,omitempty"`
+
+ // status of the condition, one of True, False, Unknown.
+ // +required
+ // +kubebuilder:validation:Enum=True;False;Unknown
+ Status metav1.ConditionStatus `json:"status,omitempty"`
+
+ // timeout is the duration that a Machine must be in a given status for,
+ // after which the Machine is considered unhealthy.
+ // For example, with a value of "1h", the Machine must match the status
+ // for at least 1 hour before being considered unhealthy.
+ // +required
+ Timeout metav1.Duration `json:"timeout"`
+}
+
// MachineHealthCheckStatus defines the observed state of MachineHealthCheck.
type MachineHealthCheckStatus struct {
// expectedMachines is the total number of machines counted by this machine health check
diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/zz_generated.conversion.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/zz_generated.conversion.go
index c0514e67d223..4bd292dce442 100644
--- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/zz_generated.conversion.go
+++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/zz_generated.conversion.go
@@ -104,6 +104,26 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil {
return err
}
+ if err := s.AddGeneratedConversionFunc((*ClusterClassUpgrade)(nil), (*v1beta2.ClusterClassUpgrade)(nil), func(a, b interface{}, scope conversion.Scope) error {
+ return Convert_v1beta1_ClusterClassUpgrade_To_v1beta2_ClusterClassUpgrade(a.(*ClusterClassUpgrade), b.(*v1beta2.ClusterClassUpgrade), scope)
+ }); err != nil {
+ return err
+ }
+ if err := s.AddGeneratedConversionFunc((*v1beta2.ClusterClassUpgrade)(nil), (*ClusterClassUpgrade)(nil), func(a, b interface{}, scope conversion.Scope) error {
+ return Convert_v1beta2_ClusterClassUpgrade_To_v1beta1_ClusterClassUpgrade(a.(*v1beta2.ClusterClassUpgrade), b.(*ClusterClassUpgrade), scope)
+ }); err != nil {
+ return err
+ }
+ if err := s.AddGeneratedConversionFunc((*ClusterClassUpgradeExternal)(nil), (*v1beta2.ClusterClassUpgradeExternal)(nil), func(a, b interface{}, scope conversion.Scope) error {
+ return Convert_v1beta1_ClusterClassUpgradeExternal_To_v1beta2_ClusterClassUpgradeExternal(a.(*ClusterClassUpgradeExternal), b.(*v1beta2.ClusterClassUpgradeExternal), scope)
+ }); err != nil {
+ return err
+ }
+ if err := s.AddGeneratedConversionFunc((*v1beta2.ClusterClassUpgradeExternal)(nil), (*ClusterClassUpgradeExternal)(nil), func(a, b interface{}, scope conversion.Scope) error {
+ return Convert_v1beta2_ClusterClassUpgradeExternal_To_v1beta1_ClusterClassUpgradeExternal(a.(*v1beta2.ClusterClassUpgradeExternal), b.(*ClusterClassUpgradeExternal), scope)
+ }); err != nil {
+ return err
+ }
if err := s.AddGeneratedConversionFunc((*ClusterClassVariableMetadata)(nil), (*v1beta2.ClusterClassVariableMetadata)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_ClusterClassVariableMetadata_To_v1beta2_ClusterClassVariableMetadata(a.(*ClusterClassVariableMetadata), b.(*v1beta2.ClusterClassVariableMetadata), scope)
}); err != nil {
@@ -149,6 +169,16 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil {
return err
}
+ if err := s.AddGeneratedConversionFunc((*ControlPlaneTopologyRolloutSpec)(nil), (*v1beta2.ControlPlaneTopologyRolloutSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
+ return Convert_v1beta1_ControlPlaneTopologyRolloutSpec_To_v1beta2_ControlPlaneTopologyRolloutSpec(a.(*ControlPlaneTopologyRolloutSpec), b.(*v1beta2.ControlPlaneTopologyRolloutSpec), scope)
+ }); err != nil {
+ return err
+ }
+ if err := s.AddGeneratedConversionFunc((*v1beta2.ControlPlaneTopologyRolloutSpec)(nil), (*ControlPlaneTopologyRolloutSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
+ return Convert_v1beta2_ControlPlaneTopologyRolloutSpec_To_v1beta1_ControlPlaneTopologyRolloutSpec(a.(*v1beta2.ControlPlaneTopologyRolloutSpec), b.(*ControlPlaneTopologyRolloutSpec), scope)
+ }); err != nil {
+ return err
+ }
if err := s.AddGeneratedConversionFunc((*ControlPlaneVariables)(nil), (*v1beta2.ControlPlaneVariables)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_ControlPlaneVariables_To_v1beta2_ControlPlaneVariables(a.(*ControlPlaneVariables), b.(*v1beta2.ControlPlaneVariables), scope)
}); err != nil {
@@ -219,6 +249,11 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil {
return err
}
+ if err := s.AddGeneratedConversionFunc((*MachineDeploymentTopologyRolloutSpec)(nil), (*v1beta2.MachineDeploymentTopologyRolloutSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
+ return Convert_v1beta1_MachineDeploymentTopologyRolloutSpec_To_v1beta2_MachineDeploymentTopologyRolloutSpec(a.(*MachineDeploymentTopologyRolloutSpec), b.(*v1beta2.MachineDeploymentTopologyRolloutSpec), scope)
+ }); err != nil {
+ return err
+ }
if err := s.AddGeneratedConversionFunc((*MachineDeploymentVariables)(nil), (*v1beta2.MachineDeploymentVariables)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_MachineDeploymentVariables_To_v1beta2_MachineDeploymentVariables(a.(*MachineDeploymentVariables), b.(*v1beta2.MachineDeploymentVariables), scope)
}); err != nil {
@@ -384,6 +419,16 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil {
return err
}
+ if err := s.AddGeneratedConversionFunc((*MachineTaint)(nil), (*v1beta2.MachineTaint)(nil), func(a, b interface{}, scope conversion.Scope) error {
+ return Convert_v1beta1_MachineTaint_To_v1beta2_MachineTaint(a.(*MachineTaint), b.(*v1beta2.MachineTaint), scope)
+ }); err != nil {
+ return err
+ }
+ if err := s.AddGeneratedConversionFunc((*v1beta2.MachineTaint)(nil), (*MachineTaint)(nil), func(a, b interface{}, scope conversion.Scope) error {
+ return Convert_v1beta2_MachineTaint_To_v1beta1_MachineTaint(a.(*v1beta2.MachineTaint), b.(*MachineTaint), scope)
+ }); err != nil {
+ return err
+ }
if err := s.AddGeneratedConversionFunc((*MachineTemplateSpec)(nil), (*v1beta2.MachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_MachineTemplateSpec_To_v1beta2_MachineTemplateSpec(a.(*MachineTemplateSpec), b.(*v1beta2.MachineTemplateSpec), scope)
}); err != nil {
@@ -724,6 +769,11 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil {
return err
}
+ if err := s.AddConversionFunc((*UnhealthyMachineCondition)(nil), (*v1beta2.UnhealthyMachineCondition)(nil), func(a, b interface{}, scope conversion.Scope) error {
+ return Convert_v1beta1_UnhealthyMachineCondition_To_v1beta2_UnhealthyMachineCondition(a.(*UnhealthyMachineCondition), b.(*v1beta2.UnhealthyMachineCondition), scope)
+ }); err != nil {
+ return err
+ }
if err := s.AddConversionFunc((*v1beta2.Bootstrap)(nil), (*Bootstrap)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta2_Bootstrap_To_v1beta1_Bootstrap(a.(*v1beta2.Bootstrap), b.(*Bootstrap), scope)
}); err != nil {
@@ -834,6 +884,11 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil {
return err
}
+ if err := s.AddConversionFunc((*v1beta2.MachineDeploymentTopologyRolloutSpec)(nil), (*MachineDeploymentTopologyRolloutSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
+ return Convert_v1beta2_MachineDeploymentTopologyRolloutSpec_To_v1beta1_MachineDeploymentTopologyRolloutSpec(a.(*v1beta2.MachineDeploymentTopologyRolloutSpec), b.(*MachineDeploymentTopologyRolloutSpec), scope)
+ }); err != nil {
+ return err
+ }
if err := s.AddConversionFunc((*v1beta2.MachineDeploymentTopology)(nil), (*MachineDeploymentTopology)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta2_MachineDeploymentTopology_To_v1beta1_MachineDeploymentTopology(a.(*v1beta2.MachineDeploymentTopology), b.(*MachineDeploymentTopology), scope)
}); err != nil {
@@ -909,6 +964,11 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil {
return err
}
+ if err := s.AddConversionFunc((*v1beta2.UnhealthyMachineCondition)(nil), (*UnhealthyMachineCondition)(nil), func(a, b interface{}, scope conversion.Scope) error {
+ return Convert_v1beta2_UnhealthyMachineCondition_To_v1beta1_UnhealthyMachineCondition(a.(*v1beta2.UnhealthyMachineCondition), b.(*UnhealthyMachineCondition), scope)
+ }); err != nil {
+ return err
+ }
return nil
}
@@ -1171,6 +1231,10 @@ func autoConvert_v1beta1_ClusterClassSpec_To_v1beta2_ClusterClassSpec(in *Cluste
} else {
out.Patches = nil
}
+ if err := Convert_v1beta1_ClusterClassUpgrade_To_v1beta2_ClusterClassUpgrade(&in.Upgrade, &out.Upgrade, s); err != nil {
+ return err
+ }
+ out.KubernetesVersions = *(*[]string)(unsafe.Pointer(&in.KubernetesVersions))
return nil
}
@@ -1207,8 +1271,10 @@ func autoConvert_v1beta2_ClusterClassSpec_To_v1beta1_ClusterClassSpec(in *v1beta
} else {
out.Patches = nil
}
- // WARNING: in.Upgrade requires manual conversion: does not exist in peer-type
- // WARNING: in.KubernetesVersions requires manual conversion: does not exist in peer-type
+ if err := Convert_v1beta2_ClusterClassUpgrade_To_v1beta1_ClusterClassUpgrade(&in.Upgrade, &out.Upgrade, s); err != nil {
+ return err
+ }
+ out.KubernetesVersions = *(*[]string)(unsafe.Pointer(&in.KubernetesVersions))
return nil
}
@@ -1340,6 +1406,50 @@ func autoConvert_v1beta2_ClusterClassStatusVariableDefinition_To_v1beta1_Cluster
return nil
}
+func autoConvert_v1beta1_ClusterClassUpgrade_To_v1beta2_ClusterClassUpgrade(in *ClusterClassUpgrade, out *v1beta2.ClusterClassUpgrade, s conversion.Scope) error {
+ if err := Convert_v1beta1_ClusterClassUpgradeExternal_To_v1beta2_ClusterClassUpgradeExternal(&in.External, &out.External, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_ClusterClassUpgrade_To_v1beta2_ClusterClassUpgrade is an autogenerated conversion function.
+func Convert_v1beta1_ClusterClassUpgrade_To_v1beta2_ClusterClassUpgrade(in *ClusterClassUpgrade, out *v1beta2.ClusterClassUpgrade, s conversion.Scope) error {
+ return autoConvert_v1beta1_ClusterClassUpgrade_To_v1beta2_ClusterClassUpgrade(in, out, s)
+}
+
+func autoConvert_v1beta2_ClusterClassUpgrade_To_v1beta1_ClusterClassUpgrade(in *v1beta2.ClusterClassUpgrade, out *ClusterClassUpgrade, s conversion.Scope) error {
+ if err := Convert_v1beta2_ClusterClassUpgradeExternal_To_v1beta1_ClusterClassUpgradeExternal(&in.External, &out.External, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta2_ClusterClassUpgrade_To_v1beta1_ClusterClassUpgrade is an autogenerated conversion function.
+func Convert_v1beta2_ClusterClassUpgrade_To_v1beta1_ClusterClassUpgrade(in *v1beta2.ClusterClassUpgrade, out *ClusterClassUpgrade, s conversion.Scope) error {
+ return autoConvert_v1beta2_ClusterClassUpgrade_To_v1beta1_ClusterClassUpgrade(in, out, s)
+}
+
+func autoConvert_v1beta1_ClusterClassUpgradeExternal_To_v1beta2_ClusterClassUpgradeExternal(in *ClusterClassUpgradeExternal, out *v1beta2.ClusterClassUpgradeExternal, s conversion.Scope) error {
+ out.GenerateUpgradePlanExtension = in.GenerateUpgradePlanExtension
+ return nil
+}
+
+// Convert_v1beta1_ClusterClassUpgradeExternal_To_v1beta2_ClusterClassUpgradeExternal is an autogenerated conversion function.
+func Convert_v1beta1_ClusterClassUpgradeExternal_To_v1beta2_ClusterClassUpgradeExternal(in *ClusterClassUpgradeExternal, out *v1beta2.ClusterClassUpgradeExternal, s conversion.Scope) error {
+ return autoConvert_v1beta1_ClusterClassUpgradeExternal_To_v1beta2_ClusterClassUpgradeExternal(in, out, s)
+}
+
+func autoConvert_v1beta2_ClusterClassUpgradeExternal_To_v1beta1_ClusterClassUpgradeExternal(in *v1beta2.ClusterClassUpgradeExternal, out *ClusterClassUpgradeExternal, s conversion.Scope) error {
+ out.GenerateUpgradePlanExtension = in.GenerateUpgradePlanExtension
+ return nil
+}
+
+// Convert_v1beta2_ClusterClassUpgradeExternal_To_v1beta1_ClusterClassUpgradeExternal is an autogenerated conversion function.
+func Convert_v1beta2_ClusterClassUpgradeExternal_To_v1beta1_ClusterClassUpgradeExternal(in *v1beta2.ClusterClassUpgradeExternal, out *ClusterClassUpgradeExternal, s conversion.Scope) error {
+ return autoConvert_v1beta2_ClusterClassUpgradeExternal_To_v1beta1_ClusterClassUpgradeExternal(in, out, s)
+}
+
func autoConvert_v1beta1_ClusterClassVariable_To_v1beta2_ClusterClassVariable(in *ClusterClassVariable, out *v1beta2.ClusterClassVariable, s conversion.Scope) error {
out.Name = in.Name
if err := v1.Convert_bool_To_Pointer_bool(&in.Required, &out.Required, s); err != nil {
@@ -1610,6 +1720,7 @@ func autoConvert_v1beta1_ControlPlaneClass_To_v1beta2_ControlPlaneClass(in *Cont
// WARNING: in.NodeDrainTimeout requires manual conversion: does not exist in peer-type
// WARNING: in.NodeVolumeDetachTimeout requires manual conversion: does not exist in peer-type
// WARNING: in.NodeDeletionTimeout requires manual conversion: does not exist in peer-type
+ out.Taints = *(*[]v1beta2.MachineTaint)(unsafe.Pointer(&in.Taints))
out.ReadinessGates = *(*[]v1beta2.MachineReadinessGate)(unsafe.Pointer(&in.ReadinessGates))
return nil
}
@@ -1623,6 +1734,7 @@ func autoConvert_v1beta2_ControlPlaneClass_To_v1beta1_ControlPlaneClass(in *v1be
// WARNING: in.HealthCheck requires manual conversion: does not exist in peer-type
// WARNING: in.Naming requires manual conversion: does not exist in peer-type
// WARNING: in.Deletion requires manual conversion: does not exist in peer-type
+ out.Taints = *(*[]MachineTaint)(unsafe.Pointer(&in.Taints))
out.ReadinessGates = *(*[]MachineReadinessGate)(unsafe.Pointer(&in.ReadinessGates))
return nil
}
@@ -1632,10 +1744,14 @@ func autoConvert_v1beta1_ControlPlaneTopology_To_v1beta2_ControlPlaneTopology(in
return err
}
out.Replicas = (*int32)(unsafe.Pointer(in.Replicas))
+ if err := Convert_v1beta1_ControlPlaneTopologyRolloutSpec_To_v1beta2_ControlPlaneTopologyRolloutSpec(&in.Rollout, &out.Rollout, s); err != nil {
+ return err
+ }
// WARNING: in.MachineHealthCheck requires manual conversion: does not exist in peer-type
// WARNING: in.NodeDrainTimeout requires manual conversion: does not exist in peer-type
// WARNING: in.NodeVolumeDetachTimeout requires manual conversion: does not exist in peer-type
// WARNING: in.NodeDeletionTimeout requires manual conversion: does not exist in peer-type
+ out.Taints = *(*[]v1beta2.MachineTaint)(unsafe.Pointer(&in.Taints))
out.ReadinessGates = *(*[]v1beta2.MachineReadinessGate)(unsafe.Pointer(&in.ReadinessGates))
// WARNING: in.Variables requires manual conversion: inconvertible types (*sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneVariables vs sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneVariables)
return nil
@@ -1646,13 +1762,37 @@ func autoConvert_v1beta2_ControlPlaneTopology_To_v1beta1_ControlPlaneTopology(in
return err
}
out.Replicas = (*int32)(unsafe.Pointer(in.Replicas))
+ if err := Convert_v1beta2_ControlPlaneTopologyRolloutSpec_To_v1beta1_ControlPlaneTopologyRolloutSpec(&in.Rollout, &out.Rollout, s); err != nil {
+ return err
+ }
// WARNING: in.HealthCheck requires manual conversion: does not exist in peer-type
// WARNING: in.Deletion requires manual conversion: does not exist in peer-type
+ out.Taints = *(*[]MachineTaint)(unsafe.Pointer(&in.Taints))
out.ReadinessGates = *(*[]MachineReadinessGate)(unsafe.Pointer(&in.ReadinessGates))
// WARNING: in.Variables requires manual conversion: inconvertible types (sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneVariables vs *sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneVariables)
return nil
}
+func autoConvert_v1beta1_ControlPlaneTopologyRolloutSpec_To_v1beta2_ControlPlaneTopologyRolloutSpec(in *ControlPlaneTopologyRolloutSpec, out *v1beta2.ControlPlaneTopologyRolloutSpec, s conversion.Scope) error {
+ out.After = in.After
+ return nil
+}
+
+// Convert_v1beta1_ControlPlaneTopologyRolloutSpec_To_v1beta2_ControlPlaneTopologyRolloutSpec is an autogenerated conversion function.
+func Convert_v1beta1_ControlPlaneTopologyRolloutSpec_To_v1beta2_ControlPlaneTopologyRolloutSpec(in *ControlPlaneTopologyRolloutSpec, out *v1beta2.ControlPlaneTopologyRolloutSpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_ControlPlaneTopologyRolloutSpec_To_v1beta2_ControlPlaneTopologyRolloutSpec(in, out, s)
+}
+
+func autoConvert_v1beta2_ControlPlaneTopologyRolloutSpec_To_v1beta1_ControlPlaneTopologyRolloutSpec(in *v1beta2.ControlPlaneTopologyRolloutSpec, out *ControlPlaneTopologyRolloutSpec, s conversion.Scope) error {
+ out.After = in.After
+ return nil
+}
+
+// Convert_v1beta2_ControlPlaneTopologyRolloutSpec_To_v1beta1_ControlPlaneTopologyRolloutSpec is an autogenerated conversion function.
+func Convert_v1beta2_ControlPlaneTopologyRolloutSpec_To_v1beta1_ControlPlaneTopologyRolloutSpec(in *v1beta2.ControlPlaneTopologyRolloutSpec, out *ControlPlaneTopologyRolloutSpec, s conversion.Scope) error {
+ return autoConvert_v1beta2_ControlPlaneTopologyRolloutSpec_To_v1beta1_ControlPlaneTopologyRolloutSpec(in, out, s)
+}
+
func autoConvert_v1beta1_ControlPlaneVariables_To_v1beta2_ControlPlaneVariables(in *ControlPlaneVariables, out *v1beta2.ControlPlaneVariables, s conversion.Scope) error {
if in.Overrides != nil {
in, out := &in.Overrides, &out.Overrides
@@ -2114,6 +2254,7 @@ func autoConvert_v1beta1_MachineDeploymentClass_To_v1beta2_MachineDeploymentClas
// WARNING: in.NodeDrainTimeout requires manual conversion: does not exist in peer-type
// WARNING: in.NodeVolumeDetachTimeout requires manual conversion: does not exist in peer-type
// WARNING: in.NodeDeletionTimeout requires manual conversion: does not exist in peer-type
+ out.Taints = *(*[]v1beta2.MachineTaint)(unsafe.Pointer(&in.Taints))
out.MinReadySeconds = (*int32)(unsafe.Pointer(in.MinReadySeconds))
out.ReadinessGates = *(*[]v1beta2.MachineReadinessGate)(unsafe.Pointer(&in.ReadinessGates))
// WARNING: in.Strategy requires manual conversion: does not exist in peer-type
@@ -2131,6 +2272,7 @@ func autoConvert_v1beta2_MachineDeploymentClass_To_v1beta1_MachineDeploymentClas
}
// WARNING: in.Naming requires manual conversion: does not exist in peer-type
// WARNING: in.Deletion requires manual conversion: does not exist in peer-type
+ out.Taints = *(*[]MachineTaint)(unsafe.Pointer(&in.Taints))
out.MinReadySeconds = (*int32)(unsafe.Pointer(in.MinReadySeconds))
out.ReadinessGates = *(*[]MachineReadinessGate)(unsafe.Pointer(&in.ReadinessGates))
// WARNING: in.Rollout requires manual conversion: does not exist in peer-type
@@ -2288,8 +2430,12 @@ func autoConvert_v1beta1_MachineDeploymentTopology_To_v1beta2_MachineDeploymentT
// WARNING: in.NodeDrainTimeout requires manual conversion: does not exist in peer-type
// WARNING: in.NodeVolumeDetachTimeout requires manual conversion: does not exist in peer-type
// WARNING: in.NodeDeletionTimeout requires manual conversion: does not exist in peer-type
+ out.Taints = *(*[]v1beta2.MachineTaint)(unsafe.Pointer(&in.Taints))
out.MinReadySeconds = (*int32)(unsafe.Pointer(in.MinReadySeconds))
out.ReadinessGates = *(*[]v1beta2.MachineReadinessGate)(unsafe.Pointer(&in.ReadinessGates))
+ if err := Convert_v1beta1_MachineDeploymentTopologyRolloutSpec_To_v1beta2_MachineDeploymentTopologyRolloutSpec(&in.Rollout, &out.Rollout, s); err != nil {
+ return err
+ }
// WARNING: in.Strategy requires manual conversion: does not exist in peer-type
// WARNING: in.Variables requires manual conversion: inconvertible types (*sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentVariables vs sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentVariables)
return nil
@@ -2307,13 +2453,32 @@ func autoConvert_v1beta2_MachineDeploymentTopology_To_v1beta1_MachineDeploymentT
out.Replicas = (*int32)(unsafe.Pointer(in.Replicas))
// WARNING: in.HealthCheck requires manual conversion: does not exist in peer-type
// WARNING: in.Deletion requires manual conversion: does not exist in peer-type
+ out.Taints = *(*[]MachineTaint)(unsafe.Pointer(&in.Taints))
out.MinReadySeconds = (*int32)(unsafe.Pointer(in.MinReadySeconds))
out.ReadinessGates = *(*[]MachineReadinessGate)(unsafe.Pointer(&in.ReadinessGates))
- // WARNING: in.Rollout requires manual conversion: does not exist in peer-type
+ if err := Convert_v1beta2_MachineDeploymentTopologyRolloutSpec_To_v1beta1_MachineDeploymentTopologyRolloutSpec(&in.Rollout, &out.Rollout, s); err != nil {
+ return err
+ }
// WARNING: in.Variables requires manual conversion: inconvertible types (sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentVariables vs *sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentVariables)
return nil
}
+func autoConvert_v1beta1_MachineDeploymentTopologyRolloutSpec_To_v1beta2_MachineDeploymentTopologyRolloutSpec(in *MachineDeploymentTopologyRolloutSpec, out *v1beta2.MachineDeploymentTopologyRolloutSpec, s conversion.Scope) error {
+ out.After = in.After
+ return nil
+}
+
+// Convert_v1beta1_MachineDeploymentTopologyRolloutSpec_To_v1beta2_MachineDeploymentTopologyRolloutSpec is an autogenerated conversion function.
+func Convert_v1beta1_MachineDeploymentTopologyRolloutSpec_To_v1beta2_MachineDeploymentTopologyRolloutSpec(in *MachineDeploymentTopologyRolloutSpec, out *v1beta2.MachineDeploymentTopologyRolloutSpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_MachineDeploymentTopologyRolloutSpec_To_v1beta2_MachineDeploymentTopologyRolloutSpec(in, out, s)
+}
+
+func autoConvert_v1beta2_MachineDeploymentTopologyRolloutSpec_To_v1beta1_MachineDeploymentTopologyRolloutSpec(in *v1beta2.MachineDeploymentTopologyRolloutSpec, out *MachineDeploymentTopologyRolloutSpec, s conversion.Scope) error {
+ out.After = in.After
+ // WARNING: in.Strategy requires manual conversion: does not exist in peer-type
+ return nil
+}
+
func autoConvert_v1beta1_MachineDeploymentVariables_To_v1beta2_MachineDeploymentVariables(in *MachineDeploymentVariables, out *v1beta2.MachineDeploymentVariables, s conversion.Scope) error {
if in.Overrides != nil {
in, out := &in.Overrides, &out.Overrides
@@ -2574,6 +2739,7 @@ func autoConvert_v1beta1_MachineHealthCheckSpec_To_v1beta2_MachineHealthCheckSpe
out.ClusterName = in.ClusterName
out.Selector = in.Selector
// WARNING: in.UnhealthyConditions requires manual conversion: does not exist in peer-type
+ // WARNING: in.UnhealthyMachineConditions requires manual conversion: does not exist in peer-type
// WARNING: in.MaxUnhealthy requires manual conversion: does not exist in peer-type
// WARNING: in.UnhealthyRange requires manual conversion: does not exist in peer-type
// WARNING: in.NodeStartupTimeout requires manual conversion: does not exist in peer-type
@@ -2725,6 +2891,7 @@ func autoConvert_v1beta1_MachinePoolClass_To_v1beta2_MachinePoolClass(in *Machin
// WARNING: in.NodeDrainTimeout requires manual conversion: does not exist in peer-type
// WARNING: in.NodeVolumeDetachTimeout requires manual conversion: does not exist in peer-type
// WARNING: in.NodeDeletionTimeout requires manual conversion: does not exist in peer-type
+ out.Taints = *(*[]v1beta2.MachineTaint)(unsafe.Pointer(&in.Taints))
out.MinReadySeconds = (*int32)(unsafe.Pointer(in.MinReadySeconds))
return nil
}
@@ -2737,6 +2904,7 @@ func autoConvert_v1beta2_MachinePoolClass_To_v1beta1_MachinePoolClass(in *v1beta
out.FailureDomains = *(*[]string)(unsafe.Pointer(&in.FailureDomains))
// WARNING: in.Naming requires manual conversion: does not exist in peer-type
// WARNING: in.Deletion requires manual conversion: does not exist in peer-type
+ out.Taints = *(*[]MachineTaint)(unsafe.Pointer(&in.Taints))
out.MinReadySeconds = (*int32)(unsafe.Pointer(in.MinReadySeconds))
return nil
}
@@ -2884,6 +3052,7 @@ func autoConvert_v1beta1_MachinePoolTopology_To_v1beta2_MachinePoolTopology(in *
// WARNING: in.NodeDrainTimeout requires manual conversion: does not exist in peer-type
// WARNING: in.NodeVolumeDetachTimeout requires manual conversion: does not exist in peer-type
// WARNING: in.NodeDeletionTimeout requires manual conversion: does not exist in peer-type
+ out.Taints = *(*[]v1beta2.MachineTaint)(unsafe.Pointer(&in.Taints))
out.MinReadySeconds = (*int32)(unsafe.Pointer(in.MinReadySeconds))
out.Replicas = (*int32)(unsafe.Pointer(in.Replicas))
// WARNING: in.Variables requires manual conversion: inconvertible types (*sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolVariables vs sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolVariables)
@@ -2898,6 +3067,7 @@ func autoConvert_v1beta2_MachinePoolTopology_To_v1beta1_MachinePoolTopology(in *
out.Name = in.Name
out.FailureDomains = *(*[]string)(unsafe.Pointer(&in.FailureDomains))
// WARNING: in.Deletion requires manual conversion: does not exist in peer-type
+ out.Taints = *(*[]MachineTaint)(unsafe.Pointer(&in.Taints))
out.MinReadySeconds = (*int32)(unsafe.Pointer(in.MinReadySeconds))
out.Replicas = (*int32)(unsafe.Pointer(in.Replicas))
// WARNING: in.Variables requires manual conversion: inconvertible types (sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolVariables vs *sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolVariables)
@@ -3144,6 +3314,7 @@ func autoConvert_v1beta1_MachineSpec_To_v1beta2_MachineSpec(in *MachineSpec, out
// WARNING: in.NodeDrainTimeout requires manual conversion: does not exist in peer-type
// WARNING: in.NodeVolumeDetachTimeout requires manual conversion: does not exist in peer-type
// WARNING: in.NodeDeletionTimeout requires manual conversion: does not exist in peer-type
+ out.Taints = *(*[]v1beta2.MachineTaint)(unsafe.Pointer(&in.Taints))
return nil
}
@@ -3167,7 +3338,7 @@ func autoConvert_v1beta2_MachineSpec_To_v1beta1_MachineSpec(in *v1beta2.MachineS
// WARNING: in.MinReadySeconds requires manual conversion: does not exist in peer-type
out.ReadinessGates = *(*[]MachineReadinessGate)(unsafe.Pointer(&in.ReadinessGates))
// WARNING: in.Deletion requires manual conversion: does not exist in peer-type
- // WARNING: in.Taints requires manual conversion: does not exist in peer-type
+ out.Taints = *(*[]MachineTaint)(unsafe.Pointer(&in.Taints))
return nil
}
@@ -3224,6 +3395,7 @@ func autoConvert_v1beta2_MachineStatus_To_v1beta1_MachineStatus(in *v1beta2.Mach
out.NodeInfo = (*corev1.NodeSystemInfo)(unsafe.Pointer(in.NodeInfo))
// WARNING: in.LastUpdated requires manual conversion: inconvertible types (k8s.io/apimachinery/pkg/apis/meta/v1.Time vs *k8s.io/apimachinery/pkg/apis/meta/v1.Time)
out.Addresses = *(*MachineAddresses)(unsafe.Pointer(&in.Addresses))
+ // WARNING: in.FailureDomain requires manual conversion: does not exist in peer-type
out.Phase = in.Phase
// WARNING: in.CertificatesExpiryDate requires manual conversion: inconvertible types (k8s.io/apimachinery/pkg/apis/meta/v1.Time vs *k8s.io/apimachinery/pkg/apis/meta/v1.Time)
out.ObservedGeneration = in.ObservedGeneration
@@ -3240,6 +3412,32 @@ func autoConvert_v1beta2_MachineStatus_To_v1beta1_MachineStatus(in *v1beta2.Mach
return nil
}
+func autoConvert_v1beta1_MachineTaint_To_v1beta2_MachineTaint(in *MachineTaint, out *v1beta2.MachineTaint, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Value = in.Value
+ out.Effect = corev1.TaintEffect(in.Effect)
+ out.Propagation = v1beta2.MachineTaintPropagation(in.Propagation)
+ return nil
+}
+
+// Convert_v1beta1_MachineTaint_To_v1beta2_MachineTaint is an autogenerated conversion function.
+func Convert_v1beta1_MachineTaint_To_v1beta2_MachineTaint(in *MachineTaint, out *v1beta2.MachineTaint, s conversion.Scope) error {
+ return autoConvert_v1beta1_MachineTaint_To_v1beta2_MachineTaint(in, out, s)
+}
+
+func autoConvert_v1beta2_MachineTaint_To_v1beta1_MachineTaint(in *v1beta2.MachineTaint, out *MachineTaint, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Value = in.Value
+ out.Effect = corev1.TaintEffect(in.Effect)
+ out.Propagation = MachineTaintPropagation(in.Propagation)
+ return nil
+}
+
+// Convert_v1beta2_MachineTaint_To_v1beta1_MachineTaint is an autogenerated conversion function.
+func Convert_v1beta2_MachineTaint_To_v1beta1_MachineTaint(in *v1beta2.MachineTaint, out *MachineTaint, s conversion.Scope) error {
+ return autoConvert_v1beta2_MachineTaint_To_v1beta1_MachineTaint(in, out, s)
+}
+
func autoConvert_v1beta1_MachineTemplateSpec_To_v1beta2_MachineTemplateSpec(in *MachineTemplateSpec, out *v1beta2.MachineTemplateSpec, s conversion.Scope) error {
if err := Convert_v1beta1_ObjectMeta_To_v1beta2_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
return err
@@ -3504,6 +3702,20 @@ func autoConvert_v1beta2_Topology_To_v1beta1_Topology(in *v1beta2.Topology, out
return nil
}
+func autoConvert_v1beta1_UnhealthyMachineCondition_To_v1beta2_UnhealthyMachineCondition(in *UnhealthyMachineCondition, out *v1beta2.UnhealthyMachineCondition, s conversion.Scope) error {
+ out.Type = in.Type
+ out.Status = v1.ConditionStatus(in.Status)
+ // WARNING: in.Timeout requires manual conversion: does not exist in peer-type
+ return nil
+}
+
+func autoConvert_v1beta2_UnhealthyMachineCondition_To_v1beta1_UnhealthyMachineCondition(in *v1beta2.UnhealthyMachineCondition, out *UnhealthyMachineCondition, s conversion.Scope) error {
+ out.Type = in.Type
+ out.Status = v1.ConditionStatus(in.Status)
+ // WARNING: in.TimeoutSeconds requires manual conversion: does not exist in peer-type
+ return nil
+}
+
func autoConvert_v1beta1_ValidationRule_To_v1beta2_ValidationRule(in *ValidationRule, out *v1beta2.ValidationRule, s conversion.Scope) error {
out.Rule = in.Rule
out.Message = in.Message
diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/zz_generated.deepcopy.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/zz_generated.deepcopy.go
index a1b090669cb4..973774e851f1 100644
--- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/zz_generated.deepcopy.go
+++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/zz_generated.deepcopy.go
@@ -232,6 +232,12 @@ func (in *ClusterClassSpec) DeepCopyInto(out *ClusterClassSpec) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
+ out.Upgrade = in.Upgrade
+ if in.KubernetesVersions != nil {
+ in, out := &in.KubernetesVersions, &out.KubernetesVersions
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterClassSpec.
@@ -317,6 +323,37 @@ func (in *ClusterClassStatusVariableDefinition) DeepCopy() *ClusterClassStatusVa
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ClusterClassUpgrade) DeepCopyInto(out *ClusterClassUpgrade) {
+ *out = *in
+ out.External = in.External
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterClassUpgrade.
+func (in *ClusterClassUpgrade) DeepCopy() *ClusterClassUpgrade {
+ if in == nil {
+ return nil
+ }
+ out := new(ClusterClassUpgrade)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ClusterClassUpgradeExternal) DeepCopyInto(out *ClusterClassUpgradeExternal) {
+ *out = *in
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterClassUpgradeExternal.
+func (in *ClusterClassUpgradeExternal) DeepCopy() *ClusterClassUpgradeExternal {
+ if in == nil {
+ return nil
+ }
+ out := new(ClusterClassUpgradeExternal)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterClassV1Beta2Status) DeepCopyInto(out *ClusterClassV1Beta2Status) {
*out = *in
@@ -692,6 +729,11 @@ func (in *ControlPlaneClass) DeepCopyInto(out *ControlPlaneClass) {
*out = new(metav1.Duration)
**out = **in
}
+ if in.Taints != nil {
+ in, out := &in.Taints, &out.Taints
+ *out = make([]MachineTaint, len(*in))
+ copy(*out, *in)
+ }
if in.ReadinessGates != nil {
in, out := &in.ReadinessGates, &out.ReadinessGates
*out = make([]MachineReadinessGate, len(*in))
@@ -738,6 +780,7 @@ func (in *ControlPlaneTopology) DeepCopyInto(out *ControlPlaneTopology) {
*out = new(int32)
**out = **in
}
+ in.Rollout.DeepCopyInto(&out.Rollout)
if in.MachineHealthCheck != nil {
in, out := &in.MachineHealthCheck, &out.MachineHealthCheck
*out = new(MachineHealthCheckTopology)
@@ -758,6 +801,11 @@ func (in *ControlPlaneTopology) DeepCopyInto(out *ControlPlaneTopology) {
*out = new(metav1.Duration)
**out = **in
}
+ if in.Taints != nil {
+ in, out := &in.Taints, &out.Taints
+ *out = make([]MachineTaint, len(*in))
+ copy(*out, *in)
+ }
if in.ReadinessGates != nil {
in, out := &in.ReadinessGates, &out.ReadinessGates
*out = make([]MachineReadinessGate, len(*in))
@@ -780,6 +828,22 @@ func (in *ControlPlaneTopology) DeepCopy() *ControlPlaneTopology {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ControlPlaneTopologyRolloutSpec) DeepCopyInto(out *ControlPlaneTopologyRolloutSpec) {
+ *out = *in
+ in.After.DeepCopyInto(&out.After)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneTopologyRolloutSpec.
+func (in *ControlPlaneTopologyRolloutSpec) DeepCopy() *ControlPlaneTopologyRolloutSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(ControlPlaneTopologyRolloutSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ControlPlaneVariables) DeepCopyInto(out *ControlPlaneVariables) {
*out = *in
@@ -1247,6 +1311,11 @@ func (in *MachineDeploymentClass) DeepCopyInto(out *MachineDeploymentClass) {
*out = new(metav1.Duration)
**out = **in
}
+ if in.Taints != nil {
+ in, out := &in.Taints, &out.Taints
+ *out = make([]MachineTaint, len(*in))
+ copy(*out, *in)
+ }
if in.MinReadySeconds != nil {
in, out := &in.MinReadySeconds, &out.MinReadySeconds
*out = new(int32)
@@ -1481,6 +1550,11 @@ func (in *MachineDeploymentTopology) DeepCopyInto(out *MachineDeploymentTopology
*out = new(metav1.Duration)
**out = **in
}
+ if in.Taints != nil {
+ in, out := &in.Taints, &out.Taints
+ *out = make([]MachineTaint, len(*in))
+ copy(*out, *in)
+ }
if in.MinReadySeconds != nil {
in, out := &in.MinReadySeconds, &out.MinReadySeconds
*out = new(int32)
@@ -1491,6 +1565,7 @@ func (in *MachineDeploymentTopology) DeepCopyInto(out *MachineDeploymentTopology
*out = make([]MachineReadinessGate, len(*in))
copy(*out, *in)
}
+ in.Rollout.DeepCopyInto(&out.Rollout)
if in.Strategy != nil {
in, out := &in.Strategy, &out.Strategy
*out = new(MachineDeploymentStrategy)
@@ -1513,6 +1588,22 @@ func (in *MachineDeploymentTopology) DeepCopy() *MachineDeploymentTopology {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *MachineDeploymentTopologyRolloutSpec) DeepCopyInto(out *MachineDeploymentTopologyRolloutSpec) {
+ *out = *in
+ in.After.DeepCopyInto(&out.After)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeploymentTopologyRolloutSpec.
+func (in *MachineDeploymentTopologyRolloutSpec) DeepCopy() *MachineDeploymentTopologyRolloutSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(MachineDeploymentTopologyRolloutSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MachineDeploymentV1Beta2Status) DeepCopyInto(out *MachineDeploymentV1Beta2Status) {
*out = *in
@@ -1765,6 +1856,11 @@ func (in *MachineHealthCheckClass) DeepCopyInto(out *MachineHealthCheckClass) {
*out = make([]UnhealthyCondition, len(*in))
copy(*out, *in)
}
+ if in.UnhealthyMachineConditions != nil {
+ in, out := &in.UnhealthyMachineConditions, &out.UnhealthyMachineConditions
+ *out = make([]UnhealthyMachineCondition, len(*in))
+ copy(*out, *in)
+ }
if in.MaxUnhealthy != nil {
in, out := &in.MaxUnhealthy, &out.MaxUnhealthy
*out = new(intstr.IntOrString)
@@ -1838,6 +1934,11 @@ func (in *MachineHealthCheckSpec) DeepCopyInto(out *MachineHealthCheckSpec) {
*out = make([]UnhealthyCondition, len(*in))
copy(*out, *in)
}
+ if in.UnhealthyMachineConditions != nil {
+ in, out := &in.UnhealthyMachineConditions, &out.UnhealthyMachineConditions
+ *out = make([]UnhealthyMachineCondition, len(*in))
+ copy(*out, *in)
+ }
if in.MaxUnhealthy != nil {
in, out := &in.MaxUnhealthy, &out.MaxUnhealthy
*out = new(intstr.IntOrString)
@@ -2048,6 +2149,11 @@ func (in *MachinePoolClass) DeepCopyInto(out *MachinePoolClass) {
*out = new(metav1.Duration)
**out = **in
}
+ if in.Taints != nil {
+ in, out := &in.Taints, &out.Taints
+ *out = make([]MachineTaint, len(*in))
+ copy(*out, *in)
+ }
if in.MinReadySeconds != nil {
in, out := &in.MinReadySeconds, &out.MinReadySeconds
*out = new(int32)
@@ -2237,6 +2343,11 @@ func (in *MachinePoolTopology) DeepCopyInto(out *MachinePoolTopology) {
*out = new(metav1.Duration)
**out = **in
}
+ if in.Taints != nil {
+ in, out := &in.Taints, &out.Taints
+ *out = make([]MachineTaint, len(*in))
+ copy(*out, *in)
+ }
if in.MinReadySeconds != nil {
in, out := &in.MinReadySeconds, &out.MinReadySeconds
*out = new(int32)
@@ -2568,6 +2679,11 @@ func (in *MachineSpec) DeepCopyInto(out *MachineSpec) {
*out = new(metav1.Duration)
**out = **in
}
+ if in.Taints != nil {
+ in, out := &in.Taints, &out.Taints
+ *out = make([]MachineTaint, len(*in))
+ copy(*out, *in)
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSpec.
@@ -2645,6 +2761,21 @@ func (in *MachineStatus) DeepCopy() *MachineStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *MachineTaint) DeepCopyInto(out *MachineTaint) {
+ *out = *in
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineTaint.
+func (in *MachineTaint) DeepCopy() *MachineTaint {
+ if in == nil {
+ return nil
+ }
+ out := new(MachineTaint)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MachineTemplateSpec) DeepCopyInto(out *MachineTemplateSpec) {
*out = *in
@@ -2905,6 +3036,22 @@ func (in *UnhealthyCondition) DeepCopy() *UnhealthyCondition {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *UnhealthyMachineCondition) DeepCopyInto(out *UnhealthyMachineCondition) {
+ *out = *in
+ out.Timeout = in.Timeout
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnhealthyMachineCondition.
+func (in *UnhealthyMachineCondition) DeepCopy() *UnhealthyMachineCondition {
+ if in == nil {
+ return nil
+ }
+ out := new(UnhealthyMachineCondition)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ValidationRule) DeepCopyInto(out *ValidationRule) {
*out = *in
diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/zz_generated.openapi.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/zz_generated.openapi.go
deleted file mode 100644
index 723cf5a90c93..000000000000
--- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/zz_generated.openapi.go
+++ /dev/null
@@ -1,5425 +0,0 @@
-//go:build !ignore_autogenerated
-// +build !ignore_autogenerated
-
-/*
-Copyright The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by openapi-gen. DO NOT EDIT.
-
-package v1beta1
-
-import (
- common "k8s.io/kube-openapi/pkg/common"
- spec "k8s.io/kube-openapi/pkg/validation/spec"
-)
-
-func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition {
- return map[string]common.OpenAPIDefinition{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.APIEndpoint": schema_cluster_api_api_core_v1beta1_APIEndpoint(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.Bootstrap": schema_cluster_api_api_core_v1beta1_Bootstrap(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster": schema_cluster_api_api_core_v1beta1_Cluster(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterAvailabilityGate": schema_cluster_api_api_core_v1beta1_ClusterAvailabilityGate(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClass": schema_cluster_api_api_core_v1beta1_ClusterClass(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassList": schema_cluster_api_api_core_v1beta1_ClusterClassList(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassPatch": schema_cluster_api_api_core_v1beta1_ClusterClassPatch(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassSpec": schema_cluster_api_api_core_v1beta1_ClusterClassSpec(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatus": schema_cluster_api_api_core_v1beta1_ClusterClassStatus(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatusVariable": schema_cluster_api_api_core_v1beta1_ClusterClassStatusVariable(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatusVariableDefinition": schema_cluster_api_api_core_v1beta1_ClusterClassStatusVariableDefinition(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassV1Beta2Status": schema_cluster_api_api_core_v1beta1_ClusterClassV1Beta2Status(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariable": schema_cluster_api_api_core_v1beta1_ClusterClassVariable(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariableMetadata": schema_cluster_api_api_core_v1beta1_ClusterClassVariableMetadata(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterControlPlaneStatus": schema_cluster_api_api_core_v1beta1_ClusterControlPlaneStatus(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterList": schema_cluster_api_api_core_v1beta1_ClusterList(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterNetwork": schema_cluster_api_api_core_v1beta1_ClusterNetwork(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterSpec": schema_cluster_api_api_core_v1beta1_ClusterSpec(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterStatus": schema_cluster_api_api_core_v1beta1_ClusterStatus(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterV1Beta2Status": schema_cluster_api_api_core_v1beta1_ClusterV1Beta2Status(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterVariable": schema_cluster_api_api_core_v1beta1_ClusterVariable(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition": schema_cluster_api_api_core_v1beta1_Condition(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneClass": schema_cluster_api_api_core_v1beta1_ControlPlaneClass(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneClassNamingStrategy": schema_cluster_api_api_core_v1beta1_ControlPlaneClassNamingStrategy(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneTopology": schema_cluster_api_api_core_v1beta1_ControlPlaneTopology(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneVariables": schema_cluster_api_api_core_v1beta1_ControlPlaneVariables(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ExternalPatchDefinition": schema_cluster_api_api_core_v1beta1_ExternalPatchDefinition(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.FailureDomainSpec": schema_cluster_api_api_core_v1beta1_FailureDomainSpec(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.InfrastructureNamingStrategy": schema_cluster_api_api_core_v1beta1_InfrastructureNamingStrategy(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.JSONPatch": schema_cluster_api_api_core_v1beta1_JSONPatch(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.JSONPatchValue": schema_cluster_api_api_core_v1beta1_JSONPatchValue(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps": schema_cluster_api_api_core_v1beta1_JSONSchemaProps(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate": schema_cluster_api_api_core_v1beta1_LocalObjectTemplate(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.Machine": schema_cluster_api_api_core_v1beta1_Machine(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineAddress": schema_cluster_api_api_core_v1beta1_MachineAddress(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeletionStatus": schema_cluster_api_api_core_v1beta1_MachineDeletionStatus(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeployment": schema_cluster_api_api_core_v1beta1_MachineDeployment(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClass": schema_cluster_api_api_core_v1beta1_MachineDeploymentClass(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClassNamingStrategy": schema_cluster_api_api_core_v1beta1_MachineDeploymentClassNamingStrategy(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClassTemplate": schema_cluster_api_api_core_v1beta1_MachineDeploymentClassTemplate(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentList": schema_cluster_api_api_core_v1beta1_MachineDeploymentList(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentSpec": schema_cluster_api_api_core_v1beta1_MachineDeploymentSpec(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStatus": schema_cluster_api_api_core_v1beta1_MachineDeploymentStatus(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy": schema_cluster_api_api_core_v1beta1_MachineDeploymentStrategy(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentTopology": schema_cluster_api_api_core_v1beta1_MachineDeploymentTopology(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentV1Beta2Status": schema_cluster_api_api_core_v1beta1_MachineDeploymentV1Beta2Status(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentVariables": schema_cluster_api_api_core_v1beta1_MachineDeploymentVariables(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRule": schema_cluster_api_api_core_v1beta1_MachineDrainRule(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleDrainConfig": schema_cluster_api_api_core_v1beta1_MachineDrainRuleDrainConfig(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleList": schema_cluster_api_api_core_v1beta1_MachineDrainRuleList(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleMachineSelector": schema_cluster_api_api_core_v1beta1_MachineDrainRuleMachineSelector(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRulePodSelector": schema_cluster_api_api_core_v1beta1_MachineDrainRulePodSelector(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleSpec": schema_cluster_api_api_core_v1beta1_MachineDrainRuleSpec(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheck": schema_cluster_api_api_core_v1beta1_MachineHealthCheck(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckClass": schema_cluster_api_api_core_v1beta1_MachineHealthCheckClass(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckList": schema_cluster_api_api_core_v1beta1_MachineHealthCheckList(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckSpec": schema_cluster_api_api_core_v1beta1_MachineHealthCheckSpec(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckStatus": schema_cluster_api_api_core_v1beta1_MachineHealthCheckStatus(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckTopology": schema_cluster_api_api_core_v1beta1_MachineHealthCheckTopology(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckV1Beta2Status": schema_cluster_api_api_core_v1beta1_MachineHealthCheckV1Beta2Status(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineList": schema_cluster_api_api_core_v1beta1_MachineList(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineNamingStrategy": schema_cluster_api_api_core_v1beta1_MachineNamingStrategy(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePool": schema_cluster_api_api_core_v1beta1_MachinePool(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClass": schema_cluster_api_api_core_v1beta1_MachinePoolClass(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClassNamingStrategy": schema_cluster_api_api_core_v1beta1_MachinePoolClassNamingStrategy(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClassTemplate": schema_cluster_api_api_core_v1beta1_MachinePoolClassTemplate(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolList": schema_cluster_api_api_core_v1beta1_MachinePoolList(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolSpec": schema_cluster_api_api_core_v1beta1_MachinePoolSpec(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolStatus": schema_cluster_api_api_core_v1beta1_MachinePoolStatus(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolTopology": schema_cluster_api_api_core_v1beta1_MachinePoolTopology(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolV1Beta2Status": schema_cluster_api_api_core_v1beta1_MachinePoolV1Beta2Status(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolVariables": schema_cluster_api_api_core_v1beta1_MachinePoolVariables(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate": schema_cluster_api_api_core_v1beta1_MachineReadinessGate(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineRollingUpdateDeployment": schema_cluster_api_api_core_v1beta1_MachineRollingUpdateDeployment(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSet": schema_cluster_api_api_core_v1beta1_MachineSet(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetList": schema_cluster_api_api_core_v1beta1_MachineSetList(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetSpec": schema_cluster_api_api_core_v1beta1_MachineSetSpec(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetStatus": schema_cluster_api_api_core_v1beta1_MachineSetStatus(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetV1Beta2Status": schema_cluster_api_api_core_v1beta1_MachineSetV1Beta2Status(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSpec": schema_cluster_api_api_core_v1beta1_MachineSpec(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineStatus": schema_cluster_api_api_core_v1beta1_MachineStatus(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTemplateSpec": schema_cluster_api_api_core_v1beta1_MachineTemplateSpec(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineV1Beta2Status": schema_cluster_api_api_core_v1beta1_MachineV1Beta2Status(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.NetworkRanges": schema_cluster_api_api_core_v1beta1_NetworkRanges(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta": schema_cluster_api_api_core_v1beta1_ObjectMeta(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.PatchDefinition": schema_cluster_api_api_core_v1beta1_PatchDefinition(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelector": schema_cluster_api_api_core_v1beta1_PatchSelector(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelectorMatch": schema_cluster_api_api_core_v1beta1_PatchSelectorMatch(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelectorMatchMachineDeploymentClass": schema_cluster_api_api_core_v1beta1_PatchSelectorMatchMachineDeploymentClass(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelectorMatchMachinePoolClass": schema_cluster_api_api_core_v1beta1_PatchSelectorMatchMachinePoolClass(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.RemediationStrategy": schema_cluster_api_api_core_v1beta1_RemediationStrategy(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.Topology": schema_cluster_api_api_core_v1beta1_Topology(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition": schema_cluster_api_api_core_v1beta1_UnhealthyCondition(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ValidationRule": schema_cluster_api_api_core_v1beta1_ValidationRule(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.VariableSchema": schema_cluster_api_api_core_v1beta1_VariableSchema(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.VariableSchemaMetadata": schema_cluster_api_api_core_v1beta1_VariableSchemaMetadata(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersClass": schema_cluster_api_api_core_v1beta1_WorkersClass(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersStatus": schema_cluster_api_api_core_v1beta1_WorkersStatus(ref),
- "sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersTopology": schema_cluster_api_api_core_v1beta1_WorkersTopology(ref),
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_APIEndpoint(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "APIEndpoint represents a reachable Kubernetes API endpoint.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "host": {
- SchemaProps: spec.SchemaProps{
- Description: "host is the hostname on which the API server is serving.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "port": {
- SchemaProps: spec.SchemaProps{
- Description: "port is the port on which the API server is serving.",
- Default: 0,
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- },
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_Bootstrap(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "Bootstrap encapsulates fields to configure the Machine’s bootstrapping mechanism.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "configRef": {
- SchemaProps: spec.SchemaProps{
- Description: "configRef is a reference to a bootstrap provider-specific resource that holds configuration details. The reference is optional to allow users/operators to specify Bootstrap.DataSecretName without the need of a controller.",
- Ref: ref("k8s.io/api/core/v1.ObjectReference"),
- },
- },
- "dataSecretName": {
- SchemaProps: spec.SchemaProps{
- Description: "dataSecretName is the name of the secret that stores the bootstrap data script. If nil, the Machine should remain in the Pending state.",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/api/core/v1.ObjectReference"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_Cluster(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "Cluster is the Schema for the clusters API.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "kind": {
- SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
- Type: []string{"string"},
- Format: "",
- },
- },
- "apiVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
- Type: []string{"string"},
- Format: "",
- },
- },
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
- },
- },
- "spec": {
- SchemaProps: spec.SchemaProps{
- Description: "spec is the desired state of Cluster.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterSpec"),
- },
- },
- "status": {
- SchemaProps: spec.SchemaProps{
- Description: "status is the observed state of Cluster.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterStatus"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterStatus"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ClusterAvailabilityGate(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ClusterAvailabilityGate contains the type of a Cluster condition to be used as availability gate.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "conditionType": {
- SchemaProps: spec.SchemaProps{
- Description: "conditionType refers to a condition with matching type in the Cluster's condition list. If the conditions doesn't exist, it will be treated as unknown. Note: Both Cluster API conditions or conditions added by 3rd party controllers can be used as availability gates.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "polarity": {
- SchemaProps: spec.SchemaProps{
- Description: "polarity of the conditionType specified in this availabilityGate. Valid values are Positive, Negative and omitted. When omitted, the default behaviour will be Positive. A positive polarity means that the condition should report a true status under normal conditions. A negative polarity means that the condition should report a false status under normal conditions.",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- Required: []string{"conditionType"},
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ClusterClass(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ClusterClass is a template which can be used to create managed topologies.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "kind": {
- SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
- Type: []string{"string"},
- Format: "",
- },
- },
- "apiVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
- Type: []string{"string"},
- Format: "",
- },
- },
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
- },
- },
- "spec": {
- SchemaProps: spec.SchemaProps{
- Description: "spec is the desired state of ClusterClass.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassSpec"),
- },
- },
- "status": {
- SchemaProps: spec.SchemaProps{
- Description: "status is the observed state of ClusterClass.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatus"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatus"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ClusterClassList(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ClusterClassList contains a list of Cluster.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "kind": {
- SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
- Type: []string{"string"},
- Format: "",
- },
- },
- "apiVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
- Type: []string{"string"},
- Format: "",
- },
- },
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds",
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"),
- },
- },
- "items": {
- SchemaProps: spec.SchemaProps{
- Description: "items is the list of ClusterClasses.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClass"),
- },
- },
- },
- },
- },
- },
- Required: []string{"items"},
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClass"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ClusterClassPatch(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ClusterClassPatch defines a patch which is applied to customize the referenced templates.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "name": {
- SchemaProps: spec.SchemaProps{
- Description: "name of the patch.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "description": {
- SchemaProps: spec.SchemaProps{
- Description: "description is a human-readable description of this patch.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "enabledIf": {
- SchemaProps: spec.SchemaProps{
- Description: "enabledIf is a Go template to be used to calculate if a patch should be enabled. It can reference variables defined in .spec.variables and builtin variables. The patch will be enabled if the template evaluates to `true`, otherwise it will be disabled. If EnabledIf is not set, the patch will be enabled per default.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "definitions": {
- SchemaProps: spec.SchemaProps{
- Description: "definitions define inline patches. Note: Patches will be applied in the order of the array. Note: Exactly one of Definitions or External must be set.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.PatchDefinition"),
- },
- },
- },
- },
- },
- "external": {
- SchemaProps: spec.SchemaProps{
- Description: "external defines an external patch. Note: Exactly one of Definitions or External must be set.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ExternalPatchDefinition"),
- },
- },
- },
- Required: []string{"name"},
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ExternalPatchDefinition", "sigs.k8s.io/cluster-api/api/core/v1beta1.PatchDefinition"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ClusterClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ClusterClassSpec describes the desired state of the ClusterClass.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "availabilityGates": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "conditionType",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "availabilityGates specifies additional conditions to include when evaluating Cluster Available condition.\n\nNOTE: this field is considered only for computing v1beta2 conditions. NOTE: If a Cluster is using this ClusterClass, and this Cluster defines a custom list of availabilityGates, such list overrides availabilityGates defined in this field.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterAvailabilityGate"),
- },
- },
- },
- },
- },
- "infrastructure": {
- SchemaProps: spec.SchemaProps{
- Description: "infrastructure is a reference to a provider-specific template that holds the details for provisioning infrastructure specific cluster for the underlying provider. The underlying provider is responsible for the implementation of the template to an infrastructure cluster.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate"),
- },
- },
- "infrastructureNamingStrategy": {
- SchemaProps: spec.SchemaProps{
- Description: "infrastructureNamingStrategy allows changing the naming pattern used when creating the infrastructure object.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.InfrastructureNamingStrategy"),
- },
- },
- "controlPlane": {
- SchemaProps: spec.SchemaProps{
- Description: "controlPlane is a reference to a local struct that holds the details for provisioning the Control Plane for the Cluster.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneClass"),
- },
- },
- "workers": {
- SchemaProps: spec.SchemaProps{
- Description: "workers describes the worker nodes for the cluster. It is a collection of node types which can be used to create the worker nodes of the cluster.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersClass"),
- },
- },
- "variables": {
- SchemaProps: spec.SchemaProps{
- Description: "variables defines the variables which can be configured in the Cluster topology and are then used in patches.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariable"),
- },
- },
- },
- },
- },
- "patches": {
- SchemaProps: spec.SchemaProps{
- Description: "patches defines the patches which are applied to customize referenced templates of a ClusterClass. Note: Patches will be applied in the order of the array.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassPatch"),
- },
- },
- },
- },
- },
- },
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterAvailabilityGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassPatch", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariable", "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneClass", "sigs.k8s.io/cluster-api/api/core/v1beta1.InfrastructureNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersClass"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ClusterClassStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ClusterClassStatus defines the observed state of the ClusterClass.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "variables": {
- SchemaProps: spec.SchemaProps{
- Description: "variables is a list of ClusterClassStatusVariable that are defined for the ClusterClass.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatusVariable"),
- },
- },
- },
- },
- },
- "conditions": {
- SchemaProps: spec.SchemaProps{
- Description: "conditions defines current observed state of the ClusterClass.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"),
- },
- },
- },
- },
- },
- "observedGeneration": {
- SchemaProps: spec.SchemaProps{
- Description: "observedGeneration is the latest generation observed by the controller.",
- Type: []string{"integer"},
- Format: "int64",
- },
- },
- "v1beta2": {
- SchemaProps: spec.SchemaProps{
- Description: "v1beta2 groups all the fields that will be added or modified in ClusterClass's status with the V1Beta2 version.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassV1Beta2Status"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatusVariable", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassV1Beta2Status", "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ClusterClassStatusVariable(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ClusterClassStatusVariable defines a variable which appears in the status of a ClusterClass.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "name": {
- SchemaProps: spec.SchemaProps{
- Description: "name is the name of the variable.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "definitionsConflict": {
- SchemaProps: spec.SchemaProps{
- Description: "definitionsConflict specifies whether or not there are conflicting definitions for a single variable name.",
- Default: false,
- Type: []string{"boolean"},
- Format: "",
- },
- },
- "definitions": {
- SchemaProps: spec.SchemaProps{
- Description: "definitions is a list of definitions for a variable.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatusVariableDefinition"),
- },
- },
- },
- },
- },
- },
- Required: []string{"name", "definitions"},
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassStatusVariableDefinition"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ClusterClassStatusVariableDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ClusterClassStatusVariableDefinition defines a variable which appears in the status of a ClusterClass.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "from": {
- SchemaProps: spec.SchemaProps{
- Description: "from specifies the origin of the variable definition. This will be `inline` for variables defined in the ClusterClass or the name of a patch defined in the ClusterClass for variables discovered from a DiscoverVariables runtime extensions.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "required": {
- SchemaProps: spec.SchemaProps{
- Description: "required specifies if the variable is required. Note: this applies to the variable as a whole and thus the top-level object defined in the schema. If nested fields are required, this will be specified inside the schema.",
- Default: false,
- Type: []string{"boolean"},
- Format: "",
- },
- },
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the metadata of a variable. It can be used to add additional data for higher level tools to a ClusterClassVariable.\n\nDeprecated: This field is deprecated and is going to be removed in the next apiVersion.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariableMetadata"),
- },
- },
- "schema": {
- SchemaProps: spec.SchemaProps{
- Description: "schema defines the schema of the variable.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.VariableSchema"),
- },
- },
- },
- Required: []string{"from", "required", "schema"},
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariableMetadata", "sigs.k8s.io/cluster-api/api/core/v1beta1.VariableSchema"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ClusterClassV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ClusterClassV1Beta2Status groups all the fields that will be added or modified in ClusterClass with the V1Beta2 version. See https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more context.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "conditions": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "type",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "conditions represents the observations of a ClusterClass's current state. Known condition types are VariablesReady, RefVersionsUpToDate, Paused.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"),
- },
- },
- },
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ClusterClassVariable(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ClusterClassVariable defines a variable which can be configured in the Cluster topology and used in patches.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "name": {
- SchemaProps: spec.SchemaProps{
- Description: "name of the variable.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "required": {
- SchemaProps: spec.SchemaProps{
- Description: "required specifies if the variable is required. Note: this applies to the variable as a whole and thus the top-level object defined in the schema. If nested fields are required, this will be specified inside the schema.",
- Default: false,
- Type: []string{"boolean"},
- Format: "",
- },
- },
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the metadata of a variable. It can be used to add additional data for higher level tools to a ClusterClassVariable.\n\nDeprecated: This field is deprecated and is going to be removed in the next apiVersion. Please use XMetadata in JSONSchemaProps instead.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariableMetadata"),
- },
- },
- "schema": {
- SchemaProps: spec.SchemaProps{
- Description: "schema defines the schema of the variable.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.VariableSchema"),
- },
- },
- },
- Required: []string{"name", "required", "schema"},
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterClassVariableMetadata", "sigs.k8s.io/cluster-api/api/core/v1beta1.VariableSchema"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ClusterClassVariableMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ClusterClassVariableMetadata is the metadata of a variable. It can be used to add additional data for higher level tools to a ClusterClassVariable.\n\nDeprecated: This struct is deprecated and is going to be removed in the next apiVersion.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "labels": {
- SchemaProps: spec.SchemaProps{
- Description: "labels is a map of string keys and values that can be used to organize and categorize (scope and select) variables.",
- Type: []string{"object"},
- AdditionalProperties: &spec.SchemaOrBool{
- Allows: true,
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- "annotations": {
- SchemaProps: spec.SchemaProps{
- Description: "annotations is an unstructured key value map that can be used to store and retrieve arbitrary metadata. They are not queryable.",
- Type: []string{"object"},
- AdditionalProperties: &spec.SchemaOrBool{
- Allows: true,
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- },
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ClusterControlPlaneStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ClusterControlPlaneStatus groups all the observations about control plane current state.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "desiredReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "desiredReplicas is the total number of desired control plane machines in this cluster.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "replicas": {
- SchemaProps: spec.SchemaProps{
- Description: "replicas is the total number of control plane machines in this cluster. NOTE: replicas also includes machines still being provisioned or being deleted.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "upToDateReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "upToDateReplicas is the number of up-to-date control plane machines in this cluster. A machine is considered up-to-date when Machine's UpToDate condition is true.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "readyReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "readyReplicas is the total number of ready control plane machines in this cluster. A machine is considered ready when Machine's Ready condition is true.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "availableReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "availableReplicas is the total number of available control plane machines in this cluster. A machine is considered available when Machine's Available condition is true.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- },
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ClusterList(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ClusterList contains a list of Cluster.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "kind": {
- SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
- Type: []string{"string"},
- Format: "",
- },
- },
- "apiVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
- Type: []string{"string"},
- Format: "",
- },
- },
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds",
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"),
- },
- },
- "items": {
- SchemaProps: spec.SchemaProps{
- Description: "items is the list of Clusters.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"),
- },
- },
- },
- },
- },
- },
- Required: []string{"items"},
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.Cluster"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ClusterNetwork(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ClusterNetwork specifies the different networking parameters for a cluster.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "apiServerPort": {
- SchemaProps: spec.SchemaProps{
- Description: "apiServerPort specifies the port the API Server should bind to. Defaults to 6443.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "services": {
- SchemaProps: spec.SchemaProps{
- Description: "services is the network ranges from which service VIPs are allocated.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.NetworkRanges"),
- },
- },
- "pods": {
- SchemaProps: spec.SchemaProps{
- Description: "pods is the network ranges from which Pod networks are allocated.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.NetworkRanges"),
- },
- },
- "serviceDomain": {
- SchemaProps: spec.SchemaProps{
- Description: "serviceDomain is the domain name for services.",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.NetworkRanges"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ClusterSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ClusterSpec defines the desired state of Cluster.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "paused": {
- SchemaProps: spec.SchemaProps{
- Description: "paused can be used to prevent controllers from processing the Cluster and all its associated objects.",
- Type: []string{"boolean"},
- Format: "",
- },
- },
- "clusterNetwork": {
- SchemaProps: spec.SchemaProps{
- Description: "clusterNetwork represents the cluster network configuration.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterNetwork"),
- },
- },
- "controlPlaneEndpoint": {
- SchemaProps: spec.SchemaProps{
- Description: "controlPlaneEndpoint represents the endpoint used to communicate with the control plane.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.APIEndpoint"),
- },
- },
- "controlPlaneRef": {
- SchemaProps: spec.SchemaProps{
- Description: "controlPlaneRef is an optional reference to a provider-specific resource that holds the details for provisioning the Control Plane for a Cluster.",
- Ref: ref("k8s.io/api/core/v1.ObjectReference"),
- },
- },
- "infrastructureRef": {
- SchemaProps: spec.SchemaProps{
- Description: "infrastructureRef is a reference to a provider-specific resource that holds the details for provisioning infrastructure for a cluster in said provider.",
- Ref: ref("k8s.io/api/core/v1.ObjectReference"),
- },
- },
- "topology": {
- SchemaProps: spec.SchemaProps{
- Description: "topology encapsulates the topology for the cluster. NOTE: It is required to enable the ClusterTopology feature gate flag to activate managed topologies support; this feature is highly experimental, and parts of it might still be not implemented.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Topology"),
- },
- },
- "availabilityGates": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "conditionType",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "availabilityGates specifies additional conditions to include when evaluating Cluster Available condition.\n\nIf this field is not defined and the Cluster implements a managed topology, availabilityGates from the corresponding ClusterClass will be used, if any.\n\nNOTE: this field is considered only for computing v1beta2 conditions.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterAvailabilityGate"),
- },
- },
- },
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/api/core/v1.ObjectReference", "sigs.k8s.io/cluster-api/api/core/v1beta1.APIEndpoint", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterAvailabilityGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterNetwork", "sigs.k8s.io/cluster-api/api/core/v1beta1.Topology"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ClusterStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ClusterStatus defines the observed state of Cluster.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "failureDomains": {
- SchemaProps: spec.SchemaProps{
- Description: "failureDomains is a slice of failure domain objects synced from the infrastructure provider.",
- Type: []string{"object"},
- AdditionalProperties: &spec.SchemaOrBool{
- Allows: true,
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.FailureDomainSpec"),
- },
- },
- },
- },
- },
- "failureReason": {
- SchemaProps: spec.SchemaProps{
- Description: "failureReason indicates that there is a fatal problem reconciling the state, and will be set to a token value suitable for programmatic interpretation.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "failureMessage": {
- SchemaProps: spec.SchemaProps{
- Description: "failureMessage indicates that there is a fatal problem reconciling the state, and will be set to a descriptive error message.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "phase": {
- SchemaProps: spec.SchemaProps{
- Description: "phase represents the current phase of cluster actuation.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "infrastructureReady": {
- SchemaProps: spec.SchemaProps{
- Description: "infrastructureReady is the state of the infrastructure provider.",
- Default: false,
- Type: []string{"boolean"},
- Format: "",
- },
- },
- "controlPlaneReady": {
- SchemaProps: spec.SchemaProps{
- Description: "controlPlaneReady denotes if the control plane became ready during initial provisioning to receive requests. NOTE: this field is part of the Cluster API contract and it is used to orchestrate provisioning. The value of this field is never updated after provisioning is completed. Please use conditions to check the operational state of the control plane.",
- Default: false,
- Type: []string{"boolean"},
- Format: "",
- },
- },
- "conditions": {
- SchemaProps: spec.SchemaProps{
- Description: "conditions defines current service state of the cluster.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"),
- },
- },
- },
- },
- },
- "observedGeneration": {
- SchemaProps: spec.SchemaProps{
- Description: "observedGeneration is the latest generation observed by the controller.",
- Type: []string{"integer"},
- Format: "int64",
- },
- },
- "v1beta2": {
- SchemaProps: spec.SchemaProps{
- Description: "v1beta2 groups all the fields that will be added or modified in Cluster's status with the V1Beta2 version.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterV1Beta2Status"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterV1Beta2Status", "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta1.FailureDomainSpec"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ClusterV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ClusterV1Beta2Status groups all the fields that will be added or modified in Cluster with the V1Beta2 version. See https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more context.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "conditions": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "type",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "conditions represents the observations of a Cluster's current state. Known condition types are Available, InfrastructureReady, ControlPlaneInitialized, ControlPlaneAvailable, WorkersAvailable, MachinesReady MachinesUpToDate, RemoteConnectionProbe, ScalingUp, ScalingDown, Remediating, Deleting, Paused. Additionally, a TopologyReconciled condition will be added in case the Cluster is referencing a ClusterClass / defining a managed Topology.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"),
- },
- },
- },
- },
- },
- "controlPlane": {
- SchemaProps: spec.SchemaProps{
- Description: "controlPlane groups all the observations about Cluster's ControlPlane current state.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterControlPlaneStatus"),
- },
- },
- "workers": {
- SchemaProps: spec.SchemaProps{
- Description: "workers groups all the observations about Cluster's Workers current state.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersStatus"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterControlPlaneStatus", "sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersStatus"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ClusterVariable(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ClusterVariable can be used to customize the Cluster through patches. Each ClusterVariable is associated with a Variable definition in the ClusterClass `status` variables.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "name": {
- SchemaProps: spec.SchemaProps{
- Description: "name of the variable.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "definitionFrom": {
- SchemaProps: spec.SchemaProps{
- Description: "definitionFrom specifies where the definition of this Variable is from.\n\nDeprecated: This field is deprecated, must not be set anymore and is going to be removed in the next apiVersion.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "value": {
- SchemaProps: spec.SchemaProps{
- Description: "value of the variable. Note: the value will be validated against the schema of the corresponding ClusterClassVariable from the ClusterClass. Note: We have to use apiextensionsv1.JSON instead of a custom JSON type, because controller-tools has a hard-coded schema for apiextensionsv1.JSON which cannot be produced by another type via controller-tools, i.e. it is not possible to have no type field. Ref: https://github.com/kubernetes-sigs/controller-tools/blob/d0e03a142d0ecdd5491593e941ee1d6b5d91dba6/pkg/crd/known_types.go#L106-L111",
- Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"),
- },
- },
- },
- Required: []string{"name", "value"},
- },
- },
- Dependencies: []string{
- "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_Condition(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "Condition defines an observation of a Cluster API resource operational state.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "type": {
- SchemaProps: spec.SchemaProps{
- Description: "type of condition in CamelCase or in foo.example.com/CamelCase. Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "status": {
- SchemaProps: spec.SchemaProps{
- Description: "status of the condition, one of True, False, Unknown.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "severity": {
- SchemaProps: spec.SchemaProps{
- Description: "severity provides an explicit classification of Reason code, so the users or machines can immediately understand the current situation and act accordingly. The Severity field MUST be set only when Status=False.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "lastTransitionTime": {
- SchemaProps: spec.SchemaProps{
- Description: "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"),
- },
- },
- "reason": {
- SchemaProps: spec.SchemaProps{
- Description: "reason is the reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. This field may be empty.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "message": {
- SchemaProps: spec.SchemaProps{
- Description: "message is a human readable message indicating details about the transition. This field may be empty.",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- Required: []string{"type", "status", "lastTransitionTime"},
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.Time"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ControlPlaneClass(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ControlPlaneClass defines the class for the control plane.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the metadata applied to the ControlPlane and the Machines of the ControlPlane if the ControlPlaneTemplate referenced is machine based. If not, it is applied only to the ControlPlane. At runtime this metadata is merged with the corresponding metadata from the topology.\n\nThis field is supported if and only if the control plane provider template referenced is Machine based.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"),
- },
- },
- "ref": {
- SchemaProps: spec.SchemaProps{
- Description: "ref is a required reference to a custom resource offered by a provider.",
- Ref: ref("k8s.io/api/core/v1.ObjectReference"),
- },
- },
- "machineInfrastructure": {
- SchemaProps: spec.SchemaProps{
- Description: "machineInfrastructure defines the metadata and infrastructure information for control plane machines.\n\nThis field is supported if and only if the control plane provider template referenced above is Machine based and supports setting replicas.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate"),
- },
- },
- "machineHealthCheck": {
- SchemaProps: spec.SchemaProps{
- Description: "machineHealthCheck defines a MachineHealthCheck for this ControlPlaneClass. This field is supported if and only if the ControlPlane provider template referenced above is Machine based and supports setting replicas.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckClass"),
- },
- },
- "namingStrategy": {
- SchemaProps: spec.SchemaProps{
- Description: "namingStrategy allows changing the naming pattern used when creating the control plane provider object.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneClassNamingStrategy"),
- },
- },
- "nodeDrainTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. The default value is 0, meaning that the node can be drained without any time limitations. NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` NOTE: This value can be overridden while defining a Cluster.Topology.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "nodeVolumeDetachTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. NOTE: This value can be overridden while defining a Cluster.Topology.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "nodeDeletionTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. Defaults to 10 seconds. NOTE: This value can be overridden while defining a Cluster.Topology.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "readinessGates": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "conditionType",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "readinessGates specifies additional conditions to include when evaluating Machine Ready condition.\n\nThis field can be used e.g. to instruct the machine controller to include in the computation for Machine's ready computation a condition, managed by an external controllers, reporting the status of special software/hardware installed on the Machine.\n\nNOTE: This field is considered only for computing v1beta2 conditions. NOTE: If a Cluster defines a custom list of readinessGates for the control plane, such list overrides readinessGates defined in this field. NOTE: Specific control plane provider implementations might automatically extend the list of readinessGates; e.g. the kubeadm control provider adds ReadinessGates for the APIServerPodHealthy, SchedulerPodHealthy conditions, etc.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate"),
- },
- },
- },
- },
- },
- },
- Required: []string{"ref"},
- },
- },
- Dependencies: []string{
- "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneClassNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckClass", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ControlPlaneClassNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ControlPlaneClassNamingStrategy defines the naming strategy for control plane objects.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "template": {
- SchemaProps: spec.SchemaProps{
- Description: "template defines the template to use for generating the name of the ControlPlane object. If not defined, it will fallback to `{{ .cluster.name }}-{{ .random }}`. If the templated string exceeds 63 characters, it will be trimmed to 58 characters and will get concatenated with a random suffix of length 5. The templating mechanism provides the following arguments: * `.cluster.name`: The name of the cluster object. * `.random`: A random alphanumeric string, without vowels, of length 5.",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ControlPlaneTopology(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ControlPlaneTopology specifies the parameters for the control plane nodes in the cluster.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the metadata applied to the ControlPlane and the Machines of the ControlPlane if the ControlPlaneTemplate referenced by the ClusterClass is machine based. If not, it is applied only to the ControlPlane. At runtime this metadata is merged with the corresponding metadata from the ClusterClass.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"),
- },
- },
- "replicas": {
- SchemaProps: spec.SchemaProps{
- Description: "replicas is the number of control plane nodes. If the value is nil, the ControlPlane object is created without the number of Replicas and it's assumed that the control plane controller does not implement support for this field. When specified against a control plane provider that lacks support for this field, this value will be ignored.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "machineHealthCheck": {
- SchemaProps: spec.SchemaProps{
- Description: "machineHealthCheck allows to enable, disable and override the MachineHealthCheck configuration in the ClusterClass for this control plane.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckTopology"),
- },
- },
- "nodeDrainTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. The default value is 0, meaning that the node can be drained without any time limitations. NOTE: NodeDrainTimeout is different from `kubectl drain --timeout`",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "nodeVolumeDetachTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "nodeDeletionTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. Defaults to 10 seconds.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "readinessGates": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "conditionType",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "readinessGates specifies additional conditions to include when evaluating Machine Ready condition.\n\nThis field can be used e.g. to instruct the machine controller to include in the computation for Machine's ready computation a condition, managed by an external controllers, reporting the status of special software/hardware installed on the Machine.\n\nIf this field is not defined, readinessGates from the corresponding ControlPlaneClass will be used, if any.\n\nNOTE: This field is considered only for computing v1beta2 conditions. NOTE: Specific control plane provider implementations might automatically extend the list of readinessGates; e.g. the kubeadm control provider adds ReadinessGates for the APIServerPodHealthy, SchedulerPodHealthy conditions, etc.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate"),
- },
- },
- },
- },
- },
- "variables": {
- SchemaProps: spec.SchemaProps{
- Description: "variables can be used to customize the ControlPlane through patches.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneVariables"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneVariables", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckTopology", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ControlPlaneVariables(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ControlPlaneVariables can be used to provide variables for the ControlPlane.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "overrides": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "name",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "overrides can be used to override Cluster level variables.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterVariable"),
- },
- },
- },
- },
- },
- },
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterVariable"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ExternalPatchDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ExternalPatchDefinition defines an external patch. Note: At least one of GenerateExtension or ValidateExtension must be set.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "generateExtension": {
- SchemaProps: spec.SchemaProps{
- Description: "generateExtension references an extension which is called to generate patches.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "validateExtension": {
- SchemaProps: spec.SchemaProps{
- Description: "validateExtension references an extension which is called to validate the topology.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "discoverVariablesExtension": {
- SchemaProps: spec.SchemaProps{
- Description: "discoverVariablesExtension references an extension which is called to discover variables.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "settings": {
- SchemaProps: spec.SchemaProps{
- Description: "settings defines key value pairs to be passed to the extensions. Values defined here take precedence over the values defined in the corresponding ExtensionConfig.",
- Type: []string{"object"},
- AdditionalProperties: &spec.SchemaOrBool{
- Allows: true,
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- },
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_FailureDomainSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "FailureDomainSpec is the Schema for Cluster API failure domains. It allows controllers to understand how many failure domains a cluster can optionally span across.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "controlPlane": {
- SchemaProps: spec.SchemaProps{
- Description: "controlPlane determines if this failure domain is suitable for use by control plane machines.",
- Type: []string{"boolean"},
- Format: "",
- },
- },
- "attributes": {
- SchemaProps: spec.SchemaProps{
- Description: "attributes is a free form map of attributes an infrastructure provider might use or require.",
- Type: []string{"object"},
- AdditionalProperties: &spec.SchemaOrBool{
- Allows: true,
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- },
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_InfrastructureNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "InfrastructureNamingStrategy defines the naming strategy for infrastructure objects.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "template": {
- SchemaProps: spec.SchemaProps{
- Description: "template defines the template to use for generating the name of the Infrastructure object. If not defined, it will fallback to `{{ .cluster.name }}-{{ .random }}`. If the templated string exceeds 63 characters, it will be trimmed to 58 characters and will get concatenated with a random suffix of length 5. The templating mechanism provides the following arguments: * `.cluster.name`: The name of the cluster object. * `.random`: A random alphanumeric string, without vowels, of length 5.",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_JSONPatch(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "JSONPatch defines a JSON patch.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "op": {
- SchemaProps: spec.SchemaProps{
- Description: "op defines the operation of the patch. Note: Only `add`, `replace` and `remove` are supported.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "path": {
- SchemaProps: spec.SchemaProps{
- Description: "path defines the path of the patch. Note: Only the spec of a template can be patched, thus the path has to start with /spec/. Note: For now the only allowed array modifications are `append` and `prepend`, i.e.: * for op: `add`: only index 0 (prepend) and - (append) are allowed * for op: `replace` or `remove`: no indexes are allowed",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "value": {
- SchemaProps: spec.SchemaProps{
- Description: "value defines the value of the patch. Note: Either Value or ValueFrom is required for add and replace operations. Only one of them is allowed to be set at the same time. Note: We have to use apiextensionsv1.JSON instead of our JSON type, because controller-tools has a hard-coded schema for apiextensionsv1.JSON which cannot be produced by another type (unset type field). Ref: https://github.com/kubernetes-sigs/controller-tools/blob/d0e03a142d0ecdd5491593e941ee1d6b5d91dba6/pkg/crd/known_types.go#L106-L111",
- Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"),
- },
- },
- "valueFrom": {
- SchemaProps: spec.SchemaProps{
- Description: "valueFrom defines the value of the patch. Note: Either Value or ValueFrom is required for add and replace operations. Only one of them is allowed to be set at the same time.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.JSONPatchValue"),
- },
- },
- },
- Required: []string{"op", "path"},
- },
- },
- Dependencies: []string{
- "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON", "sigs.k8s.io/cluster-api/api/core/v1beta1.JSONPatchValue"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_JSONPatchValue(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "JSONPatchValue defines the value of a patch. Note: Only one of the fields is allowed to be set at the same time.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "variable": {
- SchemaProps: spec.SchemaProps{
- Description: "variable is the variable to be used as value. Variable can be one of the variables defined in .spec.variables or a builtin variable.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "template": {
- SchemaProps: spec.SchemaProps{
- Description: "template is the Go template to be used to calculate the value. A template can reference variables defined in .spec.variables and builtin variables. Note: The template must evaluate to a valid YAML or JSON value.",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_JSONSchemaProps(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). This struct has been initially copied from apiextensionsv1.JSONSchemaProps, but all fields which are not supported in CAPI have been removed.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "description": {
- SchemaProps: spec.SchemaProps{
- Description: "description is a human-readable description of this variable.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "example": {
- SchemaProps: spec.SchemaProps{
- Description: "example is an example for this variable.",
- Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"),
- },
- },
- "type": {
- SchemaProps: spec.SchemaProps{
- Description: "type is the type of the variable. Valid values are: object, array, string, integer, number or boolean.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "properties": {
- SchemaProps: spec.SchemaProps{
- Description: "properties specifies fields of an object. NOTE: Can only be set if type is object. NOTE: Properties is mutually exclusive with AdditionalProperties. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.",
- Type: []string{"object"},
- AdditionalProperties: &spec.SchemaOrBool{
- Allows: true,
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps"),
- },
- },
- },
- },
- },
- "additionalProperties": {
- SchemaProps: spec.SchemaProps{
- Description: "additionalProperties specifies the schema of values in a map (keys are always strings). NOTE: Can only be set if type is object. NOTE: AdditionalProperties is mutually exclusive with Properties. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps"),
- },
- },
- "maxProperties": {
- SchemaProps: spec.SchemaProps{
- Description: "maxProperties is the maximum amount of entries in a map or properties in an object. NOTE: Can only be set if type is object.",
- Type: []string{"integer"},
- Format: "int64",
- },
- },
- "minProperties": {
- SchemaProps: spec.SchemaProps{
- Description: "minProperties is the minimum amount of entries in a map or properties in an object. NOTE: Can only be set if type is object.",
- Type: []string{"integer"},
- Format: "int64",
- },
- },
- "required": {
- SchemaProps: spec.SchemaProps{
- Description: "required specifies which fields of an object are required. NOTE: Can only be set if type is object.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- "items": {
- SchemaProps: spec.SchemaProps{
- Description: "items specifies fields of an array. NOTE: Can only be set if type is array. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps"),
- },
- },
- "maxItems": {
- SchemaProps: spec.SchemaProps{
- Description: "maxItems is the max length of an array variable. NOTE: Can only be set if type is array.",
- Type: []string{"integer"},
- Format: "int64",
- },
- },
- "minItems": {
- SchemaProps: spec.SchemaProps{
- Description: "minItems is the min length of an array variable. NOTE: Can only be set if type is array.",
- Type: []string{"integer"},
- Format: "int64",
- },
- },
- "uniqueItems": {
- SchemaProps: spec.SchemaProps{
- Description: "uniqueItems specifies if items in an array must be unique. NOTE: Can only be set if type is array.",
- Type: []string{"boolean"},
- Format: "",
- },
- },
- "format": {
- SchemaProps: spec.SchemaProps{
- Description: "format is an OpenAPI v3 format string. Unknown formats are ignored. For a list of supported formats please see: (of the k8s.io/apiextensions-apiserver version we're currently using) https://github.com/kubernetes/apiextensions-apiserver/blob/master/pkg/apiserver/validation/formats.go NOTE: Can only be set if type is string.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "maxLength": {
- SchemaProps: spec.SchemaProps{
- Description: "maxLength is the max length of a string variable. NOTE: Can only be set if type is string.",
- Type: []string{"integer"},
- Format: "int64",
- },
- },
- "minLength": {
- SchemaProps: spec.SchemaProps{
- Description: "minLength is the min length of a string variable. NOTE: Can only be set if type is string.",
- Type: []string{"integer"},
- Format: "int64",
- },
- },
- "pattern": {
- SchemaProps: spec.SchemaProps{
- Description: "pattern is the regex which a string variable must match. NOTE: Can only be set if type is string.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "maximum": {
- SchemaProps: spec.SchemaProps{
- Description: "maximum is the maximum of an integer or number variable. If ExclusiveMaximum is false, the variable is valid if it is lower than, or equal to, the value of Maximum. If ExclusiveMaximum is true, the variable is valid if it is strictly lower than the value of Maximum. NOTE: Can only be set if type is integer or number.",
- Type: []string{"integer"},
- Format: "int64",
- },
- },
- "exclusiveMaximum": {
- SchemaProps: spec.SchemaProps{
- Description: "exclusiveMaximum specifies if the Maximum is exclusive. NOTE: Can only be set if type is integer or number.",
- Type: []string{"boolean"},
- Format: "",
- },
- },
- "minimum": {
- SchemaProps: spec.SchemaProps{
- Description: "minimum is the minimum of an integer or number variable. If ExclusiveMinimum is false, the variable is valid if it is greater than, or equal to, the value of Minimum. If ExclusiveMinimum is true, the variable is valid if it is strictly greater than the value of Minimum. NOTE: Can only be set if type is integer or number.",
- Type: []string{"integer"},
- Format: "int64",
- },
- },
- "exclusiveMinimum": {
- SchemaProps: spec.SchemaProps{
- Description: "exclusiveMinimum specifies if the Minimum is exclusive. NOTE: Can only be set if type is integer or number.",
- Type: []string{"boolean"},
- Format: "",
- },
- },
- "x-kubernetes-preserve-unknown-fields": {
- SchemaProps: spec.SchemaProps{
- Description: "x-kubernetes-preserve-unknown-fields allows setting fields in a variable object which are not defined in the variable schema. This affects fields recursively, except if nested properties or additionalProperties are specified in the schema.",
- Type: []string{"boolean"},
- Format: "",
- },
- },
- "enum": {
- SchemaProps: spec.SchemaProps{
- Description: "enum is the list of valid values of the variable. NOTE: Can be set for all types.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"),
- },
- },
- },
- },
- },
- "default": {
- SchemaProps: spec.SchemaProps{
- Description: "default is the default value of the variable. NOTE: Can be set for all types.",
- Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"),
- },
- },
- "x-kubernetes-validations": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "rule",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "x-kubernetes-validations describes a list of validation rules written in the CEL expression language.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ValidationRule"),
- },
- },
- },
- },
- },
- "x-metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "x-metadata is the metadata of a variable or a nested field within a variable. It can be used to add additional data for higher level tools.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.VariableSchemaMetadata"),
- },
- },
- "x-kubernetes-int-or-string": {
- SchemaProps: spec.SchemaProps{
- Description: "x-kubernetes-int-or-string specifies that this value is either an integer or a string. If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns:\n\n1) anyOf:\n - type: integer\n - type: string\n2) allOf:\n - anyOf:\n - type: integer\n - type: string\n - ... zero or more",
- Type: []string{"boolean"},
- Format: "",
- },
- },
- "allOf": {
- SchemaProps: spec.SchemaProps{
- Description: "allOf specifies that the variable must validate against all of the subschemas in the array. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps"),
- },
- },
- },
- },
- },
- "oneOf": {
- SchemaProps: spec.SchemaProps{
- Description: "oneOf specifies that the variable must validate against exactly one of the subschemas in the array. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps"),
- },
- },
- },
- },
- },
- "anyOf": {
- SchemaProps: spec.SchemaProps{
- Description: "anyOf specifies that the variable must validate against one or more of the subschemas in the array. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps"),
- },
- },
- },
- },
- },
- "not": {
- SchemaProps: spec.SchemaProps{
- Description: "not specifies that the variable must not validate against the subschema. NOTE: This field uses PreserveUnknownFields and Schemaless, because recursive validation is not possible.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON", "sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps", "sigs.k8s.io/cluster-api/api/core/v1beta1.ValidationRule", "sigs.k8s.io/cluster-api/api/core/v1beta1.VariableSchemaMetadata"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_LocalObjectTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "LocalObjectTemplate defines a template for a topology Class.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "ref": {
- SchemaProps: spec.SchemaProps{
- Description: "ref is a required reference to a custom resource offered by a provider.",
- Ref: ref("k8s.io/api/core/v1.ObjectReference"),
- },
- },
- },
- Required: []string{"ref"},
- },
- },
- Dependencies: []string{
- "k8s.io/api/core/v1.ObjectReference"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_Machine(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "Machine is the Schema for the machines API.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "kind": {
- SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
- Type: []string{"string"},
- Format: "",
- },
- },
- "apiVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
- Type: []string{"string"},
- Format: "",
- },
- },
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
- },
- },
- "spec": {
- SchemaProps: spec.SchemaProps{
- Description: "spec is the desired state of Machine.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSpec"),
- },
- },
- "status": {
- SchemaProps: spec.SchemaProps{
- Description: "status is the observed state of Machine.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineStatus"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineStatus"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineAddress(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineAddress contains information for the node's address.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "type": {
- SchemaProps: spec.SchemaProps{
- Description: "type is the machine address type, one of Hostname, ExternalIP, InternalIP, ExternalDNS or InternalDNS.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "address": {
- SchemaProps: spec.SchemaProps{
- Description: "address is the machine address.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- Required: []string{"type", "address"},
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineDeletionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineDeletionStatus is the deletion state of the Machine.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "nodeDrainStartTime": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeDrainStartTime is the time when the drain of the node started and is used to determine if the NodeDrainTimeout is exceeded. Only present when the Machine has a deletionTimestamp and draining the node had been started.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"),
- },
- },
- "waitForNodeVolumeDetachStartTime": {
- SchemaProps: spec.SchemaProps{
- Description: "waitForNodeVolumeDetachStartTime is the time when waiting for volume detachment started and is used to determine if the NodeVolumeDetachTimeout is exceeded. Detaching volumes from nodes is usually done by CSI implementations and the current state is observed from the node's `.Status.VolumesAttached` field. Only present when the Machine has a deletionTimestamp and waiting for volume detachments had been started.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.Time"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineDeployment(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineDeployment is the Schema for the machinedeployments API.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "kind": {
- SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
- Type: []string{"string"},
- Format: "",
- },
- },
- "apiVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
- Type: []string{"string"},
- Format: "",
- },
- },
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
- },
- },
- "spec": {
- SchemaProps: spec.SchemaProps{
- Description: "spec is the desired state of MachineDeployment.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentSpec"),
- },
- },
- "status": {
- SchemaProps: spec.SchemaProps{
- Description: "status is the observed state of MachineDeployment.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStatus"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStatus"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineDeploymentClass(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineDeploymentClass serves as a template to define a set of worker nodes of the cluster provisioned using the `ClusterClass`.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "class": {
- SchemaProps: spec.SchemaProps{
- Description: "class denotes a type of worker node present in the cluster, this name MUST be unique within a ClusterClass and can be referenced in the Cluster to create a managed MachineDeployment.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "template": {
- SchemaProps: spec.SchemaProps{
- Description: "template is a local struct containing a collection of templates for creation of MachineDeployment objects representing a set of worker nodes.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClassTemplate"),
- },
- },
- "machineHealthCheck": {
- SchemaProps: spec.SchemaProps{
- Description: "machineHealthCheck defines a MachineHealthCheck for this MachineDeploymentClass.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckClass"),
- },
- },
- "failureDomain": {
- SchemaProps: spec.SchemaProps{
- Description: "failureDomain is the failure domain the machines will be created in. Must match a key in the FailureDomains map stored on the cluster object. NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "namingStrategy": {
- SchemaProps: spec.SchemaProps{
- Description: "namingStrategy allows changing the naming pattern used when creating the MachineDeployment.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClassNamingStrategy"),
- },
- },
- "nodeDrainTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. The default value is 0, meaning that the node can be drained without any time limitations. NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "nodeVolumeDetachTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "nodeDeletionTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. Defaults to 10 seconds. NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "minReadySeconds": {
- SchemaProps: spec.SchemaProps{
- Description: "minReadySeconds is the minimum number of seconds for which a newly created machine should be ready. Defaults to 0 (machine will be considered available as soon as it is ready) NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "readinessGates": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "conditionType",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "readinessGates specifies additional conditions to include when evaluating Machine Ready condition.\n\nThis field can be used e.g. to instruct the machine controller to include in the computation for Machine's ready computation a condition, managed by an external controllers, reporting the status of special software/hardware installed on the Machine.\n\nNOTE: This field is considered only for computing v1beta2 conditions. NOTE: If a Cluster defines a custom list of readinessGates for a MachineDeployment using this MachineDeploymentClass, such list overrides readinessGates defined in this field.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate"),
- },
- },
- },
- },
- },
- "strategy": {
- SchemaProps: spec.SchemaProps{
- Description: "strategy is the deployment strategy to use to replace existing machines with new ones. NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy"),
- },
- },
- },
- Required: []string{"class", "template"},
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClassNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClassTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckClass", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineDeploymentClassNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineDeploymentClassNamingStrategy defines the naming strategy for machine deployment objects.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "template": {
- SchemaProps: spec.SchemaProps{
- Description: "template defines the template to use for generating the name of the MachineDeployment object. If not defined, it will fallback to `{{ .cluster.name }}-{{ .machineDeployment.topologyName }}-{{ .random }}`. If the templated string exceeds 63 characters, it will be trimmed to 58 characters and will get concatenated with a random suffix of length 5. The templating mechanism provides the following arguments: * `.cluster.name`: The name of the cluster object. * `.random`: A random alphanumeric string, without vowels, of length 5. * `.machineDeployment.topologyName`: The name of the MachineDeployment topology (Cluster.spec.topology.workers.machineDeployments[].name).",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineDeploymentClassTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineDeploymentClassTemplate defines how a MachineDeployment generated from a MachineDeploymentClass should look like.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the metadata applied to the MachineDeployment and the machines of the MachineDeployment. At runtime this metadata is merged with the corresponding metadata from the topology.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"),
- },
- },
- "bootstrap": {
- SchemaProps: spec.SchemaProps{
- Description: "bootstrap contains the bootstrap template reference to be used for the creation of worker Machines.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate"),
- },
- },
- "infrastructure": {
- SchemaProps: spec.SchemaProps{
- Description: "infrastructure contains the infrastructure template reference to be used for the creation of worker Machines.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate"),
- },
- },
- },
- Required: []string{"bootstrap", "infrastructure"},
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineDeploymentList(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineDeploymentList contains a list of MachineDeployment.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "kind": {
- SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
- Type: []string{"string"},
- Format: "",
- },
- },
- "apiVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
- Type: []string{"string"},
- Format: "",
- },
- },
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds",
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"),
- },
- },
- "items": {
- SchemaProps: spec.SchemaProps{
- Description: "items is the list of MachineDeployments.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeployment"),
- },
- },
- },
- },
- },
- },
- Required: []string{"items"},
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeployment"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineDeploymentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineDeploymentSpec defines the desired state of MachineDeployment.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "clusterName": {
- SchemaProps: spec.SchemaProps{
- Description: "clusterName is the name of the Cluster this object belongs to.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "replicas": {
- SchemaProps: spec.SchemaProps{
- Description: "replicas is the number of desired machines. This is a pointer to distinguish between explicit zero and not specified.\n\nDefaults to: * if the Kubernetes autoscaler min size and max size annotations are set:\n - if it's a new MachineDeployment, use min size\n - if the replicas field of the old MachineDeployment is < min size, use min size\n - if the replicas field of the old MachineDeployment is > max size, use max size\n - if the replicas field of the old MachineDeployment is in the (min size, max size) range, keep the value from the oldMD\n* otherwise use 1 Note: Defaulting will be run whenever the replicas field is not set: * A new MachineDeployment is created with replicas not set. * On an existing MachineDeployment the replicas field was first set and is now unset. Those cases are especially relevant for the following Kubernetes autoscaler use cases: * A new MachineDeployment is created and replicas should be managed by the autoscaler * An existing MachineDeployment which initially wasn't controlled by the autoscaler\n should be later controlled by the autoscaler",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "rolloutAfter": {
- SchemaProps: spec.SchemaProps{
- Description: "rolloutAfter is a field to indicate a rollout should be performed after the specified time even if no changes have been made to the MachineDeployment. Example: In the YAML the time can be specified in the RFC3339 format. To specify the rolloutAfter target as March 9, 2023, at 9 am UTC use \"2023-03-09T09:00:00Z\".",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"),
- },
- },
- "selector": {
- SchemaProps: spec.SchemaProps{
- Description: "selector is the label selector for machines. Existing MachineSets whose machines are selected by this will be the ones affected by this deployment. It must match the machine template's labels.",
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"),
- },
- },
- "template": {
- SchemaProps: spec.SchemaProps{
- Description: "template describes the machines that will be created.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTemplateSpec"),
- },
- },
- "strategy": {
- SchemaProps: spec.SchemaProps{
- Description: "strategy is the deployment strategy to use to replace existing machines with new ones.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy"),
- },
- },
- "machineNamingStrategy": {
- SchemaProps: spec.SchemaProps{
- Description: "machineNamingStrategy allows changing the naming pattern used when creating Machines. Note: InfraMachines & BootstrapConfigs will use the same name as the corresponding Machines.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineNamingStrategy"),
- },
- },
- "minReadySeconds": {
- SchemaProps: spec.SchemaProps{
- Description: "minReadySeconds is the minimum number of seconds for which a Node for a newly created machine should be ready before considering the replica available. Defaults to 0 (machine will be considered available as soon as the Node is ready)",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "revisionHistoryLimit": {
- SchemaProps: spec.SchemaProps{
- Description: "revisionHistoryLimit is the number of old MachineSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.\n\nDeprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/issues/10479 for more details.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "paused": {
- SchemaProps: spec.SchemaProps{
- Description: "paused indicates that the deployment is paused.",
- Type: []string{"boolean"},
- Format: "",
- },
- },
- "progressDeadlineSeconds": {
- SchemaProps: spec.SchemaProps{
- Description: "progressDeadlineSeconds is the maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.\n\nDeprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/issues/11470 for more details.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- },
- Required: []string{"clusterName", "selector", "template"},
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTemplateSpec"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineDeploymentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineDeploymentStatus defines the observed state of MachineDeployment.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "observedGeneration": {
- SchemaProps: spec.SchemaProps{
- Description: "observedGeneration is the generation observed by the deployment controller.",
- Type: []string{"integer"},
- Format: "int64",
- },
- },
- "selector": {
- SchemaProps: spec.SchemaProps{
- Description: "selector is the same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors",
- Type: []string{"string"},
- Format: "",
- },
- },
- "replicas": {
- SchemaProps: spec.SchemaProps{
- Description: "replicas is the total number of non-terminated machines targeted by this deployment (their labels match the selector).",
- Default: 0,
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "updatedReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "updatedReplicas is the total number of non-terminated machines targeted by this deployment that have the desired template spec.",
- Default: 0,
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "readyReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "readyReplicas is the total number of ready machines targeted by this deployment.",
- Default: 0,
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "availableReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "availableReplicas is the total number of available machines (ready for at least minReadySeconds) targeted by this deployment.",
- Default: 0,
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "unavailableReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "unavailableReplicas is the total number of unavailable machines targeted by this deployment. This is the total number of machines that are still required for the deployment to have 100% available capacity. They may either be machines that are running but not yet available or machines that still have not been created.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.",
- Default: 0,
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "phase": {
- SchemaProps: spec.SchemaProps{
- Description: "phase represents the current phase of a MachineDeployment (ScalingUp, ScalingDown, Running, Failed, or Unknown).",
- Type: []string{"string"},
- Format: "",
- },
- },
- "conditions": {
- SchemaProps: spec.SchemaProps{
- Description: "conditions defines current service state of the MachineDeployment.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"),
- },
- },
- },
- },
- },
- "v1beta2": {
- SchemaProps: spec.SchemaProps{
- Description: "v1beta2 groups all the fields that will be added or modified in MachineDeployment's status with the V1Beta2 version.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentV1Beta2Status"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentV1Beta2Status"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineDeploymentStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineDeploymentStrategy describes how to replace existing machines with new ones.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "type": {
- SchemaProps: spec.SchemaProps{
- Description: "type of deployment. Allowed values are RollingUpdate and OnDelete. The default is RollingUpdate.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "rollingUpdate": {
- SchemaProps: spec.SchemaProps{
- Description: "rollingUpdate is the rolling update config params. Present only if MachineDeploymentStrategyType = RollingUpdate.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineRollingUpdateDeployment"),
- },
- },
- "remediation": {
- SchemaProps: spec.SchemaProps{
- Description: "remediation controls the strategy of remediating unhealthy machines and how remediating operations should occur during the lifecycle of the dependant MachineSets.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.RemediationStrategy"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineRollingUpdateDeployment", "sigs.k8s.io/cluster-api/api/core/v1beta1.RemediationStrategy"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineDeploymentTopology(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineDeploymentTopology specifies the different parameters for a set of worker nodes in the topology. This set of nodes is managed by a MachineDeployment object whose lifecycle is managed by the Cluster controller.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the metadata applied to the MachineDeployment and the machines of the MachineDeployment. At runtime this metadata is merged with the corresponding metadata from the ClusterClass.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"),
- },
- },
- "class": {
- SchemaProps: spec.SchemaProps{
- Description: "class is the name of the MachineDeploymentClass used to create the set of worker nodes. This should match one of the deployment classes defined in the ClusterClass object mentioned in the `Cluster.Spec.Class` field.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "name": {
- SchemaProps: spec.SchemaProps{
- Description: "name is the unique identifier for this MachineDeploymentTopology. The value is used with other unique identifiers to create a MachineDeployment's Name (e.g. cluster's name, etc). In case the name is greater than the allowed maximum length, the values are hashed together.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "failureDomain": {
- SchemaProps: spec.SchemaProps{
- Description: "failureDomain is the failure domain the machines will be created in. Must match a key in the FailureDomains map stored on the cluster object.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "replicas": {
- SchemaProps: spec.SchemaProps{
- Description: "replicas is the number of worker nodes belonging to this set. If the value is nil, the MachineDeployment is created without the number of Replicas (defaulting to 1) and it's assumed that an external entity (like cluster autoscaler) is responsible for the management of this value.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "machineHealthCheck": {
- SchemaProps: spec.SchemaProps{
- Description: "machineHealthCheck allows to enable, disable and override the MachineHealthCheck configuration in the ClusterClass for this MachineDeployment.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckTopology"),
- },
- },
- "nodeDrainTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. The default value is 0, meaning that the node can be drained without any time limitations. NOTE: NodeDrainTimeout is different from `kubectl drain --timeout`",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "nodeVolumeDetachTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "nodeDeletionTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. Defaults to 10 seconds.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "minReadySeconds": {
- SchemaProps: spec.SchemaProps{
- Description: "minReadySeconds is the minimum number of seconds for which a newly created machine should be ready. Defaults to 0 (machine will be considered available as soon as it is ready)",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "readinessGates": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "conditionType",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "readinessGates specifies additional conditions to include when evaluating Machine Ready condition.\n\nThis field can be used e.g. to instruct the machine controller to include in the computation for Machine's ready computation a condition, managed by an external controllers, reporting the status of special software/hardware installed on the Machine.\n\nIf this field is not defined, readinessGates from the corresponding MachineDeploymentClass will be used, if any.\n\nNOTE: This field is considered only for computing v1beta2 conditions.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate"),
- },
- },
- },
- },
- },
- "strategy": {
- SchemaProps: spec.SchemaProps{
- Description: "strategy is the deployment strategy to use to replace existing machines with new ones.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy"),
- },
- },
- "variables": {
- SchemaProps: spec.SchemaProps{
- Description: "variables can be used to customize the MachineDeployment through patches.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentVariables"),
- },
- },
- },
- Required: []string{"class", "name"},
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentVariables", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckTopology", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineDeploymentV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineDeploymentV1Beta2Status groups all the fields that will be added or modified in MachineDeployment with the V1Beta2 version. See https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more context.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "conditions": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "type",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "conditions represents the observations of a MachineDeployment's current state. Known condition types are Available, MachinesReady, MachinesUpToDate, ScalingUp, ScalingDown, Remediating, Deleting, Paused.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"),
- },
- },
- },
- },
- },
- "readyReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "readyReplicas is the number of ready replicas for this MachineDeployment. A machine is considered ready when Machine's Ready condition is true.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "availableReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "availableReplicas is the number of available replicas for this MachineDeployment. A machine is considered available when Machine's Available condition is true.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "upToDateReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "upToDateReplicas is the number of up-to-date replicas targeted by this deployment. A machine is considered up-to-date when Machine's UpToDate condition is true.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineDeploymentVariables(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineDeploymentVariables can be used to provide variables for a specific MachineDeployment.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "overrides": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "name",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "overrides can be used to override Cluster level variables.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterVariable"),
- },
- },
- },
- },
- },
- },
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterVariable"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineDrainRule(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineDrainRule is the Schema for the MachineDrainRule API.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "kind": {
- SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
- Type: []string{"string"},
- Format: "",
- },
- },
- "apiVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
- Type: []string{"string"},
- Format: "",
- },
- },
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
- },
- },
- "spec": {
- SchemaProps: spec.SchemaProps{
- Description: "spec defines the spec of a MachineDrainRule.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleSpec"),
- },
- },
- },
- Required: []string{"metadata", "spec"},
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleSpec"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineDrainRuleDrainConfig(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineDrainRuleDrainConfig configures if and how Pods are drained.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "behavior": {
- SchemaProps: spec.SchemaProps{
- Description: "behavior defines the drain behavior. Can be either \"Drain\", \"Skip\", or \"WaitCompleted\". \"Drain\" means that the Pods to which this MachineDrainRule applies will be drained. If behavior is set to \"Drain\" the order in which Pods are drained can be configured with the order field. When draining Pods of a Node the Pods will be grouped by order and one group after another will be drained (by increasing order). Cluster API will wait until all Pods of a group are terminated / removed from the Node before starting with the next group. \"Skip\" means that the Pods to which this MachineDrainRule applies will be skipped during drain. \"WaitCompleted\" means that the pods to which this MachineDrainRule applies will never be evicted and we wait for them to be completed, it is enforced that pods marked with this behavior always have Order=0.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "order": {
- SchemaProps: spec.SchemaProps{
- Description: "order defines the order in which Pods are drained. Pods with higher order are drained after Pods with lower order. order can only be set if behavior is set to \"Drain\". If order is not set, 0 will be used. Valid values for order are from -2147483648 to 2147483647 (inclusive).",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- },
- Required: []string{"behavior"},
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineDrainRuleList(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineDrainRuleList contains a list of MachineDrainRules.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "kind": {
- SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
- Type: []string{"string"},
- Format: "",
- },
- },
- "apiVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
- Type: []string{"string"},
- Format: "",
- },
- },
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds",
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"),
- },
- },
- "items": {
- SchemaProps: spec.SchemaProps{
- Description: "items contains the items of the MachineDrainRuleList.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRule"),
- },
- },
- },
- },
- },
- },
- Required: []string{"metadata", "items"},
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRule"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineDrainRuleMachineSelector(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineDrainRuleMachineSelector defines to which Machines this MachineDrainRule should be applied.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "selector": {
- SchemaProps: spec.SchemaProps{
- Description: "selector is a label selector which selects Machines by their labels. This field follows standard label selector semantics; if not present or empty, it selects all Machines.\n\nIf clusterSelector is also set, then the selector as a whole selects Machines matching selector belonging to Clusters selected by clusterSelector. If clusterSelector is not set, it selects all Machines matching selector in all Clusters.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"),
- },
- },
- "clusterSelector": {
- SchemaProps: spec.SchemaProps{
- Description: "clusterSelector is a label selector which selects Machines by the labels of their Clusters. This field follows standard label selector semantics; if not present or empty, it selects Machines of all Clusters.\n\nIf selector is also set, then the selector as a whole selects Machines matching selector belonging to Clusters selected by clusterSelector. If selector is not set, it selects all Machines belonging to Clusters selected by clusterSelector.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineDrainRulePodSelector(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineDrainRulePodSelector defines to which Pods this MachineDrainRule should be applied.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "selector": {
- SchemaProps: spec.SchemaProps{
- Description: "selector is a label selector which selects Pods by their labels. This field follows standard label selector semantics; if not present or empty, it selects all Pods.\n\nIf namespaceSelector is also set, then the selector as a whole selects Pods matching selector in Namespaces selected by namespaceSelector. If namespaceSelector is not set, it selects all Pods matching selector in all Namespaces.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"),
- },
- },
- "namespaceSelector": {
- SchemaProps: spec.SchemaProps{
- Description: "namespaceSelector is a label selector which selects Pods by the labels of their Namespaces. This field follows standard label selector semantics; if not present or empty, it selects Pods of all Namespaces.\n\nIf selector is also set, then the selector as a whole selects Pods matching selector in Namespaces selected by namespaceSelector. If selector is not set, it selects all Pods in Namespaces selected by namespaceSelector.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineDrainRuleSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineDrainRuleSpec defines the spec of a MachineDrainRule.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "drain": {
- SchemaProps: spec.SchemaProps{
- Description: "drain configures if and how Pods are drained.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleDrainConfig"),
- },
- },
- "machines": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-type": "atomic",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "machines defines to which Machines this MachineDrainRule should be applied.\n\nIf machines is not set, the MachineDrainRule applies to all Machines in the Namespace. If machines contains multiple selectors, the results are ORed. Within a single Machine selector the results of selector and clusterSelector are ANDed. Machines will be selected from all Clusters in the Namespace unless otherwise restricted with the clusterSelector.\n\nExample: Selects control plane Machines in all Clusters or\n Machines with label \"os\" == \"linux\" in Clusters with label\n \"stage\" == \"production\".\n\n - selector:\n matchExpressions:\n - key: cluster.x-k8s.io/control-plane\n operator: Exists\n - selector:\n matchLabels:\n os: linux\n clusterSelector:\n matchExpressions:\n - key: stage\n operator: In\n values:\n - production",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleMachineSelector"),
- },
- },
- },
- },
- },
- "pods": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-type": "atomic",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "pods defines to which Pods this MachineDrainRule should be applied.\n\nIf pods is not set, the MachineDrainRule applies to all Pods in all Namespaces. If pods contains multiple selectors, the results are ORed. Within a single Pod selector the results of selector and namespaceSelector are ANDed. Pods will be selected from all Namespaces unless otherwise restricted with the namespaceSelector.\n\nExample: Selects Pods with label \"app\" == \"logging\" in all Namespaces or\n Pods with label \"app\" == \"prometheus\" in the \"monitoring\"\n Namespace.\n\n - selector:\n matchExpressions:\n - key: app\n operator: In\n values:\n - logging\n - selector:\n matchLabels:\n app: prometheus\n namespaceSelector:\n matchLabels:\n kubernetes.io/metadata.name: monitoring",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRulePodSelector"),
- },
- },
- },
- },
- },
- },
- Required: []string{"drain"},
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleDrainConfig", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRuleMachineSelector", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDrainRulePodSelector"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineHealthCheck(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineHealthCheck is the Schema for the machinehealthchecks API.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "kind": {
- SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
- Type: []string{"string"},
- Format: "",
- },
- },
- "apiVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
- Type: []string{"string"},
- Format: "",
- },
- },
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
- },
- },
- "spec": {
- SchemaProps: spec.SchemaProps{
- Description: "spec is the specification of machine health check policy",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckSpec"),
- },
- },
- "status": {
- SchemaProps: spec.SchemaProps{
- Description: "status is the most recently observed status of MachineHealthCheck resource",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckStatus"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckStatus"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineHealthCheckClass(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineHealthCheckClass defines a MachineHealthCheck for a group of Machines.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "unhealthyConditions": {
- SchemaProps: spec.SchemaProps{
- Description: "unhealthyConditions contains a list of the conditions that determine whether a node is considered unhealthy. The conditions are combined in a logical OR, i.e. if any of the conditions is met, the node is unhealthy.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition"),
- },
- },
- },
- },
- },
- "maxUnhealthy": {
- SchemaProps: spec.SchemaProps{
- Description: "maxUnhealthy specifies the maximum number of unhealthy machines allowed. Any further remediation is only allowed if at most \"maxUnhealthy\" machines selected by \"selector\" are not healthy.",
- Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"),
- },
- },
- "unhealthyRange": {
- SchemaProps: spec.SchemaProps{
- Description: "unhealthyRange specifies the range of unhealthy machines allowed. Any further remediation is only allowed if the number of machines selected by \"selector\" as not healthy is within the range of \"unhealthyRange\". Takes precedence over maxUnhealthy. Eg. \"[3-5]\" - This means that remediation will be allowed only when: (a) there are at least 3 unhealthy machines (and) (b) there are at most 5 unhealthy machines",
- Type: []string{"string"},
- Format: "",
- },
- },
- "nodeStartupTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeStartupTimeout allows to set the maximum time for MachineHealthCheck to consider a Machine unhealthy if a corresponding Node isn't associated through a `Spec.ProviderID` field.\n\nThe duration set in this field is compared to the greatest of: - Cluster's infrastructure ready condition timestamp (if and when available) - Control Plane's initialized condition timestamp (if and when available) - Machine's infrastructure ready condition timestamp (if and when available) - Machine's metadata creation timestamp\n\nDefaults to 10 minutes. If you wish to disable this feature, set the value explicitly to 0.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "remediationTemplate": {
- SchemaProps: spec.SchemaProps{
- Description: "remediationTemplate is a reference to a remediation template provided by an infrastructure provider.\n\nThis field is completely optional, when filled, the MachineHealthCheck controller creates a new object from the template referenced and hands off remediation of the machine to a controller that lives outside of Cluster API.",
- Ref: ref("k8s.io/api/core/v1.ObjectReference"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineHealthCheckList(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineHealthCheckList contains a list of MachineHealthCheck.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "kind": {
- SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
- Type: []string{"string"},
- Format: "",
- },
- },
- "apiVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
- Type: []string{"string"},
- Format: "",
- },
- },
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds",
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"),
- },
- },
- "items": {
- SchemaProps: spec.SchemaProps{
- Description: "items is the list of MachineHealthChecks.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheck"),
- },
- },
- },
- },
- },
- },
- Required: []string{"items"},
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheck"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineHealthCheckSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineHealthCheckSpec defines the desired state of MachineHealthCheck.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "clusterName": {
- SchemaProps: spec.SchemaProps{
- Description: "clusterName is the name of the Cluster this object belongs to.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "selector": {
- SchemaProps: spec.SchemaProps{
- Description: "selector is a label selector to match machines whose health will be exercised",
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"),
- },
- },
- "unhealthyConditions": {
- SchemaProps: spec.SchemaProps{
- Description: "unhealthyConditions contains a list of the conditions that determine whether a node is considered unhealthy. The conditions are combined in a logical OR, i.e. if any of the conditions is met, the node is unhealthy.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition"),
- },
- },
- },
- },
- },
- "maxUnhealthy": {
- SchemaProps: spec.SchemaProps{
- Description: "maxUnhealthy specifies the maximum number of unhealthy machines allowed. Any further remediation is only allowed if at most \"maxUnhealthy\" machines selected by \"selector\" are not healthy.\n\nDeprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/issues/10722 for more details.",
- Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"),
- },
- },
- "unhealthyRange": {
- SchemaProps: spec.SchemaProps{
- Description: "unhealthyRange specifies the range of unhealthy machines allowed. Any further remediation is only allowed if the number of machines selected by \"selector\" as not healthy is within the range of \"unhealthyRange\". Takes precedence over maxUnhealthy. Eg. \"[3-5]\" - This means that remediation will be allowed only when: (a) there are at least 3 unhealthy machines (and) (b) there are at most 5 unhealthy machines\n\nDeprecated: This field is deprecated and is going to be removed in the next apiVersion. Please see https://github.com/kubernetes-sigs/cluster-api/issues/10722 for more details.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "nodeStartupTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeStartupTimeout allows to set the maximum time for MachineHealthCheck to consider a Machine unhealthy if a corresponding Node isn't associated through a `Spec.ProviderID` field.\n\nThe duration set in this field is compared to the greatest of: - Cluster's infrastructure ready condition timestamp (if and when available) - Control Plane's initialized condition timestamp (if and when available) - Machine's infrastructure ready condition timestamp (if and when available) - Machine's metadata creation timestamp\n\nDefaults to 10 minutes. If you wish to disable this feature, set the value explicitly to 0.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "remediationTemplate": {
- SchemaProps: spec.SchemaProps{
- Description: "remediationTemplate is a reference to a remediation template provided by an infrastructure provider.\n\nThis field is completely optional, when filled, the MachineHealthCheck controller creates a new object from the template referenced and hands off remediation of the machine to a controller that lives outside of Cluster API.",
- Ref: ref("k8s.io/api/core/v1.ObjectReference"),
- },
- },
- },
- Required: []string{"clusterName", "selector"},
- },
- },
- Dependencies: []string{
- "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineHealthCheckStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineHealthCheckStatus defines the observed state of MachineHealthCheck.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "expectedMachines": {
- SchemaProps: spec.SchemaProps{
- Description: "expectedMachines is the total number of machines counted by this machine health check",
- Default: 0,
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "currentHealthy": {
- SchemaProps: spec.SchemaProps{
- Description: "currentHealthy is the total number of healthy machines counted by this machine health check",
- Default: 0,
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "remediationsAllowed": {
- SchemaProps: spec.SchemaProps{
- Description: "remediationsAllowed is the number of further remediations allowed by this machine health check before maxUnhealthy short circuiting will be applied",
- Default: 0,
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "observedGeneration": {
- SchemaProps: spec.SchemaProps{
- Description: "observedGeneration is the latest generation observed by the controller.",
- Type: []string{"integer"},
- Format: "int64",
- },
- },
- "targets": {
- SchemaProps: spec.SchemaProps{
- Description: "targets shows the current list of machines the machine health check is watching",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- "conditions": {
- SchemaProps: spec.SchemaProps{
- Description: "conditions defines current service state of the MachineHealthCheck.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"),
- },
- },
- },
- },
- },
- "v1beta2": {
- SchemaProps: spec.SchemaProps{
- Description: "v1beta2 groups all the fields that will be added or modified in MachineHealthCheck's status with the V1Beta2 version.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckV1Beta2Status"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineHealthCheckV1Beta2Status"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineHealthCheckTopology(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineHealthCheckTopology defines a MachineHealthCheck for a group of machines.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "enable": {
- SchemaProps: spec.SchemaProps{
- Description: "enable controls if a MachineHealthCheck should be created for the target machines.\n\nIf false: No MachineHealthCheck will be created.\n\nIf not set(default): A MachineHealthCheck will be created if it is defined here or\n in the associated ClusterClass. If no MachineHealthCheck is defined then none will be created.\n\nIf true: A MachineHealthCheck is guaranteed to be created. Cluster validation will block if `enable` is true and no MachineHealthCheck definition is available.",
- Type: []string{"boolean"},
- Format: "",
- },
- },
- "unhealthyConditions": {
- SchemaProps: spec.SchemaProps{
- Description: "unhealthyConditions contains a list of the conditions that determine whether a node is considered unhealthy. The conditions are combined in a logical OR, i.e. if any of the conditions is met, the node is unhealthy.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition"),
- },
- },
- },
- },
- },
- "maxUnhealthy": {
- SchemaProps: spec.SchemaProps{
- Description: "maxUnhealthy specifies the maximum number of unhealthy machines allowed. Any further remediation is only allowed if at most \"maxUnhealthy\" machines selected by \"selector\" are not healthy.",
- Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"),
- },
- },
- "unhealthyRange": {
- SchemaProps: spec.SchemaProps{
- Description: "unhealthyRange specifies the range of unhealthy machines allowed. Any further remediation is only allowed if the number of machines selected by \"selector\" as not healthy is within the range of \"unhealthyRange\". Takes precedence over maxUnhealthy. Eg. \"[3-5]\" - This means that remediation will be allowed only when: (a) there are at least 3 unhealthy machines (and) (b) there are at most 5 unhealthy machines",
- Type: []string{"string"},
- Format: "",
- },
- },
- "nodeStartupTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeStartupTimeout allows to set the maximum time for MachineHealthCheck to consider a Machine unhealthy if a corresponding Node isn't associated through a `Spec.ProviderID` field.\n\nThe duration set in this field is compared to the greatest of: - Cluster's infrastructure ready condition timestamp (if and when available) - Control Plane's initialized condition timestamp (if and when available) - Machine's infrastructure ready condition timestamp (if and when available) - Machine's metadata creation timestamp\n\nDefaults to 10 minutes. If you wish to disable this feature, set the value explicitly to 0.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "remediationTemplate": {
- SchemaProps: spec.SchemaProps{
- Description: "remediationTemplate is a reference to a remediation template provided by an infrastructure provider.\n\nThis field is completely optional, when filled, the MachineHealthCheck controller creates a new object from the template referenced and hands off remediation of the machine to a controller that lives outside of Cluster API.",
- Ref: ref("k8s.io/api/core/v1.ObjectReference"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/cluster-api/api/core/v1beta1.UnhealthyCondition"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineHealthCheckV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineHealthCheckV1Beta2Status groups all the fields that will be added or modified in MachineHealthCheck with the V1Beta2 version. See https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more context.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "conditions": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "type",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "conditions represents the observations of a MachineHealthCheck's current state. Known condition types are RemediationAllowed, Paused.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"),
- },
- },
- },
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineList(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineList contains a list of Machine.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "kind": {
- SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
- Type: []string{"string"},
- Format: "",
- },
- },
- "apiVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
- Type: []string{"string"},
- Format: "",
- },
- },
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds",
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"),
- },
- },
- "items": {
- SchemaProps: spec.SchemaProps{
- Description: "items is the list of Machines.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Machine"),
- },
- },
- },
- },
- },
- },
- Required: []string{"items"},
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.Machine"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineNamingStrategy allows changing the naming pattern used when creating Machines. Note: InfraMachines & BootstrapConfigs will use the same name as the corresponding Machines.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "template": {
- SchemaProps: spec.SchemaProps{
- Description: "template defines the template to use for generating the names of the Machine objects. If not defined, it will fallback to `{{ .machineSet.name }}-{{ .random }}`. If the generated name string exceeds 63 characters, it will be trimmed to 58 characters and will get concatenated with a random suffix of length 5. Length of the template string must not exceed 256 characters. The template allows the following variables `.cluster.name`, `.machineSet.name` and `.random`. The variable `.cluster.name` retrieves the name of the cluster object that owns the Machines being created. The variable `.machineSet.name` retrieves the name of the MachineSet object that owns the Machines being created. The variable `.random` is substituted with random alphanumeric string, without vowels, of length 5. This variable is required part of the template. If not provided, validation will fail.",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachinePool(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachinePool is the Schema for the machinepools API.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "kind": {
- SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
- Type: []string{"string"},
- Format: "",
- },
- },
- "apiVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
- Type: []string{"string"},
- Format: "",
- },
- },
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
- },
- },
- "spec": {
- SchemaProps: spec.SchemaProps{
- Description: "spec is the desired state of MachinePool.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolSpec"),
- },
- },
- "status": {
- SchemaProps: spec.SchemaProps{
- Description: "status is the observed state of MachinePool.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolStatus"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolStatus"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachinePoolClass(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachinePoolClass serves as a template to define a pool of worker nodes of the cluster provisioned using `ClusterClass`.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "class": {
- SchemaProps: spec.SchemaProps{
- Description: "class denotes a type of machine pool present in the cluster, this name MUST be unique within a ClusterClass and can be referenced in the Cluster to create a managed MachinePool.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "template": {
- SchemaProps: spec.SchemaProps{
- Description: "template is a local struct containing a collection of templates for creation of MachinePools objects representing a pool of worker nodes.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClassTemplate"),
- },
- },
- "failureDomains": {
- SchemaProps: spec.SchemaProps{
- Description: "failureDomains is the list of failure domains the MachinePool should be attached to. Must match a key in the FailureDomains map stored on the cluster object. NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- "namingStrategy": {
- SchemaProps: spec.SchemaProps{
- Description: "namingStrategy allows changing the naming pattern used when creating the MachinePool.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClassNamingStrategy"),
- },
- },
- "nodeDrainTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. The default value is 0, meaning that the node can be drained without any time limitations. NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "nodeVolumeDetachTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations. NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "nodeDeletionTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine hosts after the Machine Pool is marked for deletion. A duration of 0 will retry deletion indefinitely. Defaults to 10 seconds. NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "minReadySeconds": {
- SchemaProps: spec.SchemaProps{
- Description: "minReadySeconds is the minimum number of seconds for which a newly created machine pool should be ready. Defaults to 0 (machine will be considered available as soon as it is ready) NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- },
- Required: []string{"class", "template"},
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClassNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClassTemplate"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachinePoolClassNamingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachinePoolClassNamingStrategy defines the naming strategy for machine pool objects.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "template": {
- SchemaProps: spec.SchemaProps{
- Description: "template defines the template to use for generating the name of the MachinePool object. If not defined, it will fallback to `{{ .cluster.name }}-{{ .machinePool.topologyName }}-{{ .random }}`. If the templated string exceeds 63 characters, it will be trimmed to 58 characters and will get concatenated with a random suffix of length 5. The templating mechanism provides the following arguments: * `.cluster.name`: The name of the cluster object. * `.random`: A random alphanumeric string, without vowels, of length 5. * `.machinePool.topologyName`: The name of the MachinePool topology (Cluster.spec.topology.workers.machinePools[].name).",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachinePoolClassTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachinePoolClassTemplate defines how a MachinePool generated from a MachinePoolClass should look like.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the metadata applied to the MachinePool. At runtime this metadata is merged with the corresponding metadata from the topology.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"),
- },
- },
- "bootstrap": {
- SchemaProps: spec.SchemaProps{
- Description: "bootstrap contains the bootstrap template reference to be used for the creation of the Machines in the MachinePool.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate"),
- },
- },
- "infrastructure": {
- SchemaProps: spec.SchemaProps{
- Description: "infrastructure contains the infrastructure template reference to be used for the creation of the MachinePool.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate"),
- },
- },
- },
- Required: []string{"bootstrap", "infrastructure"},
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.LocalObjectTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachinePoolList(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachinePoolList contains a list of MachinePool.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "kind": {
- SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
- Type: []string{"string"},
- Format: "",
- },
- },
- "apiVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
- Type: []string{"string"},
- Format: "",
- },
- },
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds",
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"),
- },
- },
- "items": {
- SchemaProps: spec.SchemaProps{
- Description: "items is the list of MachinePools.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePool"),
- },
- },
- },
- },
- },
- },
- Required: []string{"items"},
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePool"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachinePoolSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachinePoolSpec defines the desired state of MachinePool.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "clusterName": {
- SchemaProps: spec.SchemaProps{
- Description: "clusterName is the name of the Cluster this object belongs to.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "replicas": {
- SchemaProps: spec.SchemaProps{
- Description: "replicas is the number of desired machines. Defaults to 1. This is a pointer to distinguish between explicit zero and not specified.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "template": {
- SchemaProps: spec.SchemaProps{
- Description: "template describes the machines that will be created.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTemplateSpec"),
- },
- },
- "minReadySeconds": {
- SchemaProps: spec.SchemaProps{
- Description: "minReadySeconds is the minimum number of seconds for which a newly created machine instances should be ready. Defaults to 0 (machine instance will be considered available as soon as it is ready)",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "providerIDList": {
- SchemaProps: spec.SchemaProps{
- Description: "providerIDList are the identification IDs of machine instances provided by the provider. This field must match the provider IDs as seen on the node objects corresponding to a machine pool's machine instances.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- "failureDomains": {
- SchemaProps: spec.SchemaProps{
- Description: "failureDomains is the list of failure domains this MachinePool should be attached to.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- },
- Required: []string{"clusterName", "template"},
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTemplateSpec"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachinePoolStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachinePoolStatus defines the observed state of MachinePool.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "nodeRefs": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeRefs will point to the corresponding Nodes if it they exist.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/api/core/v1.ObjectReference"),
- },
- },
- },
- },
- },
- "replicas": {
- SchemaProps: spec.SchemaProps{
- Description: "replicas is the most recently observed number of replicas.",
- Default: 0,
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "readyReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "readyReplicas is the number of ready replicas for this MachinePool. A machine is considered ready when the node has been created and is \"Ready\".",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "availableReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "availableReplicas is the number of available replicas (ready for at least minReadySeconds) for this MachinePool.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "unavailableReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "unavailableReplicas is the total number of unavailable machine instances targeted by this machine pool. This is the total number of machine instances that are still required for the machine pool to have 100% available capacity. They may either be machine instances that are running but not yet available or machine instances that still have not been created.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "failureReason": {
- SchemaProps: spec.SchemaProps{
- Description: "failureReason indicates that there is a problem reconciling the state, and will be set to a token value suitable for programmatic interpretation.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "failureMessage": {
- SchemaProps: spec.SchemaProps{
- Description: "failureMessage indicates that there is a problem reconciling the state, and will be set to a descriptive error message.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "phase": {
- SchemaProps: spec.SchemaProps{
- Description: "phase represents the current phase of cluster actuation.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "bootstrapReady": {
- SchemaProps: spec.SchemaProps{
- Description: "bootstrapReady is the state of the bootstrap provider.",
- Default: false,
- Type: []string{"boolean"},
- Format: "",
- },
- },
- "infrastructureReady": {
- SchemaProps: spec.SchemaProps{
- Description: "infrastructureReady is the state of the infrastructure provider.",
- Default: false,
- Type: []string{"boolean"},
- Format: "",
- },
- },
- "observedGeneration": {
- SchemaProps: spec.SchemaProps{
- Description: "observedGeneration is the latest generation observed by the controller.",
- Type: []string{"integer"},
- Format: "int64",
- },
- },
- "conditions": {
- SchemaProps: spec.SchemaProps{
- Description: "conditions define the current service state of the MachinePool.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"),
- },
- },
- },
- },
- },
- "v1beta2": {
- SchemaProps: spec.SchemaProps{
- Description: "v1beta2 groups all the fields that will be added or modified in MachinePool's status with the V1Beta2 version.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolV1Beta2Status"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/api/core/v1.ObjectReference", "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolV1Beta2Status"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachinePoolTopology(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachinePoolTopology specifies the different parameters for a pool of worker nodes in the topology. This pool of nodes is managed by a MachinePool object whose lifecycle is managed by the Cluster controller.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the metadata applied to the MachinePool. At runtime this metadata is merged with the corresponding metadata from the ClusterClass.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"),
- },
- },
- "class": {
- SchemaProps: spec.SchemaProps{
- Description: "class is the name of the MachinePoolClass used to create the pool of worker nodes. This should match one of the deployment classes defined in the ClusterClass object mentioned in the `Cluster.Spec.Class` field.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "name": {
- SchemaProps: spec.SchemaProps{
- Description: "name is the unique identifier for this MachinePoolTopology. The value is used with other unique identifiers to create a MachinePool's Name (e.g. cluster's name, etc). In case the name is greater than the allowed maximum length, the values are hashed together.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "failureDomains": {
- SchemaProps: spec.SchemaProps{
- Description: "failureDomains is the list of failure domains the machine pool will be created in. Must match a key in the FailureDomains map stored on the cluster object.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- "nodeDrainTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. The default value is 0, meaning that the node can be drained without any time limitations. NOTE: NodeDrainTimeout is different from `kubectl drain --timeout`",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "nodeVolumeDetachTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "nodeDeletionTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeDeletionTimeout defines how long the controller will attempt to delete the Node that the MachinePool hosts after the MachinePool is marked for deletion. A duration of 0 will retry deletion indefinitely. Defaults to 10 seconds.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "minReadySeconds": {
- SchemaProps: spec.SchemaProps{
- Description: "minReadySeconds is the minimum number of seconds for which a newly created machine pool should be ready. Defaults to 0 (machine will be considered available as soon as it is ready)",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "replicas": {
- SchemaProps: spec.SchemaProps{
- Description: "replicas is the number of nodes belonging to this pool. If the value is nil, the MachinePool is created without the number of Replicas (defaulting to 1) and it's assumed that an external entity (like cluster autoscaler) is responsible for the management of this value.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "variables": {
- SchemaProps: spec.SchemaProps{
- Description: "variables can be used to customize the MachinePool through patches.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolVariables"),
- },
- },
- },
- Required: []string{"class", "name"},
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolVariables", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachinePoolV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachinePoolV1Beta2Status groups all the fields that will be added or modified in MachinePoolStatus with the V1Beta2 version. See https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more context.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "conditions": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "type",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "conditions represents the observations of a MachinePool's current state. Known condition types are Available, BootstrapConfigReady, InfrastructureReady, MachinesReady, MachinesUpToDate, ScalingUp, ScalingDown, Remediating, Deleting, Paused.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"),
- },
- },
- },
- },
- },
- "readyReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "readyReplicas is the number of ready replicas for this MachinePool. A machine is considered ready when Machine's Ready condition is true.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "availableReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "availableReplicas is the number of available replicas for this MachinePool. A machine is considered available when Machine's Available condition is true.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "upToDateReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "upToDateReplicas is the number of up-to-date replicas targeted by this MachinePool. A machine is considered up-to-date when Machine's UpToDate condition is true.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachinePoolVariables(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachinePoolVariables can be used to provide variables for a specific MachinePool.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "overrides": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "name",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "overrides can be used to override Cluster level variables.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterVariable"),
- },
- },
- },
- },
- },
- },
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterVariable"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineReadinessGate(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineReadinessGate contains the type of a Machine condition to be used as a readiness gate.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "conditionType": {
- SchemaProps: spec.SchemaProps{
- Description: "conditionType refers to a condition with matching type in the Machine's condition list. If the conditions doesn't exist, it will be treated as unknown. Note: Both Cluster API conditions or conditions added by 3rd party controllers can be used as readiness gates.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "polarity": {
- SchemaProps: spec.SchemaProps{
- Description: "polarity of the conditionType specified in this readinessGate. Valid values are Positive, Negative and omitted. When omitted, the default behaviour will be Positive. A positive polarity means that the condition should report a true status under normal conditions. A negative polarity means that the condition should report a false status under normal conditions.",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- Required: []string{"conditionType"},
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineRollingUpdateDeployment(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineRollingUpdateDeployment is used to control the desired behavior of rolling update.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "maxUnavailable": {
- SchemaProps: spec.SchemaProps{
- Description: "maxUnavailable is the maximum number of machines that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired machines (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 0. Example: when this is set to 30%, the old MachineSet can be scaled down to 70% of desired machines immediately when the rolling update starts. Once new machines are ready, old MachineSet can be scaled down further, followed by scaling up the new MachineSet, ensuring that the total number of machines available at all times during the update is at least 70% of desired machines.",
- Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"),
- },
- },
- "maxSurge": {
- SchemaProps: spec.SchemaProps{
- Description: "maxSurge is the maximum number of machines that can be scheduled above the desired number of machines. Value can be an absolute number (ex: 5) or a percentage of desired machines (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 1. Example: when this is set to 30%, the new MachineSet can be scaled up immediately when the rolling update starts, such that the total number of old and new machines do not exceed 130% of desired machines. Once old machines have been killed, new MachineSet can be scaled up further, ensuring that total number of machines running at any time during the update is at most 130% of desired machines.",
- Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"),
- },
- },
- "deletePolicy": {
- SchemaProps: spec.SchemaProps{
- Description: "deletePolicy defines the policy used by the MachineDeployment to identify nodes to delete when downscaling. Valid values are \"Random, \"Newest\", \"Oldest\" When no value is supplied, the default DeletePolicy of MachineSet is used",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/util/intstr.IntOrString"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineSet(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineSet is the Schema for the machinesets API.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "kind": {
- SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
- Type: []string{"string"},
- Format: "",
- },
- },
- "apiVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
- Type: []string{"string"},
- Format: "",
- },
- },
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
- },
- },
- "spec": {
- SchemaProps: spec.SchemaProps{
- Description: "spec is the desired state of MachineSet.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetSpec"),
- },
- },
- "status": {
- SchemaProps: spec.SchemaProps{
- Description: "status is the observed state of MachineSet.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetStatus"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetStatus"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineSetList(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineSetList contains a list of MachineSet.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "kind": {
- SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
- Type: []string{"string"},
- Format: "",
- },
- },
- "apiVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
- Type: []string{"string"},
- Format: "",
- },
- },
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds",
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"),
- },
- },
- "items": {
- SchemaProps: spec.SchemaProps{
- Description: "items is the list of MachineSets.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSet"),
- },
- },
- },
- },
- },
- },
- Required: []string{"items"},
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSet"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineSetSpec defines the desired state of MachineSet.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "clusterName": {
- SchemaProps: spec.SchemaProps{
- Description: "clusterName is the name of the Cluster this object belongs to.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "replicas": {
- SchemaProps: spec.SchemaProps{
- Description: "replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified.\n\nDefaults to: * if the Kubernetes autoscaler min size and max size annotations are set:\n - if it's a new MachineSet, use min size\n - if the replicas field of the old MachineSet is < min size, use min size\n - if the replicas field of the old MachineSet is > max size, use max size\n - if the replicas field of the old MachineSet is in the (min size, max size) range, keep the value from the oldMS\n* otherwise use 1 Note: Defaulting will be run whenever the replicas field is not set: * A new MachineSet is created with replicas not set. * On an existing MachineSet the replicas field was first set and is now unset. Those cases are especially relevant for the following Kubernetes autoscaler use cases: * A new MachineSet is created and replicas should be managed by the autoscaler * An existing MachineSet which initially wasn't controlled by the autoscaler\n should be later controlled by the autoscaler",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "minReadySeconds": {
- SchemaProps: spec.SchemaProps{
- Description: "minReadySeconds is the minimum number of seconds for which a Node for a newly created machine should be ready before considering the replica available. Defaults to 0 (machine will be considered available as soon as the Node is ready)",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "deletePolicy": {
- SchemaProps: spec.SchemaProps{
- Description: "deletePolicy defines the policy used to identify nodes to delete when downscaling. Defaults to \"Random\". Valid values are \"Random, \"Newest\", \"Oldest\"",
- Type: []string{"string"},
- Format: "",
- },
- },
- "selector": {
- SchemaProps: spec.SchemaProps{
- Description: "selector is a label query over machines that should match the replica count. Label keys and values that must match in order to be controlled by this MachineSet. It must match the machine template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"),
- },
- },
- "template": {
- SchemaProps: spec.SchemaProps{
- Description: "template is the object that describes the machine that will be created if insufficient replicas are detected. Object references to custom resources are treated as templates.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTemplateSpec"),
- },
- },
- "machineNamingStrategy": {
- SchemaProps: spec.SchemaProps{
- Description: "machineNamingStrategy allows changing the naming pattern used when creating Machines. Note: InfraMachines & BootstrapConfigs will use the same name as the corresponding Machines.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineNamingStrategy"),
- },
- },
- },
- Required: []string{"clusterName", "selector"},
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineNamingStrategy", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineTemplateSpec"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineSetStatus defines the observed state of MachineSet.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "selector": {
- SchemaProps: spec.SchemaProps{
- Description: "selector is the same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors",
- Type: []string{"string"},
- Format: "",
- },
- },
- "replicas": {
- SchemaProps: spec.SchemaProps{
- Description: "replicas is the most recently observed number of replicas.",
- Default: 0,
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "fullyLabeledReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "fullyLabeledReplicas is the number of replicas that have labels matching the labels of the machine template of the MachineSet.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.",
- Default: 0,
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "readyReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "readyReplicas is the number of ready replicas for this MachineSet. A machine is considered ready when the node has been created and is \"Ready\".",
- Default: 0,
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "availableReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "availableReplicas is the number of available replicas (ready for at least minReadySeconds) for this MachineSet.",
- Default: 0,
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "observedGeneration": {
- SchemaProps: spec.SchemaProps{
- Description: "observedGeneration reflects the generation of the most recently observed MachineSet.",
- Type: []string{"integer"},
- Format: "int64",
- },
- },
- "failureReason": {
- SchemaProps: spec.SchemaProps{
- Description: "failureReason will be set in the event that there is a terminal problem reconciling the Machine and will contain a succinct value suitable for machine interpretation.\n\nIn the event that there is a terminal problem reconciling the replicas, both FailureReason and FailureMessage will be set. FailureReason will be populated with a succinct value suitable for machine interpretation, while FailureMessage will contain a more verbose string suitable for logging and human consumption.\n\nThese fields should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is fundamentally wrong with the MachineTemplate's spec or the configuration of the machine controller, and that manual intervention is required. Examples of terminal errors would be invalid combinations of settings in the spec, values that are unsupported by the machine controller, or the responsible machine controller itself being critically misconfigured.\n\nAny transient errors that occur during the reconciliation of Machines can be added as events to the MachineSet object and/or logged in the controller's output.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "failureMessage": {
- SchemaProps: spec.SchemaProps{
- Description: "failureMessage will be set in the event that there is a terminal problem reconciling the Machine and will contain a more verbose string suitable for logging and human consumption.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "conditions": {
- SchemaProps: spec.SchemaProps{
- Description: "conditions defines current service state of the MachineSet.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"),
- },
- },
- },
- },
- },
- "v1beta2": {
- SchemaProps: spec.SchemaProps{
- Description: "v1beta2 groups all the fields that will be added or modified in MachineSet's status with the V1Beta2 version.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetV1Beta2Status"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSetV1Beta2Status"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineSetV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineSetV1Beta2Status groups all the fields that will be added or modified in MachineSetStatus with the V1Beta2 version. See https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more context.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "conditions": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "type",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "conditions represents the observations of a MachineSet's current state. Known condition types are MachinesReady, MachinesUpToDate, ScalingUp, ScalingDown, Remediating, Deleting, Paused.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"),
- },
- },
- },
- },
- },
- "readyReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "readyReplicas is the number of ready replicas for this MachineSet. A machine is considered ready when Machine's Ready condition is true.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "availableReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "availableReplicas is the number of available replicas for this MachineSet. A machine is considered available when Machine's Available condition is true.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "upToDateReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "upToDateReplicas is the number of up-to-date replicas for this MachineSet. A machine is considered up-to-date when Machine's UpToDate condition is true.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineSpec defines the desired state of Machine.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "clusterName": {
- SchemaProps: spec.SchemaProps{
- Description: "clusterName is the name of the Cluster this object belongs to.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "bootstrap": {
- SchemaProps: spec.SchemaProps{
- Description: "bootstrap is a reference to a local struct which encapsulates fields to configure the Machine’s bootstrapping mechanism.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Bootstrap"),
- },
- },
- "infrastructureRef": {
- SchemaProps: spec.SchemaProps{
- Description: "infrastructureRef is a required reference to a custom resource offered by an infrastructure provider.",
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/api/core/v1.ObjectReference"),
- },
- },
- "version": {
- SchemaProps: spec.SchemaProps{
- Description: "version defines the desired Kubernetes version. This field is meant to be optionally used by bootstrap providers.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "providerID": {
- SchemaProps: spec.SchemaProps{
- Description: "providerID is the identification ID of the machine provided by the provider. This field must match the provider ID as seen on the node object corresponding to this machine. This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a generic out-of-tree provider for autoscaler, this field is required by autoscaler to be able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver and then a comparison is done to find out unregistered machines and are marked for delete. This field will be set by the actuators and consumed by higher level entities like autoscaler that will be interfacing with cluster-api as generic provider.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "failureDomain": {
- SchemaProps: spec.SchemaProps{
- Description: "failureDomain is the failure domain the machine will be created in. Must match a key in the FailureDomains map stored on the cluster object.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "readinessGates": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "conditionType",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "readinessGates specifies additional conditions to include when evaluating Machine Ready condition.\n\nThis field can be used e.g. by Cluster API control plane providers to extend the semantic of the Ready condition for the Machine they control, like the kubeadm control provider adding ReadinessGates for the APIServerPodHealthy, SchedulerPodHealthy conditions, etc.\n\nAnother example are external controllers, e.g. responsible to install special software/hardware on the Machines; they can include the status of those components with a new condition and add this condition to ReadinessGates.\n\nNOTE: This field is considered only for computing v1beta2 conditions. NOTE: In case readinessGates conditions start with the APIServer, ControllerManager, Scheduler prefix, and all those readiness gates condition are reporting the same message, when computing the Machine's Ready condition those readinessGates will be replaced by a single entry reporting \"Control plane components: \" + message. This helps to improve readability of conditions bubbling up to the Machine's owner resource / to the Cluster).",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate"),
- },
- },
- },
- },
- },
- "nodeDrainTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeDrainTimeout is the total amount of time that the controller will spend on draining a node. The default value is 0, meaning that the node can be drained without any time limitations. NOTE: NodeDrainTimeout is different from `kubectl drain --timeout`",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "nodeVolumeDetachTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeVolumeDetachTimeout is the total amount of time that the controller will spend on waiting for all volumes to be detached. The default value is 0, meaning that the volumes can be detached without any time limitations.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- "nodeDeletionTimeout": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeDeletionTimeout defines how long the controller will attempt to delete the Node that the Machine hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. Defaults to 10 seconds.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- },
- Required: []string{"clusterName", "bootstrap", "infrastructureRef"},
- },
- },
- Dependencies: []string{
- "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "sigs.k8s.io/cluster-api/api/core/v1beta1.Bootstrap", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineReadinessGate"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineStatus defines the observed state of Machine.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "nodeRef": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeRef will point to the corresponding Node if it exists.",
- Ref: ref("k8s.io/api/core/v1.ObjectReference"),
- },
- },
- "nodeInfo": {
- SchemaProps: spec.SchemaProps{
- Description: "nodeInfo is a set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info",
- Ref: ref("k8s.io/api/core/v1.NodeSystemInfo"),
- },
- },
- "lastUpdated": {
- SchemaProps: spec.SchemaProps{
- Description: "lastUpdated identifies when the phase of the Machine last transitioned.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"),
- },
- },
- "failureReason": {
- SchemaProps: spec.SchemaProps{
- Description: "failureReason will be set in the event that there is a terminal problem reconciling the Machine and will contain a succinct value suitable for machine interpretation.\n\nThis field should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is fundamentally wrong with the Machine's spec or the configuration of the controller, and that manual intervention is required. Examples of terminal errors would be invalid combinations of settings in the spec, values that are unsupported by the controller, or the responsible controller itself being critically misconfigured.\n\nAny transient errors that occur during the reconciliation of Machines can be added as events to the Machine object and/or logged in the controller's output.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "failureMessage": {
- SchemaProps: spec.SchemaProps{
- Description: "failureMessage will be set in the event that there is a terminal problem reconciling the Machine and will contain a more verbose string suitable for logging and human consumption.\n\nThis field should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is fundamentally wrong with the Machine's spec or the configuration of the controller, and that manual intervention is required. Examples of terminal errors would be invalid combinations of settings in the spec, values that are unsupported by the controller, or the responsible controller itself being critically misconfigured.\n\nAny transient errors that occur during the reconciliation of Machines can be added as events to the Machine object and/or logged in the controller's output.\n\nDeprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "addresses": {
- SchemaProps: spec.SchemaProps{
- Description: "addresses is a list of addresses assigned to the machine. This field is copied from the infrastructure provider reference.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineAddress"),
- },
- },
- },
- },
- },
- "phase": {
- SchemaProps: spec.SchemaProps{
- Description: "phase represents the current phase of machine actuation.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "certificatesExpiryDate": {
- SchemaProps: spec.SchemaProps{
- Description: "certificatesExpiryDate is the expiry date of the machine certificates. This value is only set for control plane machines.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"),
- },
- },
- "bootstrapReady": {
- SchemaProps: spec.SchemaProps{
- Description: "bootstrapReady is the state of the bootstrap provider.",
- Default: false,
- Type: []string{"boolean"},
- Format: "",
- },
- },
- "infrastructureReady": {
- SchemaProps: spec.SchemaProps{
- Description: "infrastructureReady is the state of the infrastructure provider.",
- Default: false,
- Type: []string{"boolean"},
- Format: "",
- },
- },
- "observedGeneration": {
- SchemaProps: spec.SchemaProps{
- Description: "observedGeneration is the latest generation observed by the controller.",
- Type: []string{"integer"},
- Format: "int64",
- },
- },
- "conditions": {
- SchemaProps: spec.SchemaProps{
- Description: "conditions defines current service state of the Machine.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.Condition"),
- },
- },
- },
- },
- },
- "deletion": {
- SchemaProps: spec.SchemaProps{
- Description: "deletion contains information relating to removal of the Machine. Only present when the Machine has a deletionTimestamp and drain or wait for volume detach started.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeletionStatus"),
- },
- },
- "v1beta2": {
- SchemaProps: spec.SchemaProps{
- Description: "v1beta2 groups all the fields that will be added or modified in Machine's status with the V1Beta2 version.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineV1Beta2Status"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/api/core/v1.NodeSystemInfo", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/core/v1beta1.Condition", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineAddress", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeletionStatus", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineV1Beta2Status"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineTemplateSpec describes the data needed to create a Machine from a template.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"),
- },
- },
- "spec": {
- SchemaProps: spec.SchemaProps{
- Description: "spec is the specification of the desired behavior of the machine. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSpec"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineSpec", "sigs.k8s.io/cluster-api/api/core/v1beta1.ObjectMeta"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_MachineV1Beta2Status(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "MachineV1Beta2Status groups all the fields that will be added or modified in MachineStatus with the V1Beta2 version. See https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more context.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "conditions": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "type",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "conditions represents the observations of a Machine's current state. Known condition types are Available, Ready, UpToDate, BootstrapConfigReady, InfrastructureReady, NodeReady, NodeHealthy, Deleting, Paused. If a MachineHealthCheck is targeting this machine, also HealthCheckSucceeded, OwnerRemediated conditions are added. Additionally control plane Machines controlled by KubeadmControlPlane will have following additional conditions: APIServerPodHealthy, ControllerManagerPodHealthy, SchedulerPodHealthy, EtcdPodHealthy, EtcdMemberHealthy.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"),
- },
- },
- },
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_NetworkRanges(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "NetworkRanges represents ranges of network addresses.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "cidrBlocks": {
- SchemaProps: spec.SchemaProps{
- Description: "cidrBlocks is a list of CIDR blocks.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- },
- Required: []string{"cidrBlocks"},
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ObjectMeta(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. This is a copy of customizable fields from metav1.ObjectMeta.\n\nObjectMeta is embedded in `Machine.Spec`, `MachineDeployment.Template` and `MachineSet.Template`, which are not top-level Kubernetes objects. Given that metav1.ObjectMeta has lots of special cases and read-only fields which end up in the generated CRD validation, having it as a subset simplifies the API and some issues that can impact user experience.\n\nDuring the [upgrade to controller-tools@v2](https://github.com/kubernetes-sigs/cluster-api/pull/1054) for v1alpha2, we noticed a failure would occur running Cluster API test suite against the new CRDs, specifically `spec.metadata.creationTimestamp in body must be of type string: \"null\"`. The investigation showed that `controller-tools@v2` behaves differently than its previous version when handling types from [metav1](k8s.io/apimachinery/pkg/apis/meta/v1) package.\n\nIn more details, we found that embedded (non-top level) types that embedded `metav1.ObjectMeta` had validation properties, including for `creationTimestamp` (metav1.Time). The `metav1.Time` type specifies a custom json marshaller that, when IsZero() is true, returns `null` which breaks validation because the field isn't marked as nullable.\n\nIn future versions, controller-tools@v2 might allow overriding the type and validation for embedded types. When that happens, this hack should be revisited.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "labels": {
- SchemaProps: spec.SchemaProps{
- Description: "labels is a map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels",
- Type: []string{"object"},
- AdditionalProperties: &spec.SchemaOrBool{
- Allows: true,
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- "annotations": {
- SchemaProps: spec.SchemaProps{
- Description: "annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations",
- Type: []string{"object"},
- AdditionalProperties: &spec.SchemaOrBool{
- Allows: true,
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- },
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_PatchDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "PatchDefinition defines a patch which is applied to customize the referenced templates.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "selector": {
- SchemaProps: spec.SchemaProps{
- Description: "selector defines on which templates the patch should be applied.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelector"),
- },
- },
- "jsonPatches": {
- SchemaProps: spec.SchemaProps{
- Description: "jsonPatches defines the patches which should be applied on the templates matching the selector. Note: Patches will be applied in the order of the array.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.JSONPatch"),
- },
- },
- },
- },
- },
- },
- Required: []string{"selector", "jsonPatches"},
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.JSONPatch", "sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelector"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_PatchSelector(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "PatchSelector defines on which templates the patch should be applied. Note: Matching on APIVersion and Kind is mandatory, to enforce that the patches are written for the correct version. The version of the references in the ClusterClass may be automatically updated during reconciliation if there is a newer version for the same contract. Note: The results of selection based on the individual fields are ANDed.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "apiVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "apiVersion filters templates by apiVersion.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "kind": {
- SchemaProps: spec.SchemaProps{
- Description: "kind filters templates by kind.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "matchResources": {
- SchemaProps: spec.SchemaProps{
- Description: "matchResources selects templates based on where they are referenced.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelectorMatch"),
- },
- },
- },
- Required: []string{"apiVersion", "kind", "matchResources"},
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelectorMatch"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_PatchSelectorMatch(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "PatchSelectorMatch selects templates based on where they are referenced. Note: The selector must match at least one template. Note: The results of selection based on the individual fields are ORed.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "controlPlane": {
- SchemaProps: spec.SchemaProps{
- Description: "controlPlane selects templates referenced in .spec.ControlPlane. Note: this will match the controlPlane and also the controlPlane machineInfrastructure (depending on the kind and apiVersion).",
- Type: []string{"boolean"},
- Format: "",
- },
- },
- "infrastructureCluster": {
- SchemaProps: spec.SchemaProps{
- Description: "infrastructureCluster selects templates referenced in .spec.infrastructure.",
- Type: []string{"boolean"},
- Format: "",
- },
- },
- "machineDeploymentClass": {
- SchemaProps: spec.SchemaProps{
- Description: "machineDeploymentClass selects templates referenced in specific MachineDeploymentClasses in .spec.workers.machineDeployments.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelectorMatchMachineDeploymentClass"),
- },
- },
- "machinePoolClass": {
- SchemaProps: spec.SchemaProps{
- Description: "machinePoolClass selects templates referenced in specific MachinePoolClasses in .spec.workers.machinePools.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelectorMatchMachinePoolClass"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelectorMatchMachineDeploymentClass", "sigs.k8s.io/cluster-api/api/core/v1beta1.PatchSelectorMatchMachinePoolClass"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_PatchSelectorMatchMachineDeploymentClass(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "PatchSelectorMatchMachineDeploymentClass selects templates referenced in specific MachineDeploymentClasses in .spec.workers.machineDeployments.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "names": {
- SchemaProps: spec.SchemaProps{
- Description: "names selects templates by class names.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- },
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_PatchSelectorMatchMachinePoolClass(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "PatchSelectorMatchMachinePoolClass selects templates referenced in specific MachinePoolClasses in .spec.workers.machinePools.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "names": {
- SchemaProps: spec.SchemaProps{
- Description: "names selects templates by class names.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- },
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_RemediationStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "RemediationStrategy allows to define how the MachineSet can control scaling operations.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "maxInFlight": {
- SchemaProps: spec.SchemaProps{
- Description: "maxInFlight determines how many in flight remediations should happen at the same time.\n\nRemediation only happens on the MachineSet with the most current revision, while older MachineSets (usually present during rollout operations) aren't allowed to remediate.\n\nNote: In general (independent of remediations), unhealthy machines are always prioritized during scale down operations over healthy ones.\n\nMaxInFlight can be set to a fixed number or a percentage. Example: when this is set to 20%, the MachineSet controller deletes at most 20% of the desired replicas.\n\nIf not set, remediation is limited to all machines (bounded by replicas) under the active MachineSet's management.",
- Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/util/intstr.IntOrString"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_Topology(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "Topology encapsulates the information of the managed resources.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "class": {
- SchemaProps: spec.SchemaProps{
- Description: "class is the name of the ClusterClass object to create the topology.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "classNamespace": {
- SchemaProps: spec.SchemaProps{
- Description: "classNamespace is the namespace of the ClusterClass that should be used for the topology. If classNamespace is empty or not set, it is defaulted to the namespace of the Cluster object. classNamespace must be a valid namespace name and because of that be at most 63 characters in length and it must consist only of lower case alphanumeric characters or hyphens (-), and must start and end with an alphanumeric character.",
- Type: []string{"string"},
- Format: "",
- },
- },
- "version": {
- SchemaProps: spec.SchemaProps{
- Description: "version is the Kubernetes version of the cluster.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "rolloutAfter": {
- SchemaProps: spec.SchemaProps{
- Description: "rolloutAfter performs a rollout of the entire cluster one component at a time, control plane first and then machine deployments.\n\nDeprecated: This field has no function and is going to be removed in the next apiVersion.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"),
- },
- },
- "controlPlane": {
- SchemaProps: spec.SchemaProps{
- Description: "controlPlane describes the cluster control plane.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneTopology"),
- },
- },
- "workers": {
- SchemaProps: spec.SchemaProps{
- Description: "workers encapsulates the different constructs that form the worker nodes for the cluster.",
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersTopology"),
- },
- },
- "variables": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "name",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "variables can be used to customize the Cluster through patches. They must comply to the corresponding VariableClasses defined in the ClusterClass.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterVariable"),
- },
- },
- },
- },
- },
- },
- Required: []string{"class", "version"},
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/core/v1beta1.ClusterVariable", "sigs.k8s.io/cluster-api/api/core/v1beta1.ControlPlaneTopology", "sigs.k8s.io/cluster-api/api/core/v1beta1.WorkersTopology"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_UnhealthyCondition(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "UnhealthyCondition represents a Node condition type and value with a timeout specified as a duration. When the named condition has been in the given status for at least the timeout value, a node is considered unhealthy.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "type": {
- SchemaProps: spec.SchemaProps{
- Description: "type of Node condition",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "status": {
- SchemaProps: spec.SchemaProps{
- Description: "status of the condition, one of True, False, Unknown.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "timeout": {
- SchemaProps: spec.SchemaProps{
- Description: "timeout is the duration that a node must be in a given status for, after which the node is considered unhealthy. For example, with a value of \"1h\", the node must match the status for at least 1 hour before being considered unhealthy.",
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
- },
- },
- },
- Required: []string{"type", "status", "timeout"},
- },
- },
- Dependencies: []string{
- "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_ValidationRule(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ValidationRule describes a validation rule written in the CEL expression language.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "rule": {
- SchemaProps: spec.SchemaProps{
- Description: "rule represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. The `self` variable in the CEL expression is bound to the scoped value. If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable via `self.field` and field presence can be checked via `has(self.field)`. If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map are accessible via CEL macros and functions such as `self.all(...)`. If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and functions. If the Rule is scoped to a scalar, `self` is bound to the scalar value. Examples: - Rule scoped to a map of objects: {\"rule\": \"self.components['Widget'].priority < 10\"} - Rule scoped to a list of integers: {\"rule\": \"self.values.all(value, value >= 0 && value < 100)\"} - Rule scoped to a string value: {\"rule\": \"self.startsWith('kube')\"}\n\nUnknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL expressions. This includes: - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. - Object properties where the property schema is of an \"unknown type\". An \"unknown type\" is recursively defined as:\n - A schema with no type and x-kubernetes-preserve-unknown-fields set to true\n - An array where the items schema is of an \"unknown type\"\n - An object where the additionalProperties schema is of an \"unknown type\"\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Rule accessing a property named \"namespace\": {\"rule\": \"self.__namespace__ > 0\"}\n - Rule accessing a property named \"x-prop\": {\"rule\": \"self.x__dash__prop > 0\"}\n - Rule accessing a property named \"redact__d\": {\"rule\": \"self.redact__underscores__d > 0\"}\n\nIf `rule` makes use of the `oldSelf` variable it is implicitly a `transition rule`.\n\nBy default, the `oldSelf` variable is the same type as `self`.\n\nTransition rules by default are applied only on UPDATE requests and are skipped if an old value could not be found.",
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- "message": {
- SchemaProps: spec.SchemaProps{
- Description: "message represents the message displayed when validation fails. The message is required if the Rule contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\"",
- Type: []string{"string"},
- Format: "",
- },
- },
- "messageExpression": {
- SchemaProps: spec.SchemaProps{
- Description: "messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a rule, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset. messageExpression has access to all the same variables as the rule; the only difference is the return type. Example: \"x must be less than max (\"+string(self.max)+\")\"",
- Type: []string{"string"},
- Format: "",
- },
- },
- "reason": {
- SchemaProps: spec.SchemaProps{
- Description: "reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. The currently supported reasons are: \"FieldValueInvalid\", \"FieldValueForbidden\", \"FieldValueRequired\", \"FieldValueDuplicate\". If not set, default to use \"FieldValueInvalid\". All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid.",
- Default: FieldValueInvalid,
- Type: []string{"string"},
- Format: "",
- },
- },
- "fieldPath": {
- SchemaProps: spec.SchemaProps{
- Description: "fieldPath represents the field path returned when the validation fails. It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` It does not support list numeric index. It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. Numeric index of array is not supported. For field name which contains special characters, use `['specialName']` to refer the field name. e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']`",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- Required: []string{"rule"},
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_VariableSchema(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "VariableSchema defines the schema of a variable.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "openAPIV3Schema": {
- SchemaProps: spec.SchemaProps{
- Description: "openAPIV3Schema defines the schema of a variable via OpenAPI v3 schema. The schema is a subset of the schema used in Kubernetes CRDs.",
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps"),
- },
- },
- },
- Required: []string{"openAPIV3Schema"},
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.JSONSchemaProps"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_VariableSchemaMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "VariableSchemaMetadata is the metadata of a variable or a nested field within a variable. It can be used to add additional data for higher level tools.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "labels": {
- SchemaProps: spec.SchemaProps{
- Description: "labels is a map of string keys and values that can be used to organize and categorize (scope and select) variables.",
- Type: []string{"object"},
- AdditionalProperties: &spec.SchemaOrBool{
- Allows: true,
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- "annotations": {
- SchemaProps: spec.SchemaProps{
- Description: "annotations is an unstructured key value map that can be used to store and retrieve arbitrary metadata. They are not queryable.",
- Type: []string{"object"},
- AdditionalProperties: &spec.SchemaOrBool{
- Allows: true,
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- },
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_WorkersClass(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "WorkersClass is a collection of deployment classes.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "machineDeployments": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "class",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "machineDeployments is a list of machine deployment classes that can be used to create a set of worker nodes.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClass"),
- },
- },
- },
- },
- },
- "machinePools": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "class",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "machinePools is a list of machine pool classes that can be used to create a set of worker nodes.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClass"),
- },
- },
- },
- },
- },
- },
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentClass", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolClass"},
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_WorkersStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "WorkersStatus groups all the observations about workers current state.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "desiredReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "desiredReplicas is the total number of desired worker machines in this cluster.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "replicas": {
- SchemaProps: spec.SchemaProps{
- Description: "replicas is the total number of worker machines in this cluster. NOTE: replicas also includes machines still being provisioned or being deleted.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "upToDateReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "upToDateReplicas is the number of up-to-date worker machines in this cluster. A machine is considered up-to-date when Machine's UpToDate condition is true.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "readyReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "readyReplicas is the total number of ready worker machines in this cluster. A machine is considered ready when Machine's Ready condition is true.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- "availableReplicas": {
- SchemaProps: spec.SchemaProps{
- Description: "availableReplicas is the total number of available worker machines in this cluster. A machine is considered available when Machine's Available condition is true.",
- Type: []string{"integer"},
- Format: "int32",
- },
- },
- },
- },
- },
- }
-}
-
-func schema_cluster_api_api_core_v1beta1_WorkersTopology(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "WorkersTopology represents the different sets of worker nodes in the cluster.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "machineDeployments": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "name",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "machineDeployments is a list of machine deployments in the cluster.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentTopology"),
- },
- },
- },
- },
- },
- "machinePools": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-map-keys": []interface{}{
- "name",
- },
- "x-kubernetes-list-type": "map",
- },
- },
- SchemaProps: spec.SchemaProps{
- Description: "machinePools is a list of machine pools in the cluster.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolTopology"),
- },
- },
- },
- },
- },
- },
- },
- },
- Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta1.MachineDeploymentTopology", "sigs.k8s.io/cluster-api/api/core/v1beta1.MachinePoolTopology"},
- }
-}
diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/cluster_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/cluster_types.go
index 9666455e9035..9348ce5f5573 100644
--- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/cluster_types.go
+++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/cluster_types.go
@@ -503,8 +503,7 @@ type ClusterSpec struct {
// topology encapsulates the topology for the cluster.
// NOTE: It is required to enable the ClusterTopology
- // feature gate flag to activate managed topologies support;
- // this feature is highly experimental, and parts of it might still be not implemented.
+ // feature gate flag to activate managed topologies support.
// +optional
Topology Topology `json:"topology,omitempty,omitzero"`
@@ -633,6 +632,10 @@ type ControlPlaneTopology struct {
// +optional
Replicas *int32 `json:"replicas,omitempty"`
+ // rollout allows you to configure the behavior of rolling updates to the control plane.
+ // +optional
+ Rollout ControlPlaneTopologyRolloutSpec `json:"rollout,omitempty,omitzero"`
+
// healthCheck allows to enable, disable and override control plane health check
// configuration from the ClusterClass for this control plane.
// +optional
@@ -642,6 +645,23 @@ type ControlPlaneTopology struct {
// +optional
Deletion ControlPlaneTopologyMachineDeletionSpec `json:"deletion,omitempty,omitzero"`
+ // taints are the node taints that Cluster API will manage.
+ // This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes,
+ // e.g. the node controller might add the node.kubernetes.io/not-ready taint.
+ // Only those taints defined in this list will be added or removed by core Cluster API controllers.
+ //
+ // There can be at most 64 taints.
+ // A pod would have to tolerate all existing taints to run on the corresponding node.
+ //
+ // NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
+ // +optional
+ // +listType=map
+ // +listMapKey=key
+ // +listMapKey=effect
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=64
+ Taints []MachineTaint `json:"taints,omitempty"`
+
// readinessGates specifies additional conditions to include when evaluating Machine Ready condition.
//
// This field can be used e.g. to instruct the machine controller to include in the computation for Machine's ready
@@ -663,6 +683,18 @@ type ControlPlaneTopology struct {
Variables ControlPlaneVariables `json:"variables,omitempty,omitzero"`
}
+// ControlPlaneTopologyRolloutSpec defines the rollout behavior.
+// +kubebuilder:validation:MinProperties=1
+type ControlPlaneTopologyRolloutSpec struct {
+ // after is a field to indicate a rollout should be performed
+ // after the specified time even if no changes have been made to the ControlPlane.
+ // Example: In the YAML the time can be specified in the RFC3339 format.
+ // To specify the rolloutAfter target as March 9, 2023, at 9 am UTC
+ // use "2023-03-09T09:00:00Z".
+ // +optional
+ After metav1.Time `json:"after,omitempty,omitzero"`
+}
+
// ControlPlaneTopologyHealthCheck defines a MachineHealthCheck for control plane machines.
// +kubebuilder:validation:MinProperties=1
type ControlPlaneTopologyHealthCheck struct {
@@ -891,6 +923,23 @@ type MachineDeploymentTopology struct {
// +optional
Deletion MachineDeploymentTopologyMachineDeletionSpec `json:"deletion,omitempty,omitzero"`
+ // taints are the node taints that Cluster API will manage.
+ // This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes,
+ // e.g. the node controller might add the node.kubernetes.io/not-ready taint.
+ // Only those taints defined in this list will be added or removed by core Cluster API controllers.
+ //
+ // There can be at most 64 taints.
+ // A pod would have to tolerate all existing taints to run on the corresponding node.
+ //
+ // NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
+ // +optional
+ // +listType=map
+ // +listMapKey=key
+ // +listMapKey=effect
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=64
+ Taints []MachineTaint `json:"taints,omitempty"`
+
// minReadySeconds is the minimum number of seconds for which a newly created machine should
// be ready.
// Defaults to 0 (machine will be considered available as soon as it
@@ -1108,6 +1157,15 @@ type MachineDeploymentTopologyMachineDeletionSpec struct {
// MachineDeploymentTopologyRolloutSpec defines the rollout behavior.
// +kubebuilder:validation:MinProperties=1
type MachineDeploymentTopologyRolloutSpec struct {
+ // after is a field to indicate a rollout should be performed
+ // after the specified time even if no changes have been made to the
+ // MachineDeployment.
+ // Example: In the YAML the time can be specified in the RFC3339 format.
+ // To specify the rolloutAfter target as March 9, 2023, at 9 am UTC
+ // use "2023-03-09T09:00:00Z".
+ // +optional
+ After metav1.Time `json:"after,omitempty,omitzero"`
+
// strategy specifies how to roll out control plane Machines.
// +optional
Strategy MachineDeploymentTopologyRolloutStrategy `json:"strategy,omitempty,omitzero"`
@@ -1203,6 +1261,23 @@ type MachinePoolTopology struct {
// +optional
Deletion MachinePoolTopologyMachineDeletionSpec `json:"deletion,omitempty,omitzero"`
+ // taints are the node taints that Cluster API will manage.
+ // This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes,
+ // e.g. the node controller might add the node.kubernetes.io/not-ready taint.
+ // Only those taints defined in this list will be added or removed by core Cluster API controllers.
+ //
+ // There can be at most 64 taints.
+ // A pod would have to tolerate all existing taints to run on the corresponding node.
+ //
+ // NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
+ // +optional
+ // +listType=map
+ // +listMapKey=key
+ // +listMapKey=effect
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=64
+ Taints []MachineTaint `json:"taints,omitempty"`
+
// minReadySeconds is the minimum number of seconds for which a newly created machine pool should
// be ready.
// Defaults to 0 (machine will be considered available as soon as it
diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/clusterclass_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/clusterclass_types.go
index 12e8cc19c5d4..17e09e48a0cb 100644
--- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/clusterclass_types.go
+++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/clusterclass_types.go
@@ -203,6 +203,23 @@ type ControlPlaneClass struct {
// +optional
Deletion ControlPlaneClassMachineDeletionSpec `json:"deletion,omitempty,omitzero"`
+ // taints are the node taints that Cluster API will manage.
+ // This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes,
+ // e.g. the node controller might add the node.kubernetes.io/not-ready taint.
+ // Only those taints defined in this list will be added or removed by core Cluster API controllers.
+ //
+ // There can be at most 64 taints.
+ // A pod would have to tolerate all existing taints to run on the corresponding node.
+ //
+ // NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
+ // +optional
+ // +listType=map
+ // +listMapKey=key
+ // +listMapKey=effect
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=64
+ Taints []MachineTaint `json:"taints,omitempty"`
+
// readinessGates specifies additional conditions to include when evaluating Machine Ready condition.
//
// This field can be used e.g. to instruct the machine controller to include in the computation for Machine's ready
@@ -462,6 +479,23 @@ type MachineDeploymentClass struct {
// +optional
Deletion MachineDeploymentClassMachineDeletionSpec `json:"deletion,omitempty,omitzero"`
+ // taints are the node taints that Cluster API will manage.
+ // This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes,
+ // e.g. the node controller might add the node.kubernetes.io/not-ready taint.
+ // Only those taints defined in this list will be added or removed by core Cluster API controllers.
+ //
+ // There can be at most 64 taints.
+ // A pod would have to tolerate all existing taints to run on the corresponding node.
+ //
+ // NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
+ // +optional
+ // +listType=map
+ // +listMapKey=key
+ // +listMapKey=effect
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=64
+ Taints []MachineTaint `json:"taints,omitempty"`
+
// minReadySeconds is the minimum number of seconds for which a newly created machine should
// be ready.
// Defaults to 0 (machine will be considered available as soon as it
@@ -775,6 +809,23 @@ type MachinePoolClass struct {
// +optional
Deletion MachinePoolClassMachineDeletionSpec `json:"deletion,omitempty,omitzero"`
+ // taints are the node taints that Cluster API will manage.
+ // This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes,
+ // e.g. the node controller might add the node.kubernetes.io/not-ready taint.
+ // Only those taints defined in this list will be added or removed by core Cluster API controllers.
+ //
+ // There can be at most 64 taints.
+ // A pod would have to tolerate all existing taints to run on the corresponding node.
+ //
+ // NOTE: This list is implemented as a "map" type, meaning that individual elements can be managed by different owners.
+ // +optional
+ // +listType=map
+ // +listMapKey=key
+ // +listMapKey=effect
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=64
+ Taints []MachineTaint `json:"taints,omitempty"`
+
// minReadySeconds is the minimum number of seconds for which a newly created machine pool should
// be ready.
// Defaults to 0 (machine will be considered available as soon as it
diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/common_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/common_types.go
index 13b591c1823a..368b9dadeb65 100644
--- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/common_types.go
+++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/common_types.go
@@ -411,6 +411,8 @@ func (r *ContractVersionedObjectReference) GroupKind() schema.GroupKind {
// MachineTaint defines a taint equivalent to corev1.Taint, but additionally having a propagation field.
type MachineTaint struct {
+ // Note: we do not use CEL for validating the key as qualified name, because it would be too expensive for Cluster and ClusterClass objects.
+
// key is the taint key to be applied to a node.
// Must be a valid qualified name of maximum size 63 characters
// with an optional subdomain prefix of maximum size 253 characters,
@@ -419,7 +421,6 @@ type MachineTaint struct {
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=317
// +kubebuilder:validation:Pattern=^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$
- // +kubebuilder:validation:XValidation:rule="self.contains('/') ? ( self.split('/') [0].size() <= 253 && self.split('/') [1].size() <= 63 && self.split('/').size() == 2 ) : self.size() <= 63",message="key must be a valid qualified name of max size 63 characters with an optional subdomain prefix of max size 253 characters"
Key string `json:"key,omitempty"`
// value is the taint value corresponding to the taint key.
diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/condition_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/condition_types.go
index c609b34c7e9e..479d229351a1 100644
--- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/condition_types.go
+++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/condition_types.go
@@ -22,6 +22,9 @@ import (
)
// ConditionSeverity expresses the severity of a Condition Type failing.
+//
+// Deprecated: This type is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.
+//
// +kubebuilder:validation:MaxLength=32
type ConditionSeverity string
@@ -40,11 +43,16 @@ const (
)
// ConditionType is a valid value for Condition.Type.
+//
+// Deprecated: This type is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.
+//
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=256
type ConditionType string
// Condition defines an observation of a Cluster API resource operational state.
+//
+// Deprecated: This type is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.
type Condition struct {
// type of condition in CamelCase or in foo.example.com/CamelCase.
// Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
@@ -85,4 +93,6 @@ type Condition struct {
}
// Conditions provide observations of the operational state of a Cluster API resource.
+//
+// Deprecated: This type is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.
type Conditions []Condition
diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machine_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machine_types.go
index 16f4bf07a707..77606a632084 100644
--- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machine_types.go
+++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machine_types.go
@@ -559,7 +559,7 @@ type MachineStatus struct {
// NodeHealthy, Updating, Deleting, Paused.
// If a MachineHealthCheck is targeting this machine, also HealthCheckSucceeded, OwnerRemediated conditions are added.
// Additionally control plane Machines controlled by KubeadmControlPlane will have following additional conditions:
- // APIServerPodHealthy, ControllerManagerPodHealthy, SchedulerPodHealthy, EtcdPodHealthy, EtcdMemberHealthy.
+ // APIServerPodHealthy, ControllerManagerPodHealthy, SchedulerPodHealthy, EtcdPodHealthy, EtcdMemberHealthy, NodeKubeadmLabelsAndTaintsSet.
// +optional
// +listType=map
// +listMapKey=type
@@ -589,6 +589,12 @@ type MachineStatus struct {
// +optional
Addresses MachineAddresses `json:"addresses,omitempty"`
+ // failureDomain is the failure domain where the Machine has been scheduled.
+ // +optional
+ // +kubebuilder:validation:MinLength=1
+ // +kubebuilder:validation:MaxLength=256
+ FailureDomain string `json:"failureDomain,omitempty"`
+
// phase represents the current phase of machine actuation.
// +optional
// +kubebuilder:validation:Enum=Pending;Provisioning;Provisioned;Running;Updating;Deleting;Deleted;Failed;Unknown
@@ -783,6 +789,7 @@ type Bootstrap struct {
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".spec.clusterName",description="Cluster"
// +kubebuilder:printcolumn:name="Node Name",type="string",JSONPath=".status.nodeRef.name",description="Node name associated with this machine"
// +kubebuilder:printcolumn:name="Provider ID",type="string",JSONPath=".spec.providerID",description="Provider ID",priority=10
+// +kubebuilder:printcolumn:name="Failure domain",type="string",JSONPath=".status.failureDomain",description="The failure domain where the Machine has been scheduled"
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=`.status.conditions[?(@.type=="Ready")].status`,description="Machine pass all readiness checks"
// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=`.status.conditions[?(@.type=="Available")].status`,description="Machine is Ready for at least MinReadySeconds"
// +kubebuilder:printcolumn:name="Up-to-date",type="string",JSONPath=`.status.conditions[?(@.type=="UpToDate")].status`,description=" Machine spec matches the spec of the Machine's owner resource, e.g. MachineDeployment"
diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/zz_generated.deepcopy.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/zz_generated.deepcopy.go
index 5adb8a56c456..4a7c37c12b09 100644
--- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/zz_generated.deepcopy.go
+++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/zz_generated.deepcopy.go
@@ -791,6 +791,11 @@ func (in *ControlPlaneClass) DeepCopyInto(out *ControlPlaneClass) {
in.HealthCheck.DeepCopyInto(&out.HealthCheck)
out.Naming = in.Naming
in.Deletion.DeepCopyInto(&out.Deletion)
+ if in.Taints != nil {
+ in, out := &in.Taints, &out.Taints
+ *out = make([]MachineTaint, len(*in))
+ copy(*out, *in)
+ }
if in.ReadinessGates != nil {
in, out := &in.ReadinessGates, &out.ReadinessGates
*out = make([]MachineReadinessGate, len(*in))
@@ -966,8 +971,14 @@ func (in *ControlPlaneTopology) DeepCopyInto(out *ControlPlaneTopology) {
*out = new(int32)
**out = **in
}
+ in.Rollout.DeepCopyInto(&out.Rollout)
in.HealthCheck.DeepCopyInto(&out.HealthCheck)
in.Deletion.DeepCopyInto(&out.Deletion)
+ if in.Taints != nil {
+ in, out := &in.Taints, &out.Taints
+ *out = make([]MachineTaint, len(*in))
+ copy(*out, *in)
+ }
if in.ReadinessGates != nil {
in, out := &in.ReadinessGates, &out.ReadinessGates
*out = make([]MachineReadinessGate, len(*in))
@@ -1109,6 +1120,22 @@ func (in *ControlPlaneTopologyMachineDeletionSpec) DeepCopy() *ControlPlaneTopol
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ControlPlaneTopologyRolloutSpec) DeepCopyInto(out *ControlPlaneTopologyRolloutSpec) {
+ *out = *in
+ in.After.DeepCopyInto(&out.After)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneTopologyRolloutSpec.
+func (in *ControlPlaneTopologyRolloutSpec) DeepCopy() *ControlPlaneTopologyRolloutSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(ControlPlaneTopologyRolloutSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ControlPlaneVariables) DeepCopyInto(out *ControlPlaneVariables) {
*out = *in
@@ -1547,6 +1574,11 @@ func (in *MachineDeploymentClass) DeepCopyInto(out *MachineDeploymentClass) {
in.HealthCheck.DeepCopyInto(&out.HealthCheck)
out.Naming = in.Naming
in.Deletion.DeepCopyInto(&out.Deletion)
+ if in.Taints != nil {
+ in, out := &in.Taints, &out.Taints
+ *out = make([]MachineTaint, len(*in))
+ copy(*out, *in)
+ }
if in.MinReadySeconds != nil {
in, out := &in.MinReadySeconds, &out.MinReadySeconds
*out = new(int32)
@@ -2031,6 +2063,11 @@ func (in *MachineDeploymentTopology) DeepCopyInto(out *MachineDeploymentTopology
}
in.HealthCheck.DeepCopyInto(&out.HealthCheck)
in.Deletion.DeepCopyInto(&out.Deletion)
+ if in.Taints != nil {
+ in, out := &in.Taints, &out.Taints
+ *out = make([]MachineTaint, len(*in))
+ copy(*out, *in)
+ }
if in.MinReadySeconds != nil {
in, out := &in.MinReadySeconds, &out.MinReadySeconds
*out = new(int32)
@@ -2186,6 +2223,7 @@ func (in *MachineDeploymentTopologyMachineDeletionSpec) DeepCopy() *MachineDeplo
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MachineDeploymentTopologyRolloutSpec) DeepCopyInto(out *MachineDeploymentTopologyRolloutSpec) {
*out = *in
+ in.After.DeepCopyInto(&out.After)
in.Strategy.DeepCopyInto(&out.Strategy)
}
@@ -2841,6 +2879,11 @@ func (in *MachinePoolClass) DeepCopyInto(out *MachinePoolClass) {
}
out.Naming = in.Naming
in.Deletion.DeepCopyInto(&out.Deletion)
+ if in.Taints != nil {
+ in, out := &in.Taints, &out.Taints
+ *out = make([]MachineTaint, len(*in))
+ copy(*out, *in)
+ }
if in.MinReadySeconds != nil {
in, out := &in.MinReadySeconds, &out.MinReadySeconds
*out = new(int32)
@@ -3106,6 +3149,11 @@ func (in *MachinePoolTopology) DeepCopyInto(out *MachinePoolTopology) {
copy(*out, *in)
}
in.Deletion.DeepCopyInto(&out.Deletion)
+ if in.Taints != nil {
+ in, out := &in.Taints, &out.Taints
+ *out = make([]MachineTaint, len(*in))
+ copy(*out, *in)
+ }
if in.MinReadySeconds != nil {
in, out := &in.MinReadySeconds, &out.MinReadySeconds
*out = new(int32)
diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/zz_generated.openapi.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/zz_generated.openapi.go
index 6eecc0d326c7..717fbf09017a 100644
--- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/zz_generated.openapi.go
+++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/zz_generated.openapi.go
@@ -72,6 +72,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyHealthCheckRemediation": schema_cluster_api_api_core_v1beta2_ControlPlaneTopologyHealthCheckRemediation(ref),
"sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyHealthCheckRemediationTriggerIf": schema_cluster_api_api_core_v1beta2_ControlPlaneTopologyHealthCheckRemediationTriggerIf(ref),
"sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyMachineDeletionSpec": schema_cluster_api_api_core_v1beta2_ControlPlaneTopologyMachineDeletionSpec(ref),
+ "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyRolloutSpec": schema_cluster_api_api_core_v1beta2_ControlPlaneTopologyRolloutSpec(ref),
"sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneVariables": schema_cluster_api_api_core_v1beta2_ControlPlaneVariables(ref),
"sigs.k8s.io/cluster-api/api/core/v1beta2.ExternalPatchDefinition": schema_cluster_api_api_core_v1beta2_ExternalPatchDefinition(ref),
"sigs.k8s.io/cluster-api/api/core/v1beta2.FailureDomain": schema_cluster_api_api_core_v1beta2_FailureDomain(ref),
@@ -1248,7 +1249,7 @@ func schema_cluster_api_api_core_v1beta2_ClusterSpec(ref common.ReferenceCallbac
},
"topology": {
SchemaProps: spec.SchemaProps{
- Description: "topology encapsulates the topology for the cluster. NOTE: It is required to enable the ClusterTopology feature gate flag to activate managed topologies support; this feature is highly experimental, and parts of it might still be not implemented.",
+ Description: "topology encapsulates the topology for the cluster. NOTE: It is required to enable the ClusterTopology feature gate flag to activate managed topologies support.",
Default: map[string]interface{}{},
Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.Topology"),
},
@@ -1457,7 +1458,7 @@ func schema_cluster_api_api_core_v1beta2_Condition(ref common.ReferenceCallback)
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "Condition defines an observation of a Cluster API resource operational state.",
+ Description: "Condition defines an observation of a Cluster API resource operational state.\n\nDeprecated: This type is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more details.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"type": {
@@ -1596,6 +1597,29 @@ func schema_cluster_api_api_core_v1beta2_ControlPlaneClass(ref common.ReferenceC
Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassMachineDeletionSpec"),
},
},
+ "taints": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-map-keys": []interface{}{
+ "key",
+ "effect",
+ },
+ "x-kubernetes-list-type": "map",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Description: "taints are the node taints that Cluster API will manage. This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, e.g. the node controller might add the node.kubernetes.io/not-ready taint. Only those taints defined in this list will be added or removed by core Cluster API controllers.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint"),
+ },
+ },
+ },
+ },
+ },
"readinessGates": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
@@ -1623,7 +1647,7 @@ func schema_cluster_api_api_core_v1beta2_ControlPlaneClass(ref common.ReferenceC
},
},
Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassTemplateReference", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassHealthCheck", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassMachineInfrastructureTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassNamingSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"},
+ "sigs.k8s.io/cluster-api/api/core/v1beta2.ClusterClassTemplateReference", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassHealthCheck", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassMachineInfrastructureTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneClassNamingSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"},
}
}
@@ -1871,6 +1895,13 @@ func schema_cluster_api_api_core_v1beta2_ControlPlaneTopology(ref common.Referen
Format: "int32",
},
},
+ "rollout": {
+ SchemaProps: spec.SchemaProps{
+ Description: "rollout allows you to configure the behavior of rolling updates to the control plane.",
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyRolloutSpec"),
+ },
+ },
"healthCheck": {
SchemaProps: spec.SchemaProps{
Description: "healthCheck allows to enable, disable and override control plane health check configuration from the ClusterClass for this control plane.",
@@ -1885,6 +1916,29 @@ func schema_cluster_api_api_core_v1beta2_ControlPlaneTopology(ref common.Referen
Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyMachineDeletionSpec"),
},
},
+ "taints": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-map-keys": []interface{}{
+ "key",
+ "effect",
+ },
+ "x-kubernetes-list-type": "map",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Description: "taints are the node taints that Cluster API will manage. This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, e.g. the node controller might add the node.kubernetes.io/not-ready taint. Only those taints defined in this list will be added or removed by core Cluster API controllers.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint"),
+ },
+ },
+ },
+ },
+ },
"readinessGates": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
@@ -1918,7 +1972,7 @@ func schema_cluster_api_api_core_v1beta2_ControlPlaneTopology(ref common.Referen
},
},
Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyHealthCheck", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneVariables", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"},
+ "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyHealthCheck", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneTopologyRolloutSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.ControlPlaneVariables", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"},
}
}
@@ -2109,6 +2163,27 @@ func schema_cluster_api_api_core_v1beta2_ControlPlaneTopologyMachineDeletionSpec
}
}
+func schema_cluster_api_api_core_v1beta2_ControlPlaneTopologyRolloutSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "ControlPlaneTopologyRolloutSpec defines the rollout behavior.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "after": {
+ SchemaProps: spec.SchemaProps{
+ Description: "after is a field to indicate a rollout should be performed after the specified time even if no changes have been made to the ControlPlane. Example: In the YAML the time can be specified in the RFC3339 format. To specify the rolloutAfter target as March 9, 2023, at 9 am UTC use \"2023-03-09T09:00:00Z\".",
+ Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"),
+ },
+ },
+ },
+ },
+ },
+ Dependencies: []string{
+ "k8s.io/apimachinery/pkg/apis/meta/v1.Time"},
+ }
+}
+
func schema_cluster_api_api_core_v1beta2_ControlPlaneVariables(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
@@ -2901,6 +2976,29 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentClass(ref common.Refer
Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassMachineDeletionSpec"),
},
},
+ "taints": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-map-keys": []interface{}{
+ "key",
+ "effect",
+ },
+ "x-kubernetes-list-type": "map",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Description: "taints are the node taints that Cluster API will manage. This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, e.g. the node controller might add the node.kubernetes.io/not-ready taint. Only those taints defined in this list will be added or removed by core Cluster API controllers.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint"),
+ },
+ },
+ },
+ },
+ },
"minReadySeconds": {
SchemaProps: spec.SchemaProps{
Description: "minReadySeconds is the minimum number of seconds for which a newly created machine should be ready. Defaults to 0 (machine will be considered available as soon as it is ready) NOTE: This value can be overridden while defining a Cluster.Topology using this MachineDeploymentClass.",
@@ -2942,7 +3040,7 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentClass(ref common.Refer
},
},
Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassBootstrapTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassHealthCheck", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassInfrastructureTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassNamingSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassRolloutSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"},
+ "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassBootstrapTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassHealthCheck", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassInfrastructureTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassNamingSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentClassRolloutSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"},
}
}
@@ -3709,6 +3807,29 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentTopology(ref common.Re
Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopologyMachineDeletionSpec"),
},
},
+ "taints": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-map-keys": []interface{}{
+ "key",
+ "effect",
+ },
+ "x-kubernetes-list-type": "map",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Description: "taints are the node taints that Cluster API will manage. This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, e.g. the node controller might add the node.kubernetes.io/not-ready taint. Only those taints defined in this list will be added or removed by core Cluster API controllers.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint"),
+ },
+ },
+ },
+ },
+ },
"minReadySeconds": {
SchemaProps: spec.SchemaProps{
Description: "minReadySeconds is the minimum number of seconds for which a newly created machine should be ready. Defaults to 0 (machine will be considered available as soon as it is ready)",
@@ -3757,7 +3878,7 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentTopology(ref common.Re
},
},
Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopologyHealthCheck", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopologyMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopologyRolloutSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentVariables", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"},
+ "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopologyHealthCheck", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopologyMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopologyRolloutSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentVariables", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineReadinessGate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"},
}
}
@@ -3968,6 +4089,12 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentTopologyRolloutSpec(re
Description: "MachineDeploymentTopologyRolloutSpec defines the rollout behavior.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
+ "after": {
+ SchemaProps: spec.SchemaProps{
+ Description: "after is a field to indicate a rollout should be performed after the specified time even if no changes have been made to the MachineDeployment. Example: In the YAML the time can be specified in the RFC3339 format. To specify the rolloutAfter target as March 9, 2023, at 9 am UTC use \"2023-03-09T09:00:00Z\".",
+ Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"),
+ },
+ },
"strategy": {
SchemaProps: spec.SchemaProps{
Description: "strategy specifies how to roll out control plane Machines.",
@@ -3979,7 +4106,7 @@ func schema_cluster_api_api_core_v1beta2_MachineDeploymentTopologyRolloutSpec(re
},
},
Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopologyRolloutStrategy"},
+ "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineDeploymentTopologyRolloutStrategy"},
}
}
@@ -5075,6 +5202,29 @@ func schema_cluster_api_api_core_v1beta2_MachinePoolClass(ref common.ReferenceCa
Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassMachineDeletionSpec"),
},
},
+ "taints": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-map-keys": []interface{}{
+ "key",
+ "effect",
+ },
+ "x-kubernetes-list-type": "map",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Description: "taints are the node taints that Cluster API will manage. This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, e.g. the node controller might add the node.kubernetes.io/not-ready taint. Only those taints defined in this list will be added or removed by core Cluster API controllers.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint"),
+ },
+ },
+ },
+ },
+ },
"minReadySeconds": {
SchemaProps: spec.SchemaProps{
Description: "minReadySeconds is the minimum number of seconds for which a newly created machine pool should be ready. Defaults to 0 (machine will be considered available as soon as it is ready) NOTE: This value can be overridden while defining a Cluster.Topology using this MachinePoolClass.",
@@ -5087,7 +5237,7 @@ func schema_cluster_api_api_core_v1beta2_MachinePoolClass(ref common.ReferenceCa
},
},
Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassBootstrapTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassInfrastructureTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassNamingSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"},
+ "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassBootstrapTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassInfrastructureTemplate", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolClassNamingSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"},
}
}
@@ -5533,6 +5683,29 @@ func schema_cluster_api_api_core_v1beta2_MachinePoolTopology(ref common.Referenc
Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolTopologyMachineDeletionSpec"),
},
},
+ "taints": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-map-keys": []interface{}{
+ "key",
+ "effect",
+ },
+ "x-kubernetes-list-type": "map",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Description: "taints are the node taints that Cluster API will manage. This list is not necessarily complete: other Kubernetes components may add or remove other taints from nodes, e.g. the node controller might add the node.kubernetes.io/not-ready taint. Only those taints defined in this list will be added or removed by core Cluster API controllers.\n\nThere can be at most 64 taints. A pod would have to tolerate all existing taints to run on the corresponding node.\n\nNOTE: This list is implemented as a \"map\" type, meaning that individual elements can be managed by different owners.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint"),
+ },
+ },
+ },
+ },
+ },
"minReadySeconds": {
SchemaProps: spec.SchemaProps{
Description: "minReadySeconds is the minimum number of seconds for which a newly created machine pool should be ready. Defaults to 0 (machine will be considered available as soon as it is ready)",
@@ -5559,7 +5732,7 @@ func schema_cluster_api_api_core_v1beta2_MachinePoolTopology(ref common.Referenc
},
},
Dependencies: []string{
- "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolTopologyMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolVariables", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"},
+ "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolTopologyMachineDeletionSpec", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachinePoolVariables", "sigs.k8s.io/cluster-api/api/core/v1beta2.MachineTaint", "sigs.k8s.io/cluster-api/api/core/v1beta2.ObjectMeta"},
}
}
@@ -6213,7 +6386,7 @@ func schema_cluster_api_api_core_v1beta2_MachineStatus(ref common.ReferenceCallb
},
},
SchemaProps: spec.SchemaProps{
- Description: "conditions represents the observations of a Machine's current state. Known condition types are Available, Ready, UpToDate, BootstrapConfigReady, InfrastructureReady, NodeReady, NodeHealthy, Updating, Deleting, Paused. If a MachineHealthCheck is targeting this machine, also HealthCheckSucceeded, OwnerRemediated conditions are added. Additionally control plane Machines controlled by KubeadmControlPlane will have following additional conditions: APIServerPodHealthy, ControllerManagerPodHealthy, SchedulerPodHealthy, EtcdPodHealthy, EtcdMemberHealthy.",
+ Description: "conditions represents the observations of a Machine's current state. Known condition types are Available, Ready, UpToDate, BootstrapConfigReady, InfrastructureReady, NodeReady, NodeHealthy, Updating, Deleting, Paused. If a MachineHealthCheck is targeting this machine, also HealthCheckSucceeded, OwnerRemediated conditions are added. Additionally control plane Machines controlled by KubeadmControlPlane will have following additional conditions: APIServerPodHealthy, ControllerManagerPodHealthy, SchedulerPodHealthy, EtcdPodHealthy, EtcdMemberHealthy, NodeKubeadmLabelsAndTaintsSet.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
@@ -6265,6 +6438,13 @@ func schema_cluster_api_api_core_v1beta2_MachineStatus(ref common.ReferenceCallb
},
},
},
+ "failureDomain": {
+ SchemaProps: spec.SchemaProps{
+ Description: "failureDomain is the failure domain where the Machine has been scheduled.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
"phase": {
SchemaProps: spec.SchemaProps{
Description: "phase represents the current phase of machine actuation.",
diff --git a/vendor/sigs.k8s.io/cluster-api/feature/feature.go b/vendor/sigs.k8s.io/cluster-api/feature/feature.go
index da8dd8e8da1d..4df98753b76c 100644
--- a/vendor/sigs.k8s.io/cluster-api/feature/feature.go
+++ b/vendor/sigs.k8s.io/cluster-api/feature/feature.go
@@ -61,12 +61,16 @@ const (
// also considers VolumeAttachments in addition to Nodes.status.volumesAttached when waiting for volumes to be detached.
//
// beta: v1.9
+ // GA: v1.13
+ //
+ // Deprecated: MachineWaitForVolumeDetachConsiderVolumeAttachments feature is now GA and the corresponding feature flag will be removed in the v1.15 release.
MachineWaitForVolumeDetachConsiderVolumeAttachments featuregate.Feature = "MachineWaitForVolumeDetachConsiderVolumeAttachments"
// PriorityQueue is a feature gate that controls if the controller uses the controller-runtime PriorityQueue
// instead of the default queue implementation.
//
// alpha: v1.10
+ // beta: v1.13
PriorityQueue featuregate.Feature = "PriorityQueue"
// ReconcilerRateLimiting is a feature gate that controls if reconcilers are rate-limited.
@@ -74,6 +78,7 @@ const (
// Note: If this feature gate is enabled the PriorityQueue feature gate must be enabled as well.
//
// alpha: v1.12
+ // beta: v1.13
ReconcilerRateLimiting featuregate.Feature = "ReconcilerRateLimiting"
// InPlaceUpdates is a feature gate for the in-place machine updates functionality.
@@ -94,11 +99,11 @@ func init() {
// To add a new feature, define a key for it above and add it here.
var defaultClusterAPIFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{
// Every feature should be initiated here:
- MachinePool: {Default: true, PreRelease: featuregate.Beta},
- MachineSetPreflightChecks: {Default: true, PreRelease: featuregate.Beta},
- MachineWaitForVolumeDetachConsiderVolumeAttachments: {Default: true, PreRelease: featuregate.Beta},
- PriorityQueue: {Default: false, PreRelease: featuregate.Alpha},
- ReconcilerRateLimiting: {Default: false, PreRelease: featuregate.Alpha},
+ MachineWaitForVolumeDetachConsiderVolumeAttachments: {Default: true, PreRelease: featuregate.GA},
+ MachinePool: {Default: true, PreRelease: featuregate.Beta},
+ MachineSetPreflightChecks: {Default: true, PreRelease: featuregate.Beta},
+ PriorityQueue: {Default: true, PreRelease: featuregate.Beta},
+ ReconcilerRateLimiting: {Default: true, PreRelease: featuregate.Beta},
ClusterTopology: {Default: false, PreRelease: featuregate.Alpha},
KubeadmBootstrapFormatIgnition: {Default: false, PreRelease: featuregate.Alpha},
RuntimeSDK: {Default: false, PreRelease: featuregate.Alpha},
diff --git a/vendor/sigs.k8s.io/cluster-api/util/conditions/sort.go b/vendor/sigs.k8s.io/cluster-api/util/conditions/sort.go
index d06baeba82be..019b18647fe6 100644
--- a/vendor/sigs.k8s.io/cluster-api/util/conditions/sort.go
+++ b/vendor/sigs.k8s.io/cluster-api/util/conditions/sort.go
@@ -67,6 +67,7 @@ func defaultSortLessFunc(i, j metav1.Condition) bool {
// | ControlPlaneComponentsHealthy | | x | | | | |
// | NodeHealthy | | | | | | x |
// | NodeReady | | | | | | x |
+// | NodeKubeadmLabelsAndTaintsSet | | | | | | x |
// | EtcdPodHealthy | | | | | | x |
// | EtcdMemberHealthy | | | | | | x |
// | APIServerPodHealthy | | | | | | x |
@@ -110,6 +111,7 @@ var order = []string{
kubeadmControlPlaneControlPlaneComponentsHealthyCondition,
clusterv1.MachineNodeHealthyCondition,
clusterv1.MachineNodeReadyCondition,
+ KubeadmControlPlaneMachineNodeKubeadmLabelsAndTaintsSetCondition,
kubeadmControlPlaneMachineEtcdPodHealthyCondition,
kubeadmControlPlaneMachineEtcdMemberHealthyCondition,
kubeadmControlPlaneMachineAPIServerPodHealthyCondition,
@@ -141,13 +143,14 @@ const (
// Constants inlined for ordering (we want to avoid importing the KCP API package).
const (
- kubeadmControlPlaneCertificatesAvailableCondition = "CertificatesAvailable"
- kubeadmControlPlaneInitializedCondition = "Initialized"
- kubeadmControlPlaneEtcdClusterHealthyCondition = "EtcdClusterHealthy"
- kubeadmControlPlaneControlPlaneComponentsHealthyCondition = "ControlPlaneComponentsHealthy"
- kubeadmControlPlaneMachineAPIServerPodHealthyCondition = "APIServerPodHealthy"
- kubeadmControlPlaneMachineControllerManagerPodHealthyCondition = "ControllerManagerPodHealthy"
- kubeadmControlPlaneMachineSchedulerPodHealthyCondition = "SchedulerPodHealthy"
- kubeadmControlPlaneMachineEtcdPodHealthyCondition = "EtcdPodHealthy"
- kubeadmControlPlaneMachineEtcdMemberHealthyCondition = "EtcdMemberHealthy"
+ kubeadmControlPlaneCertificatesAvailableCondition = "CertificatesAvailable"
+ kubeadmControlPlaneInitializedCondition = "Initialized"
+ kubeadmControlPlaneEtcdClusterHealthyCondition = "EtcdClusterHealthy"
+ kubeadmControlPlaneControlPlaneComponentsHealthyCondition = "ControlPlaneComponentsHealthy"
+ KubeadmControlPlaneMachineNodeKubeadmLabelsAndTaintsSetCondition = "NodeKubeadmLabelsAndTaintsSet"
+ kubeadmControlPlaneMachineAPIServerPodHealthyCondition = "APIServerPodHealthy"
+ kubeadmControlPlaneMachineControllerManagerPodHealthyCondition = "ControllerManagerPodHealthy"
+ kubeadmControlPlaneMachineSchedulerPodHealthyCondition = "SchedulerPodHealthy"
+ kubeadmControlPlaneMachineEtcdPodHealthyCondition = "EtcdPodHealthy"
+ kubeadmControlPlaneMachineEtcdMemberHealthyCondition = "EtcdMemberHealthy"
)
diff --git a/vendor/sigs.k8s.io/cluster-api/util/conversion/conversion.go b/vendor/sigs.k8s.io/cluster-api/util/conversion/conversion.go
index 916d77c1f563..b99dfdc41ec1 100644
--- a/vendor/sigs.k8s.io/cluster-api/util/conversion/conversion.go
+++ b/vendor/sigs.k8s.io/cluster-api/util/conversion/conversion.go
@@ -18,6 +18,8 @@ limitations under the License.
package conversion
import (
+ "bytes"
+ "maps"
"math/rand"
"testing"
@@ -65,6 +67,47 @@ func MarshalData(src metav1.Object, dst metav1.Object) error {
return nil
}
+// MarshalDataUnsafeNoCopy stores the source object as json data in the destination object annotations map.
+// It ignores the metadata of the source object.
+// Note: It also mutates the metadata of the source object.
+func MarshalDataUnsafeNoCopy(src metav1.Object, dst metav1.Object) error {
+ // Remove metadata as it's not needed in the conversion annotation.
+ // Note: Directly modifying src to avoid additional memory allocations
+ // This is fine because MarshalDataUnsafeNoCopy is called at the end of ConvertFrom.
+ src.SetNamespace("")
+ src.SetName("")
+ src.SetGenerateName("")
+ src.SetUID("")
+ src.SetResourceVersion("")
+ src.SetGeneration(0)
+ src.SetSelfLink("")
+ src.SetCreationTimestamp(metav1.Time{})
+ src.SetDeletionTimestamp(nil)
+ src.SetDeletionGracePeriodSeconds(nil)
+ src.SetLabels(nil)
+ src.SetAnnotations(nil)
+ src.SetFinalizers(nil)
+ src.SetOwnerReferences(nil)
+ src.SetManagedFields(nil)
+
+ data, err := json.Marshal(src)
+ if err != nil {
+ return err
+ }
+
+ // If omitzero is not set on the ObjectMeta field the above is not enough to avoid metadata entirely.
+ // So we also have to remove an empty metadata element if it exists.
+ data = bytes.Replace(data, []byte(`"metadata":{},`), []byte(``), 1)
+
+ annotations := dst.GetAnnotations()
+ if annotations == nil {
+ annotations = map[string]string{}
+ }
+ annotations[DataAnnotation] = string(data)
+ dst.SetAnnotations(annotations)
+ return nil
+}
+
// UnmarshalData tries to retrieve the data from the annotation and unmarshals it into the object passed as input.
func UnmarshalData(from metav1.Object, to interface{}) (bool, error) {
annotations := from.GetAnnotations()
@@ -198,7 +241,21 @@ func FuzzTestFunc(input FuzzTestFuncInput) func(*testing.T) {
// First convert hub to spoke
dstCopy := input.Spoke.DeepCopyObject().(conversion.Convertible)
- g.Expect(dstCopy.ConvertFrom(hubBefore)).To(gomega.Succeed())
+ // DeepCopy hubBefore because otherwise the mutations in MarshalDataUnsafeNoCopy would affect
+ // hubBefore and accordingly the comparison between hubBefore and hubAfter below.
+ g.Expect(dstCopy.ConvertFrom(hubBefore.DeepCopyObject().(conversion.Hub))).To(gomega.Succeed())
+
+ // Note: The check here is needed because not all runtime.Objects are metav1.Objects (e.g. CABPK ClusterConfiguration)
+ if _, ok := dstCopy.(metav1.Object); ok {
+ // Sometimes the apiserver sends us objects without a spec (likely in the context of managedField conversion)
+ // This test verifies that the ConvertTo code can handle this scenario (i.e. it doesn't return an error
+ // and it doesn't panic)
+ // Note: It's important that this test is run here, because dstCopy.ConvertTo below clears the restore annotation from dstCopy.
+ dstCopyNoSpec := input.Spoke.DeepCopyObject().(conversion.Convertible)
+ dstCopyNoSpec.(metav1.Object).SetLabels(maps.Clone(dstCopy.(metav1.Object).GetLabels()))
+ dstCopyNoSpec.(metav1.Object).SetAnnotations(maps.Clone(dstCopy.(metav1.Object).GetAnnotations()))
+ g.Expect(dstCopyNoSpec.ConvertTo(input.Hub.DeepCopyObject().(conversion.Hub))).To(gomega.Succeed())
+ }
// Convert spoke back to hub and check if the resulting hub is equal to the hub before the round trip
hubAfter := input.Hub.DeepCopyObject().(conversion.Hub)
diff --git a/vendor/sigs.k8s.io/cluster-api/util/patch/patch.go b/vendor/sigs.k8s.io/cluster-api/util/patch/patch.go
index 64378f457e68..3e8558b7626c 100644
--- a/vendor/sigs.k8s.io/cluster-api/util/patch/patch.go
+++ b/vendor/sigs.k8s.io/cluster-api/util/patch/patch.go
@@ -17,8 +17,10 @@ limitations under the License.
package patch
import (
+ "bytes"
"context"
"encoding/json"
+ "reflect"
"time"
"github.com/pkg/errors"
@@ -26,6 +28,7 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/types"
kerrors "k8s.io/apimachinery/pkg/util/errors"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/wait"
@@ -70,26 +73,9 @@ func NewHelper(obj client.Object, crClient client.Client) (*Helper, error) {
return nil, errors.New("failed to create patch helper: object is nil")
}
- // Get the GroupVersionKind of the object,
- // used to validate against later on.
- gvk, err := apiutil.GVKForObject(obj, crClient.Scheme())
- if err != nil {
- return nil, errors.Wrapf(err, "failed to create patch helper for object %s", klog.KObj(obj))
- }
-
- // Identify location of the condition fields according to the canonical place defined by the proposal for
- // improving status in Cluster API conditions.
- metav1ConditionsFieldPath, clusterv1ConditionsFieldPath, err := identifyConditionsFieldsPath(obj)
- if err != nil {
- return nil, errors.Wrapf(err, "failed to identify condition fields for object %s", klog.KObj(obj))
- }
-
return &Helper{
- client: crClient,
- gvk: gvk,
- beforeObject: obj.DeepCopyObject().(client.Object),
- metav1ConditionsFieldPath: metav1ConditionsFieldPath,
- clusterv1ConditionsFieldPath: clusterv1ConditionsFieldPath,
+ client: crClient,
+ beforeObject: obj.DeepCopyObject().(client.Object),
}, nil
}
@@ -100,13 +86,31 @@ func (h *Helper) Patch(ctx context.Context, obj client.Object, opts ...Option) e
return errors.Errorf("failed to patch %s %s: modified object is nil", h.gvk.Kind, klog.KObj(h.beforeObject))
}
+ if reflect.DeepEqual(obj, h.beforeObject) {
+ return nil
+ }
+
+ // Get the GroupVersionKind of the object,
+ // used to validate against later on.
+ beforeGvk, err := apiutil.GVKForObject(h.beforeObject, h.client.Scheme())
+ if err != nil {
+ return errors.Wrapf(err, "failed to create patch helper for object %s", klog.KObj(obj))
+ }
+
// Get the GroupVersionKind of the object that we want to patch.
- gvk, err := apiutil.GVKForObject(obj, h.client.Scheme())
+ h.gvk, err = apiutil.GVKForObject(obj, h.client.Scheme())
if err != nil {
return errors.Wrapf(err, "failed to patch %s %s", h.gvk.Kind, klog.KObj(h.beforeObject))
}
- if gvk != h.gvk {
- return errors.Errorf("failed to patch %s %s: unmatched GroupVersionKind, expected %q got %q", h.gvk.Kind, klog.KObj(h.beforeObject), h.gvk, gvk)
+ if h.gvk != beforeGvk {
+ return errors.Errorf("failed to patch %s %s: unmatched GroupVersionKind, expected %q got %q", h.gvk.Kind, klog.KObj(h.beforeObject), h.gvk, beforeGvk)
+ }
+
+ // Identify location of the condition fields according to the canonical place defined by the proposal for
+ // improving status in Cluster API conditions.
+ h.metav1ConditionsFieldPath, h.clusterv1ConditionsFieldPath, err = identifyConditionsFieldsPath(obj)
+ if err != nil {
+ return errors.Wrapf(err, "failed to identify condition fields for object %s", klog.KObj(obj))
}
// Calculate the options.
@@ -132,15 +136,15 @@ func (h *Helper) Patch(ctx context.Context, obj client.Object, opts ...Option) e
}
// Convert the before object to unstructured.
- h.before, err = toUnstructured(h.beforeObject, gvk)
+ h.before, err = toUnstructured(h.beforeObject, h.gvk)
if err != nil {
return errors.Wrapf(err, "failed to patch %s %s: failed to convert before object to Unstructured", h.gvk.Kind, klog.KObj(h.beforeObject))
}
// Convert the after object to unstructured.
- h.after, err = toUnstructured(obj, gvk)
+ h.after, err = toUnstructured(obj, h.gvk)
if err != nil {
- return errors.Wrapf(err, "failed to patch %s %s: failed to convert after object to Unstructured", h.gvk.Kind, klog.KObj(h.beforeObject))
+ return errors.Wrapf(err, "failed to patch %s %s: failed to convert after object to Unstructured", h.gvk.Kind, klog.KObj(obj))
}
// Include .status.observedGeneration if IncludeStatusObservedGeneration is set.
@@ -199,7 +203,17 @@ func (h *Helper) patch(ctx context.Context, obj client.Object) error {
if err != nil {
return err
}
- return h.client.Patch(ctx, afterObject, client.MergeFrom(beforeObject))
+
+ // Check for empty patches as a safeguard to avoid continuously sending empty patches to the apiserver.
+ data, err := client.MergeFrom(beforeObject).Data(afterObject)
+ if err != nil {
+ return err
+ }
+ if bytes.Equal(data, []byte("{}")) {
+ return nil
+ }
+
+ return h.client.Patch(ctx, afterObject, client.RawPatch(types.MergePatchType, data))
}
// patchStatus issues a patch if the status has changed.
@@ -211,7 +225,22 @@ func (h *Helper) patchStatus(ctx context.Context, obj client.Object) error {
if err != nil {
return err
}
- return h.client.Status().Patch(ctx, afterObject, client.MergeFrom(beforeObject))
+
+ // Check for empty patches as a safeguard to avoid continuously sending empty patches to the apiserver.
+ // Additionally, there is a known case that if there are only changes for status.conditions
+ // patchStatus is accidentally executed as well because of limitations of calculateChanges.
+ data, err := client.MergeFrom(beforeObject).Data(afterObject)
+ if err != nil {
+ return err
+ }
+ if bytes.Equal(data, []byte("{}")) ||
+ // The following two cases occur if conditions are written for the first time on an object.
+ bytes.Equal(data, []byte(`{"status":{"v1beta2":{}}}`)) ||
+ bytes.Equal(data, []byte(`{"status":{"deprecated":{"v1beta1":{}}}}`)) {
+ return nil
+ }
+
+ return h.client.Status().Patch(ctx, afterObject, client.RawPatch(types.MergePatchType, data))
}
// patchStatusConditions issues a patch if there are any changes to the conditions slice under
diff --git a/vendor/sigs.k8s.io/cluster-api/util/patch/utils.go b/vendor/sigs.k8s.io/cluster-api/util/patch/utils.go
index 94d6fbf2a71d..29dfe946a9ba 100644
--- a/vendor/sigs.k8s.io/cluster-api/util/patch/utils.go
+++ b/vendor/sigs.k8s.io/cluster-api/util/patch/utils.go
@@ -35,14 +35,6 @@ const (
statusPatch patchType = "status"
)
-var (
- preserveUnstructuredKeys = map[string]bool{
- "kind": true,
- "apiVersion": true,
- "metadata": true,
- }
-)
-
// toUnstructured converts an object to Unstructured.
// We have to pass in a gvk as we can't rely on GVK being set in a runtime.Object.
func toUnstructured(obj runtime.Object, gvk schema.GroupVersionKind) (*unstructured.Unstructured, error) {
@@ -69,10 +61,15 @@ func toUnstructured(obj runtime.Object, gvk schema.GroupVersionKind) (*unstructu
func unsafeUnstructuredCopy(obj *unstructured.Unstructured, focus patchType, clusterv1ConditionsFieldPath, metav1ConditionsFieldPath []string) *unstructured.Unstructured {
// Create the return focused-unstructured object with a preallocated map.
res := &unstructured.Unstructured{Object: make(map[string]interface{}, len(obj.Object))}
+ // Ensure the minimum relevant fields are always set (especially when focus is statusPatch)
+ res.SetGroupVersionKind(obj.GroupVersionKind())
+ res.SetNamespace(obj.GetNamespace())
+ res.SetName(obj.GetName())
+ res.SetResourceVersion(obj.GetResourceVersion())
// Ranges over the keys of the unstructured object, think of this as the very top level of an object
// when submitting a yaml to kubectl or a client.
- // These would be keys like `apiVersion`, `kind`, `metadata`, `spec`, `status`, etc.
+ // These would be keys like `metadata`, `spec`, `status`, etc.
for key := range obj.Object {
value := obj.Object[key]
@@ -80,16 +77,15 @@ func unsafeUnstructuredCopy(obj *unstructured.Unstructured, focus patchType, clu
switch focus {
case specPatch:
// For what we define as `spec` fields, we should preserve everything
- // that's not `status`.
+ // that's not `status` including things like metadata and data (e.g. for Secrets).
preserve = key != string(statusPatch)
case statusPatch:
// For status, only preserve the status fields.
preserve = key == string(focus)
}
- // Perform a shallow copy only for the keys we're interested in,
- // or the ones that should be always preserved (like metadata).
- if preserve || preserveUnstructuredKeys[key] {
+ // Perform a shallow copy only for the keys we're interested in.
+ if preserve {
res.Object[key] = value
}
}
diff --git a/vendor/sigs.k8s.io/cluster-api/util/topology/topology.go b/vendor/sigs.k8s.io/cluster-api/util/topology/topology.go
deleted file mode 100644
index eb903e156c74..000000000000
--- a/vendor/sigs.k8s.io/cluster-api/util/topology/topology.go
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-Copyright 2022 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Package topology implements topology utility functions.
-package topology
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
-
- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
-)
-
-// ShouldSkipImmutabilityChecks returns true if it is a dry-run request and the object has the
-// TopologyDryRunAnnotation annotation set, false otherwise.
-// This ensures that the immutability check is skipped only when dry-running and when the operations has been invoked by the topology controller.
-// Instead, kubectl dry-run behavior remains consistent with the one user gets when doing kubectl apply (immutability is enforced).
-//
-// Deprecated: Please use IsDryRunRequest instead.
-func ShouldSkipImmutabilityChecks(req admission.Request, obj metav1.Object) bool {
- return IsDryRunRequest(req, obj)
-}
-
-// IsDryRunRequest returns true if it is a dry-run request and the object has the
-// TopologyDryRunAnnotation annotation set, false otherwise.
-func IsDryRunRequest(req admission.Request, obj metav1.Object) bool {
- // Check if the request is a dry-run
- if req.DryRun == nil || !*req.DryRun {
- return false
- }
-
- if obj == nil {
- return false
- }
-
- // Check for the TopologyDryRunAnnotation
- annotations := obj.GetAnnotations()
- if annotations == nil {
- return false
- }
- if _, ok := annotations[clusterv1.TopologyDryRunAnnotation]; ok {
- return true
- }
- return false
-}
diff --git a/vendor/sigs.k8s.io/controller-runtime/.golangci.yml b/vendor/sigs.k8s.io/controller-runtime/.golangci.yml
index 1741432a013d..5c86af65a306 100644
--- a/vendor/sigs.k8s.io/controller-runtime/.golangci.yml
+++ b/vendor/sigs.k8s.io/controller-runtime/.golangci.yml
@@ -1,6 +1,6 @@
version: "2"
run:
- go: "1.24"
+ go: "1.25"
timeout: 10m
allow-parallel-runners: true
linters:
@@ -11,6 +11,7 @@ linters:
- bidichk
- bodyclose
- copyloopvar
+ - depguard
- dogsled
- dupl
- errcheck
@@ -22,12 +23,15 @@ linters:
- goconst
- gocritic
- gocyclo
+ - godoclint
- goprintffuncname
- govet
- importas
- ineffassign
+ - iotamixing
- makezero
- misspell
+ - modernize
- nakedret
- nilerr
- nolintlint
@@ -40,6 +44,12 @@ linters:
- unused
- whitespace
settings:
+ depguard:
+ rules:
+ forbid-pkg-errors:
+ deny:
+ - pkg: sort
+ desc: Should be replaced with slices package
forbidigo:
forbid:
- pattern: context.Background
@@ -50,6 +60,7 @@ linters:
disable:
- fieldalignment
- shadow
+ - buildtag
enable-all: true
importas:
alias:
@@ -66,6 +77,10 @@ linters:
- pkg: sigs.k8s.io/controller-runtime
alias: ctrl
no-unaliased: true
+ modernize:
+ disable:
+ - omitzero
+ - fmtappendf
revive:
rules:
# The following rules are recommended https://github.com/mgechev/revive#recommended-configuration
diff --git a/vendor/sigs.k8s.io/controller-runtime/.gomodcheck.yaml b/vendor/sigs.k8s.io/controller-runtime/.gomodcheck.yaml
index 3608de331dda..3eaff8dc472d 100644
--- a/vendor/sigs.k8s.io/controller-runtime/.gomodcheck.yaml
+++ b/vendor/sigs.k8s.io/controller-runtime/.gomodcheck.yaml
@@ -9,6 +9,10 @@ upstreamRefs:
# k8s.io/utils -> conflicts with k/k deps
excludedModules:
+ # Needs a newer version to fix https://github.com/kubernetes-sigs/controller-runtime/issues/3418
+ # This should not be needed by the time we update to 1.36
+ - sigs.k8s.io/structured-merge-diff/v6
+
# --- test dependencies:
- github.com/onsi/ginkgo/v2
- github.com/onsi/gomega
diff --git a/vendor/sigs.k8s.io/controller-runtime/Makefile b/vendor/sigs.k8s.io/controller-runtime/Makefile
index b8e9cfa877fe..1c1fb7f4298f 100644
--- a/vendor/sigs.k8s.io/controller-runtime/Makefile
+++ b/vendor/sigs.k8s.io/controller-runtime/Makefile
@@ -27,7 +27,7 @@ SHELL:=/usr/bin/env bash
#
# Go.
#
-GO_VERSION ?= 1.24.0
+GO_VERSION ?= 1.25.0
# Use GOPROXY environment variable if set
GOPROXY := $(shell go env GOPROXY)
@@ -69,18 +69,14 @@ help: ## Display this help
## --------------------------------------
.PHONY: test
-test: test-tools ## Run the script check-everything.sh which will check all.
+test: ## Run the script check-everything.sh which will check all.
TRACE=1 ./hack/check-everything.sh
-.PHONY: test-tools
-test-tools: ## tests the tools codebase (setup-envtest)
- cd tools/setup-envtest && go test ./...
-
## --------------------------------------
## Binaries
## --------------------------------------
-GO_APIDIFF_VER := v0.8.2
+GO_APIDIFF_VER := v0.8.3
GO_APIDIFF_BIN := go-apidiff
GO_APIDIFF := $(abspath $(TOOLS_BIN_DIR)/$(GO_APIDIFF_BIN)-$(GO_APIDIFF_VER))
GO_APIDIFF_PKG := github.com/joelanford/go-apidiff
@@ -88,7 +84,7 @@ GO_APIDIFF_PKG := github.com/joelanford/go-apidiff
$(GO_APIDIFF): # Build go-apidiff from tools folder.
GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL) $(GO_APIDIFF_PKG) $(GO_APIDIFF_BIN) $(GO_APIDIFF_VER)
-CONTROLLER_GEN_VER := v0.17.1
+CONTROLLER_GEN_VER := v0.20.0
CONTROLLER_GEN_BIN := controller-gen
CONTROLLER_GEN := $(abspath $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER))
CONTROLLER_GEN_PKG := sigs.k8s.io/controller-tools/cmd/controller-gen
diff --git a/vendor/sigs.k8s.io/controller-runtime/README.md b/vendor/sigs.k8s.io/controller-runtime/README.md
index 54bacad42ec5..8549f4e88017 100644
--- a/vendor/sigs.k8s.io/controller-runtime/README.md
+++ b/vendor/sigs.k8s.io/controller-runtime/README.md
@@ -53,6 +53,7 @@ Compatible k8s.io/*, client-go and minimum Go versions can be looked up in our [
| | k8s.io/*, client-go | minimum Go version |
|----------|:-------------------:|:------------------:|
+| CR v0.22 | v0.34 | 1.24 |
| CR v0.21 | v0.33 | 1.24 |
| CR v0.20 | v0.32 | 1.23 |
| CR v0.19 | v0.31 | 1.22 |
diff --git a/vendor/sigs.k8s.io/controller-runtime/alias.go b/vendor/sigs.k8s.io/controller-runtime/alias.go
index 01ba012dcc2f..e2ac45a5e04e 100644
--- a/vendor/sigs.k8s.io/controller-runtime/alias.go
+++ b/vendor/sigs.k8s.io/controller-runtime/alias.go
@@ -18,6 +18,7 @@ package controllerruntime
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/builder"
"sigs.k8s.io/controller-runtime/pkg/client/config"
@@ -104,15 +105,20 @@ var (
// NewControllerManagedBy returns a new controller builder that will be started by the provided Manager.
NewControllerManagedBy = builder.ControllerManagedBy
- // NewWebhookManagedBy returns a new webhook builder that will be started by the provided Manager.
- NewWebhookManagedBy = builder.WebhookManagedBy
-
// NewManager returns a new Manager for creating Controllers.
// Note that if ContentType in the given config is not set, "application/vnd.kubernetes.protobuf"
// will be used for all built-in resources of Kubernetes, and "application/json" is for other types
// including all CRD resources.
NewManager = manager.New
+ // CreateOrPatch creates or patches the given object obj in the Kubernetes
+ // cluster. The object's desired state should be reconciled with the existing
+ // state using the passed in ReconcileFn. obj must be a struct pointer so that
+ // obj can be patched with the content returned by the Server.
+ //
+ // It returns the executed operation and an error.
+ CreateOrPatch = controllerutil.CreateOrPatch
+
// CreateOrUpdate creates or updates the given object obj in the Kubernetes
// cluster. The object's desired state should be reconciled with the existing
// state using the passed in ReconcileFn. obj must be a struct pointer so that
@@ -155,3 +161,8 @@ var (
// SetLogger sets a concrete logging implementation for all deferred Loggers.
SetLogger = log.SetLogger
)
+
+// NewWebhookManagedBy returns a new webhook builder for the provided type T.
+func NewWebhookManagedBy[T runtime.Object](mgr manager.Manager, obj T) *builder.WebhookBuilder[T] {
+ return builder.WebhookManagedBy(mgr, obj)
+}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/builder/controller.go b/vendor/sigs.k8s.io/controller-runtime/pkg/builder/controller.go
index 6d906f6e52c2..840e27b679b1 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/builder/controller.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/builder/controller.go
@@ -312,7 +312,7 @@ func (blder *TypedBuilder[request]) doWatch() error {
return err
}
- if reflect.TypeFor[request]() != reflect.TypeOf(reconcile.Request{}) {
+ if reflect.TypeFor[request]() != reflect.TypeFor[reconcile.Request]() {
return fmt.Errorf("For() can only be used with reconcile.Request, got %T", *new(request))
}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/builder/webhook.go b/vendor/sigs.k8s.io/controller-runtime/pkg/builder/webhook.go
index 6263f030a03c..d9c57c5e8b73 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/builder/webhook.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/builder/webhook.go
@@ -17,6 +17,7 @@ limitations under the License.
package builder
import (
+ "context"
"errors"
"net/http"
"net/url"
@@ -36,63 +37,84 @@ import (
)
// WebhookBuilder builds a Webhook.
-type WebhookBuilder struct {
+type WebhookBuilder[T runtime.Object] struct {
apiType runtime.Object
- customDefaulter admission.CustomDefaulter
+ customDefaulter admission.CustomDefaulter //nolint:staticcheck
+ defaulter admission.Defaulter[T]
customDefaulterOpts []admission.DefaulterOption
- customValidator admission.CustomValidator
+ customValidator admission.CustomValidator //nolint:staticcheck
+ validator admission.Validator[T]
customPath string
customValidatorCustomPath string
customDefaulterCustomPath string
+ converterConstructor func(*runtime.Scheme) (conversion.Converter, error)
gvk schema.GroupVersionKind
mgr manager.Manager
config *rest.Config
recoverPanic *bool
logConstructor func(base logr.Logger, req *admission.Request) logr.Logger
+ contextFunc func(context.Context, *http.Request) context.Context
err error
}
// WebhookManagedBy returns a new webhook builder.
-func WebhookManagedBy(m manager.Manager) *WebhookBuilder {
- return &WebhookBuilder{mgr: m}
+func WebhookManagedBy[T runtime.Object](m manager.Manager, object T) *WebhookBuilder[T] {
+ return &WebhookBuilder[T]{mgr: m, apiType: object}
}
-// TODO(droot): update the GoDoc for conversion.
-
-// For takes a runtime.Object which should be a CR.
-// If the given object implements the admission.Defaulter interface, a MutatingWebhook will be wired for this type.
-// If the given object implements the admission.Validator interface, a ValidatingWebhook will be wired for this type.
-func (blder *WebhookBuilder) For(apiType runtime.Object) *WebhookBuilder {
- if blder.apiType != nil {
- blder.err = errors.New("For(...) should only be called once, could not assign multiple objects for webhook registration")
- }
- blder.apiType = apiType
+// WithCustomDefaulter takes an admission.CustomDefaulter interface, a MutatingWebhook with the provided opts (admission.DefaulterOption)
+// will be wired for this type.
+//
+// Deprecated: Use WithDefaulter instead.
+func (blder *WebhookBuilder[T]) WithCustomDefaulter(defaulter admission.CustomDefaulter, opts ...admission.DefaulterOption) *WebhookBuilder[T] {
+ blder.customDefaulter = defaulter
+ blder.customDefaulterOpts = opts
return blder
}
-// WithDefaulter takes an admission.CustomDefaulter interface, a MutatingWebhook with the provided opts (admission.DefaulterOption)
-// will be wired for this type.
-func (blder *WebhookBuilder) WithDefaulter(defaulter admission.CustomDefaulter, opts ...admission.DefaulterOption) *WebhookBuilder {
- blder.customDefaulter = defaulter
+// WithDefaulter sets up the provided admission.Defaulter in a defaulting webhook.
+func (blder *WebhookBuilder[T]) WithDefaulter(defaulter admission.Defaulter[T], opts ...admission.DefaulterOption) *WebhookBuilder[T] {
+ blder.defaulter = defaulter
blder.customDefaulterOpts = opts
return blder
}
-// WithValidator takes a admission.CustomValidator interface, a ValidatingWebhook will be wired for this type.
-func (blder *WebhookBuilder) WithValidator(validator admission.CustomValidator) *WebhookBuilder {
+// WithCustomValidator takes a admission.CustomValidator interface, a ValidatingWebhook will be wired for this type.
+//
+// Deprecated: Use WithValidator instead.
+func (blder *WebhookBuilder[T]) WithCustomValidator(validator admission.CustomValidator) *WebhookBuilder[T] {
blder.customValidator = validator
return blder
}
+// WithValidator sets up the provided admission.Validator in a validating webhook.
+func (blder *WebhookBuilder[T]) WithValidator(validator admission.Validator[T]) *WebhookBuilder[T] {
+ blder.validator = validator
+ return blder
+}
+
+// WithConverter takes a func that constructs a converter.Converter.
+// The Converter will then be used by the conversion endpoint for the type passed into NewWebhookManagedBy()
+func (blder *WebhookBuilder[T]) WithConverter(converterConstructor func(*runtime.Scheme) (conversion.Converter, error)) *WebhookBuilder[T] {
+ blder.converterConstructor = converterConstructor
+ return blder
+}
+
// WithLogConstructor overrides the webhook's LogConstructor.
-func (blder *WebhookBuilder) WithLogConstructor(logConstructor func(base logr.Logger, req *admission.Request) logr.Logger) *WebhookBuilder {
+func (blder *WebhookBuilder[T]) WithLogConstructor(logConstructor func(base logr.Logger, req *admission.Request) logr.Logger) *WebhookBuilder[T] {
blder.logConstructor = logConstructor
return blder
}
+// WithContextFunc overrides the webhook's WithContextFunc.
+func (blder *WebhookBuilder[T]) WithContextFunc(contextFunc func(context.Context, *http.Request) context.Context) *WebhookBuilder[T] {
+ blder.contextFunc = contextFunc
+ return blder
+}
+
// RecoverPanic indicates whether panics caused by the webhook should be recovered.
// Defaults to true.
-func (blder *WebhookBuilder) RecoverPanic(recoverPanic bool) *WebhookBuilder {
+func (blder *WebhookBuilder[T]) RecoverPanic(recoverPanic bool) *WebhookBuilder[T] {
blder.recoverPanic = &recoverPanic
return blder
}
@@ -101,25 +123,25 @@ func (blder *WebhookBuilder) RecoverPanic(recoverPanic bool) *WebhookBuilder {
//
// Deprecated: WithCustomPath should not be used anymore.
// Please use WithValidatorCustomPath or WithDefaulterCustomPath instead.
-func (blder *WebhookBuilder) WithCustomPath(customPath string) *WebhookBuilder {
+func (blder *WebhookBuilder[T]) WithCustomPath(customPath string) *WebhookBuilder[T] {
blder.customPath = customPath
return blder
}
// WithValidatorCustomPath overrides the path of the Validator.
-func (blder *WebhookBuilder) WithValidatorCustomPath(customPath string) *WebhookBuilder {
+func (blder *WebhookBuilder[T]) WithValidatorCustomPath(customPath string) *WebhookBuilder[T] {
blder.customValidatorCustomPath = customPath
return blder
}
// WithDefaulterCustomPath overrides the path of the Defaulter.
-func (blder *WebhookBuilder) WithDefaulterCustomPath(customPath string) *WebhookBuilder {
+func (blder *WebhookBuilder[T]) WithDefaulterCustomPath(customPath string) *WebhookBuilder[T] {
blder.customDefaulterCustomPath = customPath
return blder
}
// Complete builds the webhook.
-func (blder *WebhookBuilder) Complete() error {
+func (blder *WebhookBuilder[T]) Complete() error {
// Set the Config
blder.loadRestConfig()
@@ -130,13 +152,13 @@ func (blder *WebhookBuilder) Complete() error {
return blder.registerWebhooks()
}
-func (blder *WebhookBuilder) loadRestConfig() {
+func (blder *WebhookBuilder[T]) loadRestConfig() {
if blder.config == nil {
blder.config = blder.mgr.GetConfig()
}
}
-func (blder *WebhookBuilder) setLogConstructor() {
+func (blder *WebhookBuilder[T]) setLogConstructor() {
if blder.logConstructor == nil {
blder.logConstructor = func(base logr.Logger, req *admission.Request) logr.Logger {
log := base.WithValues(
@@ -156,11 +178,11 @@ func (blder *WebhookBuilder) setLogConstructor() {
}
}
-func (blder *WebhookBuilder) isThereCustomPathConflict() bool {
+func (blder *WebhookBuilder[T]) isThereCustomPathConflict() bool {
return (blder.customPath != "" && blder.customDefaulter != nil && blder.customValidator != nil) || (blder.customPath != "" && blder.customDefaulterCustomPath != "") || (blder.customPath != "" && blder.customValidatorCustomPath != "")
}
-func (blder *WebhookBuilder) registerWebhooks() error {
+func (blder *WebhookBuilder[T]) registerWebhooks() error {
typ, err := blder.getType()
if err != nil {
return err
@@ -201,10 +223,14 @@ func (blder *WebhookBuilder) registerWebhooks() error {
}
// registerDefaultingWebhook registers a defaulting webhook if necessary.
-func (blder *WebhookBuilder) registerDefaultingWebhook() error {
- mwh := blder.getDefaultingWebhook()
+func (blder *WebhookBuilder[T]) registerDefaultingWebhook() error {
+ mwh, err := blder.getDefaultingWebhook()
+ if err != nil {
+ return err
+ }
if mwh != nil {
mwh.LogConstructor = blder.logConstructor
+ mwh.WithContextFunc = blder.contextFunc
path := generateMutatePath(blder.gvk)
if blder.customDefaulterCustomPath != "" {
generatedCustomPath, err := generateCustomPath(blder.customDefaulterCustomPath)
@@ -227,22 +253,31 @@ func (blder *WebhookBuilder) registerDefaultingWebhook() error {
return nil
}
-func (blder *WebhookBuilder) getDefaultingWebhook() *admission.Webhook {
- if defaulter := blder.customDefaulter; defaulter != nil {
- w := admission.WithCustomDefaulter(blder.mgr.GetScheme(), blder.apiType, defaulter, blder.customDefaulterOpts...)
- if blder.recoverPanic != nil {
- w = w.WithRecoverPanic(*blder.recoverPanic)
+func (blder *WebhookBuilder[T]) getDefaultingWebhook() (*admission.Webhook, error) {
+ var w *admission.Webhook
+ if blder.defaulter != nil {
+ if blder.customDefaulter != nil {
+ return nil, errors.New("only one of Defaulter or CustomDefaulter can be set")
}
- return w
+ w = admission.WithDefaulter(blder.mgr.GetScheme(), blder.defaulter, blder.customDefaulterOpts...)
+ } else if blder.customDefaulter != nil {
+ w = admission.WithCustomDefaulter(blder.mgr.GetScheme(), blder.apiType, blder.customDefaulter, blder.customDefaulterOpts...)
}
- return nil
+ if w != nil && blder.recoverPanic != nil {
+ w = w.WithRecoverPanic(*blder.recoverPanic)
+ }
+ return w, nil
}
// registerValidatingWebhook registers a validating webhook if necessary.
-func (blder *WebhookBuilder) registerValidatingWebhook() error {
- vwh := blder.getValidatingWebhook()
+func (blder *WebhookBuilder[T]) registerValidatingWebhook() error {
+ vwh, err := blder.getValidatingWebhook()
+ if err != nil {
+ return err
+ }
if vwh != nil {
vwh.LogConstructor = blder.logConstructor
+ vwh.WithContextFunc = blder.contextFunc
path := generateValidatePath(blder.gvk)
if blder.customValidatorCustomPath != "" {
generatedCustomPath, err := generateCustomPath(blder.customValidatorCustomPath)
@@ -265,41 +300,60 @@ func (blder *WebhookBuilder) registerValidatingWebhook() error {
return nil
}
-func (blder *WebhookBuilder) getValidatingWebhook() *admission.Webhook {
- if validator := blder.customValidator; validator != nil {
- w := admission.WithCustomValidator(blder.mgr.GetScheme(), blder.apiType, validator)
- if blder.recoverPanic != nil {
- w = w.WithRecoverPanic(*blder.recoverPanic)
+func (blder *WebhookBuilder[T]) getValidatingWebhook() (*admission.Webhook, error) {
+ var w *admission.Webhook
+ if blder.validator != nil {
+ if blder.customValidator != nil {
+ return nil, errors.New("only one of Validator or CustomValidator can be set")
}
- return w
+ w = admission.WithValidator(blder.mgr.GetScheme(), blder.validator)
+ } else if blder.customValidator != nil {
+ //nolint:staticcheck
+ w = admission.WithCustomValidator(blder.mgr.GetScheme(), blder.apiType, blder.customValidator)
}
- return nil
+ if w != nil && blder.recoverPanic != nil {
+ w = w.WithRecoverPanic(*blder.recoverPanic)
+ }
+ return w, nil
}
-func (blder *WebhookBuilder) registerConversionWebhook() error {
- ok, err := conversion.IsConvertible(blder.mgr.GetScheme(), blder.apiType)
- if err != nil {
- log.Error(err, "conversion check failed", "GVK", blder.gvk)
- return err
- }
- if ok {
- if !blder.isAlreadyHandled("/convert") {
- blder.mgr.GetWebhookServer().Register("/convert", conversion.NewWebhookHandler(blder.mgr.GetScheme()))
+func (blder *WebhookBuilder[T]) registerConversionWebhook() error {
+ if blder.converterConstructor != nil {
+ converter, err := blder.converterConstructor(blder.mgr.GetScheme())
+ if err != nil {
+ return err
+ }
+
+ if err := blder.mgr.GetConverterRegistry().RegisterConverter(blder.gvk.GroupKind(), converter); err != nil {
+ return err
}
- log.Info("Conversion webhook enabled", "GVK", blder.gvk)
+ } else {
+ ok, err := conversion.IsConvertible(blder.mgr.GetScheme(), blder.apiType)
+ if err != nil {
+ log.Error(err, "conversion check failed", "GVK", blder.gvk)
+ return err
+ }
+ if !ok {
+ return nil
+ }
+ }
+
+ if !blder.isAlreadyHandled("/convert") {
+ blder.mgr.GetWebhookServer().Register("/convert", conversion.NewWebhookHandler(blder.mgr.GetScheme(), blder.mgr.GetConverterRegistry()))
}
+ log.Info("Conversion webhook enabled", "GVK", blder.gvk)
return nil
}
-func (blder *WebhookBuilder) getType() (runtime.Object, error) {
+func (blder *WebhookBuilder[T]) getType() (runtime.Object, error) {
if blder.apiType != nil {
return blder.apiType, nil
}
- return nil, errors.New("For() must be called with a valid object")
+ return nil, errors.New("NewWebhookManagedBy() must be called with a valid object")
}
-func (blder *WebhookBuilder) isAlreadyHandled(path string) bool {
+func (blder *WebhookBuilder[T]) isAlreadyHandled(path string) bool {
if blder.mgr.GetWebhookServer().WebhookMux() == nil {
return false
}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/cache.go b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/cache.go
index a94ec6cc3210..b814170de1f4 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/cache.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/cache.go
@@ -22,7 +22,6 @@ import (
"maps"
"net/http"
"slices"
- "sort"
"time"
corev1 "k8s.io/api/core/v1"
@@ -657,7 +656,8 @@ func defaultConfig(toDefault, defaultFrom Config) Config {
func namespaceAllSelector(namespaces []string) []fields.Selector {
selectors := make([]fields.Selector, 0, len(namespaces)-1)
- sort.Strings(namespaces)
+ slices.Sort(namespaces)
+
for _, namespace := range namespaces {
if namespace != metav1.NamespaceAll {
selectors = append(selectors, fields.OneTermNotEqualSelector("metadata.namespace", namespace))
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/delegating_by_gvk_cache.go b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/delegating_by_gvk_cache.go
index 46bd243c66b2..adc5d957a4df 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/delegating_by_gvk_cache.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/delegating_by_gvk_cache.go
@@ -81,13 +81,11 @@ func (dbt *delegatingByGVKCache) Start(ctx context.Context) error {
errs := make(chan error)
for idx := range allCaches {
cache := allCaches[idx]
- wg.Add(1)
- go func() {
- defer wg.Done()
+ wg.Go(func() {
if err := cache.Start(ctx); err != nil {
errs <- err
}
- }()
+ })
}
select {
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/informer_cache.go b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/informer_cache.go
index 091667b7faab..50dd9a8be1eb 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/informer_cache.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/informer_cache.go
@@ -51,16 +51,7 @@ var _ error = (*ErrCacheNotStarted)(nil)
// ErrResourceNotCached indicates that the resource type
// the client asked the cache for is not cached, i.e. the
// corresponding informer does not exist yet.
-type ErrResourceNotCached struct {
- GVK schema.GroupVersionKind
-}
-
-// Error returns the error
-func (r ErrResourceNotCached) Error() string {
- return fmt.Sprintf("%s is not cached", r.GVK.String())
-}
-
-var _ error = (*ErrResourceNotCached)(nil)
+type ErrResourceNotCached = internal.ErrResourceNotCached
// informerCache is a Kubernetes Object cache populated from internal.Informers.
// informerCache wraps internal.Informers.
@@ -157,7 +148,7 @@ func (ic *informerCache) GetInformerForKind(ctx context.Context, gvk schema.Grou
return nil, err
}
- _, i, err := ic.Informers.Get(ctx, gvk, obj, applyGetOptions(opts...))
+ _, i, err := ic.Informers.Get(ctx, gvk, obj, false, applyGetOptions(opts...))
if err != nil {
return nil, err
}
@@ -171,7 +162,7 @@ func (ic *informerCache) GetInformer(ctx context.Context, obj client.Object, opt
return nil, err
}
- _, i, err := ic.Informers.Get(ctx, gvk, obj, applyGetOptions(opts...))
+ _, i, err := ic.Informers.Get(ctx, gvk, obj, false, applyGetOptions(opts...))
if err != nil {
return nil, err
}
@@ -179,15 +170,11 @@ func (ic *informerCache) GetInformer(ctx context.Context, obj client.Object, opt
}
func (ic *informerCache) getInformerForKind(ctx context.Context, gvk schema.GroupVersionKind, obj runtime.Object) (bool, *internal.Cache, error) {
- if ic.readerFailOnMissingInformer {
- cache, started, ok := ic.Informers.Peek(gvk, obj)
- if !ok {
- return false, nil, &ErrResourceNotCached{GVK: gvk}
- }
- return started, cache, nil
+ started, cache, err := ic.Informers.Get(ctx, gvk, obj, ic.readerFailOnMissingInformer, &internal.GetOptions{})
+ if err != nil {
+ return false, nil, err
}
-
- return ic.Informers.Get(ctx, gvk, obj, &internal.GetOptions{})
+ return started, cache, nil
}
// RemoveInformer deactivates and removes the informer from the cache.
@@ -221,7 +208,7 @@ func (ic *informerCache) IndexField(ctx context.Context, obj client.Object, fiel
}
func indexByField(informer Informer, field string, extractValue client.IndexerFunc) error {
- indexFunc := func(objRaw interface{}) ([]string, error) {
+ indexFunc := func(objRaw any) ([]string, error) {
// TODO(directxman12): check if this is the correct type?
obj, isObj := objRaw.(client.Object)
if !isObj {
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/internal/cache_reader.go b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/internal/cache_reader.go
index eb6b5448559f..624869f590b8 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/internal/cache_reader.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/internal/cache_reader.go
@@ -20,6 +20,7 @@ import (
"context"
"fmt"
"reflect"
+ "slices"
apierrors "k8s.io/apimachinery/pkg/api/errors"
apimeta "k8s.io/apimachinery/pkg/api/meta"
@@ -109,7 +110,7 @@ func (c *CacheReader) Get(_ context.Context, key client.ObjectKey, out client.Ob
// List lists items out of the indexer and writes them to out.
func (c *CacheReader) List(_ context.Context, out client.ObjectList, opts ...client.ListOption) error {
- var objs []interface{}
+ var objs []any
var err error
listOpts := client.ListOptions{}
@@ -186,10 +187,10 @@ func (c *CacheReader) List(_ context.Context, out client.ObjectList, opts ...cli
return nil
}
-func byIndexes(indexer cache.Indexer, requires fields.Requirements, namespace string) ([]interface{}, error) {
+func byIndexes(indexer cache.Indexer, requires fields.Requirements, namespace string) ([]any, error) {
var (
err error
- objs []interface{}
+ objs []any
vals []string
)
indexers := indexer.GetIndexers()
@@ -213,17 +214,14 @@ func byIndexes(indexer cache.Indexer, requires fields.Requirements, namespace st
if !exist {
return nil, fmt.Errorf("index with name %s does not exist", indexName)
}
- filteredObjects := make([]interface{}, 0, len(objs))
+ filteredObjects := make([]any, 0, len(objs))
for _, obj := range objs {
vals, err = fn(obj)
if err != nil {
return nil, err
}
- for _, val := range vals {
- if val == indexedValue {
- filteredObjects = append(filteredObjects, obj)
- break
- }
+ if slices.Contains(vals, indexedValue) {
+ filteredObjects = append(filteredObjects, obj)
}
}
if len(filteredObjects) == 0 {
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/internal/informers.go b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/internal/informers.go
index f216be0d9e53..619e36abd3a5 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/internal/informers.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/internal/informers.go
@@ -45,6 +45,20 @@ import (
var log = logf.RuntimeLog.WithName("cache")
+// ErrResourceNotCached indicates that the resource type
+// the client asked the cache for is not cached, i.e. the
+// corresponding informer does not exist yet.
+type ErrResourceNotCached struct {
+ GVK schema.GroupVersionKind
+}
+
+// Error returns the error
+func (r ErrResourceNotCached) Error() string {
+ return fmt.Sprintf("%s is not cached", r.GVK.String())
+}
+
+var _ error = (*ErrResourceNotCached)(nil)
+
// InformersOpts configures an InformerMap.
type InformersOpts struct {
HTTPClient *http.Client
@@ -242,11 +256,9 @@ func (ip *Informers) startInformerLocked(cacheEntry *Cache) {
return
}
- ip.waitGroup.Add(1)
- go func() {
- defer ip.waitGroup.Done()
+ ip.waitGroup.Go(func() {
cacheEntry.Start(ip.ctx.Done())
- }()
+ })
}
func (ip *Informers) waitForStarted(ctx context.Context) bool {
@@ -296,10 +308,13 @@ func (ip *Informers) Peek(gvk schema.GroupVersionKind, obj runtime.Object) (res
// Get will create a new Informer and add it to the map of specificInformersMap if none exists. Returns
// the Informer from the map.
-func (ip *Informers) Get(ctx context.Context, gvk schema.GroupVersionKind, obj runtime.Object, opts *GetOptions) (bool, *Cache, error) {
+func (ip *Informers) Get(ctx context.Context, gvk schema.GroupVersionKind, obj runtime.Object, readerFailOnMissingInformer bool, opts *GetOptions) (bool, *Cache, error) {
// Return the informer if it is found
i, started, ok := ip.Peek(gvk, obj)
if !ok {
+ if readerFailOnMissingInformer {
+ return false, nil, &ErrResourceNotCached{GVK: gvk}
+ }
var err error
if i, started, err = ip.addInformerToMap(gvk, obj); err != nil {
return started, nil, err
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/apiutil/apimachinery.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/apiutil/apimachinery.go
index b132cb2d4d67..217990dece93 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/apiutil/apimachinery.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/apiutil/apimachinery.go
@@ -231,7 +231,7 @@ func (t targetZeroingDecoder) Decode(data []byte, defaults *schema.GroupVersionK
}
// zero zeros the value of a pointer.
-func zero(x interface{}) {
+func zero(x any) {
if x == nil {
return
}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/apiutil/errors.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/apiutil/errors.go
index c216c49d2aa8..b00e071232f6 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/apiutil/errors.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/apiutil/errors.go
@@ -18,7 +18,7 @@ package apiutil
import (
"fmt"
- "sort"
+ "slices"
"strings"
apierrors "k8s.io/apimachinery/pkg/api/errors"
@@ -38,7 +38,7 @@ func (e *ErrResourceDiscoveryFailed) Error() string {
for k, v := range *e {
subErrors = append(subErrors, fmt.Sprintf("%s: %v", k, v))
}
- sort.Strings(subErrors)
+ slices.Sort(subErrors)
return fmt.Sprintf("unable to retrieve the complete list of server APIs: %s", strings.Join(subErrors, ", "))
}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/client.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/client.go
index e9f731453b4f..ad946daeaa3e 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/client.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/client.go
@@ -52,6 +52,25 @@ type Options struct {
// DryRun instructs the client to only perform dry run requests.
DryRun *bool
+
+ // FieldOwner, if provided, sets the default field manager for all write operations
+ // (Create, Update, Patch, Apply) performed by this client. The field manager is used by
+ // the server for Server-Side Apply to track field ownership.
+ // For more details, see: https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management
+ //
+ // This default can be overridden for a specific call by passing a [FieldOwner] option
+ // to the method.
+ FieldOwner string
+
+ // FieldValidation sets the field validation strategy for all mutating operations performed by this client
+ // and subresource clients created from it.
+ // The exception are apply requests which are always strict, regardless of the FieldValidation setting.
+ // Available values for this option can be found in "k8s.io/apimachinery/pkg/apis/meta/v1" package and are:
+ // - FieldValidationIgnore
+ // - FieldValidationWarn
+ // - FieldValidationStrict
+ // For more details, see: https://kubernetes.io/docs/reference/using-api/api-concepts/#field-validation
+ FieldValidation string
}
// CacheOptions are options for creating a cache-backed client.
@@ -99,6 +118,13 @@ func New(config *rest.Config, options Options) (c Client, err error) {
if err == nil && options.DryRun != nil && *options.DryRun {
c = NewDryRunClient(c)
}
+ if fo := options.FieldOwner; fo != "" {
+ c = WithFieldOwner(c, fo)
+ }
+ if fv := options.FieldValidation; fv != "" {
+ c = WithFieldValidation(c, FieldValidation(fv))
+ }
+
return c, err
}
@@ -543,6 +569,30 @@ func (po *SubResourcePatchOptions) ApplyToSubResourcePatch(o *SubResourcePatchOp
}
}
+// SubResourceApplyOptions are the options for a subresource
+// apply request.
+type SubResourceApplyOptions struct {
+ ApplyOptions
+ SubResourceBody runtime.ApplyConfiguration
+}
+
+// ApplyOpts applies the given options.
+func (ao *SubResourceApplyOptions) ApplyOpts(opts []SubResourceApplyOption) *SubResourceApplyOptions {
+ for _, o := range opts {
+ o.ApplyToSubResourceApply(ao)
+ }
+
+ return ao
+}
+
+// ApplyToSubResourceApply applies the configuration on the given patch options.
+func (ao *SubResourceApplyOptions) ApplyToSubResourceApply(o *SubResourceApplyOptions) {
+ ao.ApplyOptions.ApplyToApply(&o.ApplyOptions)
+ if ao.SubResourceBody != nil {
+ o.SubResourceBody = ao.SubResourceBody
+ }
+}
+
func (sc *subResourceClient) Get(ctx context.Context, obj Object, subResource Object, opts ...SubResourceGetOption) error {
switch obj.(type) {
case runtime.Unstructured:
@@ -594,3 +644,13 @@ func (sc *subResourceClient) Patch(ctx context.Context, obj Object, patch Patch,
return sc.client.typedClient.PatchSubResource(ctx, obj, sc.subResource, patch, opts...)
}
}
+
+func (sc *subResourceClient) Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...SubResourceApplyOption) error {
+ switch obj := obj.(type) {
+ case *unstructuredApplyConfiguration:
+ defer sc.client.resetGroupVersionKind(obj, obj.GetObjectKind().GroupVersionKind())
+ return sc.client.unstructuredClient.ApplySubResource(ctx, obj, sc.subResource, opts...)
+ default:
+ return sc.client.typedClient.ApplySubResource(ctx, obj, sc.subResource, opts...)
+ }
+}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/config/config.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/config/config.go
index 70389dfa90f4..1c39f4d854d7 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/config/config.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/config/config.go
@@ -64,9 +64,6 @@ func RegisterFlags(fs *flag.FlagSet) {
// The returned `*rest.Config` has client-side ratelimting disabled as we can rely on API priority and
// fairness. Set its QPS to a value equal or bigger than 0 to re-enable it.
//
-// It also applies saner defaults for QPS and burst based on the Kubernetes
-// controller manager defaults (20 QPS, 30 burst)
-//
// Config precedence:
//
// * --kubeconfig flag pointing at a file
@@ -87,9 +84,6 @@ func GetConfig() (*rest.Config, error) {
// The returned `*rest.Config` has client-side ratelimting disabled as we can rely on API priority and
// fairness. Set its QPS to a value equal or bigger than 0 to re-enable it.
//
-// It also applies saner defaults for QPS and burst based on the Kubernetes
-// controller manager defaults (20 QPS, 30 burst)
-//
// Config precedence:
//
// * --kubeconfig flag pointing at a file
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/dryrun.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/dryrun.go
index a185860d33da..fb7012200f59 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/dryrun.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/dryrun.go
@@ -132,3 +132,7 @@ func (sw *dryRunSubResourceClient) Update(ctx context.Context, obj Object, opts
func (sw *dryRunSubResourceClient) Patch(ctx context.Context, obj Object, patch Patch, opts ...SubResourcePatchOption) error {
return sw.client.Patch(ctx, obj, patch, append(opts, DryRunAll)...)
}
+
+func (sw *dryRunSubResourceClient) Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...SubResourceApplyOption) error {
+ return sw.client.Apply(ctx, obj, append(opts, DryRunAll)...)
+}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/fake/client.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/fake/client.go
index f88a44edd2c4..2a07bd40b2e6 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/fake/client.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/fake/client.go
@@ -17,13 +17,11 @@ limitations under the License.
package fake
import (
- "bytes"
"context"
"errors"
"fmt"
"reflect"
- "runtime/debug"
- "strconv"
+ "slices"
"strings"
"sync"
"time"
@@ -65,7 +63,6 @@ import (
utilrand "k8s.io/apimachinery/pkg/util/rand"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/strategicpatch"
- "k8s.io/apimachinery/pkg/util/validation/field"
"k8s.io/apimachinery/pkg/watch"
clientgoapplyconfigurations "k8s.io/client-go/applyconfigurations"
"k8s.io/client-go/kubernetes/scheme"
@@ -79,13 +76,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/internal/objectutil"
)
-type versionedTracker struct {
- testing.ObjectTracker
- scheme *runtime.Scheme
- withStatusSubresource sets.Set[schema.GroupVersionKind]
- usesFieldManagedObjectTracker bool
-}
-
type fakeClient struct {
// trackerWriteLock must be acquired before writing to
// the tracker or performing reads that affect a following
@@ -313,7 +303,7 @@ func (f *ClientBuilder) Build() client.WithWatch {
usesFieldManagedObjectTracker = true
}
tracker := versionedTracker{
- ObjectTracker: f.objectTracker,
+ upstream: f.objectTracker,
scheme: f.scheme,
withStatusSubresource: withStatusSubResource,
usesFieldManagedObjectTracker: usesFieldManagedObjectTracker,
@@ -354,83 +344,6 @@ func (f *ClientBuilder) Build() client.WithWatch {
const trackerAddResourceVersion = "999"
-func (t versionedTracker) Add(obj runtime.Object) error {
- var objects []runtime.Object
- if meta.IsListType(obj) {
- var err error
- objects, err = meta.ExtractList(obj)
- if err != nil {
- return err
- }
- } else {
- objects = []runtime.Object{obj}
- }
- for _, obj := range objects {
- accessor, err := meta.Accessor(obj)
- if err != nil {
- return fmt.Errorf("failed to get accessor for object: %w", err)
- }
- if accessor.GetDeletionTimestamp() != nil && len(accessor.GetFinalizers()) == 0 {
- return fmt.Errorf("refusing to create obj %s with metadata.deletionTimestamp but no finalizers", accessor.GetName())
- }
- if accessor.GetResourceVersion() == "" {
- // We use a "magic" value of 999 here because this field
- // is parsed as uint and and 0 is already used in Update.
- // As we can't go lower, go very high instead so this can
- // be recognized
- accessor.SetResourceVersion(trackerAddResourceVersion)
- }
-
- obj, err = convertFromUnstructuredIfNecessary(t.scheme, obj)
- if err != nil {
- return err
- }
-
- // If the fieldManager can not decode fields, it will just silently clear them. This is pretty
- // much guaranteed not to be what someone that initializes a fake client with objects that
- // have them set wants, so validate them here.
- // Ref https://github.com/kubernetes/kubernetes/blob/a956ef4862993b825bcd524a19260192ff1da72d/staging/src/k8s.io/apimachinery/pkg/util/managedfields/internal/fieldmanager.go#L105
- if t.usesFieldManagedObjectTracker {
- if err := managedfields.ValidateManagedFields(accessor.GetManagedFields()); err != nil {
- return fmt.Errorf("invalid managedFields on %T: %w", obj, err)
- }
- }
- if err := t.ObjectTracker.Add(obj); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func (t versionedTracker) Create(gvr schema.GroupVersionResource, obj runtime.Object, ns string, opts ...metav1.CreateOptions) error {
- accessor, err := meta.Accessor(obj)
- if err != nil {
- return fmt.Errorf("failed to get accessor for object: %w", err)
- }
- if accessor.GetName() == "" {
- gvk, _ := apiutil.GVKForObject(obj, t.scheme)
- return apierrors.NewInvalid(
- gvk.GroupKind(),
- accessor.GetName(),
- field.ErrorList{field.Required(field.NewPath("metadata.name"), "name is required")})
- }
- if accessor.GetResourceVersion() != "" {
- return apierrors.NewBadRequest("resourceVersion can not be set for Create requests")
- }
- accessor.SetResourceVersion("1")
- obj, err = convertFromUnstructuredIfNecessary(t.scheme, obj)
- if err != nil {
- return err
- }
- if err := t.ObjectTracker.Create(gvr, obj, ns, opts...); err != nil {
- accessor.SetResourceVersion("")
- return err
- }
-
- return nil
-}
-
// convertFromUnstructuredIfNecessary will convert runtime.Unstructured for a GVK that is recognized
// by the schema into the whatever the schema produces with New() for said GVK.
// This is required because the tracker unconditionally saves on manipulations, but its List() implementation
@@ -465,151 +378,6 @@ func convertFromUnstructuredIfNecessary(s *runtime.Scheme, o runtime.Object) (ru
return typed, nil
}
-func (t versionedTracker) Update(gvr schema.GroupVersionResource, obj runtime.Object, ns string, opts ...metav1.UpdateOptions) error {
- updateOpts, err := getSingleOrZeroOptions(opts)
- if err != nil {
- return err
- }
-
- return t.update(gvr, obj, ns, false, false, updateOpts)
-}
-
-func (t versionedTracker) update(gvr schema.GroupVersionResource, obj runtime.Object, ns string, isStatus, deleting bool, opts metav1.UpdateOptions) error {
- gvk, err := apiutil.GVKForObject(obj, t.scheme)
- if err != nil {
- return err
- }
- obj, err = t.updateObject(gvr, obj, ns, isStatus, deleting, opts.DryRun)
- if err != nil {
- return err
- }
- if obj == nil {
- return nil
- }
-
- if u, unstructured := obj.(*unstructured.Unstructured); unstructured {
- u.SetGroupVersionKind(gvk)
- }
-
- return t.ObjectTracker.Update(gvr, obj, ns, opts)
-}
-
-func (t versionedTracker) Patch(gvr schema.GroupVersionResource, obj runtime.Object, ns string, opts ...metav1.PatchOptions) error {
- patchOptions, err := getSingleOrZeroOptions(opts)
- if err != nil {
- return err
- }
-
- // We apply patches using a client-go reaction that ends up calling the trackers Patch. As we can't change
- // that reaction, we use the callstack to figure out if this originated from the status client.
- isStatus := bytes.Contains(debug.Stack(), []byte("sigs.k8s.io/controller-runtime/pkg/client/fake.(*fakeSubResourceClient).statusPatch"))
-
- obj, err = t.updateObject(gvr, obj, ns, isStatus, false, patchOptions.DryRun)
- if err != nil {
- return err
- }
- if obj == nil {
- return nil
- }
-
- return t.ObjectTracker.Patch(gvr, obj, ns, patchOptions)
-}
-
-func (t versionedTracker) updateObject(gvr schema.GroupVersionResource, obj runtime.Object, ns string, isStatus, deleting bool, dryRun []string) (runtime.Object, error) {
- accessor, err := meta.Accessor(obj)
- if err != nil {
- return nil, fmt.Errorf("failed to get accessor for object: %w", err)
- }
-
- if accessor.GetName() == "" {
- gvk, _ := apiutil.GVKForObject(obj, t.scheme)
- return nil, apierrors.NewInvalid(
- gvk.GroupKind(),
- accessor.GetName(),
- field.ErrorList{field.Required(field.NewPath("metadata.name"), "name is required")})
- }
-
- gvk, err := apiutil.GVKForObject(obj, t.scheme)
- if err != nil {
- return nil, err
- }
-
- oldObject, err := t.ObjectTracker.Get(gvr, ns, accessor.GetName())
- if err != nil {
- // If the resource is not found and the resource allows create on update, issue a
- // create instead.
- if apierrors.IsNotFound(err) && allowsCreateOnUpdate(gvk) {
- return nil, t.Create(gvr, obj, ns)
- }
- return nil, err
- }
-
- if t.withStatusSubresource.Has(gvk) {
- if isStatus { // copy everything but status and metadata.ResourceVersion from original object
- if err := copyStatusFrom(obj, oldObject); err != nil {
- return nil, fmt.Errorf("failed to copy non-status field for object with status subresouce: %w", err)
- }
- passedRV := accessor.GetResourceVersion()
- if err := copyFrom(oldObject, obj); err != nil {
- return nil, fmt.Errorf("failed to restore non-status fields: %w", err)
- }
- accessor.SetResourceVersion(passedRV)
- } else { // copy status from original object
- if err := copyStatusFrom(oldObject, obj); err != nil {
- return nil, fmt.Errorf("failed to copy the status for object with status subresource: %w", err)
- }
- }
- } else if isStatus {
- return nil, apierrors.NewNotFound(gvr.GroupResource(), accessor.GetName())
- }
-
- oldAccessor, err := meta.Accessor(oldObject)
- if err != nil {
- return nil, err
- }
-
- // If the new object does not have the resource version set and it allows unconditional update,
- // default it to the resource version of the existing resource
- if accessor.GetResourceVersion() == "" {
- switch {
- case allowsUnconditionalUpdate(gvk):
- accessor.SetResourceVersion(oldAccessor.GetResourceVersion())
- // This is needed because if the patch explicitly sets the RV to null, the client-go reaction we use
- // to apply it and whose output we process here will have it unset. It is not clear why the Kubernetes
- // apiserver accepts such a patch, but it does so we just copy that behavior.
- // Kubernetes apiserver behavior can be checked like this:
- // `kubectl patch configmap foo --patch '{"metadata":{"annotations":{"foo":"bar"},"resourceVersion":null}}' -v=9`
- case bytes.
- Contains(debug.Stack(), []byte("sigs.k8s.io/controller-runtime/pkg/client/fake.(*fakeClient).Patch")):
- // We apply patches using a client-go reaction that ends up calling the trackers Update. As we can't change
- // that reaction, we use the callstack to figure out if this originated from the "fakeClient.Patch" func.
- accessor.SetResourceVersion(oldAccessor.GetResourceVersion())
- }
- }
-
- if accessor.GetResourceVersion() != oldAccessor.GetResourceVersion() {
- return nil, apierrors.NewConflict(gvr.GroupResource(), accessor.GetName(), errors.New("object was modified"))
- }
- if oldAccessor.GetResourceVersion() == "" {
- oldAccessor.SetResourceVersion("0")
- }
- intResourceVersion, err := strconv.ParseUint(oldAccessor.GetResourceVersion(), 10, 64)
- if err != nil {
- return nil, fmt.Errorf("can not convert resourceVersion %q to int: %w", oldAccessor.GetResourceVersion(), err)
- }
- intResourceVersion++
- accessor.SetResourceVersion(strconv.FormatUint(intResourceVersion, 10))
-
- if !deleting && !deletionTimestampEqual(accessor, oldAccessor) {
- return nil, fmt.Errorf("error: Unable to edit %s: metadata.deletionTimestamp field is immutable", accessor.GetName())
- }
-
- if !accessor.GetDeletionTimestamp().IsZero() && len(accessor.GetFinalizers()) == 0 {
- return nil, t.ObjectTracker.Delete(gvr, accessor.GetNamespace(), accessor.GetName(), metav1.DeleteOptions{DryRun: dryRun})
- }
- return convertFromUnstructuredIfNecessary(t.scheme, obj)
-}
-
func (c *fakeClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error {
if err := c.addToSchemeIfUnknownAndUnstructuredOrPartial(obj); err != nil {
return err
@@ -821,13 +589,7 @@ func (c *fakeClient) objMatchesFieldSelector(o runtime.Object, extractIndex clie
panic(fmt.Errorf("expected object %v to be of type client.Object, but it's not", o))
}
- for _, extractedVal := range extractIndex(obj) {
- if extractedVal == val {
- return true
- }
- }
-
- return false
+ return slices.Contains(extractIndex(obj), val)
}
func (c *fakeClient) Scheme() *runtime.Scheme {
@@ -859,10 +621,8 @@ func (c *fakeClient) Create(ctx context.Context, obj client.Object, opts ...clie
createOptions := &client.CreateOptions{}
createOptions.ApplyOptions(opts)
- for _, dryRunOpt := range createOptions.DryRun {
- if dryRunOpt == metav1.DryRunAll {
- return nil
- }
+ if slices.Contains(createOptions.DryRun, metav1.DryRunAll) {
+ return nil
}
gvr, err := getGVRFromObject(obj, c.scheme)
@@ -926,10 +686,8 @@ func (c *fakeClient) Delete(ctx context.Context, obj client.Object, opts ...clie
delOptions := client.DeleteOptions{}
delOptions.ApplyOptions(opts)
- for _, dryRunOpt := range delOptions.DryRun {
- if dryRunOpt == metav1.DryRunAll {
- return nil
- }
+ if slices.Contains(delOptions.DryRun, metav1.DryRunAll) {
+ return nil
}
c.trackerWriteLock.Lock()
@@ -975,10 +733,8 @@ func (c *fakeClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ..
dcOptions := client.DeleteAllOfOptions{}
dcOptions.ApplyOptions(opts)
- for _, dryRunOpt := range dcOptions.DryRun {
- if dryRunOpt == metav1.DryRunAll {
- return nil
- }
+ if slices.Contains(dcOptions.DryRun, metav1.DryRunAll) {
+ return nil
}
c.trackerWriteLock.Lock()
@@ -1026,10 +782,8 @@ func (c *fakeClient) update(obj client.Object, isStatus bool, opts ...client.Upd
updateOptions := &client.UpdateOptions{}
updateOptions.ApplyOptions(opts)
- for _, dryRunOpt := range updateOptions.DryRun {
- if dryRunOpt == metav1.DryRunAll {
- return nil
- }
+ if slices.Contains(updateOptions.DryRun, metav1.DryRunAll) {
+ return nil
}
gvr, err := getGVRFromObject(obj, c.scheme)
@@ -1141,10 +895,8 @@ func (c *fakeClient) patch(obj client.Object, patch client.Patch, opts ...client
c.schemeLock.RLock()
defer c.schemeLock.RUnlock()
- for _, dryRunOpt := range patchOptions.DryRun {
- if dryRunOpt == metav1.DryRunAll {
- return nil
- }
+ if slices.Contains(patchOptions.DryRun, metav1.DryRunAll) {
+ return nil
}
gvr, err := getGVRFromObject(obj, c.scheme)
@@ -1176,9 +928,15 @@ func (c *fakeClient) patch(obj client.Object, patch client.Patch, opts ...client
return err
}
- // SSA deletionTimestamp updates are silently ignored
- if patch.Type() == types.ApplyPatchType && !isApplyCreate {
- obj.SetDeletionTimestamp(oldAccessor.GetDeletionTimestamp())
+ if patch.Type() == types.ApplyPatchType {
+ if isApplyCreate {
+ // Overwrite it unconditionally, this matches the apiserver behavior
+ // which allows to set it on create, but will then ignore it.
+ obj.SetResourceVersion("1")
+ } else {
+ // SSA deletionTimestamp updates are silently ignored
+ obj.SetDeletionTimestamp(oldAccessor.GetDeletionTimestamp())
+ }
}
data, err := patch.Data(obj)
@@ -1227,6 +985,15 @@ func (c *fakeClient) patch(obj client.Object, patch client.Patch, opts ...client
reaction := testing.ObjectReaction(c.tracker)
handled, o, err := reaction(action)
if err != nil {
+ // The reaction calls tracker.Get after tracker.Apply to return the object,
+ // but we may have deleted it in tracker.Apply if there was no finalizer
+ // left.
+ if apierrors.IsNotFound(err) &&
+ patch.Type() == types.ApplyPatchType &&
+ oldAccessor.GetDeletionTimestamp() != nil &&
+ len(obj.GetFinalizers()) == 0 {
+ return nil
+ }
return err
}
if !handled {
@@ -1553,6 +1320,42 @@ func (sw *fakeSubResourceClient) statusPatch(body client.Object, patch client.Pa
return sw.client.patch(body, patch, &patchOptions.PatchOptions)
}
+func (sw *fakeSubResourceClient) Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...client.SubResourceApplyOption) error {
+ if sw.subResource != "status" {
+ return errors.New("fakeSubResourceClient currently only supports Apply for status subresource")
+ }
+
+ applyOpts := &client.SubResourceApplyOptions{}
+ applyOpts.ApplyOpts(opts)
+
+ data, err := json.Marshal(obj)
+ if err != nil {
+ return fmt.Errorf("failed to marshal apply configuration: %w", err)
+ }
+
+ u := &unstructured.Unstructured{}
+ if err := json.Unmarshal(data, u); err != nil {
+ return fmt.Errorf("failed to unmarshal apply configuration: %w", err)
+ }
+
+ patchOpts := &client.SubResourcePatchOptions{}
+ patchOpts.Raw = applyOpts.AsPatchOptions()
+
+ if applyOpts.SubResourceBody != nil {
+ subResourceBodySerialized, err := json.Marshal(applyOpts.SubResourceBody)
+ if err != nil {
+ return fmt.Errorf("failed to serialize subresource body: %w", err)
+ }
+ subResourceBody := &unstructured.Unstructured{}
+ if err := json.Unmarshal(subResourceBodySerialized, subResourceBody); err != nil {
+ return fmt.Errorf("failed to unmarshal subresource body: %w", err)
+ }
+ patchOpts.SubResourceBody = subResourceBody
+ }
+
+ return sw.Patch(ctx, u, &fakeApplyPatch{}, patchOpts)
+}
+
func allowsUnconditionalUpdate(gvk schema.GroupVersionKind) bool {
switch gvk.Group {
case "apps":
@@ -1689,7 +1492,7 @@ func inTreeResourcesWithStatus() []schema.GroupVersionKind {
}
// zero zeros the value of a pointer.
-func zero(x interface{}) {
+func zero(x any) {
if x == nil {
return
}
@@ -1883,6 +1686,12 @@ func (c *fakeClient) addToSchemeIfUnknownAndUnstructuredOrPartial(obj runtime.Ob
return err
}
+ if isUnstructuredList || isPartialList {
+ if !strings.HasSuffix(gvk.Kind, "List") {
+ gvk.Kind += "List"
+ }
+ }
+
if !c.scheme.Recognizes(gvk) {
c.scheme.AddKnownTypeWithName(gvk, obj)
}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/fake/versioned_tracker.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/fake/versioned_tracker.go
new file mode 100644
index 000000000000..62ccac2becdd
--- /dev/null
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/fake/versioned_tracker.go
@@ -0,0 +1,368 @@
+/*
+Copyright 2025 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package fake
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "runtime/debug"
+ "strconv"
+
+ apierrors "k8s.io/apimachinery/pkg/api/errors"
+ "k8s.io/apimachinery/pkg/api/meta"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/util/managedfields"
+ "k8s.io/apimachinery/pkg/util/sets"
+ "k8s.io/apimachinery/pkg/util/validation/field"
+ "k8s.io/apimachinery/pkg/watch"
+ "k8s.io/client-go/testing"
+ "sigs.k8s.io/controller-runtime/pkg/client/apiutil"
+)
+
+var _ testing.ObjectTracker = (*versionedTracker)(nil)
+
+type versionedTracker struct {
+ upstream testing.ObjectTracker
+ scheme *runtime.Scheme
+ withStatusSubresource sets.Set[schema.GroupVersionKind]
+ usesFieldManagedObjectTracker bool
+}
+
+func (t versionedTracker) Add(obj runtime.Object) error {
+ var objects []runtime.Object
+ if meta.IsListType(obj) {
+ var err error
+ objects, err = meta.ExtractList(obj)
+ if err != nil {
+ return err
+ }
+ } else {
+ objects = []runtime.Object{obj}
+ }
+ for _, obj := range objects {
+ accessor, err := meta.Accessor(obj)
+ if err != nil {
+ return fmt.Errorf("failed to get accessor for object: %w", err)
+ }
+ if accessor.GetDeletionTimestamp() != nil && len(accessor.GetFinalizers()) == 0 {
+ return fmt.Errorf("refusing to create obj %s with metadata.deletionTimestamp but no finalizers", accessor.GetName())
+ }
+ if accessor.GetResourceVersion() == "" {
+ // We use a "magic" value of 999 here because this field
+ // is parsed as uint and and 0 is already used in Update.
+ // As we can't go lower, go very high instead so this can
+ // be recognized
+ accessor.SetResourceVersion(trackerAddResourceVersion)
+ }
+
+ obj, err = convertFromUnstructuredIfNecessary(t.scheme, obj)
+ if err != nil {
+ return err
+ }
+
+ // If the fieldManager can not decode fields, it will just silently clear them. This is pretty
+ // much guaranteed not to be what someone that initializes a fake client with objects that
+ // have them set wants, so validate them here.
+ // Ref https://github.com/kubernetes/kubernetes/blob/a956ef4862993b825bcd524a19260192ff1da72d/staging/src/k8s.io/apimachinery/pkg/util/managedfields/internal/fieldmanager.go#L105
+ if t.usesFieldManagedObjectTracker {
+ if err := managedfields.ValidateManagedFields(accessor.GetManagedFields()); err != nil {
+ return fmt.Errorf("invalid managedFields on %T: %w", obj, err)
+ }
+ }
+ if err := t.upstream.Add(obj); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (t versionedTracker) Create(gvr schema.GroupVersionResource, obj runtime.Object, ns string, opts ...metav1.CreateOptions) error {
+ accessor, err := meta.Accessor(obj)
+ if err != nil {
+ return fmt.Errorf("failed to get accessor for object: %w", err)
+ }
+ if accessor.GetName() == "" {
+ gvk, _ := apiutil.GVKForObject(obj, t.scheme)
+ return apierrors.NewInvalid(
+ gvk.GroupKind(),
+ accessor.GetName(),
+ field.ErrorList{field.Required(field.NewPath("metadata.name"), "name is required")})
+ }
+ if accessor.GetResourceVersion() != "" {
+ return apierrors.NewBadRequest("resourceVersion can not be set for Create requests")
+ }
+ accessor.SetResourceVersion("1")
+ obj, err = convertFromUnstructuredIfNecessary(t.scheme, obj)
+ if err != nil {
+ return err
+ }
+ if err := t.upstream.Create(gvr, obj, ns, opts...); err != nil {
+ accessor.SetResourceVersion("")
+ return err
+ }
+
+ return nil
+}
+
+func (t versionedTracker) Update(gvr schema.GroupVersionResource, obj runtime.Object, ns string, opts ...metav1.UpdateOptions) error {
+ updateOpts, err := getSingleOrZeroOptions(opts)
+ if err != nil {
+ return err
+ }
+
+ return t.update(gvr, obj, ns, false, false, updateOpts)
+}
+
+func (t versionedTracker) update(gvr schema.GroupVersionResource, obj runtime.Object, ns string, isStatus, deleting bool, opts metav1.UpdateOptions) error {
+ gvk, err := apiutil.GVKForObject(obj, t.scheme)
+ if err != nil {
+ return err
+ }
+ obj, needsCreate, err := t.updateObject(gvr, gvk, obj, ns, isStatus, deleting, allowsCreateOnUpdate(gvk), opts.DryRun)
+ if err != nil {
+ return err
+ }
+
+ if needsCreate {
+ opts := metav1.CreateOptions{DryRun: opts.DryRun, FieldManager: opts.FieldManager}
+ return t.Create(gvr, obj, ns, opts)
+ }
+
+ if obj == nil { // Object was deleted in updateObject
+ return nil
+ }
+
+ if u, unstructured := obj.(*unstructured.Unstructured); unstructured {
+ u.SetGroupVersionKind(gvk)
+ }
+
+ return t.upstream.Update(gvr, obj, ns, opts)
+}
+
+func (t versionedTracker) Patch(gvr schema.GroupVersionResource, obj runtime.Object, ns string, opts ...metav1.PatchOptions) error {
+ patchOptions, err := getSingleOrZeroOptions(opts)
+ if err != nil {
+ return err
+ }
+
+ gvk, err := apiutil.GVKForObject(obj, t.scheme)
+ if err != nil {
+ return err
+ }
+
+ // We apply patches using a client-go reaction that ends up calling the trackers Patch. As we can't change
+ // that reaction, we use the callstack to figure out if this originated from the status client.
+ isStatus := bytes.Contains(debug.Stack(), []byte("sigs.k8s.io/controller-runtime/pkg/client/fake.(*fakeSubResourceClient).statusPatch"))
+
+ obj, needsCreate, err := t.updateObject(gvr, gvk, obj, ns, isStatus, false, allowsCreateOnUpdate(gvk), patchOptions.DryRun)
+ if err != nil {
+ return err
+ }
+ if needsCreate {
+ opts := metav1.CreateOptions{DryRun: patchOptions.DryRun, FieldManager: patchOptions.FieldManager}
+ return t.Create(gvr, obj, ns, opts)
+ }
+
+ if obj == nil { // Object was deleted in updateObject
+ return nil
+ }
+
+ return t.upstream.Patch(gvr, obj, ns, patchOptions)
+}
+
+// updateObject performs a number of validations and changes related to
+// object updates, such as checking and updating the resourceVersion.
+func (t versionedTracker) updateObject(
+ gvr schema.GroupVersionResource,
+ gvk schema.GroupVersionKind,
+ obj runtime.Object,
+ ns string,
+ isStatus bool,
+ deleting bool,
+ allowCreateOnUpdate bool,
+ dryRun []string,
+) (result runtime.Object, needsCreate bool, _ error) {
+ accessor, err := meta.Accessor(obj)
+ if err != nil {
+ return nil, false, fmt.Errorf("failed to get accessor for object: %w", err)
+ }
+
+ if accessor.GetName() == "" {
+ return nil, false, apierrors.NewInvalid(
+ gvk.GroupKind(),
+ accessor.GetName(),
+ field.ErrorList{field.Required(field.NewPath("metadata.name"), "name is required")})
+ }
+
+ oldObject, err := t.Get(gvr, ns, accessor.GetName())
+ if err != nil {
+ // If the resource is not found and the resource allows create on update, issue a
+ // create instead.
+ if apierrors.IsNotFound(err) && allowCreateOnUpdate {
+ // Pass this info to the caller rather than create, because in the SSA case it
+ // must be created by calling Apply in the upstream tracker, not Create.
+ // This is because SSA considers Apply and Non-Apply operations to be different
+ // even when they use the same fieldManager. This behavior is also observable
+ // with a real Kubernetes apiserver.
+ //
+ // Ref https://kubernetes.slack.com/archives/C0EG7JC6T/p1757868204458989?thread_ts=1757808656.002569&cid=C0EG7JC6T
+ return obj, true, nil
+ }
+ return obj, false, err
+ }
+
+ if t.withStatusSubresource.Has(gvk) {
+ if isStatus { // copy everything but status, managedFields and metadata.ResourceVersion from original object
+ if err := copyStatusFrom(obj, oldObject); err != nil {
+ return nil, false, fmt.Errorf("failed to copy non-status field for object with status subresouce: %w", err)
+ }
+ passedRV := accessor.GetResourceVersion()
+ passedManagedFields := accessor.GetManagedFields()
+ if err := copyFrom(oldObject, obj); err != nil {
+ return nil, false, fmt.Errorf("failed to restore non-status fields: %w", err)
+ }
+ accessor.SetResourceVersion(passedRV)
+ accessor.SetManagedFields(passedManagedFields)
+ } else { // copy status from original object
+ if err := copyStatusFrom(oldObject, obj); err != nil {
+ return nil, false, fmt.Errorf("failed to copy the status for object with status subresource: %w", err)
+ }
+ }
+ } else if isStatus {
+ return nil, false, apierrors.NewNotFound(gvr.GroupResource(), accessor.GetName())
+ }
+
+ oldAccessor, err := meta.Accessor(oldObject)
+ if err != nil {
+ return nil, false, err
+ }
+
+ // If the new object does not have the resource version set and it allows unconditional update,
+ // default it to the resource version of the existing resource
+ if accessor.GetResourceVersion() == "" {
+ switch {
+ case allowsUnconditionalUpdate(gvk):
+ accessor.SetResourceVersion(oldAccessor.GetResourceVersion())
+ // This is needed because if the patch explicitly sets the RV to null, the client-go reaction we use
+ // to apply it and whose output we process here will have it unset. It is not clear why the Kubernetes
+ // apiserver accepts such a patch, but it does so we just copy that behavior.
+ // Kubernetes apiserver behavior can be checked like this:
+ // `kubectl patch configmap foo --patch '{"metadata":{"annotations":{"foo":"bar"},"resourceVersion":null}}' -v=9`
+ case bytes.Contains(debug.Stack(), []byte("sigs.k8s.io/controller-runtime/pkg/client/fake.(*fakeClient).Patch")),
+ bytes.Contains(debug.Stack(), []byte("sigs.k8s.io/controller-runtime/pkg/client/fake.(*fakeSubResourceClient).Patch")):
+ // We apply patches using a client-go reaction that ends up calling the trackers Update. As we can't change
+ // that reaction, we use the callstack to figure out if this originated from the "fake[SubResource]Client.Patch" func.
+ accessor.SetResourceVersion(oldAccessor.GetResourceVersion())
+ case bytes.Contains(debug.Stack(), []byte("sigs.k8s.io/controller-runtime/pkg/client/fake.(*fakeClient).Apply")),
+ bytes.Contains(debug.Stack(), []byte("sigs.k8s.io/controller-runtime/pkg/client/fake.(*fakeSubResourceClient).Apply")):
+ // We apply patches using a client-go reaction that ends up calling the trackers Update. As we can't change
+ // that reaction, we use the callstack to figure out if this originated from the "fake[SubResource]Client.Apply" func.
+ accessor.SetResourceVersion(oldAccessor.GetResourceVersion())
+ }
+ }
+
+ if accessor.GetResourceVersion() != oldAccessor.GetResourceVersion() {
+ return nil, false, apierrors.NewConflict(gvr.GroupResource(), accessor.GetName(), errors.New("object was modified"))
+ }
+ if oldAccessor.GetResourceVersion() == "" {
+ oldAccessor.SetResourceVersion("0")
+ }
+ intResourceVersion, err := strconv.ParseUint(oldAccessor.GetResourceVersion(), 10, 64)
+ if err != nil {
+ return nil, false, fmt.Errorf("can not convert resourceVersion %q to int: %w", oldAccessor.GetResourceVersion(), err)
+ }
+ intResourceVersion++
+ accessor.SetResourceVersion(strconv.FormatUint(intResourceVersion, 10))
+
+ if !deleting && !deletionTimestampEqual(accessor, oldAccessor) {
+ return nil, false, fmt.Errorf("error: Unable to edit %s: metadata.deletionTimestamp field is immutable", accessor.GetName())
+ }
+
+ if !accessor.GetDeletionTimestamp().IsZero() && len(accessor.GetFinalizers()) == 0 {
+ return nil, false, t.Delete(gvr, accessor.GetNamespace(), accessor.GetName(), metav1.DeleteOptions{DryRun: dryRun})
+ }
+
+ obj, err = convertFromUnstructuredIfNecessary(t.scheme, obj)
+ return obj, false, err
+}
+
+func (t versionedTracker) Apply(gvr schema.GroupVersionResource, applyConfiguration runtime.Object, ns string, opts ...metav1.PatchOptions) error {
+ patchOptions, err := getSingleOrZeroOptions(opts)
+ if err != nil {
+ return err
+ }
+ gvk, err := apiutil.GVKForObject(applyConfiguration, t.scheme)
+ if err != nil {
+ return err
+ }
+ isStatus := bytes.Contains(debug.Stack(), []byte("sigs.k8s.io/controller-runtime/pkg/client/fake.(*fakeSubResourceClient).statusPatch"))
+
+ applyConfiguration, needsCreate, err := t.updateObject(gvr, gvk, applyConfiguration, ns, isStatus, false, true, patchOptions.DryRun)
+ if err != nil {
+ return err
+ }
+
+ if needsCreate {
+ // https://github.com/kubernetes/kubernetes/blob/81affffa1b8d8079836f4cac713ea8d1b2bbf10f/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go#L606
+ accessor, err := meta.Accessor(applyConfiguration)
+ if err != nil {
+ return fmt.Errorf("failed to get accessor for object: %w", err)
+ }
+ if accessor.GetUID() != "" {
+ return apierrors.NewConflict(gvr.GroupResource(), accessor.GetName(), fmt.Errorf("uid mismatch: the provided object specified uid %s, and no existing object was found", accessor.GetUID()))
+ }
+
+ if t.withStatusSubresource.Has(gvk) {
+ // Clear out status for create, for update this is handled in updateObject
+ if err := copyStatusFrom(&unstructured.Unstructured{}, applyConfiguration); err != nil {
+ return err
+ }
+ }
+ }
+
+ if applyConfiguration == nil { // Object was deleted in updateObject
+ return nil
+ }
+
+ if isStatus {
+ // We restore everything but status from the tracker where we don't put GVK
+ // into the object but it must be set for the ManagedFieldsObjectTracker
+ applyConfiguration.GetObjectKind().SetGroupVersionKind(gvk)
+ }
+ return t.upstream.Apply(gvr, applyConfiguration, ns, opts...)
+}
+
+func (t versionedTracker) Delete(gvr schema.GroupVersionResource, ns, name string, opts ...metav1.DeleteOptions) error {
+ return t.upstream.Delete(gvr, ns, name, opts...)
+}
+
+func (t versionedTracker) Get(gvr schema.GroupVersionResource, ns, name string, opts ...metav1.GetOptions) (runtime.Object, error) {
+ return t.upstream.Get(gvr, ns, name, opts...)
+}
+
+func (t versionedTracker) List(gvr schema.GroupVersionResource, gvk schema.GroupVersionKind, ns string, opts ...metav1.ListOptions) (runtime.Object, error) {
+ return t.upstream.List(gvr, gvk, ns, opts...)
+}
+
+func (t versionedTracker) Watch(gvr schema.GroupVersionResource, ns string, opts ...metav1.ListOptions) (watch.Interface, error) {
+ return t.upstream.Watch(gvr, ns, opts...)
+}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/fieldowner.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/fieldowner.go
index 93274f950071..5d9437ba91f8 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/fieldowner.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/fieldowner.go
@@ -108,3 +108,7 @@ func (f *subresourceClientWithFieldOwner) Update(ctx context.Context, obj Object
func (f *subresourceClientWithFieldOwner) Patch(ctx context.Context, obj Object, patch Patch, opts ...SubResourcePatchOption) error {
return f.subresourceWriter.Patch(ctx, obj, patch, append([]SubResourcePatchOption{FieldOwner(f.owner)}, opts...)...)
}
+
+func (f *subresourceClientWithFieldOwner) Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...SubResourceApplyOption) error {
+ return f.subresourceWriter.Apply(ctx, obj, append([]SubResourceApplyOption{FieldOwner(f.owner)}, opts...)...)
+}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/fieldvalidation.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/fieldvalidation.go
index ce8d0576c7c4..b0f660854e4a 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/fieldvalidation.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/fieldvalidation.go
@@ -27,6 +27,9 @@ import (
// WithFieldValidation wraps a Client and configures field validation, by
// default, for all write requests from this client. Users can override field
// validation for individual write requests.
+//
+// This wrapper has no effect on apply requests, as they do not support a
+// custom fieldValidation setting, it is always strict.
func WithFieldValidation(c Client, validation FieldValidation) Client {
return &clientWithFieldValidation{
validation: validation,
@@ -108,3 +111,7 @@ func (c *subresourceClientWithFieldValidation) Update(ctx context.Context, obj O
func (c *subresourceClientWithFieldValidation) Patch(ctx context.Context, obj Object, patch Patch, opts ...SubResourcePatchOption) error {
return c.subresourceWriter.Patch(ctx, obj, patch, append([]SubResourcePatchOption{c.validation}, opts...)...)
}
+
+func (c *subresourceClientWithFieldValidation) Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...SubResourceApplyOption) error {
+ return c.subresourceWriter.Apply(ctx, obj, opts...)
+}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/interceptor/intercept.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/interceptor/intercept.go
index 7ff73bd8daa5..b98af1a693c5 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/interceptor/intercept.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/interceptor/intercept.go
@@ -26,6 +26,7 @@ type Funcs struct {
SubResourceCreate func(ctx context.Context, client client.Client, subResourceName string, obj client.Object, subResource client.Object, opts ...client.SubResourceCreateOption) error
SubResourceUpdate func(ctx context.Context, client client.Client, subResourceName string, obj client.Object, opts ...client.SubResourceUpdateOption) error
SubResourcePatch func(ctx context.Context, client client.Client, subResourceName string, obj client.Object, patch client.Patch, opts ...client.SubResourcePatchOption) error
+ SubResourceApply func(ctx context.Context, client client.Client, subResourceName string, obj runtime.ApplyConfiguration, opts ...client.SubResourceApplyOption) error
}
// NewClient returns a new interceptor client that calls the functions in funcs instead of the underlying client's methods, if they are not nil.
@@ -173,3 +174,10 @@ func (s subResourceInterceptor) Patch(ctx context.Context, obj client.Object, pa
}
return s.client.SubResource(s.subResourceName).Patch(ctx, obj, patch, opts...)
}
+
+func (s subResourceInterceptor) Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...client.SubResourceApplyOption) error {
+ if s.funcs.SubResourceApply != nil {
+ return s.funcs.SubResourceApply(ctx, s.client, s.subResourceName, obj, opts...)
+ }
+ return s.client.SubResource(s.subResourceName).Apply(ctx, obj, opts...)
+}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/interfaces.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/interfaces.go
index 61559ecbe10b..1af1f3a36894 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/interfaces.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/interfaces.go
@@ -155,6 +155,9 @@ type SubResourceWriter interface {
// pointer so that obj can be updated with the content returned by the
// Server.
Patch(ctx context.Context, obj Object, patch Patch, opts ...SubResourcePatchOption) error
+
+ // Apply applies the given apply configurations subresource.
+ Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...SubResourceApplyOption) error
}
// SubResourceClient knows how to perform CRU operations on Kubernetes objects.
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/namespaced_client.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/namespaced_client.go
index d4223eda26c8..ebbbc4fddf4a 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/namespaced_client.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/namespaced_client.go
@@ -150,7 +150,7 @@ func (n *namespacedClient) Patch(ctx context.Context, obj Object, patch Patch, o
return n.client.Patch(ctx, obj, patch, opts...)
}
-func (n *namespacedClient) Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...ApplyOption) error {
+func (n *namespacedClient) setNamespaceForApplyConfigIfNamespaceScoped(obj runtime.ApplyConfiguration) error {
var gvk schema.GroupVersionKind
switch o := obj.(type) {
case applyConfiguration:
@@ -193,6 +193,14 @@ func (n *namespacedClient) Apply(ctx context.Context, obj runtime.ApplyConfigura
}
}
+ return nil
+}
+
+func (n *namespacedClient) Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...ApplyOption) error {
+ if err := n.setNamespaceForApplyConfigIfNamespaceScoped(obj); err != nil {
+ return err
+ }
+
return n.client.Apply(ctx, obj, opts...)
}
@@ -231,7 +239,10 @@ func (n *namespacedClient) Status() SubResourceWriter {
// SubResource implements client.SubResourceClient.
func (n *namespacedClient) SubResource(subResource string) SubResourceClient {
- return &namespacedClientSubResourceClient{client: n.client.SubResource(subResource), namespace: n.namespace, namespacedclient: n}
+ return &namespacedClientSubResourceClient{
+ client: n.client.SubResource(subResource),
+ namespacedclient: n,
+ }
}
// ensure namespacedClientSubResourceClient implements client.SubResourceClient.
@@ -239,8 +250,7 @@ var _ SubResourceClient = &namespacedClientSubResourceClient{}
type namespacedClientSubResourceClient struct {
client SubResourceClient
- namespace string
- namespacedclient Client
+ namespacedclient *namespacedClient
}
func (nsw *namespacedClientSubResourceClient) Get(ctx context.Context, obj, subResource Object, opts ...SubResourceGetOption) error {
@@ -250,12 +260,12 @@ func (nsw *namespacedClientSubResourceClient) Get(ctx context.Context, obj, subR
}
objectNamespace := obj.GetNamespace()
- if objectNamespace != nsw.namespace && objectNamespace != "" {
- return fmt.Errorf("namespace %s of the object %s does not match the namespace %s on the client", objectNamespace, obj.GetName(), nsw.namespace)
+ if objectNamespace != nsw.namespacedclient.namespace && objectNamespace != "" {
+ return fmt.Errorf("namespace %s of the object %s does not match the namespace %s on the client", objectNamespace, obj.GetName(), nsw.namespacedclient.namespace)
}
if isNamespaceScoped && objectNamespace == "" {
- obj.SetNamespace(nsw.namespace)
+ obj.SetNamespace(nsw.namespacedclient.namespace)
}
return nsw.client.Get(ctx, obj, subResource, opts...)
@@ -268,12 +278,12 @@ func (nsw *namespacedClientSubResourceClient) Create(ctx context.Context, obj, s
}
objectNamespace := obj.GetNamespace()
- if objectNamespace != nsw.namespace && objectNamespace != "" {
- return fmt.Errorf("namespace %s of the object %s does not match the namespace %s on the client", objectNamespace, obj.GetName(), nsw.namespace)
+ if objectNamespace != nsw.namespacedclient.namespace && objectNamespace != "" {
+ return fmt.Errorf("namespace %s of the object %s does not match the namespace %s on the client", objectNamespace, obj.GetName(), nsw.namespacedclient.namespace)
}
if isNamespaceScoped && objectNamespace == "" {
- obj.SetNamespace(nsw.namespace)
+ obj.SetNamespace(nsw.namespacedclient.namespace)
}
return nsw.client.Create(ctx, obj, subResource, opts...)
@@ -287,12 +297,12 @@ func (nsw *namespacedClientSubResourceClient) Update(ctx context.Context, obj Ob
}
objectNamespace := obj.GetNamespace()
- if objectNamespace != nsw.namespace && objectNamespace != "" {
- return fmt.Errorf("namespace %s of the object %s does not match the namespace %s on the client", objectNamespace, obj.GetName(), nsw.namespace)
+ if objectNamespace != nsw.namespacedclient.namespace && objectNamespace != "" {
+ return fmt.Errorf("namespace %s of the object %s does not match the namespace %s on the client", objectNamespace, obj.GetName(), nsw.namespacedclient.namespace)
}
if isNamespaceScoped && objectNamespace == "" {
- obj.SetNamespace(nsw.namespace)
+ obj.SetNamespace(nsw.namespacedclient.namespace)
}
return nsw.client.Update(ctx, obj, opts...)
}
@@ -305,12 +315,19 @@ func (nsw *namespacedClientSubResourceClient) Patch(ctx context.Context, obj Obj
}
objectNamespace := obj.GetNamespace()
- if objectNamespace != nsw.namespace && objectNamespace != "" {
- return fmt.Errorf("namespace %s of the object %s does not match the namespace %s on the client", objectNamespace, obj.GetName(), nsw.namespace)
+ if objectNamespace != nsw.namespacedclient.namespace && objectNamespace != "" {
+ return fmt.Errorf("namespace %s of the object %s does not match the namespace %s on the client", objectNamespace, obj.GetName(), nsw.namespacedclient.namespace)
}
if isNamespaceScoped && objectNamespace == "" {
- obj.SetNamespace(nsw.namespace)
+ obj.SetNamespace(nsw.namespacedclient.namespace)
}
return nsw.client.Patch(ctx, obj, patch, opts...)
}
+
+func (nsw *namespacedClientSubResourceClient) Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...SubResourceApplyOption) error {
+ if err := nsw.namespacedclient.setNamespaceForApplyConfigIfNamespaceScoped(obj); err != nil {
+ return err
+ }
+ return nsw.client.Apply(ctx, obj, opts...)
+}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/options.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/options.go
index 33c460738cfe..a6b921171a12 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/options.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/options.go
@@ -97,6 +97,12 @@ type SubResourcePatchOption interface {
ApplyToSubResourcePatch(*SubResourcePatchOptions)
}
+// SubResourceApplyOption configures a subresource apply request.
+type SubResourceApplyOption interface {
+ // ApplyToSubResourceApply applies the configuration on the given patch options.
+ ApplyToSubResourceApply(*SubResourceApplyOptions)
+}
+
// }}}
// {{{ Multi-Type Options
@@ -148,6 +154,10 @@ func (dryRunAll) ApplyToSubResourcePatch(opts *SubResourcePatchOptions) {
opts.DryRun = []string{metav1.DryRunAll}
}
+func (dryRunAll) ApplyToSubResourceApply(opts *SubResourceApplyOptions) {
+ opts.DryRun = []string{metav1.DryRunAll}
+}
+
// FieldOwner set the field manager name for the given server-side apply patch.
type FieldOwner string
@@ -186,6 +196,11 @@ func (f FieldOwner) ApplyToSubResourceUpdate(opts *SubResourceUpdateOptions) {
opts.FieldManager = string(f)
}
+// ApplyToSubResourceApply applies this configuration to the given apply options.
+func (f FieldOwner) ApplyToSubResourceApply(opts *SubResourceApplyOptions) {
+ opts.FieldManager = string(f)
+}
+
// FieldValidation configures field validation for the given requests.
type FieldValidation string
@@ -949,6 +964,10 @@ func (forceOwnership) ApplyToApply(opts *ApplyOptions) {
opts.Force = ptr.To(true)
}
+func (forceOwnership) ApplyToSubResourceApply(opts *SubResourceApplyOptions) {
+ opts.Force = ptr.To(true)
+}
+
// }}}
// {{{ DeleteAllOf Options
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/patch.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/patch.go
index b99d7663bdff..3d914eea2241 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/patch.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/patch.go
@@ -28,10 +28,7 @@ import (
var (
// Apply uses server-side apply to patch the given object.
//
- // This should now only be used to patch sub resources, e.g. with client.Client.Status().Patch().
- // Use client.Client.Apply() instead of client.Client.Patch(..., client.Apply, ...)
- // This will be deprecated once the Apply method has been added for sub resources.
- // See the following issue for more details: https://github.com/kubernetes-sigs/controller-runtime/issues/3183
+ // Deprecated: Use client.Client.Apply() and client.Client.SubResource("subrsource").Apply() instead.
Apply Patch = applyPatch{}
// Merge uses the raw object as a merge patch, without modifications.
@@ -91,7 +88,7 @@ type MergeFromOptions struct {
type mergeFromPatch struct {
patchType types.PatchType
- createPatch func(originalJSON, modifiedJSON []byte, dataStruct interface{}) ([]byte, error)
+ createPatch func(originalJSON, modifiedJSON []byte, dataStruct any) ([]byte, error)
from Object
opts MergeFromOptions
}
@@ -137,11 +134,11 @@ func (s *mergeFromPatch) Data(obj Object) ([]byte, error) {
return data, nil
}
-func createMergePatch(originalJSON, modifiedJSON []byte, _ interface{}) ([]byte, error) {
+func createMergePatch(originalJSON, modifiedJSON []byte, _ any) ([]byte, error) {
return jsonpatch.CreateMergePatch(originalJSON, modifiedJSON)
}
-func createStrategicMergePatch(originalJSON, modifiedJSON []byte, dataStruct interface{}) ([]byte, error) {
+func createStrategicMergePatch(originalJSON, modifiedJSON []byte, dataStruct any) ([]byte, error) {
return strategicpatch.CreateTwoWayMergePatch(originalJSON, modifiedJSON, dataStruct)
}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/typed_client.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/typed_client.go
index 3bd762a6382c..66ae2e4a5cf8 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/typed_client.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/typed_client.go
@@ -304,3 +304,36 @@ func (c *typedClient) PatchSubResource(ctx context.Context, obj Object, subResou
Do(ctx).
Into(body)
}
+
+func (c *typedClient) ApplySubResource(ctx context.Context, obj runtime.ApplyConfiguration, subResource string, opts ...SubResourceApplyOption) error {
+ o, err := c.resources.getObjMeta(obj)
+ if err != nil {
+ return err
+ }
+
+ applyOpts := &SubResourceApplyOptions{}
+ applyOpts.ApplyOpts(opts)
+
+ body := obj
+ if applyOpts.SubResourceBody != nil {
+ body = applyOpts.SubResourceBody
+ }
+
+ req, err := apply.NewRequest(o, body)
+ if err != nil {
+ return fmt.Errorf("failed to create apply request: %w", err)
+ }
+
+ return req.
+ NamespaceIfScoped(o.namespace, o.isNamespaced()).
+ Resource(o.resource()).
+ Name(o.name).
+ SubResource(subResource).
+ VersionedParams(applyOpts.AsPatchOptions(), c.paramCodec).
+ Do(ctx).
+ // This is hacky, it is required because `Into` takes a `runtime.Object` and
+ // that is not implemented by the ApplyConfigurations. The generated clients
+ // don't have this problem because they deserialize into the api type, not the
+ // apply configuration: https://github.com/kubernetes/kubernetes/blob/22f5e01a37c0bc6a5f494dec14dd4e3688ee1d55/staging/src/k8s.io/client-go/gentype/type.go#L296-L317
+ Into(runtimeObjectFromApplyConfiguration(obj))
+}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/unstructured_client.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/unstructured_client.go
index e636c3beef25..d2ea6d7a3288 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/unstructured_client.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/unstructured_client.go
@@ -386,3 +386,35 @@ func (uc *unstructuredClient) PatchSubResource(ctx context.Context, obj Object,
u.GetObjectKind().SetGroupVersionKind(gvk)
return result
}
+
+func (uc *unstructuredClient) ApplySubResource(ctx context.Context, obj runtime.ApplyConfiguration, subResource string, opts ...SubResourceApplyOption) error {
+ unstructuredApplyConfig, ok := obj.(*unstructuredApplyConfiguration)
+ if !ok {
+ return fmt.Errorf("bug: unstructured client got an applyconfiguration that was not %T but %T", &unstructuredApplyConfiguration{}, obj)
+ }
+ o, err := uc.resources.getObjMeta(unstructuredApplyConfig.Unstructured)
+ if err != nil {
+ return err
+ }
+
+ applyOpts := &SubResourceApplyOptions{}
+ applyOpts.ApplyOpts(opts)
+
+ body := obj
+ if applyOpts.SubResourceBody != nil {
+ body = applyOpts.SubResourceBody
+ }
+ req, err := apply.NewRequest(o, body)
+ if err != nil {
+ return fmt.Errorf("failed to create apply request: %w", err)
+ }
+
+ return req.
+ NamespaceIfScoped(o.namespace, o.isNamespaced()).
+ Resource(o.resource()).
+ Name(o.name).
+ SubResource(subResource).
+ VersionedParams(applyOpts.AsPatchOptions(), uc.paramCodec).
+ Do(ctx).
+ Into(unstructuredApplyConfig.Unstructured)
+}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/cluster/cluster.go b/vendor/sigs.k8s.io/controller-runtime/pkg/cluster/cluster.go
index 0603f4cde564..ee14638c3fc5 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/cluster/cluster.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/cluster/cluster.go
@@ -19,13 +19,16 @@ package cluster
import (
"context"
"errors"
+ "fmt"
"net/http"
"github.com/go-logr/logr"
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/kubernetes/scheme"
+ eventsv1client "k8s.io/client-go/kubernetes/typed/events/v1"
"k8s.io/client-go/rest"
+ "k8s.io/client-go/tools/events"
"k8s.io/client-go/tools/record"
"sigs.k8s.io/controller-runtime/pkg/cache"
@@ -33,10 +36,13 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/apiutil"
logf "sigs.k8s.io/controller-runtime/pkg/internal/log"
intrec "sigs.k8s.io/controller-runtime/pkg/internal/recorder"
+ "sigs.k8s.io/controller-runtime/pkg/recorder"
)
// Cluster provides various methods to interact with a cluster.
type Cluster interface {
+ recorder.Provider
+
// GetHTTPClient returns an HTTP client that can be used to talk to the apiserver
GetHTTPClient() *http.Client
@@ -58,9 +64,6 @@ type Cluster interface {
// GetFieldIndexer returns a client.FieldIndexer configured with the client
GetFieldIndexer() client.FieldIndexer
- // GetEventRecorderFor returns a new EventRecorder for the provided name
- GetEventRecorderFor(name string) record.EventRecorder
-
// GetRESTMapper returns a RESTMapper
GetRESTMapper() meta.RESTMapper
@@ -160,8 +163,7 @@ func New(config *rest.Config, opts ...Option) (Cluster, error) {
}
options, err := setOptionsDefaults(options, config)
if err != nil {
- options.Logger.Error(err, "Failed to set defaults")
- return nil, err
+ return nil, fmt.Errorf("failed setting cluster default options: %w", err)
}
// Create the mapper provider
@@ -281,16 +283,24 @@ func setOptionsDefaults(options Options, config *rest.Config) (Options, error) {
options.newRecorderProvider = intrec.NewProvider
}
+ // This is duplicated with pkg/manager, we need it here to provide
+ // the user with an EventBroadcaster and there for the Leader election
+ evtCl, err := eventsv1client.NewForConfigAndClient(config, options.HTTPClient)
+ if err != nil {
+ return options, err
+ }
+
// This is duplicated with pkg/manager, we need it here to provide
// the user with an EventBroadcaster and there for the Leader election
if options.EventBroadcaster == nil {
// defer initialization to avoid leaking by default
- options.makeBroadcaster = func() (record.EventBroadcaster, bool) {
- return record.NewBroadcaster(), true
+ options.makeBroadcaster = func() (record.EventBroadcaster, events.EventBroadcaster, bool) {
+ return record.NewBroadcaster(), events.NewBroadcaster(&events.EventSinkImpl{Interface: evtCl}), true
}
} else {
- options.makeBroadcaster = func() (record.EventBroadcaster, bool) {
- return options.EventBroadcaster, false
+ // keep supporting the options.EventBroadcaster in the old API, but do not introduce it for the new one.
+ options.makeBroadcaster = func() (record.EventBroadcaster, events.EventBroadcaster, bool) {
+ return options.EventBroadcaster, events.NewBroadcaster(&events.EventSinkImpl{Interface: evtCl}), false
}
}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/cluster/internal.go b/vendor/sigs.k8s.io/controller-runtime/pkg/cluster/internal.go
index 2742764231b9..755f83b54697 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/cluster/internal.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/cluster/internal.go
@@ -24,6 +24,7 @@ import (
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/rest"
+ "k8s.io/client-go/tools/events"
"k8s.io/client-go/tools/record"
"sigs.k8s.io/controller-runtime/pkg/cache"
@@ -87,6 +88,10 @@ func (c *cluster) GetEventRecorderFor(name string) record.EventRecorder {
return c.recorderProvider.GetEventRecorderFor(name)
}
+func (c *cluster) GetEventRecorder(name string) events.EventRecorder {
+ return c.recorderProvider.GetEventRecorder(name)
+}
+
func (c *cluster) GetRESTMapper() meta.RESTMapper {
return c.mapper
}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/config/controller.go b/vendor/sigs.k8s.io/controller-runtime/pkg/config/controller.go
index 3dafaef93b6a..5eea2965f6ac 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/config/controller.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/config/controller.go
@@ -79,7 +79,7 @@ type Controller struct {
// UsePriorityQueue configures the controllers queue to use the controller-runtime provided
// priority queue.
//
- // Note: This flag is disabled by default until a future version. This feature is currently in beta.
+ // Note: This flag is enabled by default.
// For more details, see: https://github.com/kubernetes-sigs/controller-runtime/issues/2374.
UsePriorityQueue *bool
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/controller/controller.go b/vendor/sigs.k8s.io/controller-runtime/pkg/controller/controller.go
index afa15aebec1b..853788d52f30 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/controller/controller.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/controller/controller.go
@@ -91,7 +91,7 @@ type TypedOptions[request comparable] struct {
// UsePriorityQueue configures the controllers queue to use the controller-runtime provided
// priority queue.
//
- // Note: This flag is disabled by default until a future version. This feature is currently in beta.
+ // Note: This flag is enabled by default.
// For more details, see: https://github.com/kubernetes-sigs/controller-runtime/issues/2374.
UsePriorityQueue *bool
@@ -250,7 +250,7 @@ func NewTypedUnmanaged[request comparable](name string, options TypedOptions[req
}
if options.RateLimiter == nil {
- if ptr.Deref(options.UsePriorityQueue, false) {
+ if ptr.Deref(options.UsePriorityQueue, true) {
options.RateLimiter = workqueue.NewTypedItemExponentialFailureRateLimiter[request](5*time.Millisecond, 1000*time.Second)
} else {
options.RateLimiter = workqueue.DefaultTypedControllerRateLimiter[request]()
@@ -259,7 +259,7 @@ func NewTypedUnmanaged[request comparable](name string, options TypedOptions[req
if options.NewQueue == nil {
options.NewQueue = func(controllerName string, rateLimiter workqueue.TypedRateLimiter[request]) workqueue.TypedRateLimitingInterface[request] {
- if ptr.Deref(options.UsePriorityQueue, false) {
+ if ptr.Deref(options.UsePriorityQueue, true) {
return priorityqueue.New(controllerName, func(o *priorityqueue.Opts[request]) {
o.Log = options.Logger.WithValues("controller", controllerName)
o.RateLimiter = rateLimiter
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/controller/controllerutil/controllerutil.go b/vendor/sigs.k8s.io/controller-runtime/pkg/controller/controllerutil/controllerutil.go
index 0088f88e5d57..0f12b934ee98 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/controller/controllerutil/controllerutil.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/controller/controllerutil/controllerutil.go
@@ -20,6 +20,7 @@ import (
"context"
"fmt"
"reflect"
+ "slices"
"k8s.io/apimachinery/pkg/api/equality"
apierrors "k8s.io/apimachinery/pkg/api/errors"
@@ -501,10 +502,8 @@ type MutateFn func() error
// It returns an indication of whether it updated the object's list of finalizers.
func AddFinalizer(o client.Object, finalizer string) (finalizersUpdated bool) {
f := o.GetFinalizers()
- for _, e := range f {
- if e == finalizer {
- return false
- }
+ if slices.Contains(f, finalizer) {
+ return false
}
o.SetFinalizers(append(f, finalizer))
return true
@@ -517,7 +516,7 @@ func RemoveFinalizer(o client.Object, finalizer string) (finalizersUpdated bool)
length := len(f)
index := 0
- for i := 0; i < length; i++ {
+ for i := range length {
if f[i] == finalizer {
continue
}
@@ -531,10 +530,5 @@ func RemoveFinalizer(o client.Object, finalizer string) (finalizersUpdated bool)
// ContainsFinalizer checks an Object that the provided finalizer is present.
func ContainsFinalizer(o client.Object, finalizer string) bool {
f := o.GetFinalizers()
- for _, e := range f {
- if e == finalizer {
- return true
- }
- }
- return false
+ return slices.Contains(f, finalizer)
}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/controller/priorityqueue/priorityqueue.go b/vendor/sigs.k8s.io/controller-runtime/pkg/controller/priorityqueue/priorityqueue.go
index 71363f0d1792..fd10a6c05011 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/controller/priorityqueue/priorityqueue.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/controller/priorityqueue/priorityqueue.go
@@ -1,7 +1,6 @@
package priorityqueue
import (
- "math"
"sync"
"sync/atomic"
"time"
@@ -30,6 +29,13 @@ type AddOpts struct {
// internally de-duplicates all items that are added to
// it. It will use the max of the passed priorities and the
// min of possible durations.
+//
+// When an item that is already enqueued at a lower priority
+// is re-enqueued with a higher priority, it will be placed at
+// the end among items of the new priority, in order to
+// preserve FIFO semantics within each priority level.
+// The effective duration (i.e. the ready time) is still
+// computed as the minimum across all enqueues.
type PriorityQueue[T comparable] interface {
workqueue.TypedRateLimitingInterface[T]
AddWithOpts(o AddOpts, Items ...T)
@@ -48,6 +54,11 @@ type Opts[T comparable] struct {
// Opt allows to configure a PriorityQueue.
type Opt[T comparable] func(*Opts[T])
+type bufferItem[T comparable] struct {
+ opts AddOpts
+ items []T
+}
+
// New constructs a new PriorityQueue.
func New[T comparable](name string, o ...Opt[T]) PriorityQueue[T] {
opts := &Opts[T]{}
@@ -64,25 +75,29 @@ func New[T comparable](name string, o ...Opt[T]) PriorityQueue[T] {
}
pq := &priorityqueue[T]{
- log: opts.Log,
- items: map[T]*item[T]{},
- queue: btree.NewG(32, less[T]),
- becameReady: sets.Set[T]{},
- metrics: newQueueMetrics[T](opts.MetricProvider, name, clock.RealClock{}),
- // itemOrWaiterAdded indicates that an item or
+ log: opts.Log,
+ itemAddedToAddBuffer: make(chan struct{}, 1),
+ items: map[T]*item[T]{},
+ ready: btree.NewG(32, lessReady[T]),
+ waiting: btree.NewG(32, lessWaiting[T]),
+ metrics: newQueueMetrics[T](opts.MetricProvider, name, clock.RealClock{}),
+ // readyItemOrWaiterAdded indicates that a ready item or
// waiter was added. It must be buffered, because
// if we currently process items we can't tell
// if that included the new item/waiter.
- itemOrWaiterAdded: make(chan struct{}, 1),
- rateLimiter: opts.RateLimiter,
- locked: sets.Set[T]{},
- done: make(chan struct{}),
- get: make(chan item[T]),
- now: time.Now,
- tick: time.Tick,
+ readyItemOrWaiterAdded: make(chan struct{}, 1),
+ waitingItemAddedOrUpdated: make(chan struct{}, 1),
+ rateLimiter: opts.RateLimiter,
+ locked: sets.Set[T]{},
+ done: make(chan struct{}),
+ get: make(chan item[T]),
+ now: time.Now,
+ tick: time.Tick,
}
- go pq.spin()
+ go pq.handleAddBuffer()
+ go pq.handleReadyItems()
+ go pq.handleWaitingItems()
go pq.logState()
if _, ok := pq.metrics.(noMetrics[T]); !ok {
go pq.updateUnfinishedWorkLoop()
@@ -93,30 +108,33 @@ func New[T comparable](name string, o ...Opt[T]) PriorityQueue[T] {
type priorityqueue[T comparable] struct {
log logr.Logger
- // lock has to be acquired for any access any of items, queue, addedCounter
- // or becameReady
- lock sync.Mutex
- items map[T]*item[T]
- queue bTree[*item[T]]
+
+ addBufferLock sync.Mutex
+ addBuffer []bufferItem[T]
+ itemAddedToAddBuffer chan struct{}
+
+ // lock has to be acquired for any access to any of items, ready, waiting,
+ // addedCounter or waiters.
+ lock sync.Mutex
+ items map[T]*item[T]
+ ready bTree[*item[T]]
+ waiting bTree[*item[T]]
// addedCounter is a counter of elements added, we need it
- // because unixNano is not guaranteed to be unique.
+ // to provide FIFO semantics.
addedCounter uint64
- // becameReady holds items that are in the queue, were added
- // with non-zero after and became ready. We need it to call the
- // metrics add exactly once for them.
- becameReady sets.Set[T]
- metrics queueMetrics[T]
+ metrics queueMetrics[T]
- itemOrWaiterAdded chan struct{}
+ readyItemOrWaiterAdded chan struct{}
+ waitingItemAddedOrUpdated chan struct{}
rateLimiter workqueue.TypedRateLimiter[T]
// locked contains the keys we handed out through Get() and that haven't
// yet been returned through Done().
locked sets.Set[T]
- lockedLock sync.RWMutex
+ lockedLock sync.Mutex
shutdown atomic.Bool
done chan struct{}
@@ -137,8 +155,52 @@ func (w *priorityqueue[T]) AddWithOpts(o AddOpts, items ...T) {
return
}
- w.lock.Lock()
- defer w.lock.Unlock()
+ if len(items) == 0 {
+ return
+ }
+
+ w.addBufferLock.Lock()
+ w.addBuffer = append(w.addBuffer, bufferItem[T]{
+ opts: o,
+ items: items,
+ })
+ w.addBufferLock.Unlock()
+
+ w.notifyItemAddedToAddBuffer()
+}
+
+func (w *priorityqueue[T]) handleAddBuffer() {
+ for {
+ select {
+ case <-w.done:
+ return
+ case <-w.itemAddedToAddBuffer:
+ }
+
+ w.lock.Lock()
+ w.lockedFlushAddBuffer()
+ w.lock.Unlock()
+ }
+}
+
+func (w *priorityqueue[T]) lockedFlushAddBuffer() {
+ w.addBufferLock.Lock()
+ buffer := w.addBuffer
+ w.addBuffer = make([]bufferItem[T], 0, len(buffer))
+ w.addBufferLock.Unlock()
+
+ for _, v := range buffer {
+ w.lockedAddWithOpts(v.opts, v.items...)
+ }
+}
+
+func (w *priorityqueue[T]) lockedAddWithOpts(o AddOpts, items ...T) {
+ if w.shutdown.Load() {
+ return
+ }
+
+ var readyItemAdded bool
+ var waitingItemAddedOrUpdated bool
for _, key := range items {
after := o.After
@@ -161,68 +223,162 @@ func (w *priorityqueue[T]) AddWithOpts(o AddOpts, items ...T) {
Priority: ptr.Deref(o.Priority, 0),
ReadyAt: readyAt,
}
+ w.addedCounter++
w.items[key] = item
- w.queue.ReplaceOrInsert(item)
- if item.ReadyAt == nil {
+ if readyAt != nil {
+ w.waiting.ReplaceOrInsert(item)
+ waitingItemAddedOrUpdated = true
+ } else {
+ w.ready.ReplaceOrInsert(item)
w.metrics.add(key, item.Priority)
+ readyItemAdded = true
}
- w.addedCounter++
continue
}
- // The b-tree de-duplicates based on ordering and any change here
- // will affect the order - Just delete and re-add.
- item, _ := w.queue.Delete(w.items[key])
- if newPriority := ptr.Deref(o.Priority, 0); newPriority > item.Priority {
- // Update depth metric only if the item in the queue was already added to the depth metric.
- if item.ReadyAt == nil || w.becameReady.Has(key) {
- w.metrics.updateDepthWithPriorityMetric(item.Priority, newPriority)
- }
- item.Priority = newPriority
+ if w.items[key].ReadyAt == nil {
+ readyAt = nil
+ } else if readyAt != nil && w.items[key].ReadyAt.Before(*readyAt) {
+ readyAt = w.items[key].ReadyAt
}
- if item.ReadyAt != nil && (readyAt == nil || readyAt.Before(*item.ReadyAt)) {
- if readyAt == nil && !w.becameReady.Has(key) {
- w.metrics.add(key, item.Priority)
+ priority := w.items[key].Priority
+ addedCounter := w.items[key].AddedCounter
+ if newPriority := ptr.Deref(o.Priority, 0); newPriority > w.items[key].Priority {
+ // Update depth metric only if the item was already ready
+ if w.items[key].ReadyAt == nil {
+ w.metrics.updateDepthWithPriorityMetric(w.items[key].Priority, newPriority)
}
- item.ReadyAt = readyAt
+ priority = newPriority
+ addedCounter = w.addedCounter
+ w.addedCounter++
}
- w.queue.ReplaceOrInsert(item)
+ var tree, previousTree bTree[*item[T]]
+ switch {
+ case readyAt == nil && w.items[key].ReadyAt == nil:
+ tree, previousTree = w.ready, w.ready
+ case readyAt == nil && w.items[key].ReadyAt != nil:
+ tree, previousTree = w.ready, w.waiting
+ readyItemAdded = true
+ w.metrics.add(key, priority)
+ case readyAt != nil:
+ // We are in the update path and we set readyAt to nil if the
+ // existing item has a nil readyAt, so we can be sure here that
+ // it has a non-nil readyAt/is in w.waiting.
+ tree, previousTree = w.waiting, w.waiting
+ waitingItemAddedOrUpdated = true
+ }
+
+ item, _ := previousTree.Delete(w.items[key])
+ item.ReadyAt = readyAt
+ item.Priority = priority
+ item.AddedCounter = addedCounter
+ tree.ReplaceOrInsert(item)
+ }
+
+ if readyItemAdded {
+ w.notifyReadyItemOrWaiterAdded()
+ }
+ if waitingItemAddedOrUpdated {
+ w.notifyWaitingItemAddedOrUpdated()
+ }
+}
+
+func (w *priorityqueue[T]) notifyItemAddedToAddBuffer() {
+ select {
+ case w.itemAddedToAddBuffer <- struct{}{}:
+ default:
}
+}
- if len(items) > 0 {
- w.notifyItemOrWaiterAdded()
+func (w *priorityqueue[T]) notifyReadyItemOrWaiterAdded() {
+ select {
+ case w.readyItemOrWaiterAdded <- struct{}{}:
+ default:
}
}
-func (w *priorityqueue[T]) notifyItemOrWaiterAdded() {
+func (w *priorityqueue[T]) notifyWaitingItemAddedOrUpdated() {
select {
- case w.itemOrWaiterAdded <- struct{}{}:
+ case w.waitingItemAddedOrUpdated <- struct{}{}:
default:
}
}
-func (w *priorityqueue[T]) spin() {
+func (w *priorityqueue[T]) handleWaitingItems() {
blockForever := make(chan time.Time)
var nextReady <-chan time.Time
nextReady = blockForever
- var nextItemReadyAt time.Time
for {
select {
case <-w.done:
return
- case <-w.itemOrWaiterAdded:
+ case <-w.waitingItemAddedOrUpdated:
case <-nextReady:
nextReady = blockForever
- nextItemReadyAt = time.Time{}
}
func() {
w.lock.Lock()
defer w.lock.Unlock()
+ var toMove []*item[T]
+ w.waiting.Ascend(func(item *item[T]) bool {
+ readyIn := item.ReadyAt.Sub(w.now()) // Store this to prevent TOCTOU issues
+ if readyIn <= 0 {
+ toMove = append(toMove, item)
+ return true
+ }
+
+ nextReady = w.tick(readyIn)
+ return false
+ })
+
+ // Don't manipulate the tree from within Ascend
+ for _, toMove := range toMove {
+ w.waiting.Delete(toMove)
+ toMove.ReadyAt = nil
+
+ // Bump added counter so items get sorted by when
+ // they became ready, not when they were added.
+ toMove.AddedCounter = w.addedCounter
+ w.addedCounter++
+
+ w.metrics.add(toMove.Key, toMove.Priority)
+ w.ready.ReplaceOrInsert(toMove)
+ }
+
+ if len(toMove) > 0 {
+ w.notifyReadyItemOrWaiterAdded()
+ }
+ }()
+ }
+}
+
+func (w *priorityqueue[T]) handleReadyItems() {
+ for {
+ select {
+ case <-w.done:
+ return
+ case <-w.readyItemOrWaiterAdded:
+ }
+
+ func() {
+ w.lock.Lock()
+ defer w.lock.Unlock()
+
+ // Flush is performed before reading items to avoid errors caused by asynchronous behavior,
+ // primarily for unit testing purposes.
+ // Successfully adding a ready item may result in an additional call to handleReadyItems(),
+ // but the cost is negligible.
+ w.lockedFlushAddBuffer()
+
+ if w.waiters == 0 {
+ return
+ }
+
w.lockedLock.Lock()
defer w.lockedLock.Unlock()
@@ -230,69 +386,24 @@ func (w *priorityqueue[T]) spin() {
// track what we want to delete and do it after we are done ascending.
var toDelete []*item[T]
- var key T
-
- // Items in the queue tree are sorted first by priority and second by readiness, so
- // items with a lower priority might be ready further down in the queue.
- // We iterate through the priorities high to low until we find a ready item
- pivot := item[T]{
- Key: key,
- AddedCounter: 0,
- Priority: math.MaxInt,
- ReadyAt: nil,
- }
-
- for {
- pivotChange := false
-
- w.queue.AscendGreaterOrEqual(&pivot, func(item *item[T]) bool {
- // Item is locked, we can not hand it out
- if w.locked.Has(item.Key) {
- return true
- }
-
- if item.ReadyAt != nil {
- if readyAt := item.ReadyAt.Sub(w.now()); readyAt > 0 {
- if nextItemReadyAt.After(*item.ReadyAt) || nextItemReadyAt.IsZero() {
- nextReady = w.tick(readyAt)
- nextItemReadyAt = *item.ReadyAt
- }
-
- // Adjusting the pivot item moves the ascend to the next lower priority
- pivot.Priority = item.Priority - 1
- pivotChange = true
- return false
- }
- if !w.becameReady.Has(item.Key) {
- w.metrics.add(item.Key, item.Priority)
- w.becameReady.Insert(item.Key)
- }
- }
-
- if w.waiters == 0 {
- // Have to keep iterating here to ensure we update metrics
- // for further items that became ready and set nextReady.
- return true
- }
-
- w.metrics.get(item.Key, item.Priority)
- w.locked.Insert(item.Key)
- w.waiters--
- delete(w.items, item.Key)
- toDelete = append(toDelete, item)
- w.becameReady.Delete(item.Key)
- w.get <- *item
-
+ w.ready.Ascend(func(item *item[T]) bool {
+ // Item is locked, we can not hand it out
+ if w.locked.Has(item.Key) {
return true
- })
-
- if !pivotChange {
- break
}
- }
+
+ w.metrics.get(item.Key, item.Priority)
+ w.locked.Insert(item.Key)
+ w.waiters--
+ delete(w.items, item.Key)
+ toDelete = append(toDelete, item)
+ w.get <- *item
+
+ return w.waiters > 0
+ })
for _, item := range toDelete {
- w.queue.Delete(item)
+ w.ready.Delete(item)
}
}()
}
@@ -320,7 +431,7 @@ func (w *priorityqueue[T]) GetWithPriority() (_ T, priority int, shutdown bool)
w.waiters++
w.lock.Unlock()
- w.notifyItemOrWaiterAdded()
+ w.notifyReadyItemOrWaiterAdded()
select {
case <-w.done:
@@ -358,7 +469,7 @@ func (w *priorityqueue[T]) Done(item T) {
defer w.lockedLock.Unlock()
w.locked.Delete(item)
w.metrics.done(item)
- w.notifyItemOrWaiterAdded()
+ w.notifyReadyItemOrWaiterAdded()
}
func (w *priorityqueue[T]) ShutDown() {
@@ -379,16 +490,11 @@ func (w *priorityqueue[T]) Len() int {
w.lock.Lock()
defer w.lock.Unlock()
- var result int
- w.queue.Ascend(func(item *item[T]) bool {
- if item.ReadyAt == nil || item.ReadyAt.Compare(w.now()) <= 0 {
- result++
- return true
- }
- return false
- })
+ // Flush is performed before reading items to avoid errors caused by asynchronous behavior,
+ // primarily for unit testing purposes.
+ w.lockedFlushAddBuffer()
- return result
+ return w.ready.Len()
}
func (w *priorityqueue[T]) logState() {
@@ -408,7 +514,11 @@ func (w *priorityqueue[T]) logState() {
}
w.lock.Lock()
items := make([]*item[T], 0, len(w.items))
- w.queue.Ascend(func(item *item[T]) bool {
+ w.waiting.Ascend(func(item *item[T]) bool {
+ items = append(items, item)
+ return true
+ })
+ w.ready.Ascend(func(item *item[T]) bool {
items = append(items, item)
return true
})
@@ -418,20 +528,17 @@ func (w *priorityqueue[T]) logState() {
}
}
-func less[T comparable](a, b *item[T]) bool {
- if a.Priority != b.Priority {
- return a.Priority > b.Priority
- }
- if a.ReadyAt == nil && b.ReadyAt != nil {
- return true
- }
- if b.ReadyAt == nil && a.ReadyAt != nil {
- return false
- }
- if a.ReadyAt != nil && b.ReadyAt != nil && !a.ReadyAt.Equal(*b.ReadyAt) {
+func lessWaiting[T comparable](a, b *item[T]) bool {
+ if !a.ReadyAt.Equal(*b.ReadyAt) {
return a.ReadyAt.Before(*b.ReadyAt)
}
+ return lessReady(a, b)
+}
+func lessReady[T comparable](a, b *item[T]) bool {
+ if a.Priority != b.Priority {
+ return a.Priority > b.Priority
+ }
return a.AddedCounter < b.AddedCounter
}
@@ -455,8 +562,8 @@ func (w *priorityqueue[T]) updateUnfinishedWorkLoop() {
}
type bTree[T any] interface {
- ReplaceOrInsert(item T) (_ T, _ bool)
+ ReplaceOrInsert(item T) (T, bool)
Delete(item T) (T, bool)
Ascend(iterator btree.ItemIteratorG[T])
- AscendGreaterOrEqual(pivot T, iterator btree.ItemIteratorG[T])
+ Len() int
}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/healthz/healthz.go b/vendor/sigs.k8s.io/controller-runtime/pkg/healthz/healthz.go
index cfb5dc8d02b5..149b02ec98f6 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/healthz/healthz.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/healthz/healthz.go
@@ -20,7 +20,7 @@ import (
"fmt"
"net/http"
"path"
- "sort"
+ "slices"
"strings"
"k8s.io/apimachinery/pkg/util/sets"
@@ -75,7 +75,7 @@ func (h *Handler) serveAggregated(resp http.ResponseWriter, req *http.Request) {
}
// ...sort to be consistent...
- sort.Slice(parts, func(i, j int) bool { return parts[i].name < parts[j].name })
+ slices.SortStableFunc(parts, func(i, j checkStatus) int { return strings.Compare(i.name, j.name) })
// ...and write out the result
// TODO(directxman12): this should also accept a request for JSON content (via a accept header)
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go
index ea7968186233..f2638b9d9b7e 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go
@@ -39,6 +39,10 @@ import (
"sigs.k8s.io/controller-runtime/pkg/source"
)
+// errReconciliationTimeout is the error used as the cause when the ReconciliationTimeout guardrail fires.
+// This allows us to distinguish wrapper timeouts from user-initiated context cancellations.
+var errReconciliationTimeout = errors.New("reconciliation timeout")
+
// Options are the arguments for creating a new Controller.
type Options[request comparable] struct {
// Reconciler is a function that can be called at any time with the Name / Namespace of an object and
@@ -207,13 +211,26 @@ func (c *Controller[request]) Reconcile(ctx context.Context, req request) (_ rec
}
}()
+ var timeoutCause error
if c.ReconciliationTimeout > 0 {
+ timeoutCause = errReconciliationTimeout
var cancel context.CancelFunc
- ctx, cancel = context.WithTimeout(ctx, c.ReconciliationTimeout)
+ ctx, cancel = context.WithTimeoutCause(ctx, c.ReconciliationTimeout, timeoutCause)
defer cancel()
}
- return c.Do.Reconcile(ctx, req)
+ res, err := c.Do.Reconcile(ctx, req)
+
+ // Check if the reconciliation timed out due to our wrapper timeout guardrail.
+ // We check ctx.Err() == context.DeadlineExceeded first to ensure the context was actually
+ // cancelled due to a deadline (not parent cancellation or other reasons), then verify it was
+ // our specific timeout cause. This prevents false positives from parent context cancellations
+ // or other timeout scenarios.
+ if timeoutCause != nil && ctx.Err() == context.DeadlineExceeded && errors.Is(context.Cause(ctx), timeoutCause) {
+ ctrlmetrics.ReconcileTimeouts.WithLabelValues(c.Name).Inc()
+ }
+
+ return res, err
}
// Watch implements controller.Controller.
@@ -437,6 +454,7 @@ func (c *Controller[request]) initMetrics() {
ctrlmetrics.ReconcileErrors.WithLabelValues(c.Name).Add(0)
ctrlmetrics.TerminalReconcileErrors.WithLabelValues(c.Name).Add(0)
ctrlmetrics.ReconcilePanics.WithLabelValues(c.Name).Add(0)
+ ctrlmetrics.ReconcileTimeouts.WithLabelValues(c.Name).Add(0)
ctrlmetrics.WorkerCount.WithLabelValues(c.Name).Set(float64(c.MaxConcurrentReconciles))
ctrlmetrics.ActiveWorkers.WithLabelValues(c.Name).Set(0)
}
@@ -459,6 +477,9 @@ func (c *Controller[request]) reconcileHandler(ctx context.Context, req request,
// resource to be synced.
log.V(5).Info("Reconciling")
result, err := c.Reconcile(ctx, req)
+ if result.Priority != nil {
+ priority = *result.Priority
+ }
switch {
case err != nil:
if errors.Is(err, reconcile.TerminalError(nil)) {
@@ -468,8 +489,8 @@ func (c *Controller[request]) reconcileHandler(ctx context.Context, req request,
}
ctrlmetrics.ReconcileErrors.WithLabelValues(c.Name).Inc()
ctrlmetrics.ReconcileTotal.WithLabelValues(c.Name, labelError).Inc()
- if !result.IsZero() {
- log.Info("Warning: Reconciler returned both a non-zero result and a non-nil error. The result will always be ignored if the error is non-nil and the non-nil error causes requeuing with exponential backoff. For more details, see: https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/reconcile#Reconciler")
+ if result.RequeueAfter > 0 || result.Requeue { //nolint: staticcheck // We have to handle Requeue until it is removed
+ log.Info("Warning: Reconciler returned both a result with either RequeueAfter or Requeue set and a non-nil error. RequeueAfter and Requeue will always be ignored if the error is non-nil. For more details, see: https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/reconcile#Reconciler")
}
log.Error(err, "Reconciler error")
case result.RequeueAfter > 0:
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/metrics/metrics.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/metrics/metrics.go
index 450e9ae25b2d..39b435c45327 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/metrics/metrics.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/metrics/metrics.go
@@ -80,6 +80,15 @@ var (
Name: "controller_runtime_active_workers",
Help: "Number of currently used workers per controller",
}, []string{"controller"})
+
+ // ReconcileTimeouts is a prometheus counter metric which holds the total
+ // number of reconciliations that timed out due to the ReconciliationTimeout
+ // context timeout. This metric only increments when the wrapper timeout fires,
+ // not when user reconcilers cancels the context or completes before the timeout.
+ ReconcileTimeouts = prometheus.NewCounterVec(prometheus.CounterOpts{
+ Name: "controller_runtime_reconcile_timeouts_total",
+ Help: "Total number of reconciliation timeouts per controller",
+ }, []string{"controller"})
)
func init() {
@@ -91,6 +100,7 @@ func init() {
ReconcileTime,
WorkerCount,
ActiveWorkers,
+ ReconcileTimeouts,
// expose process metrics like CPU, Memory, file descriptor usage etc.
collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}),
// expose all Go runtime metrics like GC stats, memory stats etc.
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/flock/flock_other.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/flock/flock_other.go
index 069a5b3a2cb1..1def472197a3 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/flock/flock_other.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/flock/flock_other.go
@@ -1,4 +1,4 @@
-// +build !linux,!darwin,!freebsd,!openbsd,!netbsd,!dragonfly
+//go:build !linux && !darwin && !freebsd && !openbsd && !netbsd && !dragonfly
/*
Copyright 2016 The Kubernetes Authors.
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/flock/flock_unix.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/flock/flock_unix.go
index 71ec576df237..be2a8c2cfda9 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/flock/flock_unix.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/flock/flock_unix.go
@@ -1,5 +1,4 @@
//go:build linux || darwin || freebsd || openbsd || netbsd || dragonfly
-// +build linux darwin freebsd openbsd netbsd dragonfly
/*
Copyright 2016 The Kubernetes Authors.
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/metrics/workqueue.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/metrics/workqueue.go
index 402319817bd3..49180457a64a 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/metrics/workqueue.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/metrics/workqueue.go
@@ -18,9 +18,11 @@ package metrics
import (
"strconv"
+ "sync"
"time"
"github.com/prometheus/client_golang/prometheus"
+ "k8s.io/apimachinery/pkg/util/sets"
"k8s.io/client-go/util/workqueue"
"sigs.k8s.io/controller-runtime/pkg/metrics"
)
@@ -154,17 +156,55 @@ type DepthMetricWithPriority interface {
var _ MetricsProviderWithPriority = WorkqueueMetricsProvider{}
func (WorkqueueMetricsProvider) NewDepthMetricWithPriority(name string) DepthMetricWithPriority {
- return &depthWithPriorityMetric{lvs: []string{name, name}}
+ return &depthWithPriorityMetric{depth: depth, lvs: []string{name, name}, observedPriorities: sets.Set[int]{}}
}
+type prometheusGaugeVec interface {
+ WithLabelValues(lvs ...string) prometheus.Gauge
+}
+
+const (
+ priorityCardinalityExceededPlaceholder = "exceeded_cardinality_limit"
+ // maxRecommendedUniquePriorities is not scientifically chosen, we assume
+ // that the 99% use-case is to only use the two priorities that c-r itself
+ // uses and then leave a bit of leeway for other use-cases.
+ // We may decide to update this value in the future if we find that a
+ // a different value is more appropriate.
+ maxRecommendedUniquePriorities = 25
+)
+
type depthWithPriorityMetric struct {
- lvs []string
+ depth prometheusGaugeVec
+ lvs []string
+
+ observedPrioritiesLock sync.Mutex
+ priorityCardinalityLimitReached bool
+ observedPriorities sets.Set[int]
+}
+
+func (g *depthWithPriorityMetric) priorityLabel(priority int) string {
+ g.observedPrioritiesLock.Lock()
+ defer g.observedPrioritiesLock.Unlock()
+
+ if g.priorityCardinalityLimitReached {
+ return priorityCardinalityExceededPlaceholder
+ }
+
+ g.observedPriorities.Insert(priority)
+
+ if g.observedPriorities.Len() > maxRecommendedUniquePriorities {
+ g.observedPriorities = nil
+ g.priorityCardinalityLimitReached = true
+ return priorityCardinalityExceededPlaceholder
+ }
+
+ return strconv.Itoa(priority)
}
func (g *depthWithPriorityMetric) Inc(priority int) {
- depth.WithLabelValues(append(g.lvs, strconv.Itoa(priority))...).Inc()
+ g.depth.WithLabelValues(append(g.lvs, g.priorityLabel(priority))...).Inc()
}
func (g *depthWithPriorityMetric) Dec(priority int) {
- depth.WithLabelValues(append(g.lvs, strconv.Itoa(priority))...).Dec()
+ g.depth.WithLabelValues(append(g.lvs, g.priorityLabel(priority))...).Dec()
}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/recorder/recorder.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/recorder/recorder.go
index 21f0146ba3b8..bbc160483545 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/recorder/recorder.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/recorder/recorder.go
@@ -24,16 +24,19 @@ import (
"github.com/go-logr/logr"
corev1 "k8s.io/api/core/v1"
+ eventsv1 "k8s.io/api/events/v1"
"k8s.io/apimachinery/pkg/runtime"
corev1client "k8s.io/client-go/kubernetes/typed/core/v1"
"k8s.io/client-go/rest"
+ "k8s.io/client-go/tools/events"
"k8s.io/client-go/tools/record"
)
// EventBroadcasterProducer makes an event broadcaster, returning
// whether or not the broadcaster should be stopped with the Provider,
// or not (e.g. if it's shared, it shouldn't be stopped with the Provider).
-type EventBroadcasterProducer func() (caster record.EventBroadcaster, stopWithProvider bool)
+// This producer currently produces both an old API and a new API broadcaster.
+type EventBroadcasterProducer func() (deprecatedCaster record.EventBroadcaster, caster events.EventBroadcaster, stopWithProvider bool)
// Provider is a recorder.Provider that records events to the k8s API server
// and to a logr Logger.
@@ -48,9 +51,13 @@ type Provider struct {
evtClient corev1client.EventInterface
makeBroadcaster EventBroadcasterProducer
- broadcasterOnce sync.Once
- broadcaster record.EventBroadcaster
- stopBroadcaster bool
+ broadcasterOnce sync.Once
+ broadcaster events.EventBroadcaster
+ cancelSinkRecordingFunc context.CancelFunc
+ stopWatcherFunc func()
+ // Deprecated: will be removed in a future release. Use the broadcaster above instead.
+ deprecatedBroadcaster record.EventBroadcaster
+ stopBroadcaster bool
}
// NB(directxman12): this manually implements Stop instead of Being a runnable because we need to
@@ -71,10 +78,13 @@ func (p *Provider) Stop(shutdownCtx context.Context) {
// almost certainly already been started (e.g. by leader election). We
// need to invoke this to ensure that we don't inadvertently race with
// an invocation of getBroadcaster.
- broadcaster := p.getBroadcaster()
+ deprecatedBroadcaster, broadcaster := p.getBroadcaster()
if p.stopBroadcaster {
p.lock.Lock()
broadcaster.Shutdown()
+ p.cancelSinkRecordingFunc()
+ p.stopWatcherFunc()
+ deprecatedBroadcaster.Shutdown()
p.stopped = true
p.lock.Unlock()
}
@@ -89,7 +99,7 @@ func (p *Provider) Stop(shutdownCtx context.Context) {
// getBroadcaster ensures that a broadcaster is started for this
// provider, and returns it. It's threadsafe.
-func (p *Provider) getBroadcaster() record.EventBroadcaster {
+func (p *Provider) getBroadcaster() (record.EventBroadcaster, events.EventBroadcaster) {
// NB(directxman12): this can technically still leak if something calls
// "getBroadcaster" (i.e. Emits an Event) but never calls Start, but if we
// create the broadcaster in start, we could race with other things that
@@ -97,17 +107,37 @@ func (p *Provider) getBroadcaster() record.EventBroadcaster {
// silently swallowing events and more locking, but that seems suboptimal.
p.broadcasterOnce.Do(func() {
- broadcaster, stop := p.makeBroadcaster()
- broadcaster.StartRecordingToSink(&corev1client.EventSinkImpl{Interface: p.evtClient})
- broadcaster.StartEventWatcher(
+ p.deprecatedBroadcaster, p.broadcaster, p.stopBroadcaster = p.makeBroadcaster()
+
+ // init deprecated broadcaster
+ p.deprecatedBroadcaster.StartRecordingToSink(&corev1client.EventSinkImpl{Interface: p.evtClient})
+ p.deprecatedBroadcaster.StartEventWatcher(
func(e *corev1.Event) {
p.logger.V(1).Info(e.Message, "type", e.Type, "object", e.InvolvedObject, "reason", e.Reason)
})
- p.broadcaster = broadcaster
- p.stopBroadcaster = stop
+
+ // init new broadcaster
+ ctx, cancel := context.WithCancel(context.Background())
+ p.cancelSinkRecordingFunc = cancel
+ if err := p.broadcaster.StartRecordingToSinkWithContext(ctx); err != nil {
+ p.logger.Error(err, "error starting recording for broadcaster")
+ return
+ }
+
+ stopWatcher, err := p.broadcaster.StartEventWatcher(func(event runtime.Object) {
+ e, isEvt := event.(*eventsv1.Event)
+ if isEvt {
+ p.logger.V(1).Info(e.Note, "type", e.Type, "object", e.Related, "action", e.Action, "reason", e.Reason)
+ }
+ })
+ if err != nil {
+ p.logger.Error(err, "error starting event watcher for broadcaster")
+ }
+
+ p.stopWatcherFunc = stopWatcher
})
- return p.broadcaster
+ return p.deprecatedBroadcaster, p.broadcaster
}
// NewProvider create a new Provider instance.
@@ -128,6 +158,15 @@ func NewProvider(config *rest.Config, httpClient *http.Client, scheme *runtime.S
// GetEventRecorderFor returns an event recorder that broadcasts to this provider's
// broadcaster. All events will be associated with a component of the given name.
func (p *Provider) GetEventRecorderFor(name string) record.EventRecorder {
+ return &deprecatedRecorder{
+ prov: p,
+ name: name,
+ }
+}
+
+// GetEventRecorder returns an event recorder that broadcasts to this provider's
+// broadcaster. All events will be associated with a component of the given name.
+func (p *Provider) GetEventRecorder(name string) events.EventRecorder {
return &lazyRecorder{
prov: p,
name: name,
@@ -141,18 +180,47 @@ type lazyRecorder struct {
name string
recOnce sync.Once
- rec record.EventRecorder
+ rec events.EventRecorder
}
// ensureRecording ensures that a concrete recorder is populated for this recorder.
func (l *lazyRecorder) ensureRecording() {
l.recOnce.Do(func() {
- broadcaster := l.prov.getBroadcaster()
- l.rec = broadcaster.NewRecorder(l.prov.scheme, corev1.EventSource{Component: l.name})
+ _, broadcaster := l.prov.getBroadcaster()
+ l.rec = broadcaster.NewRecorder(l.prov.scheme, l.name)
})
}
-func (l *lazyRecorder) Event(object runtime.Object, eventtype, reason, message string) {
+func (l *lazyRecorder) Eventf(regarding runtime.Object, related runtime.Object, eventtype, reason, action, note string, args ...any) {
+ l.ensureRecording()
+
+ l.prov.lock.RLock()
+ if !l.prov.stopped {
+ l.rec.Eventf(regarding, related, eventtype, reason, action, note, args...)
+ }
+ l.prov.lock.RUnlock()
+}
+
+// deprecatedRecorder implements the old events API during the tranisiton and will be removed in a future release.
+//
+// Deprecated: will be removed in a future release.
+type deprecatedRecorder struct {
+ prov *Provider
+ name string
+
+ recOnce sync.Once
+ rec record.EventRecorder
+}
+
+// ensureRecording ensures that a concrete recorder is populated for this recorder.
+func (l *deprecatedRecorder) ensureRecording() {
+ l.recOnce.Do(func() {
+ deprecatedBroadcaster, _ := l.prov.getBroadcaster()
+ l.rec = deprecatedBroadcaster.NewRecorder(l.prov.scheme, corev1.EventSource{Component: l.name})
+ })
+}
+
+func (l *deprecatedRecorder) Event(object runtime.Object, eventtype, reason, message string) {
l.ensureRecording()
l.prov.lock.RLock()
@@ -161,7 +229,8 @@ func (l *lazyRecorder) Event(object runtime.Object, eventtype, reason, message s
}
l.prov.lock.RUnlock()
}
-func (l *lazyRecorder) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{}) {
+
+func (l *deprecatedRecorder) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...any) {
l.ensureRecording()
l.prov.lock.RLock()
@@ -170,7 +239,8 @@ func (l *lazyRecorder) Eventf(object runtime.Object, eventtype, reason, messageF
}
l.prov.lock.RUnlock()
}
-func (l *lazyRecorder) AnnotatedEventf(object runtime.Object, annotations map[string]string, eventtype, reason, messageFmt string, args ...interface{}) {
+
+func (l *deprecatedRecorder) AnnotatedEventf(object runtime.Object, annotations map[string]string, eventtype, reason, messageFmt string, args ...any) {
l.ensureRecording()
l.prov.lock.RLock()
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/source/event_handler.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/source/event_handler.go
index 7cc8c5155589..9d614f34a56d 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/source/event_handler.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/source/event_handler.go
@@ -60,7 +60,7 @@ type EventHandler[object client.Object, request comparable] struct {
}
// OnAdd creates CreateEvent and calls Create on EventHandler.
-func (e *EventHandler[object, request]) OnAdd(obj interface{}, isInInitialList bool) {
+func (e *EventHandler[object, request]) OnAdd(obj any, isInInitialList bool) {
c := event.TypedCreateEvent[object]{
IsInInitialList: isInInitialList,
}
@@ -87,7 +87,7 @@ func (e *EventHandler[object, request]) OnAdd(obj interface{}, isInInitialList b
}
// OnUpdate creates UpdateEvent and calls Update on EventHandler.
-func (e *EventHandler[object, request]) OnUpdate(oldObj, newObj interface{}) {
+func (e *EventHandler[object, request]) OnUpdate(oldObj, newObj any) {
u := event.TypedUpdateEvent[object]{}
if o, ok := oldObj.(object); ok {
@@ -120,7 +120,7 @@ func (e *EventHandler[object, request]) OnUpdate(oldObj, newObj interface{}) {
}
// OnDelete creates DeleteEvent and calls Delete on EventHandler.
-func (e *EventHandler[object, request]) OnDelete(obj interface{}) {
+func (e *EventHandler[object, request]) OnDelete(obj any) {
d := event.TypedDeleteEvent[object]{}
// Deal with tombstone events by pulling the object out. Tombstone events wrap the object in a
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/source/kind.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/source/kind.go
index 285424452319..a28aeb177e37 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/source/kind.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/source/kind.go
@@ -91,16 +91,23 @@ func (ks *Kind[object, request]) Start(ctx context.Context, queue workqueue.Type
return
}
- _, err := i.AddEventHandlerWithOptions(NewEventHandler(ctx, queue, ks.Handler, ks.Predicates), toolscache.HandlerOptions{
+ handlerRegistration, err := i.AddEventHandlerWithOptions(NewEventHandler(ctx, queue, ks.Handler, ks.Predicates), toolscache.HandlerOptions{
Logger: &logKind,
})
if err != nil {
ks.startedErr <- err
return
}
+ // First, wait for the cache to sync. For real caches this waits for startup.
+ // For fakes with Synced=false, this returns immediately allowing fast failure.
if !ks.Cache.WaitForCacheSync(ctx) {
- // Would be great to return something more informative here
ks.startedErr <- errors.New("cache did not sync")
+ close(ks.startedErr)
+ return
+ }
+ // Then wait for this specific handler to receive all initial events.
+ if !toolscache.WaitForCacheSync(ctx.Done(), handlerRegistration.HasSynced) {
+ ks.startedErr <- errors.New("handler did not sync")
}
close(ks.startedErr)
}()
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/addr/manager.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/addr/manager.go
index ffa33a88616f..e8f1f10d2aee 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/addr/manager.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/addr/manager.go
@@ -124,14 +124,16 @@ func suggest(listenHost string) (*net.TCPListener, int, string, error) {
// Suggest suggests an address a process can listen on. It returns
// a tuple consisting of a free port and the hostname resolved to its IP.
// It makes sure that new port allocated does not conflict with old ports
-// allocated within 1 minute.
+// allocated within 2 minute.
func Suggest(listenHost string) (int, string, error) {
- for i := 0; i < portConflictRetry; i++ {
+ for range portConflictRetry {
listener, port, resolvedHost, err := suggest(listenHost)
if err != nil {
return -1, "", err
}
- defer listener.Close()
+ if err := listener.Close(); err != nil {
+ return -1, "", err
+ }
if ok, err := cache.add(port); ok {
return port, resolvedHost, nil
} else if err != nil {
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/arguments.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/arguments.go
index 391eec1facf1..caa417d2c2a4 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/arguments.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/arguments.go
@@ -19,14 +19,14 @@ package process
import (
"bytes"
"html/template"
- "sort"
+ "slices"
"strings"
)
// RenderTemplates returns an []string to render the templates
//
// Deprecated: will be removed in favor of Arguments.
-func RenderTemplates(argTemplates []string, data interface{}) (args []string, err error) {
+func RenderTemplates(argTemplates []string, data any) (args []string, err error) {
var t *template.Template
for _, arg := range argTemplates {
@@ -82,7 +82,7 @@ func SliceToArguments(sliceArgs []string, args *Arguments) []string {
// Deprecated: will be removed when RenderTemplates is removed.
type TemplateDefaults struct {
// Data will be used to render the template.
- Data interface{}
+ Data any
// Defaults will be used to default structured arguments if no template is passed.
Defaults map[string][]string
// MinimalDefaults will be used to default structured arguments if a template is passed.
@@ -230,7 +230,7 @@ func (a *Arguments) AsStrings(defaults map[string][]string) []string {
for key := range a.values {
keysInOrder = append(keysInOrder, key)
}
- sort.Strings(keysInOrder)
+ slices.Sort(keysInOrder)
var res []string
for _, key := range keysInOrder {
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_other.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_other.go
index df13b341a48b..e65ddc5f40c9 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_other.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_other.go
@@ -1,5 +1,4 @@
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos
-// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
/*
Copyright 2016 The Kubernetes Authors.
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_unix.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_unix.go
index 83ad509af0fb..2bdf0c7c4736 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_unix.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_unix.go
@@ -1,5 +1,4 @@
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
/*
Copyright 2023 The Kubernetes Authors.
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/leaderelection/leader_election.go b/vendor/sigs.k8s.io/controller-runtime/pkg/leaderelection/leader_election.go
index 6c013e7992a8..7f59d8289766 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/leaderelection/leader_election.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/leaderelection/leader_election.go
@@ -103,10 +103,7 @@ func NewResourceLock(config *rest.Config, recorderProvider recorder.Provider, op
// RenewDeadline to keep a single hung request from forcing a leader loss.
// Setting it to max(time.Second, RenewDeadline/2) as a reasonable heuristic.
if options.RenewDeadline != 0 {
- timeout := options.RenewDeadline / 2
- if timeout < time.Second {
- timeout = time.Second
- }
+ timeout := max(options.RenewDeadline/2, time.Second)
config.Timeout = timeout
}
@@ -127,8 +124,10 @@ func NewResourceLock(config *rest.Config, recorderProvider recorder.Provider, op
corev1Client,
coordinationClient,
resourcelock.ResourceLockConfig{
- Identity: id,
- EventRecorder: recorderProvider.GetEventRecorderFor(id),
+ Identity: id,
+ // TODO(clebs): Replace with the new events API after leader election is updated upstream.
+ // REF: https://github.com/kubernetes/kubernetes/issues/82846
+ EventRecorder: recorderProvider.GetEventRecorderFor(id), //nolint:staticcheck
},
options.LeaderLabels,
)
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/log/deleg.go b/vendor/sigs.k8s.io/controller-runtime/pkg/log/deleg.go
index 6eb551d3b6ae..948330b01d57 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/log/deleg.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/log/deleg.go
@@ -30,7 +30,7 @@ type loggerPromise struct {
promisesLock sync.Mutex
name *string
- tags []interface{}
+ tags []any
}
func (p *loggerPromise) WithName(l *delegatingLogSink, name string) *loggerPromise {
@@ -47,7 +47,7 @@ func (p *loggerPromise) WithName(l *delegatingLogSink, name string) *loggerPromi
}
// WithValues provides a new Logger with the tags appended.
-func (p *loggerPromise) WithValues(l *delegatingLogSink, tags ...interface{}) *loggerPromise {
+func (p *loggerPromise) WithValues(l *delegatingLogSink, tags ...any) *loggerPromise {
res := &loggerPromise{
logger: l,
tags: tags,
@@ -120,7 +120,7 @@ func (l *delegatingLogSink) Enabled(level int) bool {
// the log line. The key/value pairs can then be used to add additional
// variable information. The key/value pairs should alternate string
// keys and arbitrary values.
-func (l *delegatingLogSink) Info(level int, msg string, keysAndValues ...interface{}) {
+func (l *delegatingLogSink) Info(level int, msg string, keysAndValues ...any) {
eventuallyFulfillRoot()
l.lock.RLock()
defer l.lock.RUnlock()
@@ -135,7 +135,7 @@ func (l *delegatingLogSink) Info(level int, msg string, keysAndValues ...interfa
// The msg field should be used to add context to any underlying error,
// while the err field should be used to attach the actual error that
// triggered this log line, if present.
-func (l *delegatingLogSink) Error(err error, msg string, keysAndValues ...interface{}) {
+func (l *delegatingLogSink) Error(err error, msg string, keysAndValues ...any) {
eventuallyFulfillRoot()
l.lock.RLock()
defer l.lock.RUnlock()
@@ -164,7 +164,7 @@ func (l *delegatingLogSink) WithName(name string) logr.LogSink {
}
// WithValues provides a new Logger with the tags appended.
-func (l *delegatingLogSink) WithValues(tags ...interface{}) logr.LogSink {
+func (l *delegatingLogSink) WithValues(tags ...any) logr.LogSink {
eventuallyFulfillRoot()
l.lock.RLock()
defer l.lock.RUnlock()
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/log/log.go b/vendor/sigs.k8s.io/controller-runtime/pkg/log/log.go
index ade21d6fb564..48a4d490d3f5 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/log/log.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/log/log.go
@@ -88,7 +88,7 @@ var (
)
// FromContext returns a logger with predefined values from a context.Context.
-func FromContext(ctx context.Context, keysAndValues ...interface{}) logr.Logger {
+func FromContext(ctx context.Context, keysAndValues ...any) logr.Logger {
log := Log
if ctx != nil {
if logger, err := logr.FromContext(ctx); err == nil {
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/log/null.go b/vendor/sigs.k8s.io/controller-runtime/pkg/log/null.go
index f3e81074fee6..f8dd84ca6538 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/log/null.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/log/null.go
@@ -34,7 +34,7 @@ func (log NullLogSink) Init(logr.RuntimeInfo) {
}
// Info implements logr.InfoLogger.
-func (NullLogSink) Info(_ int, _ string, _ ...interface{}) {
+func (NullLogSink) Info(_ int, _ string, _ ...any) {
// Do nothing.
}
@@ -44,7 +44,7 @@ func (NullLogSink) Enabled(level int) bool {
}
// Error implements logr.Logger.
-func (NullLogSink) Error(_ error, _ string, _ ...interface{}) {
+func (NullLogSink) Error(_ error, _ string, _ ...any) {
// Do nothing.
}
@@ -54,6 +54,6 @@ func (log NullLogSink) WithName(_ string) logr.LogSink {
}
// WithValues implements logr.Logger.
-func (log NullLogSink) WithValues(_ ...interface{}) logr.LogSink {
+func (log NullLogSink) WithValues(_ ...any) logr.LogSink {
return log
}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/log/zap/flags.go b/vendor/sigs.k8s.io/controller-runtime/pkg/log/zap/flags.go
index 2c88ad42abe3..4ebac57dcb61 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/log/zap/flags.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/log/zap/flags.go
@@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-// Package zap contains helpers for setting up a new logr.Logger instance
-// using the Zap logging framework.
package zap
import (
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/manager/internal.go b/vendor/sigs.k8s.io/controller-runtime/pkg/manager/internal.go
index a9f91cbdd56b..187d4f56c2be 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/manager/internal.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/manager/internal.go
@@ -32,9 +32,11 @@ import (
"k8s.io/apimachinery/pkg/runtime"
kerrors "k8s.io/apimachinery/pkg/util/errors"
"k8s.io/client-go/rest"
+ "k8s.io/client-go/tools/events"
"k8s.io/client-go/tools/leaderelection"
"k8s.io/client-go/tools/leaderelection/resourcelock"
"k8s.io/client-go/tools/record"
+ "sigs.k8s.io/controller-runtime/pkg/webhook/conversion"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/client"
@@ -129,6 +131,9 @@ type controllerManager struct {
// webhookServer if unset, and Add() it to controllerManager.
webhookServerOnce sync.Once
+ // converterRegistry stores conversion.Converter for the conversion endpoint.
+ converterRegistry conversion.Registry
+
// leaderElectionID is the name of the resource that leader election
// will use for holding the leader lock.
leaderElectionID string
@@ -256,7 +261,11 @@ func (cm *controllerManager) GetCache() cache.Cache {
}
func (cm *controllerManager) GetEventRecorderFor(name string) record.EventRecorder {
- return cm.cluster.GetEventRecorderFor(name)
+ return cm.cluster.GetEventRecorderFor(name) //nolint:staticcheck
+}
+
+func (cm *controllerManager) GetEventRecorder(name string) events.EventRecorder {
+ return cm.cluster.GetEventRecorder(name)
}
func (cm *controllerManager) GetRESTMapper() meta.RESTMapper {
@@ -279,6 +288,10 @@ func (cm *controllerManager) GetWebhookServer() webhook.Server {
return cm.webhookServer
}
+func (cm *controllerManager) GetConverterRegistry() conversion.Registry {
+ return cm.converterRegistry
+}
+
func (cm *controllerManager) GetLogger() logr.Logger {
return cm.logger
}
@@ -446,13 +459,16 @@ func (cm *controllerManager) Start(ctx context.Context) (err error) {
// Start the leader election and all required runnables.
{
- ctx, cancel := context.WithCancel(context.Background())
+ // Create a context that inherits all keys from the parent context
+ // but can be cancelled independently for leader election management
+ baseCtx := context.WithoutCancel(ctx)
+ leaderCtx, cancel := context.WithCancel(baseCtx)
cm.leaderElectionCancel = cancel
if leaderElector != nil {
// Start the leader elector process
go func() {
- leaderElector.Run(ctx)
- <-ctx.Done()
+ leaderElector.Run(leaderCtx)
+ <-leaderCtx.Done()
close(cm.leaderElectionStopped)
}()
} else {
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/manager/manager.go b/vendor/sigs.k8s.io/controller-runtime/pkg/manager/manager.go
index e0e94245e77c..af532ea741ed 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/manager/manager.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/manager/manager.go
@@ -29,11 +29,14 @@ import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/runtime"
+ eventsv1client "k8s.io/client-go/kubernetes/typed/events/v1"
"k8s.io/client-go/rest"
+ "k8s.io/client-go/tools/events"
"k8s.io/client-go/tools/leaderelection/resourcelock"
"k8s.io/client-go/tools/record"
"k8s.io/utils/ptr"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
+ "sigs.k8s.io/controller-runtime/pkg/webhook/conversion"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/client"
@@ -95,6 +98,10 @@ type Manager interface {
// GetControllerOptions returns controller global configuration options.
GetControllerOptions() config.Controller
+
+ // GetConverterRegistry returns the converter registry that is used to store conversion.Converter
+ // for the conversion endpoint.
+ GetConverterRegistry() conversion.Registry
}
// Options are the arguments for creating a new Manager.
@@ -337,7 +344,10 @@ func New(config *rest.Config, options Options) (Manager, error) {
return nil, errors.New("must specify Config")
}
// Set default values for options fields
- options = setOptionsDefaults(options)
+ options, err := setOptionsDefaults(config, options)
+ if err != nil {
+ return nil, fmt.Errorf("failed setting manager default options: %w", err)
+ }
cluster, err := cluster.New(config, func(clusterOptions *cluster.Options) {
clusterOptions.Scheme = options.Scheme
@@ -445,6 +455,7 @@ func New(config *rest.Config, options Options) (Manager, error) {
logger: options.Logger,
elected: make(chan struct{}),
webhookServer: options.WebhookServer,
+ converterRegistry: conversion.NewRegistry(),
leaderElectionID: options.LeaderElectionID,
leaseDuration: *options.LeaseDuration,
renewDeadline: *options.RenewDeadline,
@@ -493,7 +504,7 @@ func defaultBaseContext() context.Context {
}
// setOptionsDefaults set default values for Options fields.
-func setOptionsDefaults(options Options) Options {
+func setOptionsDefaults(config *rest.Config, options Options) (Options, error) {
// Allow newResourceLock to be mocked
if options.newResourceLock == nil {
options.newResourceLock = leaderelection.NewResourceLock
@@ -507,14 +518,25 @@ func setOptionsDefaults(options Options) Options {
// This is duplicated with pkg/cluster, we need it here
// for the leader election and there to provide the user with
// an EventBroadcaster
+ httpClient, err := rest.HTTPClientFor(config)
+ if err != nil {
+ return options, err
+ }
+
+ evtCl, err := eventsv1client.NewForConfigAndClient(config, httpClient)
+ if err != nil {
+ return options, err
+ }
+
if options.EventBroadcaster == nil {
// defer initialization to avoid leaking by default
- options.makeBroadcaster = func() (record.EventBroadcaster, bool) {
- return record.NewBroadcaster(), true
+ options.makeBroadcaster = func() (record.EventBroadcaster, events.EventBroadcaster, bool) {
+ return record.NewBroadcaster(), events.NewBroadcaster(&events.EventSinkImpl{Interface: evtCl}), true
}
} else {
- options.makeBroadcaster = func() (record.EventBroadcaster, bool) {
- return options.EventBroadcaster, false
+ // keep supporting the options.EventBroadcaster in the old API, but do not introduce it for the new one.
+ options.makeBroadcaster = func() (record.EventBroadcaster, events.EventBroadcaster, bool) {
+ return options.EventBroadcaster, events.NewBroadcaster(&events.EventSinkImpl{Interface: evtCl}), false
}
}
@@ -571,5 +593,5 @@ func setOptionsDefaults(options Options) Options {
options.WebhookServer = webhook.NewServer(webhook.Options{})
}
- return options
+ return options, nil
}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/manager/signals/signal_posix.go b/vendor/sigs.k8s.io/controller-runtime/pkg/manager/signals/signal_posix.go
index a0f00a732130..2b24faa4280e 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/manager/signals/signal_posix.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/manager/signals/signal_posix.go
@@ -1,5 +1,4 @@
//go:build !windows
-// +build !windows
/*
Copyright 2017 The Kubernetes Authors.
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/reconcile/reconcile.go b/vendor/sigs.k8s.io/controller-runtime/pkg/reconcile/reconcile.go
index c98b1864ef3e..88303ae781a1 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/reconcile/reconcile.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/reconcile/reconcile.go
@@ -44,6 +44,11 @@ type Result struct {
// RequeueAfter if greater than 0, tells the Controller to requeue the reconcile key after the Duration.
// Implies that Requeue is true, there is no need to set Requeue to true at the same time as RequeueAfter.
RequeueAfter time.Duration
+
+ // Priority is the priority that will be used if the item gets re-enqueued (also if an error is returned).
+ // If Priority is not set the original Priority of the request is preserved.
+ // Note: Priority is only respected if the controller is using a priorityqueue.PriorityQueue.
+ Priority *int
}
// IsZero returns true if this result is empty.
@@ -174,7 +179,7 @@ type terminalError struct {
err error
}
-// This function will return nil if te.err is nil.
+// Unwrap returns nil if te.err is nil.
func (te *terminalError) Unwrap() error {
return te.err
}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/recorder/recorder.go b/vendor/sigs.k8s.io/controller-runtime/pkg/recorder/recorder.go
index f093f0a72665..b34fecb525f5 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/recorder/recorder.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/recorder/recorder.go
@@ -21,11 +21,16 @@ limitations under the License.
package recorder
import (
+ "k8s.io/client-go/tools/events"
"k8s.io/client-go/tools/record"
)
// Provider knows how to generate new event recorders with given name.
type Provider interface {
- // NewRecorder returns an EventRecorder with given name.
+ // GetEventRecorderFor returns an EventRecorder for the old events API.
+ //
+ // Deprecated: this uses the old events API and will be removed in a future release. Please use GetEventRecorder instead.
GetEventRecorderFor(name string) record.EventRecorder
+ // GetEventRecorder returns a EventRecorder with given name.
+ GetEventRecorder(name string) events.EventRecorder
}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/decode.go b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/decode.go
index 55f1cafb5ea7..576262cf708d 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/decode.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/decode.go
@@ -79,7 +79,7 @@ func (d *decoder) DecodeRaw(rawObj runtime.RawExtension, into runtime.Object) er
}
if unstructuredInto, isUnstructured := into.(runtime.Unstructured); isUnstructured {
// unmarshal into unstructured's underlying object to avoid calling the decoder
- var object map[string]interface{}
+ var object map[string]any
if err := json.Unmarshal(rawObj.Raw, &object); err != nil {
return err
}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/defaulter_custom.go b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/defaulter_custom.go
index a703cbd2c54c..9fec8003f2d9 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/defaulter_custom.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/defaulter_custom.go
@@ -21,6 +21,7 @@ import (
"encoding/json"
"errors"
"net/http"
+ "reflect"
"slices"
"gomodules.xyz/jsonpatch/v2"
@@ -31,11 +32,16 @@ import (
"k8s.io/apimachinery/pkg/util/sets"
)
-// CustomDefaulter defines functions for setting defaults on resources.
-type CustomDefaulter interface {
- Default(ctx context.Context, obj runtime.Object) error
+// Defaulter defines functions for setting defaults on resources.
+type Defaulter[T runtime.Object] interface {
+ Default(ctx context.Context, obj T) error
}
+// CustomDefaulter defines functions for setting defaults on resources.
+//
+// Deprecated: CustomDefaulter is deprecated, use Defaulter instead
+type CustomDefaulter = Defaulter[runtime.Object]
+
type defaulterOptions struct {
removeUnknownOrOmitableFields bool
}
@@ -50,6 +56,29 @@ func DefaulterRemoveUnknownOrOmitableFields(o *defaulterOptions) {
o.removeUnknownOrOmitableFields = true
}
+// WithDefaulter creates a new Webhook for a Defaulter interface.
+func WithDefaulter[T runtime.Object](scheme *runtime.Scheme, defaulter Defaulter[T], opts ...DefaulterOption) *Webhook {
+ options := &defaulterOptions{}
+ for _, o := range opts {
+ o(options)
+ }
+ return &Webhook{
+ Handler: &defaulterForType[T]{
+ defaulter: defaulter,
+ decoder: NewDecoder(scheme),
+ removeUnknownOrOmitableFields: options.removeUnknownOrOmitableFields,
+ new: func() T {
+ var zero T
+ typ := reflect.TypeOf(zero)
+ if typ.Kind() == reflect.Ptr {
+ return reflect.New(typ.Elem()).Interface().(T)
+ }
+ return zero
+ },
+ },
+ }
+}
+
// WithCustomDefaulter creates a new Webhook for a CustomDefaulter interface.
func WithCustomDefaulter(scheme *runtime.Scheme, obj runtime.Object, defaulter CustomDefaulter, opts ...DefaulterOption) *Webhook {
options := &defaulterOptions{}
@@ -57,33 +86,30 @@ func WithCustomDefaulter(scheme *runtime.Scheme, obj runtime.Object, defaulter C
o(options)
}
return &Webhook{
- Handler: &defaulterForType{
- object: obj,
+ Handler: &defaulterForType[runtime.Object]{
defaulter: defaulter,
decoder: NewDecoder(scheme),
removeUnknownOrOmitableFields: options.removeUnknownOrOmitableFields,
+ new: func() runtime.Object { return obj.DeepCopyObject() },
},
}
}
-type defaulterForType struct {
- defaulter CustomDefaulter
- object runtime.Object
+type defaulterForType[T runtime.Object] struct {
+ defaulter Defaulter[T]
decoder Decoder
removeUnknownOrOmitableFields bool
+ new func() T
}
// Handle handles admission requests.
-func (h *defaulterForType) Handle(ctx context.Context, req Request) Response {
+func (h *defaulterForType[T]) Handle(ctx context.Context, req Request) Response {
if h.decoder == nil {
panic("decoder should never be nil")
}
if h.defaulter == nil {
panic("defaulter should never be nil")
}
- if h.object == nil {
- panic("object should never be nil")
- }
// Always skip when a DELETE operation received in custom mutation handler.
if req.Operation == admissionv1.Delete {
@@ -98,16 +124,12 @@ func (h *defaulterForType) Handle(ctx context.Context, req Request) Response {
ctx = NewContextWithRequest(ctx, req)
// Get the object in the request
- obj := h.object.DeepCopyObject()
+ obj := h.new()
if err := h.decoder.Decode(req, obj); err != nil {
return Errored(http.StatusBadRequest, err)
}
- // Keep a copy of the object if needed
- var originalObj runtime.Object
- if !h.removeUnknownOrOmitableFields {
- originalObj = obj.DeepCopyObject()
- }
+ originalObj := obj.DeepCopyObject().(T)
// Default the object
if err := h.defaulter.Default(ctx, obj); err != nil {
@@ -118,6 +140,21 @@ func (h *defaulterForType) Handle(ctx context.Context, req Request) Response {
return Denied(err.Error())
}
+ // If the object is not changed, there's no reason to go through the expensive patch calculation below.
+ // Note: While jsonpatch.CreatePatch short-circuits if both byte arrays are equal this is likely never the case.
+ // * json.Marshal that we use below sorts fields alphabetically
+ // * for builtin types the apiserver also sorts alphabetically (but it seems like it adds an empty line at the end)
+ // * for CRDs the apiserver uses the field order in the OpenAPI schema which very likely is not alphabetically sorted
+ // Note: If removeUnknownOrOmitableFields is set we have to compute a patch to remove unknown or omitable fields even
+ // if the objects are equal
+ if !h.removeUnknownOrOmitableFields && reflect.DeepEqual(originalObj, obj) {
+ return Response{
+ AdmissionResponse: admissionv1.AdmissionResponse{
+ Allowed: true,
+ },
+ }
+ }
+
// Create the patch
marshalled, err := json.Marshal(obj)
if err != nil {
@@ -131,7 +168,7 @@ func (h *defaulterForType) Handle(ctx context.Context, req Request) Response {
return handlerResponse
}
-func (h *defaulterForType) dropSchemeRemovals(r Response, original runtime.Object, raw []byte) Response {
+func (h *defaulterForType[T]) dropSchemeRemovals(r Response, original T, raw []byte) Response {
const opRemove = "remove"
if !r.Allowed || r.PatchType == nil {
return r
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator_custom.go b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator_custom.go
index ef1be52a8fb9..f8401571d0dc 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator_custom.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator_custom.go
@@ -21,6 +21,7 @@ import (
"errors"
"fmt"
"net/http"
+ "reflect"
v1 "k8s.io/api/admission/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
@@ -30,54 +31,79 @@ import (
// Warnings represents warning messages.
type Warnings []string
-// CustomValidator defines functions for validating an operation.
+// Validator defines functions for validating an operation.
// The object to be validated is passed into methods as a parameter.
-type CustomValidator interface {
+type Validator[T runtime.Object] interface {
// ValidateCreate validates the object on creation.
// The optional warnings will be added to the response as warning messages.
// Return an error if the object is invalid.
- ValidateCreate(ctx context.Context, obj runtime.Object) (warnings Warnings, err error)
+ ValidateCreate(ctx context.Context, obj T) (warnings Warnings, err error)
// ValidateUpdate validates the object on update.
// The optional warnings will be added to the response as warning messages.
// Return an error if the object is invalid.
- ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (warnings Warnings, err error)
+ ValidateUpdate(ctx context.Context, oldObj, newObj T) (warnings Warnings, err error)
// ValidateDelete validates the object on deletion.
// The optional warnings will be added to the response as warning messages.
// Return an error if the object is invalid.
- ValidateDelete(ctx context.Context, obj runtime.Object) (warnings Warnings, err error)
+ ValidateDelete(ctx context.Context, obj T) (warnings Warnings, err error)
+}
+
+// CustomValidator defines functions for validating an operation.
+//
+// Deprecated: CustomValidator is deprecated, use Validator instead
+type CustomValidator = Validator[runtime.Object]
+
+// WithValidator creates a new Webhook for validating the provided type.
+func WithValidator[T runtime.Object](scheme *runtime.Scheme, validator Validator[T]) *Webhook {
+ return &Webhook{
+ Handler: &validatorForType[T]{
+ validator: validator,
+ decoder: NewDecoder(scheme),
+ new: func() T {
+ var zero T
+ typ := reflect.TypeOf(zero)
+ if typ.Kind() == reflect.Ptr {
+ return reflect.New(typ.Elem()).Interface().(T)
+ }
+ return zero
+ },
+ },
+ }
}
-// WithCustomValidator creates a new Webhook for validating the provided type.
+// WithCustomValidator creates a new Webhook for a CustomValidator.
+//
+// Deprecated: WithCustomValidator is deprecated, use WithValidator instead
func WithCustomValidator(scheme *runtime.Scheme, obj runtime.Object, validator CustomValidator) *Webhook {
return &Webhook{
- Handler: &validatorForType{object: obj, validator: validator, decoder: NewDecoder(scheme)},
+ Handler: &validatorForType[runtime.Object]{
+ validator: validator,
+ decoder: NewDecoder(scheme),
+ new: func() runtime.Object { return obj.DeepCopyObject() },
+ },
}
}
-type validatorForType struct {
- validator CustomValidator
- object runtime.Object
+type validatorForType[T runtime.Object] struct {
+ validator Validator[T]
decoder Decoder
+ new func() T
}
// Handle handles admission requests.
-func (h *validatorForType) Handle(ctx context.Context, req Request) Response {
+func (h *validatorForType[T]) Handle(ctx context.Context, req Request) Response {
if h.decoder == nil {
panic("decoder should never be nil")
}
if h.validator == nil {
panic("validator should never be nil")
}
- if h.object == nil {
- panic("object should never be nil")
- }
ctx = NewContextWithRequest(ctx, req)
- // Get the object in the request
- obj := h.object.DeepCopyObject()
+ obj := h.new()
var err error
var warnings []string
@@ -93,7 +119,7 @@ func (h *validatorForType) Handle(ctx context.Context, req Request) Response {
warnings, err = h.validator.ValidateCreate(ctx, obj)
case v1.Update:
- oldObj := obj.DeepCopyObject()
+ oldObj := h.new()
if err := h.decoder.DecodeRaw(req.Object, obj); err != nil {
return Errored(http.StatusBadRequest, err)
}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/alias.go b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/alias.go
index 2882e7bab367..518d52f36497 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/alias.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/alias.go
@@ -24,10 +24,14 @@ import (
// define some aliases for common bits of the webhook functionality
// CustomDefaulter defines functions for setting defaults on resources.
-type CustomDefaulter = admission.CustomDefaulter
+//
+// Deprecated: Use admission.Defaulter instead.
+type CustomDefaulter = admission.CustomDefaulter //nolint:staticcheck
// CustomValidator defines functions for validating an operation.
-type CustomValidator = admission.CustomValidator
+//
+// Deprecated: Use admission.Validator instead.
+type CustomValidator = admission.CustomValidator //nolint:staticcheck
// AdmissionRequest defines the input for an admission handler.
// It contains information to identify the object in
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/conversion/conversion.go b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/conversion/conversion.go
index a26fa348bb70..3f98fb7ba786 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/conversion/conversion.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/conversion/conversion.go
@@ -43,14 +43,15 @@ var (
log = logf.Log.WithName("conversion-webhook")
)
-func NewWebhookHandler(scheme *runtime.Scheme) http.Handler {
- return &webhook{scheme: scheme, decoder: NewDecoder(scheme)}
+func NewWebhookHandler(scheme *runtime.Scheme, registry Registry) http.Handler {
+ return &webhook{scheme: scheme, decoder: NewDecoder(scheme), registry: registry}
}
// webhook implements a CRD conversion webhook HTTP handler.
type webhook struct {
- scheme *runtime.Scheme
- decoder *Decoder
+ scheme *runtime.Scheme
+ decoder *Decoder
+ registry Registry
}
// ensure Webhook implements http.Handler
@@ -119,7 +120,7 @@ func (wh *webhook) handleConvertRequest(ctx context.Context, req *apix.Conversio
if err != nil {
return nil, err
}
- err = wh.convertObject(src, dst)
+ err = wh.convertObject(ctx, src, dst)
if err != nil {
return nil, err
}
@@ -137,7 +138,7 @@ func (wh *webhook) handleConvertRequest(ctx context.Context, req *apix.Conversio
// convertObject will convert given a src object to dst object.
// Note(droot): couldn't find a way to reduce the cyclomatic complexity under 10
// without compromising readability, so disabling gocyclo linter
-func (wh *webhook) convertObject(src, dst runtime.Object) error {
+func (wh *webhook) convertObject(ctx context.Context, src, dst runtime.Object) error {
srcGVK := src.GetObjectKind().GroupVersionKind()
dstGVK := dst.GetObjectKind().GroupVersionKind()
@@ -149,6 +150,10 @@ func (wh *webhook) convertObject(src, dst runtime.Object) error {
return fmt.Errorf("conversion is not allowed between same type %T", src)
}
+ if converter, ok := wh.registry.GetConverter(srcGVK.GroupKind()); ok {
+ return converter.ConvertObject(ctx, src, dst)
+ }
+
srcIsHub, dstIsHub := isHub(src), isHub(dst)
srcIsConvertible, dstIsConvertible := isConvertible(src), isConvertible(dst)
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/conversion/conversion_hubspoke.go b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/conversion/conversion_hubspoke.go
new file mode 100644
index 000000000000..b33af92ff49d
--- /dev/null
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/conversion/conversion_hubspoke.go
@@ -0,0 +1,173 @@
+/*
+Copyright 2025 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package conversion
+
+import (
+ "context"
+ "fmt"
+ "slices"
+ "strings"
+
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/util/sets"
+ "sigs.k8s.io/controller-runtime/pkg/client"
+ "sigs.k8s.io/controller-runtime/pkg/client/apiutil"
+)
+
+func NewHubSpokeConverter[hubObject runtime.Object](hub hubObject, spokeConverter ...SpokeConverter[hubObject]) func(scheme *runtime.Scheme) (Converter, error) {
+ return func(scheme *runtime.Scheme) (Converter, error) {
+ hubGVK, err := apiutil.GVKForObject(hub, scheme)
+ if err != nil {
+ return nil, fmt.Errorf("failed to create hub spoke converter: failed to get GroupVersionKind for hub: %w", err)
+ }
+ allGVKs, err := objectGVKs(scheme, hub)
+ if err != nil {
+ return nil, fmt.Errorf("failed to create hub spoke converter for %s: %w", hubGVK.Kind, err)
+ }
+ spokeVersions := sets.New[string]()
+ for _, gvk := range allGVKs {
+ if gvk != hubGVK {
+ spokeVersions.Insert(gvk.Version)
+ }
+ }
+
+ c := &hubSpokeConverter[hubObject]{
+ scheme: scheme,
+ hubGVK: hubGVK,
+ spokeConverterByGVK: map[schema.GroupVersionKind]SpokeConverter[hubObject]{},
+ }
+
+ spokeConverterVersions := sets.New[string]()
+ for _, sc := range spokeConverter {
+ spokeGVK, err := apiutil.GVKForObject(sc.GetSpoke(), scheme)
+ if err != nil {
+ return nil, fmt.Errorf("failed to create hub spoke converter for %s: "+
+ "failed to get GroupVersionKind for spoke converter: %w",
+ hubGVK.Kind, err)
+ }
+ if hubGVK.GroupKind() != spokeGVK.GroupKind() {
+ return nil, fmt.Errorf("failed to create hub spoke converter for %s: "+
+ "spoke converter GroupKind %s does not match hub GroupKind %s",
+ hubGVK.Kind, spokeGVK.GroupKind(), hubGVK.GroupKind())
+ }
+
+ if _, ok := c.spokeConverterByGVK[spokeGVK]; ok {
+ return nil, fmt.Errorf("failed to create hub spoke converter for %s: "+
+ "duplicate spoke converter for version %s",
+ hubGVK.Kind, spokeGVK.Version)
+ }
+ c.spokeConverterByGVK[spokeGVK] = sc
+ spokeConverterVersions.Insert(spokeGVK.Version)
+ }
+
+ if !spokeConverterVersions.Equal(spokeVersions) {
+ return nil, fmt.Errorf("failed to create hub spoke converter for %s: "+
+ "expected spoke converter for %s got spoke converter for %s",
+ hubGVK.Kind, sortAndJoin(spokeVersions), sortAndJoin(spokeConverterVersions))
+ }
+
+ return c, nil
+ }
+}
+
+func sortAndJoin(set sets.Set[string]) string {
+ list := set.UnsortedList()
+ slices.Sort(list)
+ return strings.Join(list, ",")
+}
+
+type hubSpokeConverter[hubObject runtime.Object] struct {
+ scheme *runtime.Scheme
+ hubGVK schema.GroupVersionKind
+ spokeConverterByGVK map[schema.GroupVersionKind]SpokeConverter[hubObject]
+}
+
+func (c hubSpokeConverter[hubObject]) ConvertObject(ctx context.Context, src, dst runtime.Object) error {
+ srcGVK := src.GetObjectKind().GroupVersionKind()
+ dstGVK := dst.GetObjectKind().GroupVersionKind()
+
+ if srcGVK.GroupKind() != dstGVK.GroupKind() {
+ return fmt.Errorf("src %T and dst %T does not belong to same API Group", src, dst)
+ }
+
+ if srcGVK == dstGVK {
+ return fmt.Errorf("conversion is not allowed between same type %T", src)
+ }
+
+ srcIsHub := c.hubGVK == srcGVK
+ dstIsHub := c.hubGVK == dstGVK
+ _, srcIsConvertible := c.spokeConverterByGVK[srcGVK]
+ _, dstIsConvertible := c.spokeConverterByGVK[dstGVK]
+
+ switch {
+ case srcIsHub && dstIsConvertible:
+ return c.spokeConverterByGVK[dstGVK].ConvertHubToSpoke(ctx, src.(hubObject), dst)
+ case dstIsHub && srcIsConvertible:
+ return c.spokeConverterByGVK[srcGVK].ConvertSpokeToHub(ctx, src, dst.(hubObject))
+ case srcIsConvertible && dstIsConvertible:
+ hub, err := c.scheme.New(c.hubGVK)
+ if err != nil {
+ return fmt.Errorf("failed to allocate an instance for GroupVersionKind %s: %w", c.hubGVK, err)
+ }
+ if err := c.spokeConverterByGVK[srcGVK].ConvertSpokeToHub(ctx, src, hub.(hubObject)); err != nil {
+ return fmt.Errorf("failed to convert spoke %s to hub %s : %w", srcGVK, c.hubGVK, err)
+ }
+ if err := c.spokeConverterByGVK[dstGVK].ConvertHubToSpoke(ctx, hub.(hubObject), dst); err != nil {
+ return fmt.Errorf("failed to convert hub %s to spoke %s : %w", c.hubGVK, dstGVK, err)
+ }
+ return nil
+ default:
+ return fmt.Errorf("failed to convert %s to %s: not convertible", srcGVK, dstGVK)
+ }
+}
+
+type SpokeConverter[hubObject runtime.Object] interface {
+ GetSpoke() runtime.Object
+ ConvertHubToSpoke(ctx context.Context, hub hubObject, spoke runtime.Object) error
+ ConvertSpokeToHub(ctx context.Context, spoke runtime.Object, hub hubObject) error
+}
+
+func NewSpokeConverter[hubObject, spokeObject client.Object](
+ spoke spokeObject,
+ convertHubToSpokeFunc func(ctx context.Context, src hubObject, dst spokeObject) error,
+ convertSpokeToHubFunc func(ctx context.Context, src spokeObject, dst hubObject) error,
+) SpokeConverter[hubObject] {
+ return &spokeConverter[hubObject, spokeObject]{
+ spoke: spoke,
+ convertSpokeToHubFunc: convertSpokeToHubFunc,
+ convertHubToSpokeFunc: convertHubToSpokeFunc,
+ }
+}
+
+type spokeConverter[hubObject, spokeObject runtime.Object] struct {
+ spoke spokeObject
+ convertHubToSpokeFunc func(ctx context.Context, src hubObject, dst spokeObject) error
+ convertSpokeToHubFunc func(ctx context.Context, src spokeObject, dst hubObject) error
+}
+
+func (c spokeConverter[hubObject, spokeObject]) GetSpoke() runtime.Object {
+ return c.spoke
+}
+
+func (c spokeConverter[hubObject, spokeObject]) ConvertHubToSpoke(ctx context.Context, hub hubObject, spoke runtime.Object) error {
+ return c.convertHubToSpokeFunc(ctx, hub, spoke.(spokeObject))
+}
+
+func (c spokeConverter[hubObject, spokeObject]) ConvertSpokeToHub(ctx context.Context, spoke runtime.Object, hub hubObject) error {
+ return c.convertSpokeToHubFunc(ctx, spoke.(spokeObject), hub)
+}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/conversion/conversion_registry.go b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/conversion/conversion_registry.go
new file mode 100644
index 000000000000..6e68b5ffa6e7
--- /dev/null
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/conversion/conversion_registry.go
@@ -0,0 +1,57 @@
+/*
+Copyright 2025 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package conversion
+
+import (
+ "context"
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+type Converter interface {
+ ConvertObject(ctx context.Context, src, dst runtime.Object) error
+}
+
+type Registry interface {
+ RegisterConverter(gk schema.GroupKind, converter Converter) error
+ GetConverter(gk schema.GroupKind) (Converter, bool)
+}
+
+type registry struct {
+ converterByGK map[schema.GroupKind]Converter
+}
+
+func NewRegistry() Registry {
+ return registry{
+ converterByGK: map[schema.GroupKind]Converter{},
+ }
+}
+func (r registry) RegisterConverter(gk schema.GroupKind, converter Converter) error {
+ if _, ok := r.converterByGK[gk]; ok {
+ return fmt.Errorf("failed to register Converter for GroupKind %s: converter already registered", gk)
+ }
+
+ r.converterByGK[gk] = converter
+ return nil
+}
+
+func (r registry) GetConverter(gk schema.GroupKind) (Converter, bool) {
+ c, ok := r.converterByGK[gk]
+ return c, ok
+}
diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/internal/metrics/metrics.go b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/internal/metrics/metrics.go
index f1e6ce68f5e0..a8ff40095411 100644
--- a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/internal/metrics/metrics.go
+++ b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/internal/metrics/metrics.go
@@ -33,6 +33,7 @@ var (
prometheus.HistogramOpts{
Name: "controller_runtime_webhook_latency_seconds",
Help: "Histogram of the latency of processing admission requests",
+ Buckets: prometheus.ExponentialBuckets(10e-9, 10, 12),
NativeHistogramBucketFactor: 1.1,
NativeHistogramMaxBucketNumber: 100,
NativeHistogramMinResetDuration: 1 * time.Hour,
diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v6/fieldpath/serialize-pe.go b/vendor/sigs.k8s.io/structured-merge-diff/v6/fieldpath/serialize-pe.go
index f4b00c2ee545..b2f62dc693af 100644
--- a/vendor/sigs.k8s.io/structured-merge-diff/v6/fieldpath/serialize-pe.go
+++ b/vendor/sigs.k8s.io/structured-merge-diff/v6/fieldpath/serialize-pe.go
@@ -97,6 +97,14 @@ func DeserializePathElement(s string) (PathElement, error) {
if err != nil {
return PathElement{}, err
}
+ // Lookahead validates that there is no unexpected trailing data.
+ // io.EOF is a successful termination indicator; all other errors or trailing data fail.
+ if iter.WhatIsNext(); iter.Error != io.EOF {
+ if iter.Error == nil {
+ iter.ReportError("managedFields parsing", "unexpected trailing data after JSON object")
+ }
+ return PathElement{}, iter.Error
+ }
return PathElement{Value: &v}, nil
case peKeySepBytes[0]:
iter := readPool.BorrowIterator(b)
@@ -112,8 +120,16 @@ func DeserializePathElement(s string) (PathElement, error) {
fields = append(fields, value.Field{Name: key, Value: v})
return true
})
+ // Lookahead validates that there is no unexpected trailing data.
+ // io.EOF is a successful termination indicator; all other errors or trailing data fail.
+ if iter.WhatIsNext(); iter.Error != io.EOF {
+ if iter.Error == nil {
+ iter.ReportError("managedFields parsing", "unexpected trailing data after JSON object")
+ }
+ return PathElement{}, iter.Error
+ }
fields.Sort()
- return PathElement{Key: &fields}, iter.Error
+ return PathElement{Key: &fields}, nil
case peIndexSepBytes[0]:
i, err := strconv.Atoi(s[2:])
if err != nil {
diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v6/fieldpath/serialize.go b/vendor/sigs.k8s.io/structured-merge-diff/v6/fieldpath/serialize.go
index b992b93c5fab..6701f17ee9ea 100644
--- a/vendor/sigs.k8s.io/structured-merge-diff/v6/fieldpath/serialize.go
+++ b/vendor/sigs.k8s.io/structured-merge-diff/v6/fieldpath/serialize.go
@@ -175,6 +175,17 @@ func (s *Set) FromJSON(r io.Reader) error {
} else {
*s = *found
}
+ if iter.Error != nil {
+ return iter.Error
+ }
+ if iter.WhatIsNext(); iter.Error == nil {
+ // Piggy back on scanner aware error reporting here.
+ iter.ReportError("managedFields parsing", "unexpected trailing data after JSON object")
+ return iter.Error
+ }
+ if iter.Error == io.EOF {
+ return nil
+ }
return iter.Error
}
diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/elements.go b/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/elements.go
index c8138a6548a5..4c0e30b257fb 100644
--- a/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/elements.go
+++ b/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/elements.go
@@ -62,6 +62,10 @@ type TypeRef struct {
// If this field is nil, then it has no effect.
// See `Map` and `List` for more information about `ElementRelationship`
ElementRelationship *ElementRelationship `yaml:"elementRelationship,omitempty"`
+
+ // Nullable indicates that an explicit null is a valid value,
+ // corresponding to OpenAPI's `nullable: true`.
+ Nullable bool `yaml:"nullable,omitempty"`
}
// Atom represents the smallest possible pieces of the type system.
diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/equals.go b/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/equals.go
index b668eff8339d..e1fa5c95ddfe 100644
--- a/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/equals.go
+++ b/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/equals.go
@@ -55,6 +55,9 @@ func (a *TypeRef) Equals(b *TypeRef) bool {
if a.ElementRelationship != b.ElementRelationship {
return false
}
+ if a.Nullable != b.Nullable {
+ return false
+ }
return a.Inlined.Equals(&b.Inlined)
}
diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/schemaschema.go b/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/schemaschema.go
index 6eb6c36df30c..4eb367b6579b 100644
--- a/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/schemaschema.go
+++ b/vendor/sigs.k8s.io/structured-merge-diff/v6/schema/schemaschema.go
@@ -69,6 +69,9 @@ var SchemaSchemaYAML = `types:
- name: elementRelationship
type:
scalar: string
+ - name: nullable
+ type:
+ scalar: boolean
- name: scalar
scalar: string
- name: map
diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v6/typed/remove.go b/vendor/sigs.k8s.io/structured-merge-diff/v6/typed/remove.go
index 0db1734f941b..78ba6f50d0ac 100644
--- a/vendor/sigs.k8s.io/structured-merge-diff/v6/typed/remove.go
+++ b/vendor/sigs.k8s.io/structured-merge-diff/v6/typed/remove.go
@@ -75,7 +75,6 @@ func (w *removingWalker) doList(t *schema.List) (errs ValidationErrors) {
}
var newItems []interface{}
- hadMatches := false
iter := l.RangeUsing(w.allocator)
defer w.allocator.Free(iter)
for iter.Next() {
@@ -99,26 +98,12 @@ func (w *removingWalker) doList(t *schema.List) (errs ValidationErrors) {
continue
}
if isPrefixMatch {
- // Removing nested items within this list item and preserve if it becomes empty
- hadMatches = true
- wasMap := item.IsMap()
- wasList := item.IsList()
item = removeItemsWithSchema(item, w.toRemove.WithPrefix(pe), w.schema, t.ElementType, w.shouldExtract)
- // If item returned null but we're removing items within the structure(not the item itself),
- // preserve the empty container structure
- if item.IsNull() && !w.shouldExtract {
- if wasMap {
- item = value.NewValueInterface(map[string]interface{}{})
- } else if wasList {
- item = value.NewValueInterface([]interface{}{})
- }
- }
}
newItems = append(newItems, item.Unstructured())
}
}
- // Preserve empty lists (non-nil) instead of converting to null when items were matched and removed
- if len(newItems) > 0 || (hadMatches && !w.shouldExtract) {
+ if len(newItems) > 0 {
w.out = newItems
}
return nil
@@ -156,7 +141,6 @@ func (w *removingWalker) doMap(t *schema.Map) ValidationErrors {
}
newMap := map[string]interface{}{}
- hadMatches := false
m.Iterate(func(k string, val value.Value) bool {
pe := fieldpath.PathElement{FieldName: &k}
path, _ := fieldpath.MakePath(pe)
@@ -174,19 +158,7 @@ func (w *removingWalker) doMap(t *schema.Map) ValidationErrors {
return true
}
if subset := w.toRemove.WithPrefix(pe); !subset.Empty() {
- hadMatches = true
- wasMap := val.IsMap()
- wasList := val.IsList()
val = removeItemsWithSchema(val, subset, w.schema, fieldType, w.shouldExtract)
- // If val returned null but we're removing items within the structure (not the field itself),
- // preserve the empty container structure
- if val.IsNull() && !w.shouldExtract {
- if wasMap {
- val = value.NewValueInterface(map[string]interface{}{})
- } else if wasList {
- val = value.NewValueInterface([]interface{}{})
- }
- }
} else {
// don't save values not on the path when we shouldExtract.
if w.shouldExtract {
@@ -196,8 +168,7 @@ func (w *removingWalker) doMap(t *schema.Map) ValidationErrors {
newMap[k] = val.Unstructured()
return true
})
- // Preserve empty maps (non-nil) instead of converting to null when items were matched and removed
- if len(newMap) > 0 || (hadMatches && !w.shouldExtract) {
+ if len(newMap) > 0 {
w.out = newMap
}
return nil
diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v6/value/reflectcache.go b/vendor/sigs.k8s.io/structured-merge-diff/v6/value/reflectcache.go
index 75b7085c3e6a..f4f4c2b44d03 100644
--- a/vendor/sigs.k8s.io/structured-merge-diff/v6/value/reflectcache.go
+++ b/vendor/sigs.k8s.io/structured-merge-diff/v6/value/reflectcache.go
@@ -39,14 +39,28 @@ type UnstructuredConverter interface {
ToUnstructured() interface{}
}
+// UnstructuredConverterWithError is implemented instead of UnstructuredConverter by types for which
+// some, but not all, values can be converted directly to unstructured. If a type implements both
+// UnstructuredConverter and UnstructuredConverterWithError, its UnstructuredConverterWithError
+// implementation takes precedence during conversion.
+type UnstructuredConverterWithError interface {
+ json.Marshaler // require that json.Marshaler is implemented
+
+ // ToUnstructured returns the unstructured representation, or a non-nil error if the value
+ // cannot be converted to unstructured.
+ ToUnstructuredWithError() (any, error)
+}
+
// TypeReflectCacheEntry keeps data gathered using reflection about how a type is converted to/from unstructured.
type TypeReflectCacheEntry struct {
- isJsonMarshaler bool
- ptrIsJsonMarshaler bool
- isJsonUnmarshaler bool
- ptrIsJsonUnmarshaler bool
- isStringConvertable bool
- ptrIsStringConvertable bool
+ isJsonMarshaler bool
+ ptrIsJsonMarshaler bool
+ isJsonUnmarshaler bool
+ ptrIsJsonUnmarshaler bool
+ isUnstructuredConverter bool
+ ptrIsUnstructuredConverter bool
+ isUnstructuredConverterWithError bool
+ ptrIsUnstructuredConverterWithError bool
structFields map[string]*FieldCacheEntry
orderedStructFields []*FieldCacheEntry
@@ -93,9 +107,10 @@ func (f *FieldCacheEntry) GetFrom(structVal reflect.Value) reflect.Value {
return structVal
}
-var marshalerType = reflect.TypeOf(new(json.Marshaler)).Elem()
-var unmarshalerType = reflect.TypeOf(new(json.Unmarshaler)).Elem()
-var unstructuredConvertableType = reflect.TypeOf(new(UnstructuredConverter)).Elem()
+var marshalerType = reflect.TypeFor[json.Marshaler]()
+var unmarshalerType = reflect.TypeFor[json.Unmarshaler]()
+var unstructuredConverterType = reflect.TypeFor[UnstructuredConverter]()
+var unstructuredConverterWithErrorType = reflect.TypeFor[UnstructuredConverterWithError]()
var defaultReflectCache = newReflectCache()
// TypeReflectEntryOf returns the TypeReflectCacheEntry of the provided reflect.Type.
@@ -122,11 +137,13 @@ func typeReflectEntryOf(cm reflectCacheMap, t reflect.Type, updates reflectCache
return record
}
typeEntry := &TypeReflectCacheEntry{
- isJsonMarshaler: t.Implements(marshalerType),
- ptrIsJsonMarshaler: reflect.PtrTo(t).Implements(marshalerType),
- isJsonUnmarshaler: reflect.PtrTo(t).Implements(unmarshalerType),
- isStringConvertable: t.Implements(unstructuredConvertableType),
- ptrIsStringConvertable: reflect.PtrTo(t).Implements(unstructuredConvertableType),
+ isJsonMarshaler: t.Implements(marshalerType),
+ ptrIsJsonMarshaler: reflect.PointerTo(t).Implements(marshalerType),
+ isJsonUnmarshaler: reflect.PointerTo(t).Implements(unmarshalerType),
+ isUnstructuredConverter: t.Implements(unstructuredConverterType),
+ ptrIsUnstructuredConverter: reflect.PointerTo(t).Implements(unstructuredConverterType),
+ isUnstructuredConverterWithError: t.Implements(unstructuredConverterWithErrorType),
+ ptrIsUnstructuredConverterWithError: reflect.PointerTo(t).Implements(unstructuredConverterWithErrorType),
}
if t.Kind() == reflect.Struct {
fieldEntries := map[string]*FieldCacheEntry{}
@@ -190,7 +207,7 @@ func (e TypeReflectCacheEntry) OrderedFields() []*FieldCacheEntry {
// CanConvertToUnstructured returns true if this TypeReflectCacheEntry can convert values of its type to unstructured.
func (e TypeReflectCacheEntry) CanConvertToUnstructured() bool {
- return e.isJsonMarshaler || e.ptrIsJsonMarshaler || e.isStringConvertable || e.ptrIsStringConvertable
+ return e.isJsonMarshaler || e.ptrIsJsonMarshaler || e.isUnstructuredConverter || e.ptrIsUnstructuredConverter || e.isUnstructuredConverterWithError || e.ptrIsUnstructuredConverterWithError
}
// ToUnstructured converts the provided value to unstructured and returns it.
@@ -206,7 +223,7 @@ func (e TypeReflectCacheEntry) ToUnstructured(sv reflect.Value) (interface{}, er
// Check if the object has a custom string converter and use it if available, since it is much more efficient
// than round tripping through json.
if converter, ok := e.getUnstructuredConverter(sv); ok {
- return converter.ToUnstructured(), nil
+ return converter.ToUnstructuredWithError()
}
// Check if the object has a custom JSON marshaller/unmarshaller.
if marshaler, ok := e.getJsonMarshaler(sv); ok {
@@ -318,16 +335,26 @@ func (e TypeReflectCacheEntry) getJsonUnmarshaler(v reflect.Value) (json.Unmarsh
return v.Addr().Interface().(json.Unmarshaler), true
}
-func (e TypeReflectCacheEntry) getUnstructuredConverter(v reflect.Value) (UnstructuredConverter, bool) {
- if e.isStringConvertable {
- return v.Interface().(UnstructuredConverter), true
- }
- if e.ptrIsStringConvertable {
+type unstructuredConverterWithNilError struct {
+ UnstructuredConverter
+}
+
+func (c unstructuredConverterWithNilError) ToUnstructuredWithError() (any, error) {
+ return c.UnstructuredConverter.ToUnstructured(), nil
+}
+
+func (e TypeReflectCacheEntry) getUnstructuredConverter(v reflect.Value) (UnstructuredConverterWithError, bool) {
+ switch {
+ case e.isUnstructuredConverterWithError:
+ return v.Interface().(UnstructuredConverterWithError), true
+ case e.ptrIsUnstructuredConverterWithError && v.CanAddr():
// Check pointer receivers if v is not a pointer
- if v.CanAddr() {
- v = v.Addr()
- return v.Interface().(UnstructuredConverter), true
- }
+ return v.Addr().Interface().(UnstructuredConverterWithError), true
+ case e.isUnstructuredConverter:
+ return unstructuredConverterWithNilError{v.Interface().(UnstructuredConverter)}, true
+ case e.ptrIsUnstructuredConverter && v.CanAddr():
+ // Check pointer receivers if v is not a pointer
+ return unstructuredConverterWithNilError{v.Addr().Interface().(UnstructuredConverter)}, true
}
return nil, false
}
diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v6/value/value.go b/vendor/sigs.k8s.io/structured-merge-diff/v6/value/value.go
index 140b99038e78..167848ebeb8c 100644
--- a/vendor/sigs.k8s.io/structured-merge-diff/v6/value/value.go
+++ b/vendor/sigs.k8s.io/structured-merge-diff/v6/value/value.go
@@ -118,6 +118,11 @@ func readJSONIter(iter *jsoniter.Iterator) (Value, error) {
if iter.Error != nil && iter.Error != io.EOF {
return nil, iter.Error
}
+ if iter.WhatIsNext(); iter.Error == nil {
+ // Piggy back on scanner aware error reporting here.
+ iter.ReportError("managedFields parsing", "unexpected trailing data after JSON object")
+ return nil, iter.Error
+ }
return NewValueInterface(v), nil
}