From f8fc31ecd2780f4ec7ea27e765b92de9034d28ad Mon Sep 17 00:00:00 2001 From: wenyingd Date: Tue, 23 Aug 2022 10:33:05 +0000 Subject: [PATCH] [ExternalNode] Implement support bundle collection on Controller side Add internal objects to sync the suport bundle request from Controller to Agent, and report status from Agent to Controller. Implement support bundle collection on Controlelr side. Signed-off-by: wenyingd --- .../charts/antrea/conf/antrea-controller.conf | 3 + .../antrea/crds/supportbundlecollection.yaml | 2 +- .../templates/controller/clusterrole.yaml | 14 + .../webhooks/validating/crdvalidator.yaml | 17 +- build/yamls/antrea-aks.yml | 38 +- build/yamls/antrea-crds.yml | 2 +- build/yamls/antrea-eks.yml | 38 +- build/yamls/antrea-gke.yml | 38 +- build/yamls/antrea-ipsec.yml | 38 +- build/yamls/antrea.yml | 38 +- .../support-bundle-collection-rbac.yml | 27 + cmd/antrea-controller/controller.go | 22 +- docs/feature-gates.md | 51 +- pkg/apis/controlplane/register.go | 3 + pkg/apis/controlplane/types.go | 69 + pkg/apis/controlplane/v1beta2/conversion.go | 2 +- pkg/apis/controlplane/v1beta2/generated.pb.go | 4240 ++++++++++++----- pkg/apis/controlplane/v1beta2/generated.proto | 63 + pkg/apis/controlplane/v1beta2/helper.go | 4 +- pkg/apis/controlplane/v1beta2/register.go | 3 + pkg/apis/controlplane/v1beta2/types.go | 62 + .../v1beta2/zz_generated.conversion.go | 244 + .../v1beta2/zz_generated.deepcopy.go | 162 + .../controlplane/zz_generated.deepcopy.go | 162 + pkg/apis/crd/v1alpha1/types.go | 7 +- pkg/apiserver/apiserver.go | 17 +- pkg/apiserver/openapi/zz_generated.openapi.go | 915 ++-- .../supportbundlecollection/rest.go | 103 + .../supportbundlecollection/rest_test.go | 211 + .../v1beta2/controlplane_client.go | 5 + .../v1beta2/fake/fake_controlplane_client.go | 6 +- .../fake/fake_supportbundlecollection.go | 74 + .../v1beta2/generated_expansion.go | 4 +- .../v1beta2/supportbundlecollection.go | 96 + .../supportbundlecollection/controller.go | 679 +++ .../controller_test.go | 1481 ++++++ .../store/collection.go | 143 + .../supportbundlecollection/validate.go | 89 + .../supportbundlecollection/validate_test.go | 245 + .../types/support_bundle_collection.go | 35 + pkg/features/antrea_features.go | 48 +- 41 files changed, 7871 insertions(+), 1629 deletions(-) create mode 100644 build/yamls/externalnode/support-bundle-collection-rbac.yml create mode 100644 pkg/apiserver/registry/controlplane/supportbundlecollection/rest.go create mode 100644 pkg/apiserver/registry/controlplane/supportbundlecollection/rest_test.go create mode 100644 pkg/client/clientset/versioned/typed/controlplane/v1beta2/fake/fake_supportbundlecollection.go create mode 100644 pkg/client/clientset/versioned/typed/controlplane/v1beta2/supportbundlecollection.go create mode 100644 pkg/controller/supportbundlecollection/controller.go create mode 100644 pkg/controller/supportbundlecollection/controller_test.go create mode 100644 pkg/controller/supportbundlecollection/store/collection.go create mode 100644 pkg/controller/supportbundlecollection/validate.go create mode 100644 pkg/controller/supportbundlecollection/validate_test.go create mode 100644 pkg/controller/types/support_bundle_collection.go diff --git a/build/charts/antrea/conf/antrea-controller.conf b/build/charts/antrea/conf/antrea-controller.conf index a2ebef6c5a7..0cbb0dc0958 100644 --- a/build/charts/antrea/conf/antrea-controller.conf +++ b/build/charts/antrea/conf/antrea-controller.conf @@ -40,6 +40,9 @@ featureGates: # Enable managing ExternalNode for unmanaged VM/BM. {{- include "featureGate" (dict "featureGates" .Values.featureGates "name" "ExternalNode" "default" false) }} +# Enable collecting support bundle files with SupportBundleCollection CRD. +{{- include "featureGate" (dict "featureGates" .Values.featureGates "name" "SupportBundleCollection" "default" false) }} + # The port for the antrea-controller APIServer to serve on. # Note that if it's set to another value, the `containerPort` of the `api` port of the # `antrea-controller` container must be set to the same value. diff --git a/build/charts/antrea/crds/supportbundlecollection.yaml b/build/charts/antrea/crds/supportbundlecollection.yaml index a700e1a8f6f..0487cfd4925 100644 --- a/build/charts/antrea/crds/supportbundlecollection.yaml +++ b/build/charts/antrea/crds/supportbundlecollection.yaml @@ -105,7 +105,7 @@ spec: properties: authType: type: string - enum: ["BearerToken", "APIKey"] + enum: ["BearerToken", "APIKey", "BasicAuthentication"] authSecret: type: object properties: diff --git a/build/charts/antrea/templates/controller/clusterrole.yaml b/build/charts/antrea/templates/controller/clusterrole.yaml index e94d2b5dbdd..40b4d2c903e 100644 --- a/build/charts/antrea/templates/controller/clusterrole.yaml +++ b/build/charts/antrea/templates/controller/clusterrole.yaml @@ -290,3 +290,17 @@ rules: - get - list - watch + - apiGroups: + - crd.antrea.io + resources: + - supportbundlecollections + verbs: + - get + - watch + - list + - apiGroups: + - crd.antrea.io + resources: + - supportbundlecollections/status + verbs: + - update diff --git a/build/charts/antrea/templates/webhooks/validating/crdvalidator.yaml b/build/charts/antrea/templates/webhooks/validating/crdvalidator.yaml index 184fa7e8413..36058cd7c67 100644 --- a/build/charts/antrea/templates/webhooks/validating/crdvalidator.yaml +++ b/build/charts/antrea/templates/webhooks/validating/crdvalidator.yaml @@ -124,4 +124,19 @@ webhooks: scope: "Cluster" admissionReviewVersions: ["v1", "v1beta1"] sideEffects: None - timeoutSeconds: 5 \ No newline at end of file + timeoutSeconds: 5 + - name: "supportbundlecollectionvalidator.antrea.io" + clientConfig: + service: + name: "antrea" + namespace: {{ .Release.Namespace }} + path: "/validate/supportbundlecollection" + rules: + - operations: ["UPDATE", "DELETE"] + apiGroups: ["crd.antrea.io"] + apiVersions: ["v1alpha1"] + resources: ["supportbundlecollections"] + scope: "Cluster" + admissionReviewVersions: ["v1", "v1beta1"] + sideEffects: None + timeoutSeconds: 5 diff --git a/build/yamls/antrea-aks.yml b/build/yamls/antrea-aks.yml index bb4a22bd8b5..0ffb4036185 100644 --- a/build/yamls/antrea-aks.yml +++ b/build/yamls/antrea-aks.yml @@ -2155,7 +2155,7 @@ spec: properties: authType: type: string - enum: ["BearerToken", "APIKey"] + enum: ["BearerToken", "APIKey", "BasicAuthentication"] authSecret: type: object properties: @@ -3208,6 +3208,9 @@ data: # Enable managing ExternalNode for unmanaged VM/BM. # ExternalNode: false + # Enable collecting support bundle files with SupportBundleCollection CRD. + # SupportBundleCollection: false + # The port for the antrea-controller APIServer to serve on. # Note that if it's set to another value, the `containerPort` of the `api` port of the # `antrea-controller` container must be set to the same value. @@ -3971,6 +3974,20 @@ rules: - get - list - watch + - apiGroups: + - crd.antrea.io + resources: + - supportbundlecollections + verbs: + - get + - watch + - list + - apiGroups: + - crd.antrea.io + resources: + - supportbundlecollections/status + verbs: + - update --- # Source: antrea/templates/crds-rbac/clusterroles.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -4148,7 +4165,7 @@ spec: kubectl.kubernetes.io/default-container: antrea-agent # Automatically restart Pods with a RollingUpdate if the ConfigMap changes # See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments - checksum/config: ec59529f4b774af0f12a30c31eb48e5494ac6371ce624e872d1e6b76b797325e + checksum/config: 5c1b8a2aad154a1c1e44b30b390916ffdd68362b348228f93a3d797923a36f85 labels: app: antrea component: antrea-agent @@ -4389,7 +4406,7 @@ spec: annotations: # Automatically restart Pod if the ConfigMap changes # See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments - checksum/config: ec59529f4b774af0f12a30c31eb48e5494ac6371ce624e872d1e6b76b797325e + checksum/config: 5c1b8a2aad154a1c1e44b30b390916ffdd68362b348228f93a3d797923a36f85 labels: app: antrea component: antrea-controller @@ -4705,3 +4722,18 @@ webhooks: admissionReviewVersions: ["v1", "v1beta1"] sideEffects: None timeoutSeconds: 5 + - name: "supportbundlecollectionvalidator.antrea.io" + clientConfig: + service: + name: "antrea" + namespace: kube-system + path: "/validate/supportbundlecollection" + rules: + - operations: ["UPDATE", "DELETE"] + apiGroups: ["crd.antrea.io"] + apiVersions: ["v1alpha1"] + resources: ["supportbundlecollections"] + scope: "Cluster" + admissionReviewVersions: ["v1", "v1beta1"] + sideEffects: None + timeoutSeconds: 5 diff --git a/build/yamls/antrea-crds.yml b/build/yamls/antrea-crds.yml index cf54533a4d5..9f0756926e2 100644 --- a/build/yamls/antrea-crds.yml +++ b/build/yamls/antrea-crds.yml @@ -2134,7 +2134,7 @@ spec: properties: authType: type: string - enum: ["BearerToken", "APIKey"] + enum: ["BearerToken", "APIKey", "BasicAuthentication"] authSecret: type: object properties: diff --git a/build/yamls/antrea-eks.yml b/build/yamls/antrea-eks.yml index 16a52ce7846..c3e76de068b 100644 --- a/build/yamls/antrea-eks.yml +++ b/build/yamls/antrea-eks.yml @@ -2155,7 +2155,7 @@ spec: properties: authType: type: string - enum: ["BearerToken", "APIKey"] + enum: ["BearerToken", "APIKey", "BasicAuthentication"] authSecret: type: object properties: @@ -3208,6 +3208,9 @@ data: # Enable managing ExternalNode for unmanaged VM/BM. # ExternalNode: false + # Enable collecting support bundle files with SupportBundleCollection CRD. + # SupportBundleCollection: false + # The port for the antrea-controller APIServer to serve on. # Note that if it's set to another value, the `containerPort` of the `api` port of the # `antrea-controller` container must be set to the same value. @@ -3971,6 +3974,20 @@ rules: - get - list - watch + - apiGroups: + - crd.antrea.io + resources: + - supportbundlecollections + verbs: + - get + - watch + - list + - apiGroups: + - crd.antrea.io + resources: + - supportbundlecollections/status + verbs: + - update --- # Source: antrea/templates/crds-rbac/clusterroles.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -4148,7 +4165,7 @@ spec: kubectl.kubernetes.io/default-container: antrea-agent # Automatically restart Pods with a RollingUpdate if the ConfigMap changes # See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments - checksum/config: ec59529f4b774af0f12a30c31eb48e5494ac6371ce624e872d1e6b76b797325e + checksum/config: 5c1b8a2aad154a1c1e44b30b390916ffdd68362b348228f93a3d797923a36f85 labels: app: antrea component: antrea-agent @@ -4391,7 +4408,7 @@ spec: annotations: # Automatically restart Pod if the ConfigMap changes # See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments - checksum/config: ec59529f4b774af0f12a30c31eb48e5494ac6371ce624e872d1e6b76b797325e + checksum/config: 5c1b8a2aad154a1c1e44b30b390916ffdd68362b348228f93a3d797923a36f85 labels: app: antrea component: antrea-controller @@ -4707,3 +4724,18 @@ webhooks: admissionReviewVersions: ["v1", "v1beta1"] sideEffects: None timeoutSeconds: 5 + - name: "supportbundlecollectionvalidator.antrea.io" + clientConfig: + service: + name: "antrea" + namespace: kube-system + path: "/validate/supportbundlecollection" + rules: + - operations: ["UPDATE", "DELETE"] + apiGroups: ["crd.antrea.io"] + apiVersions: ["v1alpha1"] + resources: ["supportbundlecollections"] + scope: "Cluster" + admissionReviewVersions: ["v1", "v1beta1"] + sideEffects: None + timeoutSeconds: 5 diff --git a/build/yamls/antrea-gke.yml b/build/yamls/antrea-gke.yml index f44a4eca97d..0450e872495 100644 --- a/build/yamls/antrea-gke.yml +++ b/build/yamls/antrea-gke.yml @@ -2155,7 +2155,7 @@ spec: properties: authType: type: string - enum: ["BearerToken", "APIKey"] + enum: ["BearerToken", "APIKey", "BasicAuthentication"] authSecret: type: object properties: @@ -3208,6 +3208,9 @@ data: # Enable managing ExternalNode for unmanaged VM/BM. # ExternalNode: false + # Enable collecting support bundle files with SupportBundleCollection CRD. + # SupportBundleCollection: false + # The port for the antrea-controller APIServer to serve on. # Note that if it's set to another value, the `containerPort` of the `api` port of the # `antrea-controller` container must be set to the same value. @@ -3971,6 +3974,20 @@ rules: - get - list - watch + - apiGroups: + - crd.antrea.io + resources: + - supportbundlecollections + verbs: + - get + - watch + - list + - apiGroups: + - crd.antrea.io + resources: + - supportbundlecollections/status + verbs: + - update --- # Source: antrea/templates/crds-rbac/clusterroles.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -4148,7 +4165,7 @@ spec: kubectl.kubernetes.io/default-container: antrea-agent # Automatically restart Pods with a RollingUpdate if the ConfigMap changes # See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments - checksum/config: ae585cead46246e4d15fa336e081caaa51d432909dfd21a22720a1c37b2e37e9 + checksum/config: 3c4f8d1990f152d15b232ce7d0b7f04d69dd366e4d8cbec47a8f2cfe0ba091f8 labels: app: antrea component: antrea-agent @@ -4388,7 +4405,7 @@ spec: annotations: # Automatically restart Pod if the ConfigMap changes # See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments - checksum/config: ae585cead46246e4d15fa336e081caaa51d432909dfd21a22720a1c37b2e37e9 + checksum/config: 3c4f8d1990f152d15b232ce7d0b7f04d69dd366e4d8cbec47a8f2cfe0ba091f8 labels: app: antrea component: antrea-controller @@ -4704,3 +4721,18 @@ webhooks: admissionReviewVersions: ["v1", "v1beta1"] sideEffects: None timeoutSeconds: 5 + - name: "supportbundlecollectionvalidator.antrea.io" + clientConfig: + service: + name: "antrea" + namespace: kube-system + path: "/validate/supportbundlecollection" + rules: + - operations: ["UPDATE", "DELETE"] + apiGroups: ["crd.antrea.io"] + apiVersions: ["v1alpha1"] + resources: ["supportbundlecollections"] + scope: "Cluster" + admissionReviewVersions: ["v1", "v1beta1"] + sideEffects: None + timeoutSeconds: 5 diff --git a/build/yamls/antrea-ipsec.yml b/build/yamls/antrea-ipsec.yml index 1cf044549fc..00b8095c5cc 100644 --- a/build/yamls/antrea-ipsec.yml +++ b/build/yamls/antrea-ipsec.yml @@ -2155,7 +2155,7 @@ spec: properties: authType: type: string - enum: ["BearerToken", "APIKey"] + enum: ["BearerToken", "APIKey", "BasicAuthentication"] authSecret: type: object properties: @@ -3221,6 +3221,9 @@ data: # Enable managing ExternalNode for unmanaged VM/BM. # ExternalNode: false + # Enable collecting support bundle files with SupportBundleCollection CRD. + # SupportBundleCollection: false + # The port for the antrea-controller APIServer to serve on. # Note that if it's set to another value, the `containerPort` of the `api` port of the # `antrea-controller` container must be set to the same value. @@ -3984,6 +3987,20 @@ rules: - get - list - watch + - apiGroups: + - crd.antrea.io + resources: + - supportbundlecollections + verbs: + - get + - watch + - list + - apiGroups: + - crd.antrea.io + resources: + - supportbundlecollections/status + verbs: + - update --- # Source: antrea/templates/crds-rbac/clusterroles.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -4161,7 +4178,7 @@ spec: kubectl.kubernetes.io/default-container: antrea-agent # Automatically restart Pods with a RollingUpdate if the ConfigMap changes # See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments - checksum/config: 8dc962ec6575509a540500f9cc1bd399118256fc0485c02705b129922b981c4e + checksum/config: c3f0a47584264e529f09e9bb25db4ab7c7c90aa27c37428ae0101c8fbe77d477 checksum/ipsec-secret: d0eb9c52d0cd4311b6d252a951126bf9bea27ec05590bed8a394f0f792dcb2a4 labels: app: antrea @@ -4447,7 +4464,7 @@ spec: annotations: # Automatically restart Pod if the ConfigMap changes # See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments - checksum/config: 8dc962ec6575509a540500f9cc1bd399118256fc0485c02705b129922b981c4e + checksum/config: c3f0a47584264e529f09e9bb25db4ab7c7c90aa27c37428ae0101c8fbe77d477 labels: app: antrea component: antrea-controller @@ -4763,3 +4780,18 @@ webhooks: admissionReviewVersions: ["v1", "v1beta1"] sideEffects: None timeoutSeconds: 5 + - name: "supportbundlecollectionvalidator.antrea.io" + clientConfig: + service: + name: "antrea" + namespace: kube-system + path: "/validate/supportbundlecollection" + rules: + - operations: ["UPDATE", "DELETE"] + apiGroups: ["crd.antrea.io"] + apiVersions: ["v1alpha1"] + resources: ["supportbundlecollections"] + scope: "Cluster" + admissionReviewVersions: ["v1", "v1beta1"] + sideEffects: None + timeoutSeconds: 5 diff --git a/build/yamls/antrea.yml b/build/yamls/antrea.yml index a3c85aa82a9..c7d594a77f0 100644 --- a/build/yamls/antrea.yml +++ b/build/yamls/antrea.yml @@ -2155,7 +2155,7 @@ spec: properties: authType: type: string - enum: ["BearerToken", "APIKey"] + enum: ["BearerToken", "APIKey", "BasicAuthentication"] authSecret: type: object properties: @@ -3208,6 +3208,9 @@ data: # Enable managing ExternalNode for unmanaged VM/BM. # ExternalNode: false + # Enable collecting support bundle files with SupportBundleCollection CRD. + # SupportBundleCollection: false + # The port for the antrea-controller APIServer to serve on. # Note that if it's set to another value, the `containerPort` of the `api` port of the # `antrea-controller` container must be set to the same value. @@ -3971,6 +3974,20 @@ rules: - get - list - watch + - apiGroups: + - crd.antrea.io + resources: + - supportbundlecollections + verbs: + - get + - watch + - list + - apiGroups: + - crd.antrea.io + resources: + - supportbundlecollections/status + verbs: + - update --- # Source: antrea/templates/crds-rbac/clusterroles.yaml apiVersion: rbac.authorization.k8s.io/v1 @@ -4148,7 +4165,7 @@ spec: kubectl.kubernetes.io/default-container: antrea-agent # Automatically restart Pods with a RollingUpdate if the ConfigMap changes # See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments - checksum/config: b609bc3b220de28b3fe935093fc7d99dfdc533916597e906a6c627c6233fedbc + checksum/config: bbe8ea932abf1c8b0013dbfb9ded2d15fdfb91866afd35b7f4d241a3c0ec9428 labels: app: antrea component: antrea-agent @@ -4388,7 +4405,7 @@ spec: annotations: # Automatically restart Pod if the ConfigMap changes # See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments - checksum/config: b609bc3b220de28b3fe935093fc7d99dfdc533916597e906a6c627c6233fedbc + checksum/config: bbe8ea932abf1c8b0013dbfb9ded2d15fdfb91866afd35b7f4d241a3c0ec9428 labels: app: antrea component: antrea-controller @@ -4704,3 +4721,18 @@ webhooks: admissionReviewVersions: ["v1", "v1beta1"] sideEffects: None timeoutSeconds: 5 + - name: "supportbundlecollectionvalidator.antrea.io" + clientConfig: + service: + name: "antrea" + namespace: kube-system + path: "/validate/supportbundlecollection" + rules: + - operations: ["UPDATE", "DELETE"] + apiGroups: ["crd.antrea.io"] + apiVersions: ["v1alpha1"] + resources: ["supportbundlecollections"] + scope: "Cluster" + admissionReviewVersions: ["v1", "v1beta1"] + sideEffects: None + timeoutSeconds: 5 diff --git a/build/yamls/externalnode/support-bundle-collection-rbac.yml b/build/yamls/externalnode/support-bundle-collection-rbac.yml new file mode 100644 index 00000000000..6bc41714e9c --- /dev/null +++ b/build/yamls/externalnode/support-bundle-collection-rbac.yml @@ -0,0 +1,27 @@ +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: antrea-secret-reader + labels: + app: antrea +rules: + - apiGroups: + - "" + resources: + - secrets + verbs: + - get +--- +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: antrea-read-secrets + namespace: kube-system # Change the Namespace to where the Secret for file server's authentication credential is created. +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: antrea-secret-reader +subjects: + - kind: ServiceAccount + name: antrea-controller + namespace: kube-system diff --git a/cmd/antrea-controller/controller.go b/cmd/antrea-controller/controller.go index e11b835e950..76525364629 100644 --- a/cmd/antrea-controller/controller.go +++ b/cmd/antrea-controller/controller.go @@ -57,6 +57,8 @@ import ( "antrea.io/antrea/pkg/controller/querier" "antrea.io/antrea/pkg/controller/serviceexternalip" "antrea.io/antrea/pkg/controller/stats" + "antrea.io/antrea/pkg/controller/supportbundlecollection" + supportbundlecollectionstore "antrea.io/antrea/pkg/controller/supportbundlecollection/store" "antrea.io/antrea/pkg/controller/traceflow" "antrea.io/antrea/pkg/features" "antrea.io/antrea/pkg/log" @@ -104,6 +106,7 @@ var allowedPaths = []string{ "/validate/egress", "/validate/group", "/validate/ippool", + "/validate/supportbundlecollection", "/convert/clustergroup", } @@ -172,6 +175,13 @@ func run(o *Options) error { externalNodeController = externalnode.NewExternalNodeController(crdClient, externalNodeInformer, eeInformer) } + var bundleCollectionController *supportbundlecollection.Controller + bundleCollectionStore := supportbundlecollectionstore.NewSupportBundleCollectionStore() + if features.DefaultFeatureGate.Enabled(features.SupportBundleCollection) { + bundleCollectionInformer := crdInformerFactory.Crd().V1alpha1().SupportBundleCollections() + bundleCollectionController = supportbundlecollection.NewSupportBundleCollectionController(client, crdClient, bundleCollectionInformer, nodeInformer, externalNodeInformer, bundleCollectionStore) + } + var networkPolicyStatusController *networkpolicy.StatusController if features.DefaultFeatureGate.Enabled(features.AntreaPolicy) { networkPolicyStatusController = networkpolicy.NewStatusController(crdClient, networkPolicyStore, cnpInformer, anpInformer) @@ -252,12 +262,14 @@ func run(o *Options) error { networkPolicyStore, groupStore, egressGroupStore, + bundleCollectionStore, controllerQuerier, endpointQuerier, networkPolicyController, networkPolicyStatusController, egressController, statsAggregator, + bundleCollectionController, *o.config.EnablePrometheusMetrics, cipherSuites, cipher.TLSVersionMap[o.config.TLSMinVersion]) @@ -352,6 +364,10 @@ func run(o *Options) error { go externalNodeController.Run(stopCh) } + if features.DefaultFeatureGate.Enabled(features.SupportBundleCollection) { + go bundleCollectionController.Run(stopCh) + } + if antreaIPAMController != nil { go antreaIPAMController.Run(stopCh) } @@ -419,12 +435,14 @@ func createAPIServerConfig(kubeconfig string, networkPolicyStore storage.Interface, groupStore storage.Interface, egressGroupStore storage.Interface, + supportBundleCollectionStore storage.Interface, controllerQuerier querier.ControllerQuerier, endpointQuerier networkpolicy.EndpointQuerier, npController *networkpolicy.NetworkPolicyController, networkPolicyStatusController *networkpolicy.StatusController, egressController *egress.EgressController, statsAggregator *stats.Aggregator, + bundleCollectionStore *supportbundlecollection.Controller, enableMetrics bool, cipherSuites []uint16, tlsMinVersion uint16) (*apiserver.Config, error) { @@ -479,11 +497,13 @@ func createAPIServerConfig(kubeconfig string, networkPolicyStore, groupStore, egressGroupStore, + supportBundleCollectionStore, caCertController, statsAggregator, controllerQuerier, networkPolicyStatusController, endpointQuerier, npController, - egressController), nil + egressController, + bundleCollectionStore), nil } diff --git a/docs/feature-gates.md b/docs/feature-gates.md index 04965b94ad9..92ff501ea57 100644 --- a/docs/feature-gates.md +++ b/docs/feature-gates.md @@ -32,24 +32,25 @@ edit the Agent configuration in the ## List of Available Features -| Feature Name | Component | Default | Stage | Alpha Release | Beta Release | GA Release | Extra Requirements | Notes | -| ----------------------- | ------------------ | ------- | ----- |---------------| ------------ | ---------- | ------------------ | ----- | -| `AntreaProxy` | Agent | `true` | Beta | v0.8 | v0.11 | N/A | Yes | Must be enabled for Windows. | -| `EndpointSlice` | Agent | `false` | Alpha | v0.13.0 | N/A | N/A | Yes | | -| `TopologyAwareHints` | Agent | `false` | Alpha | v1.8 | N/A | N/A | Yes | | -| `AntreaPolicy` | Agent + Controller | `true` | Beta | v0.8 | v1.0 | N/A | No | Agent side config required from v0.9.0+. | -| `Traceflow` | Agent + Controller | `true` | Beta | v0.8 | v0.11 | N/A | Yes | | -| `FlowExporter` | Agent | `false` | Alpha | v0.9 | N/A | N/A | Yes | | -| `NetworkPolicyStats` | Agent + Controller | `true` | Beta | v0.10 | v1.2 | N/A | No | | -| `NodePortLocal` | Agent | `true` | Beta | v0.13 | v1.4 | N/A | Yes | Important user-facing change in v1.2.0 | -| `Egress` | Agent + Controller | `true` | Beta | v1.0 | v1.6 | N/A | Yes | | -| `NodeIPAM` | Controller | `false` | Alpha | v1.4 | N/A | N/A | Yes | | -| `AntreaIPAM` | Agent + Controller | `false` | Alpha | v1.4 | N/A | N/A | Yes | | -| `Multicast` | Agent | `false` | Alpha | v1.5 | N/A | N/A | Yes | | -| `SecondaryNetwork` | Agent | `false` | Alpha | v1.5 | N/A | N/A | Yes | | -| `ServiceExternalIP` | Agent + Controller | `false` | Alpha | v1.5 | N/A | N/A | Yes | | -| `TrafficControl` | Agent | `false` | Alpha | v1.7 | N/A | N/A | No | | -| `ExternalNode` | Agent | `false` | Alpha | v1.8 | N/A | N/A | Yes | | +| Feature Name | Component | Default | Stage | Alpha Release | Beta Release | GA Release | Extra Requirements | Notes | +|---------------------------|--------------------| ------- | ----- |---------------| ------------ | ---------- |--------------------| ----- | +| `AntreaProxy` | Agent | `true` | Beta | v0.8 | v0.11 | N/A | Yes | Must be enabled for Windows. | +| `EndpointSlice` | Agent | `false` | Alpha | v0.13.0 | N/A | N/A | Yes | | +| `TopologyAwareHints` | Agent | `false` | Alpha | v1.8 | N/A | N/A | Yes | | +| `AntreaPolicy` | Agent + Controller | `true` | Beta | v0.8 | v1.0 | N/A | No | Agent side config required from v0.9.0+. | +| `Traceflow` | Agent + Controller | `true` | Beta | v0.8 | v0.11 | N/A | Yes | | +| `FlowExporter` | Agent | `false` | Alpha | v0.9 | N/A | N/A | Yes | | +| `NetworkPolicyStats` | Agent + Controller | `true` | Beta | v0.10 | v1.2 | N/A | No | | +| `NodePortLocal` | Agent | `true` | Beta | v0.13 | v1.4 | N/A | Yes | Important user-facing change in v1.2.0 | +| `Egress` | Agent + Controller | `true` | Beta | v1.0 | v1.6 | N/A | Yes | | +| `NodeIPAM` | Controller | `false` | Alpha | v1.4 | N/A | N/A | Yes | | +| `AntreaIPAM` | Agent + Controller | `false` | Alpha | v1.4 | N/A | N/A | Yes | | +| `Multicast` | Agent | `false` | Alpha | v1.5 | N/A | N/A | Yes | | +| `SecondaryNetwork` | Agent | `false` | Alpha | v1.5 | N/A | N/A | Yes | | +| `ServiceExternalIP` | Agent + Controller | `false` | Alpha | v1.5 | N/A | N/A | Yes | | +| `TrafficControl` | Agent | `false` | Alpha | v1.7 | N/A | N/A | No | | +| `ExternalNode` | Agent | `false` | Alpha | v1.8 | N/A | N/A | Yes | | +| `SupportBundleCollection` | Agent + Controller | `false` | Alpha | v1.9 | N/A | N/A | Yes | | ## Description and Requirements of Features @@ -321,7 +322,7 @@ The `ExternalNode` feature enables Antrea Agent runs on a virtual machine or a b Kubernetes Node, and enforces Antrea NetworkPolicy for the VM/BM. Antrea Agent supports the `ExternalNode` feature on both Linux and Windows. -More documentation will be coming in the future. +Refer to this [document](external-node.md) for more information. #### Requirements for this Feature @@ -330,3 +331,15 @@ disabled. As of now, this feature requires that `AntreaProxy` and `NetworkPolicy OVS is required to be installed on the virtual machine or the bare-metal server before running Antrea Agent, and the OVS version must be >= 2.13.0. + +### SupportBundleCollection + +`SupportBundleCollection` feature enables a CRD API for Antrea to collect support bundle files on any Node or +ExternalNode, and upload to a user defined file server. + +More documentation will be coming in the future. + +#### Requirements for this Feature + +User should provide a file server with this feature, and store its authentication credential in a Secret. Antrea +Controller is required to be configured with the permission to read the Secret. diff --git a/pkg/apis/controlplane/register.go b/pkg/apis/controlplane/register.go index a51c3c11769..8cee3309bd9 100644 --- a/pkg/apis/controlplane/register.go +++ b/pkg/apis/controlplane/register.go @@ -61,6 +61,9 @@ func addKnownTypes(scheme *runtime.Scheme) error { &EgressGroup{}, &EgressGroupPatch{}, &EgressGroupList{}, + &SupportBundleCollection{}, + &SupportBundleCollectionList{}, + &SupportBundleCollectionStatus{}, ) return nil } diff --git a/pkg/apis/controlplane/types.go b/pkg/apis/controlplane/types.go index 5cfcfc829c4..a408a4cd669 100644 --- a/pkg/apis/controlplane/types.go +++ b/pkg/apis/controlplane/types.go @@ -436,3 +436,72 @@ type EgressGroupList struct { metav1.ListMeta Items []EgressGroup } + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type SupportBundleCollection struct { + metav1.TypeMeta + metav1.ObjectMeta + ExpiredAt metav1.Time + SinceTime string + FileServer BundleFileServer + Authentication BundleServerAuthConfiguration +} + +// BundleFileServer specifies the bundle file server information. +type BundleFileServer struct { + // The URL of the bundle file server. It is set with format: scheme://host[:port][/path], + // e.g, https://api.example.com:8443/v1/supportbundles/. If scheme is not set, https is used by default. + URL string +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SupportBundleCollectionList is a list of SupportBundleCollection objects. +type SupportBundleCollectionList struct { + metav1.TypeMeta + metav1.ListMeta + Items []SupportBundleCollection +} + +type BasicAuthentication struct { + Username string + Password string +} + +type BundleServerAuthConfiguration struct { + BearerToken string + APIKey string + BasicAuthentication *BasicAuthentication +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SupportBundleCollectionStatus is the status of a SupportBundleCollection. +type SupportBundleCollectionStatus struct { + metav1.TypeMeta + metav1.ObjectMeta + // Nodes contains statuses produced on a list of Nodes. + Nodes []SupportBundleCollectionNodeStatus +} + +type SupportBundleCollectionNodeType string + +const ( + SupportBundleCollectionNodeTypeNode SupportBundleCollectionNodeType = "Node" + SupportBundleCollectionNodeTypeExternalNode SupportBundleCollectionNodeType = "ExternalNode" +) + +// SupportBundleCollectionNodeStatus is the status of a SupportBundleCollection on a Node. +type SupportBundleCollectionNodeStatus struct { + // The name of the Node that produces the status. + NodeName string + // The Namespace of the Node produces the status. It is set only when NodeType is externalNode + NodeNamespace string + // The type of the Node that produces the status. The supported values are "Node" and "ExternalNode". + NodeType SupportBundleCollectionNodeType + // Completed shows if the SupportBundleCollection is successfully processed on the Node or ExternalNode or not. + Completed bool + // Error is the reason for which the SupportBundleCollection is failed on the Node. + Error string +} diff --git a/pkg/apis/controlplane/v1beta2/conversion.go b/pkg/apis/controlplane/v1beta2/conversion.go index 590384ca14b..ea352f41a30 100644 --- a/pkg/apis/controlplane/v1beta2/conversion.go +++ b/pkg/apis/controlplane/v1beta2/conversion.go @@ -26,7 +26,7 @@ func init() { // addConversionFuncs adds non-generated conversion functions to the given scheme. func addConversionFuncs(scheme *runtime.Scheme) error { - for _, kind := range []string{"AppliedToGroup", "AddressGroup", "NetworkPolicy", "EgressGroup"} { + for _, kind := range []string{"AppliedToGroup", "AddressGroup", "NetworkPolicy", "EgressGroup", "SupportBundleCollection"} { err := scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.WithKind(kind), func(label, value string) (string, string, error) { switch label { diff --git a/pkg/apis/controlplane/v1beta2/generated.pb.go b/pkg/apis/controlplane/v1beta2/generated.pb.go index 1240b68ebf0..8c5a177a963 100644 --- a/pkg/apis/controlplane/v1beta2/generated.pb.go +++ b/pkg/apis/controlplane/v1beta2/generated.pb.go @@ -215,10 +215,94 @@ func (m *AppliedToGroupPatch) XXX_DiscardUnknown() { var xxx_messageInfo_AppliedToGroupPatch proto.InternalMessageInfo +func (m *BasicAuthentication) Reset() { *m = BasicAuthentication{} } +func (*BasicAuthentication) ProtoMessage() {} +func (*BasicAuthentication) Descriptor() ([]byte, []int) { + return fileDescriptor_fbaa7d016762fa1d, []int{6} +} +func (m *BasicAuthentication) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BasicAuthentication) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *BasicAuthentication) XXX_Merge(src proto.Message) { + xxx_messageInfo_BasicAuthentication.Merge(m, src) +} +func (m *BasicAuthentication) XXX_Size() int { + return m.Size() +} +func (m *BasicAuthentication) XXX_DiscardUnknown() { + xxx_messageInfo_BasicAuthentication.DiscardUnknown(m) +} + +var xxx_messageInfo_BasicAuthentication proto.InternalMessageInfo + +func (m *BundleFileServer) Reset() { *m = BundleFileServer{} } +func (*BundleFileServer) ProtoMessage() {} +func (*BundleFileServer) Descriptor() ([]byte, []int) { + return fileDescriptor_fbaa7d016762fa1d, []int{7} +} +func (m *BundleFileServer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BundleFileServer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *BundleFileServer) XXX_Merge(src proto.Message) { + xxx_messageInfo_BundleFileServer.Merge(m, src) +} +func (m *BundleFileServer) XXX_Size() int { + return m.Size() +} +func (m *BundleFileServer) XXX_DiscardUnknown() { + xxx_messageInfo_BundleFileServer.DiscardUnknown(m) +} + +var xxx_messageInfo_BundleFileServer proto.InternalMessageInfo + +func (m *BundleServerAuthConfiguration) Reset() { *m = BundleServerAuthConfiguration{} } +func (*BundleServerAuthConfiguration) ProtoMessage() {} +func (*BundleServerAuthConfiguration) Descriptor() ([]byte, []int) { + return fileDescriptor_fbaa7d016762fa1d, []int{8} +} +func (m *BundleServerAuthConfiguration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BundleServerAuthConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *BundleServerAuthConfiguration) XXX_Merge(src proto.Message) { + xxx_messageInfo_BundleServerAuthConfiguration.Merge(m, src) +} +func (m *BundleServerAuthConfiguration) XXX_Size() int { + return m.Size() +} +func (m *BundleServerAuthConfiguration) XXX_DiscardUnknown() { + xxx_messageInfo_BundleServerAuthConfiguration.DiscardUnknown(m) +} + +var xxx_messageInfo_BundleServerAuthConfiguration proto.InternalMessageInfo + func (m *ClusterGroupMembers) Reset() { *m = ClusterGroupMembers{} } func (*ClusterGroupMembers) ProtoMessage() {} func (*ClusterGroupMembers) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{6} + return fileDescriptor_fbaa7d016762fa1d, []int{9} } func (m *ClusterGroupMembers) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -246,7 +330,7 @@ var xxx_messageInfo_ClusterGroupMembers proto.InternalMessageInfo func (m *EgressGroup) Reset() { *m = EgressGroup{} } func (*EgressGroup) ProtoMessage() {} func (*EgressGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{7} + return fileDescriptor_fbaa7d016762fa1d, []int{10} } func (m *EgressGroup) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -274,7 +358,7 @@ var xxx_messageInfo_EgressGroup proto.InternalMessageInfo func (m *EgressGroupList) Reset() { *m = EgressGroupList{} } func (*EgressGroupList) ProtoMessage() {} func (*EgressGroupList) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{8} + return fileDescriptor_fbaa7d016762fa1d, []int{11} } func (m *EgressGroupList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -302,7 +386,7 @@ var xxx_messageInfo_EgressGroupList proto.InternalMessageInfo func (m *EgressGroupPatch) Reset() { *m = EgressGroupPatch{} } func (*EgressGroupPatch) ProtoMessage() {} func (*EgressGroupPatch) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{9} + return fileDescriptor_fbaa7d016762fa1d, []int{12} } func (m *EgressGroupPatch) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -330,7 +414,7 @@ var xxx_messageInfo_EgressGroupPatch proto.InternalMessageInfo func (m *ExternalEntityReference) Reset() { *m = ExternalEntityReference{} } func (*ExternalEntityReference) ProtoMessage() {} func (*ExternalEntityReference) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{10} + return fileDescriptor_fbaa7d016762fa1d, []int{13} } func (m *ExternalEntityReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -358,7 +442,7 @@ var xxx_messageInfo_ExternalEntityReference proto.InternalMessageInfo func (m *GroupAssociation) Reset() { *m = GroupAssociation{} } func (*GroupAssociation) ProtoMessage() {} func (*GroupAssociation) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{11} + return fileDescriptor_fbaa7d016762fa1d, []int{14} } func (m *GroupAssociation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -386,7 +470,7 @@ var xxx_messageInfo_GroupAssociation proto.InternalMessageInfo func (m *GroupMember) Reset() { *m = GroupMember{} } func (*GroupMember) ProtoMessage() {} func (*GroupMember) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{12} + return fileDescriptor_fbaa7d016762fa1d, []int{15} } func (m *GroupMember) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -414,7 +498,7 @@ var xxx_messageInfo_GroupMember proto.InternalMessageInfo func (m *GroupReference) Reset() { *m = GroupReference{} } func (*GroupReference) ProtoMessage() {} func (*GroupReference) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{13} + return fileDescriptor_fbaa7d016762fa1d, []int{16} } func (m *GroupReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -442,7 +526,7 @@ var xxx_messageInfo_GroupReference proto.InternalMessageInfo func (m *IPBlock) Reset() { *m = IPBlock{} } func (*IPBlock) ProtoMessage() {} func (*IPBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{14} + return fileDescriptor_fbaa7d016762fa1d, []int{17} } func (m *IPBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -470,7 +554,7 @@ var xxx_messageInfo_IPBlock proto.InternalMessageInfo func (m *IPNet) Reset() { *m = IPNet{} } func (*IPNet) ProtoMessage() {} func (*IPNet) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{15} + return fileDescriptor_fbaa7d016762fa1d, []int{18} } func (m *IPNet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -498,7 +582,7 @@ var xxx_messageInfo_IPNet proto.InternalMessageInfo func (m *MulticastGroupInfo) Reset() { *m = MulticastGroupInfo{} } func (*MulticastGroupInfo) ProtoMessage() {} func (*MulticastGroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{16} + return fileDescriptor_fbaa7d016762fa1d, []int{19} } func (m *MulticastGroupInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -526,7 +610,7 @@ var xxx_messageInfo_MulticastGroupInfo proto.InternalMessageInfo func (m *NamedPort) Reset() { *m = NamedPort{} } func (*NamedPort) ProtoMessage() {} func (*NamedPort) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{17} + return fileDescriptor_fbaa7d016762fa1d, []int{20} } func (m *NamedPort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -554,7 +638,7 @@ var xxx_messageInfo_NamedPort proto.InternalMessageInfo func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} } func (*NetworkPolicy) ProtoMessage() {} func (*NetworkPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{18} + return fileDescriptor_fbaa7d016762fa1d, []int{21} } func (m *NetworkPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -582,7 +666,7 @@ var xxx_messageInfo_NetworkPolicy proto.InternalMessageInfo func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} } func (*NetworkPolicyList) ProtoMessage() {} func (*NetworkPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{19} + return fileDescriptor_fbaa7d016762fa1d, []int{22} } func (m *NetworkPolicyList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -610,7 +694,7 @@ var xxx_messageInfo_NetworkPolicyList proto.InternalMessageInfo func (m *NetworkPolicyNodeStatus) Reset() { *m = NetworkPolicyNodeStatus{} } func (*NetworkPolicyNodeStatus) ProtoMessage() {} func (*NetworkPolicyNodeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{20} + return fileDescriptor_fbaa7d016762fa1d, []int{23} } func (m *NetworkPolicyNodeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -638,7 +722,7 @@ var xxx_messageInfo_NetworkPolicyNodeStatus proto.InternalMessageInfo func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} } func (*NetworkPolicyPeer) ProtoMessage() {} func (*NetworkPolicyPeer) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{21} + return fileDescriptor_fbaa7d016762fa1d, []int{24} } func (m *NetworkPolicyPeer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -666,7 +750,7 @@ var xxx_messageInfo_NetworkPolicyPeer proto.InternalMessageInfo func (m *NetworkPolicyReference) Reset() { *m = NetworkPolicyReference{} } func (*NetworkPolicyReference) ProtoMessage() {} func (*NetworkPolicyReference) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{22} + return fileDescriptor_fbaa7d016762fa1d, []int{25} } func (m *NetworkPolicyReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -694,7 +778,7 @@ var xxx_messageInfo_NetworkPolicyReference proto.InternalMessageInfo func (m *NetworkPolicyRule) Reset() { *m = NetworkPolicyRule{} } func (*NetworkPolicyRule) ProtoMessage() {} func (*NetworkPolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{23} + return fileDescriptor_fbaa7d016762fa1d, []int{26} } func (m *NetworkPolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -722,7 +806,7 @@ var xxx_messageInfo_NetworkPolicyRule proto.InternalMessageInfo func (m *NetworkPolicyStats) Reset() { *m = NetworkPolicyStats{} } func (*NetworkPolicyStats) ProtoMessage() {} func (*NetworkPolicyStats) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{24} + return fileDescriptor_fbaa7d016762fa1d, []int{27} } func (m *NetworkPolicyStats) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -750,7 +834,7 @@ var xxx_messageInfo_NetworkPolicyStats proto.InternalMessageInfo func (m *NetworkPolicyStatus) Reset() { *m = NetworkPolicyStatus{} } func (*NetworkPolicyStatus) ProtoMessage() {} func (*NetworkPolicyStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{25} + return fileDescriptor_fbaa7d016762fa1d, []int{28} } func (m *NetworkPolicyStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -778,7 +862,7 @@ var xxx_messageInfo_NetworkPolicyStatus proto.InternalMessageInfo func (m *NodeReference) Reset() { *m = NodeReference{} } func (*NodeReference) ProtoMessage() {} func (*NodeReference) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{26} + return fileDescriptor_fbaa7d016762fa1d, []int{29} } func (m *NodeReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -806,7 +890,7 @@ var xxx_messageInfo_NodeReference proto.InternalMessageInfo func (m *NodeStatsSummary) Reset() { *m = NodeStatsSummary{} } func (*NodeStatsSummary) ProtoMessage() {} func (*NodeStatsSummary) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{27} + return fileDescriptor_fbaa7d016762fa1d, []int{30} } func (m *NodeStatsSummary) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -834,7 +918,7 @@ var xxx_messageInfo_NodeStatsSummary proto.InternalMessageInfo func (m *PaginationGetOptions) Reset() { *m = PaginationGetOptions{} } func (*PaginationGetOptions) ProtoMessage() {} func (*PaginationGetOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{28} + return fileDescriptor_fbaa7d016762fa1d, []int{31} } func (m *PaginationGetOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -862,7 +946,7 @@ var xxx_messageInfo_PaginationGetOptions proto.InternalMessageInfo func (m *PodReference) Reset() { *m = PodReference{} } func (*PodReference) ProtoMessage() {} func (*PodReference) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{29} + return fileDescriptor_fbaa7d016762fa1d, []int{32} } func (m *PodReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -890,7 +974,7 @@ var xxx_messageInfo_PodReference proto.InternalMessageInfo func (m *Service) Reset() { *m = Service{} } func (*Service) ProtoMessage() {} func (*Service) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{30} + return fileDescriptor_fbaa7d016762fa1d, []int{33} } func (m *Service) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -918,7 +1002,7 @@ var xxx_messageInfo_Service proto.InternalMessageInfo func (m *ServiceReference) Reset() { *m = ServiceReference{} } func (*ServiceReference) ProtoMessage() {} func (*ServiceReference) Descriptor() ([]byte, []int) { - return fileDescriptor_fbaa7d016762fa1d, []int{31} + return fileDescriptor_fbaa7d016762fa1d, []int{34} } func (m *ServiceReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -943,6 +1027,118 @@ func (m *ServiceReference) XXX_DiscardUnknown() { var xxx_messageInfo_ServiceReference proto.InternalMessageInfo +func (m *SupportBundleCollection) Reset() { *m = SupportBundleCollection{} } +func (*SupportBundleCollection) ProtoMessage() {} +func (*SupportBundleCollection) Descriptor() ([]byte, []int) { + return fileDescriptor_fbaa7d016762fa1d, []int{35} +} +func (m *SupportBundleCollection) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SupportBundleCollection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *SupportBundleCollection) XXX_Merge(src proto.Message) { + xxx_messageInfo_SupportBundleCollection.Merge(m, src) +} +func (m *SupportBundleCollection) XXX_Size() int { + return m.Size() +} +func (m *SupportBundleCollection) XXX_DiscardUnknown() { + xxx_messageInfo_SupportBundleCollection.DiscardUnknown(m) +} + +var xxx_messageInfo_SupportBundleCollection proto.InternalMessageInfo + +func (m *SupportBundleCollectionList) Reset() { *m = SupportBundleCollectionList{} } +func (*SupportBundleCollectionList) ProtoMessage() {} +func (*SupportBundleCollectionList) Descriptor() ([]byte, []int) { + return fileDescriptor_fbaa7d016762fa1d, []int{36} +} +func (m *SupportBundleCollectionList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SupportBundleCollectionList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *SupportBundleCollectionList) XXX_Merge(src proto.Message) { + xxx_messageInfo_SupportBundleCollectionList.Merge(m, src) +} +func (m *SupportBundleCollectionList) XXX_Size() int { + return m.Size() +} +func (m *SupportBundleCollectionList) XXX_DiscardUnknown() { + xxx_messageInfo_SupportBundleCollectionList.DiscardUnknown(m) +} + +var xxx_messageInfo_SupportBundleCollectionList proto.InternalMessageInfo + +func (m *SupportBundleCollectionNodeStatus) Reset() { *m = SupportBundleCollectionNodeStatus{} } +func (*SupportBundleCollectionNodeStatus) ProtoMessage() {} +func (*SupportBundleCollectionNodeStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_fbaa7d016762fa1d, []int{37} +} +func (m *SupportBundleCollectionNodeStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SupportBundleCollectionNodeStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *SupportBundleCollectionNodeStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_SupportBundleCollectionNodeStatus.Merge(m, src) +} +func (m *SupportBundleCollectionNodeStatus) XXX_Size() int { + return m.Size() +} +func (m *SupportBundleCollectionNodeStatus) XXX_DiscardUnknown() { + xxx_messageInfo_SupportBundleCollectionNodeStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_SupportBundleCollectionNodeStatus proto.InternalMessageInfo + +func (m *SupportBundleCollectionStatus) Reset() { *m = SupportBundleCollectionStatus{} } +func (*SupportBundleCollectionStatus) ProtoMessage() {} +func (*SupportBundleCollectionStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_fbaa7d016762fa1d, []int{38} +} +func (m *SupportBundleCollectionStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SupportBundleCollectionStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *SupportBundleCollectionStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_SupportBundleCollectionStatus.Merge(m, src) +} +func (m *SupportBundleCollectionStatus) XXX_Size() int { + return m.Size() +} +func (m *SupportBundleCollectionStatus) XXX_DiscardUnknown() { + xxx_messageInfo_SupportBundleCollectionStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_SupportBundleCollectionStatus proto.InternalMessageInfo + func init() { proto.RegisterType((*AddressGroup)(nil), "antrea_io.antrea.pkg.apis.controlplane.v1beta2.AddressGroup") proto.RegisterType((*AddressGroupList)(nil), "antrea_io.antrea.pkg.apis.controlplane.v1beta2.AddressGroupList") @@ -950,6 +1146,9 @@ func init() { proto.RegisterType((*AppliedToGroup)(nil), "antrea_io.antrea.pkg.apis.controlplane.v1beta2.AppliedToGroup") proto.RegisterType((*AppliedToGroupList)(nil), "antrea_io.antrea.pkg.apis.controlplane.v1beta2.AppliedToGroupList") proto.RegisterType((*AppliedToGroupPatch)(nil), "antrea_io.antrea.pkg.apis.controlplane.v1beta2.AppliedToGroupPatch") + proto.RegisterType((*BasicAuthentication)(nil), "antrea_io.antrea.pkg.apis.controlplane.v1beta2.BasicAuthentication") + proto.RegisterType((*BundleFileServer)(nil), "antrea_io.antrea.pkg.apis.controlplane.v1beta2.BundleFileServer") + proto.RegisterType((*BundleServerAuthConfiguration)(nil), "antrea_io.antrea.pkg.apis.controlplane.v1beta2.BundleServerAuthConfiguration") proto.RegisterType((*ClusterGroupMembers)(nil), "antrea_io.antrea.pkg.apis.controlplane.v1beta2.ClusterGroupMembers") proto.RegisterType((*EgressGroup)(nil), "antrea_io.antrea.pkg.apis.controlplane.v1beta2.EgressGroup") proto.RegisterType((*EgressGroupList)(nil), "antrea_io.antrea.pkg.apis.controlplane.v1beta2.EgressGroupList") @@ -976,6 +1175,10 @@ func init() { proto.RegisterType((*PodReference)(nil), "antrea_io.antrea.pkg.apis.controlplane.v1beta2.PodReference") proto.RegisterType((*Service)(nil), "antrea_io.antrea.pkg.apis.controlplane.v1beta2.Service") proto.RegisterType((*ServiceReference)(nil), "antrea_io.antrea.pkg.apis.controlplane.v1beta2.ServiceReference") + proto.RegisterType((*SupportBundleCollection)(nil), "antrea_io.antrea.pkg.apis.controlplane.v1beta2.SupportBundleCollection") + proto.RegisterType((*SupportBundleCollectionList)(nil), "antrea_io.antrea.pkg.apis.controlplane.v1beta2.SupportBundleCollectionList") + proto.RegisterType((*SupportBundleCollectionNodeStatus)(nil), "antrea_io.antrea.pkg.apis.controlplane.v1beta2.SupportBundleCollectionNodeStatus") + proto.RegisterType((*SupportBundleCollectionStatus)(nil), "antrea_io.antrea.pkg.apis.controlplane.v1beta2.SupportBundleCollectionStatus") } func init() { @@ -983,143 +1186,168 @@ func init() { } var fileDescriptor_fbaa7d016762fa1d = []byte{ - // 2176 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x1a, 0xcd, 0x6f, 0x1b, 0x59, - 0xbd, 0xe3, 0x8f, 0x24, 0xfe, 0xd9, 0x69, 0x9d, 0x97, 0x96, 0x9a, 0xa5, 0xd8, 0xdd, 0x59, 0x40, - 0x3d, 0xc0, 0x78, 0x13, 0xda, 0x6d, 0x60, 0xb7, 0x0b, 0x71, 0x92, 0x46, 0x96, 0xda, 0xd4, 0xbc, - 0x64, 0x55, 0x09, 0xe8, 0xb2, 0x93, 0x99, 0x67, 0xe7, 0x11, 0x7b, 0x66, 0x98, 0x79, 0x0e, 0x8d, - 0x90, 0xd0, 0x22, 0xe0, 0xb0, 0x80, 0x04, 0x37, 0xc4, 0x0d, 0x4e, 0x5c, 0xf8, 0x0b, 0xf6, 0xc6, - 0xad, 0xe2, 0xb4, 0x08, 0x21, 0xf6, 0x64, 0x51, 0x23, 0x40, 0x1c, 0xe0, 0x0f, 0x08, 0x17, 0xf4, - 0xde, 0xbc, 0x99, 0x79, 0x63, 0x27, 0x4d, 0x9d, 0xa4, 0x41, 0x82, 0x3d, 0xc5, 0x7e, 0xbf, 0xef, - 0xf7, 0xfb, 0x7e, 0x0e, 0xbc, 0x69, 0x3a, 0xcc, 0x27, 0xa6, 0x41, 0xdd, 0x7a, 0xf8, 0xa9, 0xee, - 0xed, 0x76, 0xea, 0xa6, 0x47, 0x83, 0xba, 0xe5, 0x3a, 0xcc, 0x77, 0xbb, 0x5e, 0xd7, 0x74, 0x48, - 0x7d, 0x6f, 0x61, 0x9b, 0x30, 0x73, 0xb1, 0xde, 0x21, 0x0e, 0xf1, 0x4d, 0x46, 0x6c, 0xc3, 0xf3, - 0x5d, 0xe6, 0x22, 0x23, 0xa4, 0xfa, 0x06, 0x75, 0xe5, 0x27, 0xc3, 0xdb, 0xed, 0x18, 0x9c, 0xde, - 0x50, 0xe9, 0x0d, 0x49, 0xff, 0xd2, 0xd2, 0xd1, 0xf2, 0x02, 0x66, 0xb2, 0xa0, 0xbe, 0xb7, 0x60, - 0x76, 0xbd, 0x1d, 0x73, 0x61, 0x54, 0xd2, 0x4b, 0x9f, 0xeb, 0x50, 0xb6, 0xd3, 0xdf, 0x36, 0x2c, - 0xb7, 0x57, 0xef, 0xb8, 0x1d, 0xb7, 0x2e, 0x8e, 0xb7, 0xfb, 0x6d, 0xf1, 0x4d, 0x7c, 0x11, 0x9f, - 0x24, 0xfa, 0xcd, 0xdd, 0xa5, 0x40, 0x48, 0xf1, 0x68, 0xcf, 0xb4, 0x76, 0xa8, 0x43, 0xfc, 0xfd, - 0x44, 0x56, 0x8f, 0x30, 0xb3, 0xbe, 0x37, 0x2e, 0xa4, 0x7e, 0x14, 0x95, 0xdf, 0x77, 0x18, 0xed, - 0x91, 0x31, 0x82, 0xd7, 0x8e, 0x23, 0x08, 0xac, 0x1d, 0xd2, 0x33, 0xc7, 0xe8, 0x3e, 0x7f, 0x14, - 0x5d, 0x9f, 0xd1, 0x6e, 0x9d, 0x3a, 0x2c, 0x60, 0xfe, 0x28, 0x91, 0xfe, 0x77, 0x0d, 0x4a, 0xcb, - 0xb6, 0xed, 0x93, 0x20, 0x58, 0xf7, 0xdd, 0xbe, 0x87, 0xde, 0x81, 0x19, 0x6e, 0x89, 0x6d, 0x32, - 0xb3, 0xa2, 0x5d, 0xd7, 0x6e, 0x14, 0x17, 0x5f, 0x35, 0x42, 0xc6, 0x86, 0xca, 0x38, 0xf1, 0x09, - 0xc7, 0x36, 0xf6, 0x16, 0x8c, 0x07, 0xdb, 0xdf, 0x24, 0x16, 0xbb, 0x4f, 0x98, 0xd9, 0x40, 0x4f, - 0x06, 0xb5, 0x0b, 0xc3, 0x41, 0x0d, 0x92, 0x33, 0x1c, 0x73, 0x45, 0x7d, 0x28, 0x75, 0xb8, 0xa8, - 0xfb, 0xa4, 0xb7, 0x4d, 0xfc, 0xa0, 0x92, 0xb9, 0x9e, 0xbd, 0x51, 0x5c, 0x7c, 0x7d, 0x42, 0xb7, - 0x1b, 0xeb, 0x09, 0x8f, 0xc6, 0x65, 0x29, 0xb0, 0xa4, 0x1c, 0x06, 0x38, 0x25, 0x46, 0xff, 0x83, - 0x06, 0x65, 0xd5, 0xd2, 0x7b, 0x34, 0x60, 0xe8, 0xeb, 0x63, 0xd6, 0x1a, 0xcf, 0x67, 0x2d, 0xa7, - 0x16, 0xb6, 0x96, 0xa5, 0xe8, 0x99, 0xe8, 0x44, 0xb1, 0xd4, 0x84, 0x3c, 0x65, 0xa4, 0x17, 0x99, - 0xf8, 0xc6, 0xa4, 0x26, 0xaa, 0xea, 0x36, 0x66, 0xa5, 0xa0, 0x7c, 0x93, 0xb3, 0xc4, 0x21, 0x67, - 0xfd, 0xbd, 0x2c, 0xcc, 0xa9, 0x68, 0x2d, 0x93, 0x59, 0x3b, 0xe7, 0xe0, 0xc4, 0x1f, 0x68, 0x30, - 0x67, 0xda, 0x36, 0xb1, 0xd7, 0xcf, 0xd8, 0x95, 0x1f, 0x97, 0x62, 0xb9, 0x55, 0x69, 0xee, 0x78, - 0x5c, 0x20, 0xfa, 0x91, 0x06, 0xf3, 0x3e, 0xe9, 0xb9, 0x7b, 0x23, 0x8a, 0x64, 0x4f, 0xaf, 0xc8, - 0x27, 0xa4, 0x22, 0xf3, 0x78, 0x9c, 0x3f, 0x3e, 0x4c, 0xa8, 0xfe, 0x0f, 0x0d, 0x2e, 0x2e, 0x7b, - 0x5e, 0x97, 0x12, 0x7b, 0xcb, 0xfd, 0x1f, 0xcf, 0xa6, 0x3f, 0x69, 0x80, 0xd2, 0xb6, 0x9e, 0x43, - 0x3e, 0x59, 0xe9, 0x7c, 0x7a, 0x73, 0xe2, 0x7c, 0x4a, 0x29, 0x7c, 0x44, 0x46, 0xfd, 0x38, 0x0b, - 0xf3, 0x69, 0xc4, 0x8f, 0x72, 0xea, 0xbf, 0x97, 0x53, 0xbf, 0xcc, 0xc1, 0xfc, 0x4a, 0xb7, 0x1f, - 0x30, 0xe2, 0xa7, 0x94, 0x7c, 0xf1, 0xde, 0xf8, 0x9e, 0x06, 0x65, 0xd2, 0x6e, 0x13, 0x8b, 0xd1, - 0x3d, 0x72, 0x86, 0xce, 0xa8, 0x48, 0xa9, 0xe5, 0xb5, 0x11, 0xe6, 0x78, 0x4c, 0x1c, 0xfa, 0x2e, - 0xcc, 0xc5, 0x67, 0xcd, 0x56, 0xa3, 0xeb, 0x5a, 0xbb, 0x91, 0x1f, 0x6e, 0x4d, 0xaa, 0x43, 0xb3, - 0xb5, 0x41, 0x58, 0x12, 0x0a, 0x6b, 0xa3, 0x7c, 0xf1, 0xb8, 0x28, 0xb4, 0x04, 0x25, 0xe6, 0x32, - 0xb3, 0x1b, 0x99, 0x9f, 0xbb, 0xae, 0xdd, 0xc8, 0x26, 0xf5, 0x61, 0x4b, 0x81, 0xe1, 0x14, 0x26, - 0x5a, 0x04, 0x10, 0xdf, 0x5b, 0x66, 0x87, 0x04, 0x95, 0xbc, 0xa0, 0x8b, 0xef, 0x7b, 0x2b, 0x86, - 0x60, 0x05, 0x0b, 0xdd, 0x82, 0xa2, 0xd5, 0xf7, 0x7d, 0xe2, 0x30, 0xfe, 0xbd, 0x32, 0x25, 0x88, - 0xe6, 0x25, 0x51, 0x71, 0x25, 0x01, 0x61, 0x15, 0x4f, 0xff, 0x9b, 0x06, 0xc5, 0xb5, 0xce, 0xff, - 0xc1, 0x04, 0xf3, 0x7b, 0x0d, 0x2e, 0x29, 0x86, 0x9e, 0x43, 0xc1, 0x7d, 0x27, 0x5d, 0x70, 0x27, - 0xb6, 0x50, 0xd1, 0xf6, 0x88, 0x6a, 0xfb, 0x93, 0x2c, 0x94, 0x15, 0xac, 0xb0, 0xd4, 0xda, 0x00, - 0x6e, 0x7c, 0xef, 0x67, 0xea, 0x43, 0x85, 0xef, 0x47, 0xe5, 0xf6, 0x90, 0x72, 0xdb, 0x85, 0xab, - 0x6b, 0x8f, 0x19, 0xf1, 0x1d, 0xb3, 0xbb, 0xe6, 0x30, 0xca, 0xf6, 0x31, 0x69, 0x13, 0x9f, 0x38, - 0x16, 0x41, 0xd7, 0x21, 0xe7, 0x98, 0x3d, 0x22, 0xdc, 0x51, 0x68, 0x94, 0x24, 0xeb, 0xdc, 0x86, - 0xd9, 0x23, 0x58, 0x40, 0x50, 0x1d, 0x0a, 0xfc, 0x6f, 0xe0, 0x99, 0x16, 0xa9, 0x64, 0x04, 0xda, - 0x9c, 0x44, 0x2b, 0x6c, 0x44, 0x00, 0x9c, 0xe0, 0xe8, 0xff, 0xd6, 0xa0, 0x2c, 0xc4, 0x2f, 0x07, - 0x81, 0x6b, 0x51, 0x93, 0x51, 0xd7, 0x39, 0x9f, 0x3e, 0x5b, 0x36, 0xa5, 0x44, 0x69, 0xff, 0x89, - 0x47, 0x0a, 0x41, 0x1d, 0x5f, 0x52, 0x52, 0xdc, 0x97, 0x47, 0xf8, 0xe3, 0x31, 0x89, 0xfa, 0xfb, - 0x39, 0x28, 0x2a, 0x97, 0x8f, 0x1e, 0x42, 0xd6, 0x73, 0x6d, 0x69, 0xf3, 0xc4, 0xbb, 0x42, 0xcb, - 0xb5, 0x13, 0x35, 0xa6, 0x87, 0x83, 0x5a, 0x96, 0x9f, 0x70, 0x8e, 0xe8, 0xfb, 0x1a, 0x5c, 0x24, - 0x29, 0xaf, 0x0a, 0xef, 0x14, 0x17, 0xd7, 0x27, 0xce, 0xe7, 0xc3, 0x63, 0xa3, 0x81, 0x86, 0x83, - 0xda, 0xc5, 0x11, 0xe0, 0x88, 0x48, 0xf4, 0x19, 0xc8, 0x52, 0x2f, 0x0c, 0xeb, 0x52, 0xe3, 0x32, - 0x57, 0xb0, 0xd9, 0x0a, 0x0e, 0x06, 0xb5, 0x42, 0xb3, 0x25, 0x17, 0x18, 0xcc, 0x11, 0xd0, 0xdb, - 0x90, 0xf7, 0x5c, 0x9f, 0xf1, 0x66, 0xc3, 0x3d, 0xf2, 0x85, 0x49, 0x75, 0xe4, 0x91, 0x66, 0xb7, - 0x5c, 0x9f, 0x25, 0x15, 0x87, 0x7f, 0x0b, 0x70, 0xc8, 0x16, 0x7d, 0x0d, 0x72, 0x8e, 0x6b, 0x13, - 0xd1, 0x93, 0x8a, 0x8b, 0x77, 0x26, 0x66, 0xef, 0xda, 0x24, 0x31, 0x7c, 0x46, 0xa4, 0x00, 0x3f, - 0x12, 0x4c, 0x51, 0x07, 0xa6, 0x03, 0xe2, 0xef, 0x51, 0x2b, 0x6c, 0x5f, 0xc5, 0xc5, 0x2f, 0x4f, - 0xca, 0x7f, 0x33, 0x24, 0x4f, 0x44, 0x14, 0x87, 0x83, 0xda, 0x74, 0x74, 0x1a, 0x71, 0xd7, 0x7f, - 0xad, 0xc1, 0xc5, 0x74, 0xec, 0xa5, 0xd3, 0x4f, 0x3b, 0x3e, 0xfd, 0xe2, 0x8c, 0xce, 0x1c, 0x99, - 0xd1, 0x0d, 0xc8, 0xf6, 0xa9, 0x5d, 0xc9, 0x0a, 0x84, 0x57, 0x25, 0x42, 0xf6, 0xad, 0xe6, 0xea, - 0xc1, 0xa0, 0xf6, 0xf2, 0x51, 0xcf, 0x0d, 0x6c, 0xdf, 0x23, 0x81, 0xf1, 0x56, 0x73, 0x15, 0x73, - 0x62, 0xfd, 0xb7, 0x1a, 0x4c, 0xcb, 0x81, 0x02, 0x3d, 0x84, 0x9c, 0x45, 0x6d, 0x5f, 0xc6, 0xf8, - 0x09, 0x47, 0x98, 0x58, 0xd1, 0x95, 0xe6, 0x2a, 0xc6, 0x82, 0x21, 0x7a, 0x04, 0x53, 0xe4, 0xb1, - 0x45, 0x3c, 0x26, 0xf3, 0xf8, 0x84, 0xac, 0x2f, 0x4a, 0xd6, 0x53, 0x6b, 0x82, 0x19, 0x96, 0x4c, - 0xf5, 0x36, 0xe4, 0x05, 0x02, 0x7a, 0x05, 0x32, 0xd4, 0x13, 0xea, 0x97, 0x1a, 0xf3, 0xc3, 0x41, - 0x2d, 0xd3, 0x6c, 0xa5, 0x43, 0x38, 0x43, 0x3d, 0x3e, 0x35, 0x79, 0x3e, 0x69, 0xd3, 0xc7, 0xf7, - 0x88, 0xd3, 0x61, 0x3b, 0xe2, 0x7e, 0xf3, 0x49, 0x87, 0x6f, 0x29, 0x30, 0x9c, 0xc2, 0xd4, 0x7f, - 0xa1, 0x01, 0xba, 0xdf, 0xef, 0x32, 0x6a, 0x99, 0x01, 0x13, 0xee, 0x6d, 0x3a, 0x6d, 0x17, 0xbd, - 0x02, 0x79, 0x31, 0x08, 0x48, 0xaf, 0xc6, 0x71, 0x1d, 0x06, 0x40, 0x08, 0x43, 0x6f, 0x43, 0xce, - 0x73, 0xed, 0x13, 0xbf, 0x35, 0xa4, 0xea, 0x47, 0x7c, 0xc5, 0x2d, 0xd7, 0x0e, 0xb0, 0xe0, 0xab, - 0xbf, 0xa7, 0x41, 0x21, 0xce, 0x2d, 0x1e, 0x3b, 0x3c, 0x9d, 0x84, 0x46, 0x79, 0x15, 0xdf, 0x67, - 0x58, 0x40, 0x9e, 0x23, 0xba, 0x96, 0x60, 0x46, 0x3c, 0x42, 0x59, 0x6e, 0x57, 0x86, 0xd8, 0xb5, - 0x68, 0x16, 0x69, 0xc9, 0xf3, 0x03, 0xe5, 0x33, 0x8e, 0xb1, 0xf5, 0x7f, 0x66, 0x61, 0x76, 0x83, - 0xb0, 0x6f, 0xbb, 0xfe, 0x6e, 0xcb, 0xed, 0x52, 0x6b, 0xff, 0x1c, 0xba, 0x46, 0x1b, 0xf2, 0x7e, - 0xbf, 0x4b, 0xa2, 0x0b, 0x5e, 0x9e, 0xb8, 0x70, 0xa8, 0xfa, 0xe2, 0x7e, 0x97, 0x24, 0x7e, 0xe4, - 0xdf, 0x02, 0x1c, 0xb2, 0x47, 0x77, 0xe0, 0x92, 0x99, 0x5a, 0x3f, 0xc3, 0x9a, 0x59, 0x10, 0xf1, - 0x76, 0x29, 0xbd, 0x99, 0x06, 0x78, 0x14, 0x17, 0xdd, 0xe0, 0x97, 0x4a, 0x5d, 0x9f, 0x57, 0x79, - 0x3e, 0xae, 0x6b, 0x8d, 0x52, 0x78, 0xa1, 0xe1, 0x19, 0x8e, 0xa1, 0xe8, 0x26, 0x94, 0x18, 0x25, - 0x7e, 0x04, 0x11, 0x05, 0x31, 0xdf, 0x28, 0x8b, 0xc1, 0x5e, 0x39, 0xc7, 0x29, 0x2c, 0x14, 0x40, - 0x21, 0x70, 0xfb, 0xbe, 0xa8, 0x50, 0xb2, 0xc6, 0xdd, 0x3d, 0xdd, 0x55, 0xc4, 0x51, 0x37, 0xcb, - 0x2b, 0xd5, 0x66, 0xc4, 0x1c, 0x27, 0x72, 0xf4, 0x3f, 0x6a, 0x30, 0x97, 0x22, 0x3a, 0x87, 0xd9, - 0x77, 0x3b, 0x3d, 0xfb, 0xde, 0x39, 0x95, 0x91, 0x47, 0x4c, 0xbf, 0xdf, 0x81, 0xab, 0x29, 0x34, - 0xde, 0x49, 0x36, 0x99, 0xc9, 0xfa, 0x01, 0xfa, 0x2c, 0xcc, 0xf0, 0x8e, 0xb2, 0x91, 0x8c, 0x5c, - 0xb1, 0xb2, 0x1b, 0xf2, 0x1c, 0xc7, 0x18, 0x7c, 0xdd, 0x92, 0x2f, 0xbb, 0xd4, 0x75, 0x44, 0xca, - 0x29, 0xeb, 0xd6, 0x7a, 0x0c, 0xc1, 0x0a, 0x96, 0xfe, 0xbb, 0xcc, 0xc8, 0xa5, 0xb6, 0x08, 0xf1, - 0xd1, 0x6d, 0x98, 0x35, 0x95, 0xf7, 0xc4, 0xa0, 0xa2, 0x89, 0xe0, 0x9b, 0x1b, 0x0e, 0x6a, 0xb3, - 0xea, 0x43, 0x63, 0x80, 0xd3, 0x78, 0x88, 0xc0, 0x0c, 0xf5, 0xe4, 0x8a, 0x1a, 0x5e, 0xd9, 0xed, - 0xc9, 0x8b, 0xb0, 0xa0, 0x4f, 0x2c, 0x8d, 0x77, 0xd3, 0x98, 0x35, 0xaa, 0x41, 0xbe, 0xfd, 0x2d, - 0xdb, 0x89, 0x92, 0xa2, 0xc0, 0xef, 0xf4, 0xee, 0x57, 0x56, 0x37, 0x02, 0x1c, 0x9e, 0x23, 0xc6, - 0x37, 0x4f, 0xd9, 0x2f, 0xa3, 0x21, 0xe2, 0xf4, 0x5d, 0x58, 0xd9, 0x5d, 0x23, 0xde, 0x58, 0x91, - 0xc3, 0x97, 0xd0, 0x8f, 0x1d, 0x1e, 0xd6, 0xe8, 0x16, 0xe4, 0x78, 0x4b, 0x94, 0x5e, 0x7c, 0x39, - 0x2a, 0x84, 0x5b, 0xfb, 0x1e, 0x39, 0x18, 0xd4, 0xd2, 0x2e, 0xe0, 0x87, 0x58, 0xa0, 0x4f, 0x3c, - 0x4d, 0xc7, 0x05, 0x37, 0x7b, 0x5c, 0x3b, 0xcf, 0x9d, 0xa6, 0x9d, 0xff, 0x2a, 0x3f, 0x12, 0x35, - 0xbc, 0x78, 0xa1, 0x37, 0xa0, 0x60, 0x53, 0x9f, 0x58, 0x22, 0xfc, 0x42, 0x43, 0xab, 0x91, 0xb2, - 0xab, 0x11, 0xe0, 0x40, 0xfd, 0x82, 0x13, 0x02, 0x64, 0x41, 0xae, 0xed, 0xbb, 0x3d, 0x39, 0x95, - 0x9e, 0xae, 0xb2, 0xf2, 0x20, 0x4e, 0x8c, 0xbf, 0xeb, 0xbb, 0x3d, 0x2c, 0x98, 0xa3, 0x47, 0x90, - 0x61, 0xae, 0xb8, 0x9c, 0x33, 0x11, 0x01, 0x52, 0x44, 0x66, 0xcb, 0xc5, 0x19, 0xe6, 0xf2, 0xf0, - 0x0f, 0xd2, 0x41, 0x77, 0xfb, 0x84, 0x41, 0x97, 0x84, 0x7f, 0x1c, 0x69, 0x31, 0x6b, 0x5e, 0x16, - 0xbc, 0x91, 0x82, 0x9d, 0xf4, 0xcc, 0xb1, 0x12, 0xff, 0x10, 0xa6, 0xcc, 0xd0, 0x27, 0x53, 0xc2, - 0x27, 0x5f, 0xe2, 0xb3, 0xcd, 0x72, 0xe4, 0x8c, 0x85, 0x67, 0xfc, 0x50, 0xe7, 0xdb, 0xf1, 0xcf, - 0x66, 0x06, 0xf7, 0x70, 0x48, 0x84, 0x25, 0x3b, 0xf4, 0x3a, 0xcc, 0x12, 0xc7, 0xdc, 0xee, 0x92, - 0x7b, 0x6e, 0xa7, 0x43, 0x9d, 0x4e, 0x65, 0xfa, 0xba, 0x76, 0x63, 0xa6, 0x71, 0x45, 0xea, 0x32, - 0xbb, 0xa6, 0x02, 0x71, 0x1a, 0xf7, 0xb0, 0x0e, 0x37, 0x33, 0x41, 0x87, 0x8b, 0xe2, 0xbc, 0x70, - 0x54, 0x9c, 0xeb, 0x3f, 0xcd, 0x02, 0x4a, 0x79, 0x8c, 0xd7, 0xd4, 0x80, 0xef, 0x41, 0xb3, 0x8e, - 0x7a, 0x2c, 0xbb, 0xc6, 0x59, 0xf5, 0xaf, 0xd8, 0xfa, 0x34, 0x3c, 0x2d, 0x13, 0x79, 0x50, 0x62, - 0xbe, 0xd9, 0x6e, 0x53, 0x4b, 0x68, 0x25, 0x83, 0xfe, 0xb5, 0x67, 0xe8, 0x20, 0x7e, 0xc5, 0x34, - 0x62, 0x77, 0x6c, 0x29, 0xd4, 0xca, 0x5b, 0x9c, 0x72, 0x8a, 0x53, 0x12, 0xd0, 0xbb, 0x1a, 0x94, - 0xf9, 0x6c, 0xa1, 0xa2, 0xc8, 0xe7, 0x85, 0x2f, 0x3e, 0xbf, 0x58, 0x3c, 0xc2, 0x21, 0xd9, 0x75, - 0x47, 0x21, 0x78, 0x4c, 0x9a, 0xfe, 0x57, 0x0d, 0xe6, 0xc7, 0x3c, 0xd2, 0x3f, 0x8f, 0x67, 0xdc, - 0x2e, 0xe4, 0x79, 0x97, 0x8c, 0x7a, 0xd2, 0xfa, 0xa9, 0x7c, 0x9d, 0xf4, 0xe7, 0xa4, 0xa1, 0xf3, - 0xb3, 0x00, 0x87, 0x42, 0xf4, 0x05, 0x98, 0x4d, 0x2d, 0x88, 0xc7, 0xbf, 0x9a, 0xe8, 0xef, 0xe7, - 0xa1, 0x1c, 0xf1, 0x0d, 0x36, 0xfb, 0xbd, 0x9e, 0xe9, 0x9f, 0xc7, 0x38, 0xfb, 0x43, 0x0d, 0x2e, - 0xa9, 0x81, 0x49, 0xe3, 0x2b, 0x6a, 0x9c, 0xea, 0x8a, 0xc2, 0xd8, 0xb8, 0x2a, 0x65, 0x5f, 0xda, - 0x48, 0x8b, 0xc0, 0xa3, 0x32, 0xd1, 0x6f, 0x34, 0xb8, 0x16, 0x4a, 0x91, 0xcf, 0xfc, 0x23, 0x14, - 0x32, 0x50, 0xcf, 0x42, 0xa9, 0x4f, 0x49, 0xa5, 0xae, 0x2d, 0x3f, 0x43, 0x1e, 0x7e, 0xa6, 0x36, - 0xe8, 0xe7, 0x1a, 0x5c, 0x09, 0x11, 0x46, 0xf5, 0xcc, 0x9d, 0x99, 0x9e, 0x9f, 0x94, 0x7a, 0x5e, - 0x59, 0x3e, 0x4c, 0x10, 0x3e, 0x5c, 0x3e, 0x1f, 0xcc, 0x7b, 0xd1, 0xea, 0x58, 0xc9, 0x9f, 0x4c, - 0x99, 0xf1, 0xdd, 0x33, 0x99, 0x39, 0x62, 0x18, 0x4e, 0xe4, 0xe8, 0x8f, 0xe0, 0x72, 0xcb, 0xec, - 0x50, 0x47, 0x4c, 0x94, 0xeb, 0x84, 0x3d, 0xf0, 0xf8, 0x07, 0x51, 0xa3, 0x3d, 0xb3, 0x13, 0x86, - 0x7d, 0x56, 0x59, 0x0f, 0xcd, 0x0e, 0xc1, 0x02, 0xc2, 0x77, 0xda, 0x2e, 0xed, 0x51, 0x26, 0x87, - 0xd5, 0x38, 0x9d, 0xee, 0xf1, 0x43, 0x1c, 0xc2, 0x74, 0x13, 0x4a, 0xea, 0x5e, 0xfa, 0x22, 0xde, - 0x20, 0xff, 0x95, 0x81, 0xe8, 0x75, 0x05, 0xdd, 0x54, 0x16, 0xd2, 0x50, 0x44, 0xe5, 0xf8, 0x65, - 0x14, 0x6d, 0xc8, 0x55, 0x38, 0x73, 0x4c, 0x9e, 0xf6, 0x19, 0xed, 0x1a, 0xe1, 0xbf, 0x61, 0x18, - 0x4d, 0x87, 0x3d, 0xf0, 0x37, 0x99, 0x4f, 0x9d, 0x4e, 0xf8, 0x86, 0xa4, 0x2c, 0xce, 0x9f, 0x86, - 0x69, 0xe2, 0x88, 0x2d, 0x5b, 0x4c, 0x2b, 0xf9, 0xf0, 0x05, 0x68, 0x2d, 0x3c, 0xc2, 0x11, 0x8c, - 0x2f, 0x7a, 0xd4, 0xea, 0x79, 0x7c, 0x62, 0x14, 0x13, 0x5d, 0x3e, 0x5c, 0xf4, 0x9a, 0x2b, 0xf7, - 0x5b, 0x62, 0x8a, 0x8c, 0xa1, 0x11, 0xe6, 0x4a, 0xf4, 0xea, 0xa5, 0x60, 0xf2, 0x33, 0x1c, 0x43, - 0x05, 0x66, 0x47, 0xf2, 0x9c, 0x52, 0x30, 0xd7, 0x63, 0x9e, 0x12, 0x8a, 0x96, 0xe4, 0x4f, 0x20, - 0x72, 0x25, 0x10, 0xfd, 0xbf, 0x30, 0xf2, 0x2b, 0x46, 0xf4, 0x26, 0x92, 0xc2, 0xd4, 0x09, 0x94, - 0x47, 0xa7, 0xeb, 0x17, 0xe0, 0xd7, 0xc6, 0xd6, 0x93, 0xa7, 0xd5, 0x0b, 0x1f, 0x3c, 0xad, 0x5e, - 0xf8, 0xf0, 0x69, 0xf5, 0xc2, 0xbb, 0xc3, 0xaa, 0xf6, 0x64, 0x58, 0xd5, 0x3e, 0x18, 0x56, 0xb5, - 0x0f, 0x87, 0x55, 0xed, 0xcf, 0xc3, 0xaa, 0xf6, 0xb3, 0xbf, 0x54, 0x2f, 0x7c, 0xd5, 0x98, 0xec, - 0x7f, 0x95, 0xfe, 0x13, 0x00, 0x00, 0xff, 0xff, 0xca, 0x4d, 0x24, 0x0a, 0xdc, 0x24, 0x00, 0x00, + // 2562 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x1a, 0xdd, 0x6f, 0x1c, 0x47, + 0x3d, 0x7b, 0x1f, 0xb6, 0xef, 0xe7, 0x8f, 0x9c, 0xc7, 0x6d, 0x63, 0xda, 0xc4, 0x4e, 0xb6, 0x50, + 0x45, 0xa8, 0xdc, 0xd5, 0x26, 0x69, 0x02, 0x69, 0x0a, 0x3e, 0xc7, 0xb1, 0x4e, 0x4d, 0x9c, 0xeb, + 0xd8, 0x51, 0x24, 0x4a, 0x4a, 0xd7, 0xbb, 0x73, 0xe7, 0xc1, 0x7b, 0xbb, 0xdb, 0xd9, 0x39, 0x37, + 0x16, 0x12, 0x2a, 0x02, 0x1e, 0xca, 0x57, 0x10, 0x2f, 0x88, 0x37, 0x78, 0xe2, 0x85, 0xbf, 0xa0, + 0x6f, 0xbc, 0x45, 0x3c, 0x15, 0x21, 0x44, 0x9f, 0x2c, 0x62, 0x04, 0xa8, 0x0f, 0xf0, 0x4e, 0x78, + 0x41, 0x33, 0x3b, 0xbb, 0x3b, 0x7b, 0xe7, 0x8b, 0x73, 0xb6, 0x63, 0x24, 0xe8, 0x93, 0x6f, 0x7f, + 0xdf, 0x33, 0xbf, 0xdf, 0xcc, 0xef, 0x63, 0x0c, 0xaf, 0x5b, 0x1e, 0x67, 0xc4, 0xaa, 0x50, 0xbf, + 0x1a, 0xfd, 0xaa, 0x06, 0x9b, 0xad, 0xaa, 0x15, 0xd0, 0xb0, 0x6a, 0xfb, 0x1e, 0x67, 0xbe, 0x1b, + 0xb8, 0x96, 0x47, 0xaa, 0x5b, 0x73, 0xeb, 0x84, 0x5b, 0xf3, 0xd5, 0x16, 0xf1, 0x08, 0xb3, 0x38, + 0x71, 0x2a, 0x01, 0xf3, 0xb9, 0x8f, 0x2a, 0x11, 0xd7, 0x37, 0xa8, 0xaf, 0x7e, 0x55, 0x82, 0xcd, + 0x56, 0x45, 0xf0, 0x57, 0x74, 0xfe, 0x8a, 0xe2, 0x7f, 0xfe, 0x72, 0x7f, 0x7d, 0x21, 0xb7, 0x78, + 0x58, 0xdd, 0x9a, 0xb3, 0xdc, 0x60, 0xc3, 0x9a, 0xeb, 0xd6, 0xf4, 0xfc, 0x17, 0x5a, 0x94, 0x6f, + 0x74, 0xd6, 0x2b, 0xb6, 0xdf, 0xae, 0xb6, 0xfc, 0x96, 0x5f, 0x95, 0xe0, 0xf5, 0x4e, 0x53, 0x7e, + 0xc9, 0x0f, 0xf9, 0x4b, 0x91, 0x5f, 0xd8, 0xbc, 0x1c, 0x4a, 0x2d, 0x01, 0x6d, 0x5b, 0xf6, 0x06, + 0xf5, 0x08, 0xdb, 0x4e, 0x75, 0xb5, 0x09, 0xb7, 0xaa, 0x5b, 0xbd, 0x4a, 0xaa, 0xfd, 0xb8, 0x58, + 0xc7, 0xe3, 0xb4, 0x4d, 0x7a, 0x18, 0x5e, 0xdd, 0x8f, 0x21, 0xb4, 0x37, 0x48, 0xdb, 0xea, 0xe1, + 0xfb, 0x62, 0x3f, 0xbe, 0x0e, 0xa7, 0x6e, 0x95, 0x7a, 0x3c, 0xe4, 0xac, 0x9b, 0xc9, 0xfc, 0xbb, + 0x01, 0x63, 0x0b, 0x8e, 0xc3, 0x48, 0x18, 0x2e, 0x33, 0xbf, 0x13, 0xa0, 0x77, 0x60, 0x44, 0xac, + 0xc4, 0xb1, 0xb8, 0x35, 0x6d, 0x9c, 0x35, 0xce, 0x8f, 0xce, 0xbf, 0x52, 0x89, 0x04, 0x57, 0x74, + 0xc1, 0xa9, 0x4f, 0x04, 0x75, 0x65, 0x6b, 0xae, 0x72, 0x6b, 0xfd, 0x9b, 0xc4, 0xe6, 0x37, 0x09, + 0xb7, 0x6a, 0xe8, 0xc1, 0xce, 0xec, 0x89, 0xdd, 0x9d, 0x59, 0x48, 0x61, 0x38, 0x91, 0x8a, 0x3a, + 0x30, 0xd6, 0x12, 0xaa, 0x6e, 0x92, 0xf6, 0x3a, 0x61, 0xe1, 0x74, 0xee, 0x6c, 0xfe, 0xfc, 0xe8, + 0xfc, 0x95, 0x01, 0xdd, 0x5e, 0x59, 0x4e, 0x65, 0xd4, 0x9e, 0x51, 0x0a, 0xc7, 0x34, 0x60, 0x88, + 0x33, 0x6a, 0xcc, 0x3f, 0x18, 0x50, 0xd6, 0x57, 0x7a, 0x83, 0x86, 0x1c, 0x7d, 0xbd, 0x67, 0xb5, + 0x95, 0x27, 0x5b, 0xad, 0xe0, 0x96, 0x6b, 0x2d, 0x2b, 0xd5, 0x23, 0x31, 0x44, 0x5b, 0xa9, 0x05, + 0x45, 0xca, 0x49, 0x3b, 0x5e, 0xe2, 0x6b, 0x83, 0x2e, 0x51, 0x37, 0xb7, 0x36, 0xae, 0x14, 0x15, + 0xeb, 0x42, 0x24, 0x8e, 0x24, 0x9b, 0x1f, 0xe4, 0x61, 0x52, 0x27, 0x6b, 0x58, 0xdc, 0xde, 0x38, + 0x06, 0x27, 0x7e, 0xcf, 0x80, 0x49, 0xcb, 0x71, 0x88, 0xb3, 0x7c, 0xc4, 0xae, 0xfc, 0x8c, 0x52, + 0x2b, 0x56, 0x95, 0x95, 0x8e, 0x7b, 0x15, 0xa2, 0x1f, 0x18, 0x30, 0xc5, 0x48, 0xdb, 0xdf, 0xea, + 0x32, 0x24, 0x7f, 0x78, 0x43, 0x5e, 0x50, 0x86, 0x4c, 0xe1, 0x5e, 0xf9, 0x78, 0x2f, 0xa5, 0xe6, + 0x27, 0x06, 0x4c, 0x2c, 0x04, 0x81, 0x4b, 0x89, 0xb3, 0xe6, 0xff, 0x8f, 0x9f, 0xa6, 0x3f, 0x19, + 0x80, 0xb2, 0x6b, 0x3d, 0x86, 0xf3, 0x64, 0x67, 0xcf, 0xd3, 0xeb, 0x03, 0x9f, 0xa7, 0x8c, 0xc1, + 0x7d, 0x4e, 0xd4, 0x0f, 0xf3, 0x30, 0x95, 0x25, 0xfc, 0xf4, 0x4c, 0xfd, 0xf7, 0xce, 0xd4, 0xbb, + 0x30, 0x55, 0xb3, 0x42, 0x6a, 0x2f, 0x74, 0xf8, 0x06, 0xf1, 0x38, 0xb5, 0x2d, 0x4e, 0x7d, 0x0f, + 0xbd, 0x0c, 0x23, 0x9d, 0x90, 0x30, 0xcf, 0x6a, 0x13, 0xe9, 0x8c, 0x52, 0x1a, 0x37, 0xb7, 0x15, + 0x1c, 0x27, 0x14, 0x82, 0x3a, 0xb0, 0xc2, 0xf0, 0x3d, 0x9f, 0x39, 0xd3, 0xb9, 0x2c, 0x75, 0x43, + 0xc1, 0x71, 0x42, 0x61, 0xce, 0x41, 0xb9, 0xd6, 0xf1, 0x1c, 0x97, 0x5c, 0xa7, 0x2e, 0x59, 0x25, + 0x6c, 0x8b, 0x30, 0x74, 0x06, 0xf2, 0x1d, 0xe6, 0x2a, 0x55, 0xa3, 0x8a, 0x39, 0x7f, 0x1b, 0xdf, + 0xc0, 0x02, 0x6e, 0xde, 0xcf, 0xc1, 0x99, 0x88, 0x27, 0xa2, 0x17, 0xd6, 0x2e, 0xfa, 0x5e, 0x93, + 0xb6, 0x3a, 0x2c, 0x32, 0xf8, 0x22, 0x8c, 0xae, 0x13, 0x8b, 0x11, 0xb6, 0xe6, 0x6f, 0x12, 0x4f, + 0x09, 0x9a, 0x52, 0x82, 0x46, 0x6b, 0x29, 0x0a, 0xeb, 0x74, 0xe8, 0x25, 0x18, 0xb2, 0x02, 0xfa, + 0x06, 0xd9, 0x56, 0x76, 0x4f, 0x28, 0x8e, 0xa1, 0x85, 0x46, 0xfd, 0x0d, 0xb2, 0x8d, 0x15, 0x16, + 0xfd, 0xc4, 0x80, 0xa9, 0xf5, 0xde, 0x7d, 0x9a, 0xce, 0xcb, 0x40, 0x5d, 0x1c, 0xd4, 0x67, 0x7b, + 0x6c, 0x79, 0xed, 0x94, 0xf0, 0xdb, 0x1e, 0x08, 0xbc, 0x97, 0x62, 0xf3, 0x97, 0x05, 0x98, 0x5a, + 0x74, 0x3b, 0x21, 0x27, 0x2c, 0x13, 0x5c, 0x4f, 0xff, 0x14, 0x7d, 0xc7, 0x80, 0x32, 0x69, 0x36, + 0x89, 0xcd, 0xe9, 0x16, 0x39, 0xc2, 0x43, 0x34, 0xad, 0xb4, 0x96, 0x97, 0xba, 0x84, 0xe3, 0x1e, + 0x75, 0xe8, 0xdb, 0x30, 0x99, 0xc0, 0xea, 0x8d, 0x9a, 0xeb, 0xdb, 0x9b, 0xf1, 0xf9, 0xb9, 0x38, + 0xa8, 0x0d, 0xf5, 0xc6, 0x0a, 0xe1, 0xe9, 0x11, 0x5e, 0xea, 0x96, 0x8b, 0x7b, 0x55, 0xa1, 0xcb, + 0x30, 0xc6, 0x7d, 0x6e, 0xb9, 0xf1, 0xf2, 0x0b, 0x67, 0x8d, 0xf3, 0xf9, 0xf4, 0x5e, 0x5f, 0xd3, + 0x70, 0x38, 0x43, 0x89, 0xe6, 0x01, 0xe4, 0x77, 0xc3, 0x6a, 0x91, 0x70, 0xba, 0x28, 0xf9, 0x92, + 0xfd, 0x5e, 0x4b, 0x30, 0x58, 0xa3, 0x12, 0xb1, 0x6d, 0x77, 0x18, 0x23, 0x1e, 0x17, 0xdf, 0xd3, + 0x43, 0x92, 0x29, 0x89, 0xed, 0xc5, 0x14, 0x85, 0x75, 0x3a, 0xf3, 0x6f, 0x06, 0x8c, 0x2e, 0xb5, + 0xfe, 0x0f, 0x2a, 0xcf, 0xdf, 0x1b, 0x70, 0x52, 0x5b, 0xe8, 0x31, 0x24, 0xca, 0x77, 0xb2, 0x89, + 0x72, 0xe0, 0x15, 0x6a, 0xd6, 0xf6, 0xc9, 0x92, 0x3f, 0xca, 0x43, 0x59, 0xa3, 0x8a, 0x52, 0xa4, + 0x03, 0xe0, 0x27, 0xfb, 0x7e, 0xa4, 0x3e, 0xd4, 0xe4, 0x7e, 0x9a, 0x26, 0xf7, 0x48, 0x93, 0x2e, + 0x9c, 0x5a, 0xba, 0xc7, 0x45, 0xba, 0x73, 0x97, 0x3c, 0x4e, 0xf9, 0x36, 0x26, 0x4d, 0xc2, 0x88, + 0x67, 0x13, 0x74, 0x16, 0x0a, 0x5a, 0x9a, 0x1c, 0x53, 0xa2, 0x0b, 0x2b, 0x22, 0x45, 0x4a, 0x0c, + 0xaa, 0x42, 0x49, 0xfc, 0x0d, 0x03, 0xcb, 0x26, 0x2a, 0xcf, 0x4c, 0x2a, 0xb2, 0xd2, 0x4a, 0x8c, + 0xc0, 0x29, 0x8d, 0xf9, 0x6f, 0x03, 0xca, 0x52, 0xfd, 0x42, 0x18, 0xfa, 0x36, 0x8d, 0x32, 0xdc, + 0xb1, 0xd4, 0x47, 0x65, 0x4b, 0x69, 0x54, 0xeb, 0x3f, 0x70, 0x29, 0x28, 0xb9, 0x93, 0x4d, 0x4a, + 0x2f, 0xf7, 0x85, 0x2e, 0xf9, 0xb8, 0x47, 0xa3, 0xf9, 0x61, 0x01, 0x46, 0xb5, 0xcd, 0x47, 0x77, + 0x20, 0x1f, 0xf8, 0x8e, 0x5a, 0xf3, 0xc0, 0x3d, 0x5e, 0xc3, 0x77, 0x52, 0x33, 0x86, 0x45, 0x55, + 0x21, 0x20, 0x42, 0x22, 0xfa, 0xae, 0x01, 0x13, 0x24, 0xe3, 0x55, 0xe9, 0x9d, 0xd1, 0xf9, 0xe5, + 0x81, 0xcf, 0xf3, 0xde, 0xb1, 0x51, 0x43, 0xbb, 0x3b, 0xb3, 0x13, 0x5d, 0xc8, 0x2e, 0x95, 0xe8, + 0x25, 0xc8, 0xd3, 0x20, 0x0a, 0xeb, 0xb1, 0xda, 0x33, 0xc2, 0xc0, 0x7a, 0x23, 0x7c, 0xb4, 0x33, + 0x5b, 0xaa, 0x37, 0x54, 0xe3, 0x89, 0x05, 0x01, 0x7a, 0x1b, 0x8a, 0x81, 0xcf, 0xb8, 0x48, 0x36, + 0xc2, 0x23, 0x5f, 0x1a, 0xd4, 0x46, 0x11, 0x69, 0x4e, 0xc3, 0x67, 0x3c, 0xbd, 0x71, 0xc4, 0x57, + 0x88, 0x23, 0xb1, 0xe8, 0x2d, 0x28, 0x78, 0xbe, 0x43, 0x64, 0x4e, 0x1a, 0x9d, 0xbf, 0x3a, 0xb0, + 0x78, 0xdf, 0x21, 0xe9, 0xc2, 0x47, 0xe4, 0x11, 0x10, 0x20, 0x29, 0x14, 0xb5, 0x60, 0x38, 0x24, + 0x6c, 0x8b, 0xda, 0x51, 0xfa, 0x1a, 0x9d, 0xff, 0xea, 0xa0, 0xf2, 0x57, 0x23, 0xf6, 0x54, 0xc5, + 0xe8, 0xee, 0xce, 0xec, 0x70, 0x0c, 0x8d, 0xa5, 0x9b, 0xbf, 0x36, 0x60, 0x22, 0x1b, 0x7b, 0xd9, + 0xe3, 0x67, 0xec, 0x7f, 0xfc, 0x92, 0x13, 0x9d, 0xeb, 0x7b, 0xa2, 0x6b, 0x90, 0xef, 0x50, 0x47, + 0x56, 0x7f, 0xa5, 0xda, 0x2b, 0x49, 0xb9, 0x5a, 0xbf, 0xf6, 0x68, 0x67, 0xf6, 0x5c, 0xbf, 0x31, + 0x11, 0xdf, 0x0e, 0x48, 0x58, 0xb9, 0x5d, 0xbf, 0x86, 0x05, 0xb3, 0xf9, 0x5b, 0x03, 0x86, 0x55, + 0x41, 0x81, 0xee, 0x40, 0xc1, 0xa6, 0x0e, 0x53, 0x31, 0x7e, 0xc0, 0x12, 0x26, 0x31, 0x74, 0xb1, + 0x7e, 0x0d, 0x63, 0x29, 0x10, 0xdd, 0x85, 0x21, 0x72, 0xcf, 0x26, 0x01, 0x57, 0xe7, 0xf8, 0x80, + 0xa2, 0x93, 0xb2, 0x78, 0x49, 0x0a, 0xc3, 0x4a, 0xa8, 0xd9, 0x84, 0xa2, 0x24, 0x40, 0x2f, 0x42, + 0x8e, 0x06, 0xd2, 0xfc, 0xb1, 0xda, 0xd4, 0xee, 0xce, 0x6c, 0xae, 0xde, 0xc8, 0x86, 0x70, 0x8e, + 0x06, 0xa2, 0x6a, 0x0a, 0x18, 0x69, 0xd2, 0x7b, 0x37, 0x88, 0xd7, 0xe2, 0x1b, 0x72, 0x7f, 0x8b, + 0x69, 0x86, 0x6f, 0x68, 0x38, 0x9c, 0xa1, 0x34, 0x7f, 0x61, 0x00, 0xba, 0xd9, 0x71, 0x45, 0xf5, + 0x1b, 0x72, 0xe9, 0xde, 0xba, 0xd7, 0xf4, 0xd1, 0x8b, 0x50, 0x94, 0x85, 0x80, 0xf2, 0x6a, 0x12, + 0xd7, 0x51, 0x00, 0x44, 0x38, 0xf4, 0x36, 0x14, 0x02, 0xdf, 0x39, 0xf0, 0x8c, 0x28, 0x73, 0x7f, + 0x24, 0x5b, 0xdc, 0xf0, 0x9d, 0x10, 0x4b, 0xb9, 0xe6, 0x07, 0x06, 0x94, 0x92, 0xb3, 0x25, 0x62, + 0x47, 0x1c, 0x27, 0x69, 0x51, 0x51, 0xa7, 0x67, 0x1c, 0x4b, 0xcc, 0x13, 0x44, 0xd7, 0x65, 0x18, + 0x91, 0xc3, 0x43, 0xdb, 0x77, 0x55, 0x88, 0x9d, 0x4e, 0xda, 0x29, 0x05, 0x7f, 0xa4, 0xfd, 0xc6, + 0x09, 0xb5, 0xf9, 0x8f, 0x3c, 0x8c, 0xaf, 0x10, 0xfe, 0x9e, 0xcf, 0x36, 0x1b, 0xbe, 0x4b, 0xed, + 0xed, 0x63, 0xc8, 0x1a, 0x4d, 0x28, 0xb2, 0x8e, 0x4b, 0xe2, 0x0d, 0x5e, 0x18, 0xf8, 0xe2, 0xd0, + 0xed, 0xc5, 0x1d, 0x97, 0xa4, 0x7e, 0x14, 0x5f, 0x21, 0x8e, 0xc4, 0xa3, 0xab, 0x70, 0xd2, 0xca, + 0x8c, 0x0d, 0xa2, 0x3b, 0xb3, 0x24, 0xe3, 0xed, 0x64, 0x76, 0xa2, 0x10, 0xe2, 0x6e, 0x5a, 0x74, + 0x5e, 0x6c, 0x2a, 0xf5, 0x99, 0xb8, 0xe5, 0x45, 0xb9, 0x6e, 0xd4, 0xc6, 0xa2, 0x0d, 0x8d, 0x60, + 0x38, 0xc1, 0xa2, 0x0b, 0x30, 0xc6, 0x29, 0x61, 0x31, 0x46, 0x5e, 0x88, 0xc5, 0x5a, 0x59, 0x16, + 0xf6, 0x1a, 0x1c, 0x67, 0xa8, 0x50, 0x08, 0xa5, 0xd0, 0xef, 0x30, 0x79, 0x43, 0xa9, 0x3b, 0xee, + 0xfa, 0xe1, 0xb6, 0x22, 0x89, 0xba, 0x71, 0x71, 0x53, 0xad, 0xc6, 0xc2, 0x71, 0xaa, 0xc7, 0xfc, + 0xa3, 0x01, 0x93, 0x19, 0xa6, 0x63, 0xa8, 0x7d, 0xd7, 0xb3, 0xb5, 0xef, 0xd5, 0x43, 0x2d, 0xb2, + 0x4f, 0xf5, 0xfb, 0x2d, 0x38, 0x95, 0x21, 0x13, 0x99, 0x64, 0x95, 0x5b, 0xbc, 0x13, 0xa2, 0x97, + 0x61, 0x44, 0x64, 0x94, 0x95, 0x3d, 0x26, 0x13, 0x2b, 0x0a, 0x8e, 0x13, 0x0a, 0xd1, 0x6e, 0xa9, + 0x89, 0xbc, 0xe8, 0xd6, 0x73, 0xd9, 0x76, 0x6b, 0x39, 0xc1, 0x60, 0x8d, 0xca, 0xfc, 0x5d, 0xae, + 0x6b, 0x53, 0x1b, 0x84, 0x30, 0x74, 0x09, 0xc6, 0x2d, 0x6d, 0x0e, 0x1c, 0x4e, 0x1b, 0x32, 0xf8, + 0x26, 0x77, 0x77, 0x66, 0xc7, 0xf5, 0x01, 0x71, 0x88, 0xb3, 0x74, 0x88, 0xc0, 0x08, 0x0d, 0x54, + 0x8b, 0x1a, 0x6d, 0xd9, 0xa5, 0xc1, 0x2f, 0x61, 0xc9, 0x9f, 0xae, 0x34, 0xe9, 0x4d, 0x13, 0xd1, + 0x68, 0x16, 0x8a, 0xcd, 0x77, 0x1d, 0x2f, 0x3e, 0x14, 0x25, 0xb1, 0xa7, 0xd7, 0xdf, 0xbc, 0xb6, + 0x12, 0xe2, 0x08, 0x8e, 0xb8, 0xe8, 0x3c, 0x55, 0xbe, 0x8c, 0x8b, 0x88, 0xc3, 0x67, 0x61, 0xad, + 0x77, 0x8d, 0x65, 0x63, 0x4d, 0x8f, 0x68, 0x42, 0x9f, 0xdb, 0x3b, 0xac, 0xd1, 0x45, 0x28, 0x88, + 0x94, 0xa8, 0xbc, 0x78, 0x2e, 0xbe, 0x08, 0xd7, 0xb6, 0x03, 0xf2, 0x68, 0x67, 0x36, 0xeb, 0x02, + 0x01, 0xc4, 0x92, 0x7c, 0xe0, 0x6a, 0x3a, 0xb9, 0x70, 0xf3, 0xfb, 0xa5, 0xf3, 0xc2, 0x61, 0xd2, + 0xf9, 0xaf, 0x8a, 0x5d, 0x51, 0x23, 0x2e, 0x2f, 0xf4, 0x1a, 0x94, 0x1c, 0xca, 0x88, 0x2d, 0xc3, + 0x2f, 0x5a, 0xe8, 0x4c, 0x6c, 0xec, 0xb5, 0x18, 0xf1, 0x48, 0xff, 0xc0, 0x29, 0x03, 0xb2, 0xa1, + 0xd0, 0x64, 0x7e, 0x5b, 0x55, 0xa5, 0x87, 0xbb, 0x59, 0x45, 0x10, 0xa7, 0x8b, 0xbf, 0xce, 0xfc, + 0x36, 0x96, 0xc2, 0xd1, 0x5d, 0xc8, 0x71, 0x5f, 0x0d, 0xb2, 0x8e, 0x40, 0x05, 0x28, 0x15, 0xb9, + 0x35, 0x1f, 0xe7, 0xb8, 0x2f, 0xc2, 0x3f, 0xcc, 0x06, 0xdd, 0xa5, 0x03, 0x06, 0x5d, 0x1a, 0xfe, + 0x49, 0xa4, 0x25, 0xa2, 0xe5, 0x08, 0xb2, 0xeb, 0xc2, 0x4e, 0x73, 0x66, 0xcf, 0x15, 0x7f, 0x07, + 0x86, 0xac, 0xc8, 0x27, 0x43, 0xd2, 0x27, 0x5f, 0x91, 0x23, 0xbf, 0xd8, 0x19, 0x73, 0x8f, 0x79, + 0x60, 0x65, 0x4e, 0xf2, 0xdc, 0x59, 0x11, 0x1e, 0x8e, 0x98, 0xb0, 0x12, 0x87, 0xae, 0xc0, 0x38, + 0xf1, 0xac, 0x75, 0x97, 0xdc, 0xf0, 0x5b, 0x2d, 0xea, 0xb5, 0xa6, 0x87, 0xcf, 0x1a, 0xe7, 0x47, + 0x6a, 0xcf, 0x2a, 0x5b, 0xc6, 0x97, 0x74, 0x24, 0xce, 0xd2, 0xee, 0x95, 0xe1, 0x46, 0x06, 0xc8, + 0x70, 0x71, 0x9c, 0x97, 0xfa, 0xc5, 0xb9, 0x79, 0x3f, 0x0f, 0x28, 0xe3, 0x31, 0x71, 0xa7, 0x86, + 0xa2, 0x0f, 0x1a, 0xf7, 0x74, 0xb0, 0xca, 0x1a, 0x47, 0x95, 0xbf, 0x92, 0xd5, 0x67, 0xf1, 0x59, + 0x9d, 0x28, 0x80, 0x31, 0xce, 0xac, 0x66, 0x93, 0xda, 0xd2, 0x2a, 0x15, 0xf4, 0xaf, 0x3e, 0xc6, + 0x06, 0xf9, 0xfa, 0x5c, 0x49, 0xdc, 0xb1, 0xa6, 0x71, 0x6b, 0xb3, 0x38, 0x0d, 0x8a, 0x33, 0x1a, + 0xd0, 0xfb, 0x06, 0x94, 0x45, 0x6d, 0xa1, 0x93, 0xa8, 0xf1, 0xc2, 0x97, 0x9f, 0x5c, 0x2d, 0xee, + 0x92, 0x90, 0xf6, 0xba, 0xdd, 0x18, 0xdc, 0xa3, 0xcd, 0xfc, 0xab, 0x01, 0x53, 0x3d, 0x1e, 0xe9, + 0x1c, 0xc7, 0x18, 0xd7, 0x85, 0xa2, 0xc8, 0x92, 0x71, 0x4e, 0x5a, 0x3e, 0x94, 0xaf, 0xd3, 0xfc, + 0x9c, 0x26, 0x74, 0x01, 0x0b, 0x71, 0xa4, 0xc4, 0x9c, 0x83, 0xf1, 0x4c, 0x83, 0xb8, 0xff, 0xd4, + 0xc4, 0xfc, 0xb0, 0x08, 0xe5, 0x58, 0x6e, 0xb8, 0xda, 0x69, 0xb7, 0x2d, 0x76, 0x1c, 0xe5, 0xec, + 0xf7, 0x0d, 0x38, 0xa9, 0x07, 0x26, 0x4d, 0xb6, 0xa8, 0x76, 0xa8, 0x2d, 0x8a, 0x62, 0xe3, 0x94, + 0xd2, 0x7d, 0x72, 0x25, 0xab, 0x02, 0x77, 0xeb, 0x44, 0xbf, 0x31, 0xe0, 0x74, 0xa4, 0x45, 0x8d, + 0xf9, 0xbb, 0x38, 0x54, 0xa0, 0x1e, 0x85, 0x51, 0x9f, 0x55, 0x46, 0x9d, 0x5e, 0x78, 0x8c, 0x3e, + 0xfc, 0x58, 0x6b, 0xd0, 0xcf, 0x0d, 0x78, 0x36, 0x22, 0xe8, 0xb6, 0xb3, 0x70, 0x64, 0x76, 0x9e, + 0x51, 0x76, 0x3e, 0xbb, 0xb0, 0x97, 0x22, 0xbc, 0xb7, 0x7e, 0x51, 0x98, 0xb7, 0xe3, 0xd6, 0x71, + 0xba, 0x78, 0x30, 0x63, 0x7a, 0x7b, 0xcf, 0xb4, 0xe6, 0x48, 0x70, 0x38, 0xd5, 0x63, 0xde, 0x85, + 0x67, 0x1a, 0x56, 0x8b, 0x7a, 0xb2, 0xa2, 0x5c, 0x26, 0xfc, 0x56, 0x20, 0x7e, 0xc8, 0x3b, 0x3a, + 0xb0, 0x5a, 0x51, 0xd8, 0xe7, 0xb5, 0xf6, 0xd0, 0x6a, 0x11, 0x2c, 0x31, 0xa2, 0xa7, 0x75, 0x69, + 0x9b, 0x72, 0x55, 0xac, 0x26, 0xc7, 0xe9, 0x86, 0x00, 0xe2, 0x08, 0x67, 0x5a, 0x30, 0xa6, 0xf7, + 0xa5, 0x4f, 0x63, 0x06, 0xf9, 0xcf, 0x1c, 0xc4, 0xd3, 0x15, 0x74, 0x41, 0x6b, 0x48, 0x23, 0x15, + 0xd3, 0xfb, 0x37, 0xa3, 0x68, 0x45, 0xb5, 0xc2, 0xb9, 0x7d, 0xce, 0x69, 0x87, 0x53, 0xb7, 0x12, + 0xfd, 0xfb, 0x4c, 0xa5, 0xee, 0xf1, 0x5b, 0x6c, 0x95, 0x33, 0xea, 0xb5, 0xa2, 0x19, 0x92, 0xd6, + 0x38, 0x7f, 0x0e, 0x86, 0x89, 0x27, 0xbb, 0x6c, 0x59, 0xad, 0x14, 0xa3, 0x09, 0xd0, 0x52, 0x04, + 0xc2, 0x31, 0x4e, 0x34, 0x7a, 0xd4, 0x6e, 0x07, 0xa2, 0x62, 0x94, 0x15, 0x5d, 0x31, 0x6a, 0xf4, + 0xea, 0x8b, 0x37, 0x1b, 0xb2, 0x8a, 0x4c, 0xb0, 0x31, 0xe5, 0x62, 0x3c, 0xf5, 0xd2, 0x28, 0x05, + 0x0c, 0x27, 0x58, 0x49, 0xd9, 0x52, 0x32, 0x87, 0x34, 0xca, 0xe5, 0x44, 0xa6, 0xc2, 0xa2, 0xcb, + 0xea, 0x09, 0x44, 0xb5, 0x04, 0x32, 0xff, 0x97, 0xba, 0x5e, 0x31, 0xe2, 0x99, 0x48, 0x86, 0xd2, + 0x24, 0x50, 0xee, 0xae, 0xae, 0x9f, 0x86, 0x5f, 0xef, 0x17, 0xe0, 0xd4, 0x6a, 0x27, 0x10, 0x3b, + 0x1a, 0xbd, 0xa8, 0x2e, 0xfa, 0xae, 0xab, 0xea, 0xcd, 0xa7, 0x7f, 0xbb, 0xbe, 0x05, 0x25, 0x72, + 0x2f, 0xa0, 0x8c, 0x38, 0x0b, 0x71, 0x60, 0x7c, 0xfe, 0xc9, 0x54, 0xac, 0xd1, 0x36, 0x49, 0x97, + 0xb6, 0x14, 0x0b, 0xc1, 0xa9, 0x3c, 0xb1, 0x17, 0x21, 0xf5, 0x6c, 0x22, 0x48, 0x55, 0xb5, 0x9f, + 0x30, 0xac, 0xc6, 0x08, 0x9c, 0xd2, 0x88, 0x96, 0xa8, 0x99, 0xbc, 0x41, 0xcb, 0x60, 0x39, 0x40, + 0x4b, 0xd4, 0xfd, 0x96, 0x9d, 0xee, 0x40, 0x0a, 0xc3, 0x9a, 0x1e, 0xf4, 0x63, 0x03, 0x26, 0xac, + 0xec, 0x33, 0x72, 0x34, 0x73, 0xbd, 0x79, 0x30, 0xd5, 0x7d, 0x9e, 0xc4, 0x6b, 0xcf, 0x29, 0x3b, + 0x26, 0xba, 0xde, 0x93, 0xbb, 0x94, 0x9b, 0x9f, 0x18, 0xf0, 0x42, 0x9f, 0x88, 0x38, 0x86, 0x71, + 0x82, 0x9b, 0x1d, 0x27, 0x0c, 0x5c, 0x87, 0xf4, 0xb1, 0xbc, 0xcf, 0x60, 0xe1, 0x67, 0x39, 0x38, + 0xd7, 0x87, 0xe3, 0xc0, 0x33, 0x86, 0x2b, 0x30, 0x1e, 0xff, 0xd6, 0x8f, 0x61, 0x5a, 0xf5, 0xea, + 0x48, 0x9c, 0xa5, 0x8d, 0x55, 0xc9, 0x9b, 0x25, 0xdf, 0xab, 0x2a, 0xba, 0x5d, 0x62, 0x0a, 0x11, + 0xe1, 0xb6, 0xdf, 0x0e, 0x5c, 0xc2, 0x49, 0xd4, 0xae, 0x8e, 0xa4, 0x11, 0xbe, 0x18, 0x23, 0x70, + 0x4a, 0x23, 0xb2, 0x09, 0x61, 0xcc, 0x67, 0x32, 0xc2, 0xb4, 0x09, 0xe9, 0x92, 0x00, 0xe2, 0x08, + 0x67, 0xfe, 0xcb, 0x80, 0x33, 0x7d, 0x36, 0xe5, 0xd8, 0xca, 0xd1, 0xad, 0x6c, 0x39, 0xfa, 0xe6, + 0x11, 0x85, 0xc1, 0x7e, 0x85, 0x69, 0x6d, 0xed, 0xc1, 0xc3, 0x99, 0x13, 0x1f, 0x3d, 0x9c, 0x39, + 0xf1, 0xf1, 0xc3, 0x99, 0x13, 0xef, 0xef, 0xce, 0x18, 0x0f, 0x76, 0x67, 0x8c, 0x8f, 0x76, 0x67, + 0x8c, 0x8f, 0x77, 0x67, 0x8c, 0x3f, 0xef, 0xce, 0x18, 0x3f, 0xfd, 0xcb, 0xcc, 0x89, 0xaf, 0x55, + 0x06, 0xfb, 0x97, 0xdb, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x53, 0xb6, 0x4e, 0x80, 0xa3, 0x2b, + 0x00, 0x00, } func (m *AddressGroup) Marshal() (dAtA []byte, err error) { @@ -1432,6 +1660,112 @@ func (m *AppliedToGroupPatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *BasicAuthentication) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BasicAuthentication) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BasicAuthentication) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Password) + copy(dAtA[i:], m.Password) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Password))) + i-- + dAtA[i] = 0x12 + i -= len(m.Username) + copy(dAtA[i:], m.Username) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Username))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *BundleFileServer) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BundleFileServer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BundleFileServer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.URL) + copy(dAtA[i:], m.URL) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.URL))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *BundleServerAuthConfiguration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BundleServerAuthConfiguration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BundleServerAuthConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BasicAuthentication != nil { + { + size, err := m.BasicAuthentication.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + i -= len(m.APIKey) + copy(dAtA[i:], m.APIKey) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIKey))) + i-- + dAtA[i] = 0x12 + i -= len(m.BearerToken) + copy(dAtA[i:], m.BearerToken) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.BearerToken))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *ClusterGroupMembers) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2773,15 +3107,228 @@ func (m *ServiceReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *SupportBundleCollection) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) + return dAtA[:n], nil +} + +func (m *SupportBundleCollection) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SupportBundleCollection) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Authentication.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size, err := m.FileServer.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + i -= len(m.SinceTime) + copy(dAtA[i:], m.SinceTime) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.SinceTime))) + i-- + dAtA[i] = 0x1a + { + size, err := m.ExpiredAt.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *SupportBundleCollectionList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SupportBundleCollectionList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SupportBundleCollectionList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *SupportBundleCollectionNodeStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SupportBundleCollectionNodeStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SupportBundleCollectionNodeStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Error) + copy(dAtA[i:], m.Error) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Error))) + i-- + dAtA[i] = 0x2a + i-- + if m.Completed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + i -= len(m.NodeType) + copy(dAtA[i:], m.NodeType) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeType))) + i-- + dAtA[i] = 0x1a + i -= len(m.NodeNamespace) + copy(dAtA[i:], m.NodeNamespace) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeNamespace))) + i-- + dAtA[i] = 0x12 + i -= len(m.NodeName) + copy(dAtA[i:], m.NodeName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *SupportBundleCollectionStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SupportBundleCollectionStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SupportBundleCollectionStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Nodes) > 0 { + for iNdEx := len(m.Nodes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Nodes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) return base } func (m *AddressGroup) Size() (n int) { @@ -2898,6 +3445,47 @@ func (m *AppliedToGroupPatch) Size() (n int) { return n } +func (m *BasicAuthentication) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Username) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Password) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *BundleFileServer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.URL) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *BundleServerAuthConfiguration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BearerToken) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.APIKey) + n += 1 + l + sovGenerated(uint64(l)) + if m.BasicAuthentication != nil { + l = m.BasicAuthentication.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + func (m *ClusterGroupMembers) Size() (n int) { if m == nil { return 0 @@ -3422,34 +4010,105 @@ func (m *ServiceReference) Size() (n int) { return n } -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *AddressGroup) String() string { - if this == nil { - return "nil" - } - repeatedStringForGroupMembers := "[]GroupMember{" - for _, f := range this.GroupMembers { - repeatedStringForGroupMembers += strings.Replace(strings.Replace(f.String(), "GroupMember", "GroupMember", 1), `&`, ``, 1) + "," +func (m *SupportBundleCollection) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForGroupMembers += "}" - s := strings.Join([]string{`&AddressGroup{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `GroupMembers:` + repeatedStringForGroupMembers + `,`, - `}`, - }, "") - return s + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.ExpiredAt.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.SinceTime) + n += 1 + l + sovGenerated(uint64(l)) + l = m.FileServer.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Authentication.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (this *AddressGroupList) String() string { - if this == nil { - return "nil" + +func (m *SupportBundleCollectionList) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForItems := "[]AddressGroup{" - for _, f := range this.Items { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *SupportBundleCollectionNodeStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NodeName) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.NodeNamespace) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.NodeType) + n += 1 + l + sovGenerated(uint64(l)) + n += 2 + l = len(m.Error) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *SupportBundleCollectionStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Nodes) > 0 { + for _, e := range m.Nodes { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *AddressGroup) String() string { + if this == nil { + return "nil" + } + repeatedStringForGroupMembers := "[]GroupMember{" + for _, f := range this.GroupMembers { + repeatedStringForGroupMembers += strings.Replace(strings.Replace(f.String(), "GroupMember", "GroupMember", 1), `&`, ``, 1) + "," + } + repeatedStringForGroupMembers += "}" + s := strings.Join([]string{`&AddressGroup{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `GroupMembers:` + repeatedStringForGroupMembers + `,`, + `}`, + }, "") + return s +} +func (this *AddressGroupList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]AddressGroup{" + for _, f := range this.Items { repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "AddressGroup", "AddressGroup", 1), `&`, ``, 1) + "," } repeatedStringForItems += "}" @@ -3536,6 +4195,39 @@ func (this *AppliedToGroupPatch) String() string { }, "") return s } +func (this *BasicAuthentication) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&BasicAuthentication{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `Password:` + fmt.Sprintf("%v", this.Password) + `,`, + `}`, + }, "") + return s +} +func (this *BundleFileServer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&BundleFileServer{`, + `URL:` + fmt.Sprintf("%v", this.URL) + `,`, + `}`, + }, "") + return s +} +func (this *BundleServerAuthConfiguration) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&BundleServerAuthConfiguration{`, + `BearerToken:` + fmt.Sprintf("%v", this.BearerToken) + `,`, + `APIKey:` + fmt.Sprintf("%v", this.APIKey) + `,`, + `BasicAuthentication:` + strings.Replace(this.BasicAuthentication.String(), "BasicAuthentication", "BasicAuthentication", 1) + `,`, + `}`, + }, "") + return s +} func (this *ClusterGroupMembers) String() string { if this == nil { return "nil" @@ -3961,6 +4653,66 @@ func (this *ServiceReference) String() string { }, "") return s } +func (this *SupportBundleCollection) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SupportBundleCollection{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ExpiredAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ExpiredAt), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, + `SinceTime:` + fmt.Sprintf("%v", this.SinceTime) + `,`, + `FileServer:` + strings.Replace(strings.Replace(this.FileServer.String(), "BundleFileServer", "BundleFileServer", 1), `&`, ``, 1) + `,`, + `Authentication:` + strings.Replace(strings.Replace(this.Authentication.String(), "BundleServerAuthConfiguration", "BundleServerAuthConfiguration", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *SupportBundleCollectionList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]SupportBundleCollection{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "SupportBundleCollection", "SupportBundleCollection", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&SupportBundleCollectionList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *SupportBundleCollectionNodeStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SupportBundleCollectionNodeStatus{`, + `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`, + `NodeNamespace:` + fmt.Sprintf("%v", this.NodeNamespace) + `,`, + `NodeType:` + fmt.Sprintf("%v", this.NodeType) + `,`, + `Completed:` + fmt.Sprintf("%v", this.Completed) + `,`, + `Error:` + fmt.Sprintf("%v", this.Error) + `,`, + `}`, + }, "") + return s +} +func (this *SupportBundleCollectionStatus) String() string { + if this == nil { + return "nil" + } + repeatedStringForNodes := "[]SupportBundleCollectionNodeStatus{" + for _, f := range this.Nodes { + repeatedStringForNodes += strings.Replace(strings.Replace(f.String(), "SupportBundleCollectionNodeStatus", "SupportBundleCollectionNodeStatus", 1), `&`, ``, 1) + "," + } + repeatedStringForNodes += "}" + s := strings.Join([]string{`&SupportBundleCollectionStatus{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Nodes:` + repeatedStringForNodes + `,`, + `}`, + }, "") + return s +} func valueToStringGenerated(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -4739,7 +5491,7 @@ func (m *AppliedToGroupPatch) Unmarshal(dAtA []byte) error { } return nil } -func (m *ClusterGroupMembers) Unmarshal(dAtA []byte) error { +func (m *BasicAuthentication) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4762,17 +5514,17 @@ func (m *ClusterGroupMembers) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ClusterGroupMembers: wiretype end group for non-group") + return fmt.Errorf("proto: BasicAuthentication: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterGroupMembers: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: BasicAuthentication: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4782,64 +5534,29 @@ func (m *ClusterGroupMembers) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Username = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EffectiveMembers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EffectiveMembers = append(m.EffectiveMembers, GroupMember{}) - if err := m.EffectiveMembers[len(m.EffectiveMembers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EffectiveIPBlocks", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4849,83 +5566,24 @@ func (m *ClusterGroupMembers) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.EffectiveIPBlocks = append(m.EffectiveIPBlocks, IPNet{}) - if err := m.EffectiveIPBlocks[len(m.EffectiveIPBlocks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Password = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalMembers", wireType) - } - m.TotalMembers = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalMembers |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalPages", wireType) - } - m.TotalPages = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalPages |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentPage", wireType) - } - m.CurrentPage = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CurrentPage |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -4947,7 +5605,7 @@ func (m *ClusterGroupMembers) Unmarshal(dAtA []byte) error { } return nil } -func (m *EgressGroup) Unmarshal(dAtA []byte) error { +func (m *BundleFileServer) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4970,50 +5628,17 @@ func (m *EgressGroup) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EgressGroup: wiretype end group for non-group") + return fmt.Errorf("proto: BundleFileServer: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EgressGroup: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: BundleFileServer: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupMembers", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5023,25 +5648,23 @@ func (m *EgressGroup) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.GroupMembers = append(m.GroupMembers, GroupMember{}) - if err := m.GroupMembers[len(m.GroupMembers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.URL = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5064,7 +5687,7 @@ func (m *EgressGroup) Unmarshal(dAtA []byte) error { } return nil } -func (m *EgressGroupList) Unmarshal(dAtA []byte) error { +func (m *BundleServerAuthConfiguration) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5087,17 +5710,17 @@ func (m *EgressGroupList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EgressGroupList: wiretype end group for non-group") + return fmt.Errorf("proto: BundleServerAuthConfiguration: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EgressGroupList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: BundleServerAuthConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BearerToken", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5107,28 +5730,59 @@ func (m *EgressGroupList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.BearerToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field APIKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BasicAuthentication", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5155,8 +5809,10 @@ func (m *EgressGroupList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, EgressGroup{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.BasicAuthentication == nil { + m.BasicAuthentication = &BasicAuthentication{} + } + if err := m.BasicAuthentication.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5181,7 +5837,7 @@ func (m *EgressGroupList) Unmarshal(dAtA []byte) error { } return nil } -func (m *EgressGroupPatch) Unmarshal(dAtA []byte) error { +func (m *ClusterGroupMembers) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5204,10 +5860,10 @@ func (m *EgressGroupPatch) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EgressGroupPatch: wiretype end group for non-group") + return fmt.Errorf("proto: ClusterGroupMembers: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EgressGroupPatch: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ClusterGroupMembers: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5245,7 +5901,7 @@ func (m *EgressGroupPatch) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AddedGroupMembers", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EffectiveMembers", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5272,14 +5928,14 @@ func (m *EgressGroupPatch) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.AddedGroupMembers = append(m.AddedGroupMembers, GroupMember{}) - if err := m.AddedGroupMembers[len(m.AddedGroupMembers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.EffectiveMembers = append(m.EffectiveMembers, GroupMember{}) + if err := m.EffectiveMembers[len(m.EffectiveMembers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RemovedGroupMembers", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EffectiveIPBlocks", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5306,11 +5962,68 @@ func (m *EgressGroupPatch) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.RemovedGroupMembers = append(m.RemovedGroupMembers, GroupMember{}) - if err := m.RemovedGroupMembers[len(m.RemovedGroupMembers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.EffectiveIPBlocks = append(m.EffectiveIPBlocks, IPNet{}) + if err := m.EffectiveIPBlocks[len(m.EffectiveIPBlocks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalMembers", wireType) + } + m.TotalMembers = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalMembers |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalPages", wireType) + } + m.TotalPages = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalPages |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentPage", wireType) + } + m.CurrentPage = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CurrentPage |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -5332,7 +6045,7 @@ func (m *EgressGroupPatch) Unmarshal(dAtA []byte) error { } return nil } -func (m *ExternalEntityReference) Unmarshal(dAtA []byte) error { +func (m *EgressGroup) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5355,17 +6068,17 @@ func (m *ExternalEntityReference) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExternalEntityReference: wiretype end group for non-group") + return fmt.Errorf("proto: EgressGroup: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExternalEntityReference: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EgressGroup: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5375,29 +6088,30 @@ func (m *ExternalEntityReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupMembers", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5407,23 +6121,25 @@ func (m *ExternalEntityReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespace = string(dAtA[iNdEx:postIndex]) + m.GroupMembers = append(m.GroupMembers, GroupMember{}) + if err := m.GroupMembers[len(m.GroupMembers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -5446,7 +6162,7 @@ func (m *ExternalEntityReference) Unmarshal(dAtA []byte) error { } return nil } -func (m *GroupAssociation) Unmarshal(dAtA []byte) error { +func (m *EgressGroupList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5469,15 +6185,15 @@ func (m *GroupAssociation) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GroupAssociation: wiretype end group for non-group") + return fmt.Errorf("proto: EgressGroupList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GroupAssociation: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EgressGroupList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5504,13 +6220,13 @@ func (m *GroupAssociation) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssociatedGroups", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5537,8 +6253,8 @@ func (m *GroupAssociation) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.AssociatedGroups = append(m.AssociatedGroups, GroupReference{}) - if err := m.AssociatedGroups[len(m.AssociatedGroups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Items = append(m.Items, EgressGroup{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5563,7 +6279,7 @@ func (m *GroupAssociation) Unmarshal(dAtA []byte) error { } return nil } -func (m *GroupMember) Unmarshal(dAtA []byte) error { +func (m *EgressGroupPatch) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5586,15 +6302,15 @@ func (m *GroupMember) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GroupMember: wiretype end group for non-group") + return fmt.Errorf("proto: EgressGroupPatch: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GroupMember: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EgressGroupPatch: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pod", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5621,16 +6337,13 @@ func (m *GroupMember) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pod == nil { - m.Pod = &PodReference{} - } - if err := m.Pod.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExternalEntity", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AddedGroupMembers", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5657,18 +6370,16 @@ func (m *GroupMember) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ExternalEntity == nil { - m.ExternalEntity = &ExternalEntityReference{} - } - if err := m.ExternalEntity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.AddedGroupMembers = append(m.AddedGroupMembers, GroupMember{}) + if err := m.AddedGroupMembers[len(m.AddedGroupMembers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IPs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RemovedGroupMembers", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5678,127 +6389,23 @@ func (m *GroupMember) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.IPs = append(m.IPs, make([]byte, postIndex-iNdEx)) - copy(m.IPs[len(m.IPs)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ports = append(m.Ports, NamedPort{}) - if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Node == nil { - m.Node = &NodeReference{} - } - if err := m.Node.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Service == nil { - m.Service = &ServiceReference{} - } - if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.RemovedGroupMembers = append(m.RemovedGroupMembers, GroupMember{}) + if err := m.RemovedGroupMembers[len(m.RemovedGroupMembers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5823,7 +6430,7 @@ func (m *GroupMember) Unmarshal(dAtA []byte) error { } return nil } -func (m *GroupReference) Unmarshal(dAtA []byte) error { +func (m *ExternalEntityReference) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5846,45 +6453,13 @@ func (m *GroupReference) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GroupReference: wiretype end group for non-group") + return fmt.Errorf("proto: ExternalEntityReference: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GroupReference: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExternalEntityReference: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } @@ -5916,9 +6491,9 @@ func (m *GroupReference) Unmarshal(dAtA []byte) error { } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5946,7 +6521,7 @@ func (m *GroupReference) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) + m.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5969,7 +6544,7 @@ func (m *GroupReference) Unmarshal(dAtA []byte) error { } return nil } -func (m *IPBlock) Unmarshal(dAtA []byte) error { +func (m *GroupAssociation) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5992,15 +6567,15 @@ func (m *IPBlock) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IPBlock: wiretype end group for non-group") + return fmt.Errorf("proto: GroupAssociation: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IPBlock: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GroupAssociation: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CIDR", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6027,13 +6602,13 @@ func (m *IPBlock) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.CIDR.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Except", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AssociatedGroups", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6060,8 +6635,8 @@ func (m *IPBlock) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Except = append(m.Except, IPNet{}) - if err := m.Except[len(m.Except)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.AssociatedGroups = append(m.AssociatedGroups, GroupReference{}) + if err := m.AssociatedGroups[len(m.AssociatedGroups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6086,7 +6661,7 @@ func (m *IPBlock) Unmarshal(dAtA []byte) error { } return nil } -func (m *IPNet) Unmarshal(dAtA []byte) error { +func (m *GroupMember) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6109,17 +6684,17 @@ func (m *IPNet) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IPNet: wiretype end group for non-group") + return fmt.Errorf("proto: GroupMember: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IPNet: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GroupMember: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pod", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6129,31 +6704,33 @@ func (m *IPNet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.IP = append(m.IP[:0], dAtA[iNdEx:postIndex]...) - if m.IP == nil { - m.IP = []byte{} + if m.Pod == nil { + m.Pod = &PodReference{} + } + if err := m.Pod.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PrefixLength", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExternalEntity", wireType) } - m.PrefixLength = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6163,66 +6740,33 @@ func (m *IPNet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PrefixLength |= int32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err + if msglen < 0 { + return ErrInvalidLengthGenerated } - if (skippy < 0) || (iNdEx+skippy) < 0 { + postIndex := iNdEx + msglen + if postIndex < 0 { return ErrInvalidLengthGenerated } - if (iNdEx + skippy) > l { + if postIndex > l { return io.ErrUnexpectedEOF } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MulticastGroupInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + if m.ExternalEntity == nil { + m.ExternalEntity = &ExternalEntityReference{} } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if err := m.ExternalEntity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MulticastGroupInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MulticastGroupInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IPs", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6232,27 +6776,27 @@ func (m *MulticastGroupInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Group = string(dAtA[iNdEx:postIndex]) + m.IPs = append(m.IPs, make([]byte, postIndex-iNdEx)) + copy(m.IPs[len(m.IPs)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6279,85 +6823,16 @@ func (m *MulticastGroupInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Pods = append(m.Pods, PodReference{}) - if err := m.Pods[len(m.Pods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Ports = append(m.Ports, NamedPort{}) + if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NamedPort) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NamedPort: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NamedPort: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - m.Port = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Port |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6367,29 +6842,33 @@ func (m *NamedPort) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + if m.Node == nil { + m.Node = &NodeReference{} + } + if err := m.Node.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6399,23 +6878,27 @@ func (m *NamedPort) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Protocol = Protocol(dAtA[iNdEx:postIndex]) + if m.Service == nil { + m.Service = &ServiceReference{} + } + if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -6438,7 +6921,7 @@ func (m *NamedPort) Unmarshal(dAtA []byte) error { } return nil } -func (m *NetworkPolicy) Unmarshal(dAtA []byte) error { +func (m *GroupReference) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6461,17 +6944,17 @@ func (m *NetworkPolicy) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NetworkPolicy: wiretype end group for non-group") + return fmt.Errorf("proto: GroupReference: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GroupReference: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6481,30 +6964,29 @@ func (m *NetworkPolicy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6514,29 +6996,27 @@ func (m *NetworkPolicy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Rules = append(m.Rules, NetworkPolicyRule{}) - if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppliedToGroups", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6564,75 +7044,7 @@ func (m *NetworkPolicy) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.AppliedToGroups = append(m.AppliedToGroups, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Priority = &v2 - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TierPriority", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TierPriority = &v - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceRef", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SourceRef == nil { - m.SourceRef = &NetworkPolicyReference{} - } - if err := m.SourceRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -6655,7 +7067,7 @@ func (m *NetworkPolicy) Unmarshal(dAtA []byte) error { } return nil } -func (m *NetworkPolicyList) Unmarshal(dAtA []byte) error { +func (m *IPBlock) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6678,15 +7090,15 @@ func (m *NetworkPolicyList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NetworkPolicyList: wiretype end group for non-group") + return fmt.Errorf("proto: IPBlock: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkPolicyList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IPBlock: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CIDR", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6713,13 +7125,13 @@ func (m *NetworkPolicyList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.CIDR.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Except", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6746,8 +7158,8 @@ func (m *NetworkPolicyList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, NetworkPolicy{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Except = append(m.Except, IPNet{}) + if err := m.Except[len(m.Except)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6772,7 +7184,7 @@ func (m *NetworkPolicyList) Unmarshal(dAtA []byte) error { } return nil } -func (m *NetworkPolicyNodeStatus) Unmarshal(dAtA []byte) error { +func (m *IPNet) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6795,17 +7207,17 @@ func (m *NetworkPolicyNodeStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NetworkPolicyNodeStatus: wiretype end group for non-group") + return fmt.Errorf("proto: IPNet: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkPolicyNodeStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IPNet: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6815,29 +7227,31 @@ func (m *NetworkPolicyNodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.NodeName = string(dAtA[iNdEx:postIndex]) + m.IP = append(m.IP[:0], dAtA[iNdEx:postIndex]...) + if m.IP == nil { + m.IP = []byte{} + } iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PrefixLength", wireType) } - m.Generation = 0 + m.PrefixLength = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6847,7 +7261,7 @@ func (m *NetworkPolicyNodeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Generation |= int64(b&0x7F) << shift + m.PrefixLength |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -6873,7 +7287,7 @@ func (m *NetworkPolicyNodeStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *NetworkPolicyPeer) Unmarshal(dAtA []byte) error { +func (m *MulticastGroupInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6896,15 +7310,15 @@ func (m *NetworkPolicyPeer) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NetworkPolicyPeer: wiretype end group for non-group") + return fmt.Errorf("proto: MulticastGroupInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkPolicyPeer: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MulticastGroupInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AddressGroups", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6932,11 +7346,11 @@ func (m *NetworkPolicyPeer) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.AddressGroups = append(m.AddressGroups, string(dAtA[iNdEx:postIndex])) + m.Group = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IPBlocks", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6963,14 +7377,83 @@ func (m *NetworkPolicyPeer) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.IPBlocks = append(m.IPBlocks, IPBlock{}) - if err := m.IPBlocks[len(m.IPBlocks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Pods = append(m.Pods, PodReference{}) + if err := m.Pods[len(m.Pods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedPort) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedPort: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedPort: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + m.Port = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Port |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FQDNs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6998,13 +7481,13 @@ func (m *NetworkPolicyPeer) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.FQDNs = append(m.FQDNs, string(dAtA[iNdEx:postIndex])) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ToServices", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7014,25 +7497,23 @@ func (m *NetworkPolicyPeer) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.ToServices = append(m.ToServices, ServiceReference{}) - if err := m.ToServices[len(m.ToServices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Protocol = Protocol(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7055,7 +7536,7 @@ func (m *NetworkPolicyPeer) Unmarshal(dAtA []byte) error { } return nil } -func (m *NetworkPolicyReference) Unmarshal(dAtA []byte) error { +func (m *NetworkPolicy) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7078,17 +7559,17 @@ func (m *NetworkPolicyReference) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NetworkPolicyReference: wiretype end group for non-group") + return fmt.Errorf("proto: NetworkPolicy: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkPolicyReference: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NetworkPolicy: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7098,29 +7579,30 @@ func (m *NetworkPolicyReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Type = NetworkPolicyType(dAtA[iNdEx:postIndex]) + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7130,27 +7612,29 @@ func (m *NetworkPolicyReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespace = string(dAtA[iNdEx:postIndex]) + m.Rules = append(m.Rules, NetworkPolicyRule{}) + if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AppliedToGroups", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7178,13 +7662,45 @@ func (m *NetworkPolicyReference) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.AppliedToGroups = append(m.AppliedToGroups, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Priority = &v2 + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TierPriority", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.TierPriority = &v + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SourceRef", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7194,23 +7710,27 @@ func (m *NetworkPolicyReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) + if m.SourceRef == nil { + m.SourceRef = &NetworkPolicyReference{} + } + if err := m.SourceRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -7233,7 +7753,7 @@ func (m *NetworkPolicyReference) Unmarshal(dAtA []byte) error { } return nil } -func (m *NetworkPolicyRule) Unmarshal(dAtA []byte) error { +func (m *NetworkPolicyList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7256,17 +7776,17 @@ func (m *NetworkPolicyRule) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NetworkPolicyRule: wiretype end group for non-group") + return fmt.Errorf("proto: NetworkPolicyList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkPolicyRule: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NetworkPolicyList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Direction", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7276,27 +7796,28 @@ func (m *NetworkPolicyRule) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Direction = Direction(dAtA[iNdEx:postIndex]) + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7323,13 +7844,1192 @@ func (m *NetworkPolicyRule) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Items = append(m.Items, NetworkPolicy{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NetworkPolicyNodeStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NetworkPolicyNodeStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NetworkPolicyNodeStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NodeName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType) + } + m.Generation = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Generation |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NetworkPolicyPeer) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NetworkPolicyPeer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NetworkPolicyPeer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AddressGroups", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AddressGroups = append(m.AddressGroups, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IPBlocks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IPBlocks = append(m.IPBlocks, IPBlock{}) + if err := m.IPBlocks[len(m.IPBlocks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FQDNs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FQDNs = append(m.FQDNs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ToServices", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ToServices = append(m.ToServices, ServiceReference{}) + if err := m.ToServices[len(m.ToServices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NetworkPolicyReference) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NetworkPolicyReference: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NetworkPolicyReference: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = NetworkPolicyType(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NetworkPolicyRule) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NetworkPolicyRule: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NetworkPolicyRule: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Direction", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Direction = Direction(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.To.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Services", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Services = append(m.Services, Service{}) + if err := m.Services[len(m.Services)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) + } + m.Priority = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Priority |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := antrea_io_antrea_pkg_apis_crd_v1alpha1.RuleAction(dAtA[iNdEx:postIndex]) + m.Action = &s + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnableLogging", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.EnableLogging = bool(v != 0) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AppliedToGroups", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AppliedToGroups = append(m.AppliedToGroups, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NetworkPolicyStats) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NetworkPolicyStats: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NetworkPolicyStats: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkPolicy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NetworkPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TrafficStats", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TrafficStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RuleTrafficStats", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RuleTrafficStats = append(m.RuleTrafficStats, v1alpha1.RuleTrafficStats{}) + if err := m.RuleTrafficStats[len(m.RuleTrafficStats)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NetworkPolicyStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NetworkPolicyStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NetworkPolicyStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nodes = append(m.Nodes, NetworkPolicyNodeStatus{}) + if err := m.Nodes[len(m.Nodes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NodeReference) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NodeReference: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NodeReference: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NodeStatsSummary) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NodeStatsSummary: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NodeStatsSummary: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7356,13 +9056,13 @@ func (m *NetworkPolicyRule) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.To.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Services", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NetworkPolicies", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7389,16 +9089,16 @@ func (m *NetworkPolicyRule) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Services = append(m.Services, Service{}) - if err := m.Services[len(m.Services)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.NetworkPolicies = append(m.NetworkPolicies, NetworkPolicyStats{}) + if err := m.NetworkPolicies[len(m.NetworkPolicies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AntreaClusterNetworkPolicies", wireType) } - m.Priority = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7408,16 +9108,31 @@ func (m *NetworkPolicyRule) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Priority |= int32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 6: + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AntreaClusterNetworkPolicies = append(m.AntreaClusterNetworkPolicies, NetworkPolicyStats{}) + if err := m.AntreaClusterNetworkPolicies[len(m.AntreaClusterNetworkPolicies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AntreaNetworkPolicies", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7427,30 +9142,115 @@ func (m *NetworkPolicyRule) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - s := antrea_io_antrea_pkg_apis_crd_v1alpha1.RuleAction(dAtA[iNdEx:postIndex]) - m.Action = &s + m.AntreaNetworkPolicies = append(m.AntreaNetworkPolicies, NetworkPolicyStats{}) + if err := m.AntreaNetworkPolicies[len(m.AntreaNetworkPolicies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 7: + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Multicast", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Multicast = append(m.Multicast, MulticastGroupInfo{}) + if err := m.Multicast[len(m.Multicast)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PaginationGetOptions) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PaginationGetOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PaginationGetOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EnableLogging", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Page", wireType) } - var v int + m.Page = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7460,15 +9260,83 @@ func (m *NetworkPolicyRule) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Page |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= int64(b&0x7F) << shift if b < 0x80 { break } } - m.EnableLogging = bool(v != 0) - case 8: + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodReference) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodReference: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodReference: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppliedToGroups", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7496,11 +9364,11 @@ func (m *NetworkPolicyRule) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.AppliedToGroups = append(m.AppliedToGroups, string(dAtA[iNdEx:postIndex])) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 9: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7528,7 +9396,7 @@ func (m *NetworkPolicyRule) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7551,7 +9419,7 @@ func (m *NetworkPolicyRule) Unmarshal(dAtA []byte) error { } return nil } -func (m *NetworkPolicyStats) Unmarshal(dAtA []byte) error { +func (m *Service) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7574,17 +9442,17 @@ func (m *NetworkPolicyStats) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NetworkPolicyStats: wiretype end group for non-group") + return fmt.Errorf("proto: Service: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkPolicyStats: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Service: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NetworkPolicy", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7594,28 +9462,28 @@ func (m *NetworkPolicyStats) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.NetworkPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := Protocol(dAtA[iNdEx:postIndex]) + m.Protocol = &s iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TrafficStats", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7642,15 +9510,18 @@ func (m *NetworkPolicyStats) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.TrafficStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Port == nil { + m.Port = &intstr.IntOrString{} + } + if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RuleTrafficStats", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EndPort", wireType) } - var msglen int + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7660,81 +9531,17 @@ func (m *NetworkPolicyStats) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= int32(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RuleTrafficStats = append(m.RuleTrafficStats, v1alpha1.RuleTrafficStats{}) - if err := m.RuleTrafficStats[len(m.RuleTrafficStats)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NetworkPolicyStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NetworkPolicyStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkPolicyStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + m.EndPort = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ICMPType", wireType) } - var msglen int + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7744,30 +9551,57 @@ func (m *NetworkPolicyStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= int32(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthGenerated + m.ICMPType = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ICMPCode", wireType) } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } } - if postIndex > l { - return io.ErrUnexpectedEOF + m.ICMPCode = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IGMPType", wireType) } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex - case 2: + m.IGMPType = &v + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupAddress", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7777,25 +9611,23 @@ func (m *NetworkPolicyStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Nodes = append(m.Nodes, NetworkPolicyNodeStatus{}) - if err := m.Nodes[len(m.Nodes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.GroupAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7818,7 +9650,7 @@ func (m *NetworkPolicyStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *NodeReference) Unmarshal(dAtA []byte) error { +func (m *ServiceReference) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7841,10 +9673,10 @@ func (m *NodeReference) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NodeReference: wiretype end group for non-group") + return fmt.Errorf("proto: ServiceReference: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NodeReference: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ServiceReference: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -7879,6 +9711,38 @@ func (m *NodeReference) Unmarshal(dAtA []byte) error { } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -7900,7 +9764,7 @@ func (m *NodeReference) Unmarshal(dAtA []byte) error { } return nil } -func (m *NodeStatsSummary) Unmarshal(dAtA []byte) error { +func (m *SupportBundleCollection) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7923,10 +9787,10 @@ func (m *NodeStatsSummary) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NodeStatsSummary: wiretype end group for non-group") + return fmt.Errorf("proto: SupportBundleCollection: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NodeStatsSummary: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SupportBundleCollection: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -7964,7 +9828,7 @@ func (m *NodeStatsSummary) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NetworkPolicies", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExpiredAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7991,16 +9855,15 @@ func (m *NodeStatsSummary) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NetworkPolicies = append(m.NetworkPolicies, NetworkPolicyStats{}) - if err := m.NetworkPolicies[len(m.NetworkPolicies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ExpiredAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AntreaClusterNetworkPolicies", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SinceTime", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8010,29 +9873,27 @@ func (m *NodeStatsSummary) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.AntreaClusterNetworkPolicies = append(m.AntreaClusterNetworkPolicies, NetworkPolicyStats{}) - if err := m.AntreaClusterNetworkPolicies[len(m.AntreaClusterNetworkPolicies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.SinceTime = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AntreaNetworkPolicies", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FileServer", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8059,14 +9920,13 @@ func (m *NodeStatsSummary) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.AntreaNetworkPolicies = append(m.AntreaNetworkPolicies, NetworkPolicyStats{}) - if err := m.AntreaNetworkPolicies[len(m.AntreaNetworkPolicies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.FileServer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Multicast", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Authentication", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8093,8 +9953,7 @@ func (m *NodeStatsSummary) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Multicast = append(m.Multicast, MulticastGroupInfo{}) - if err := m.Multicast[len(m.Multicast)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Authentication.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8119,95 +9978,7 @@ func (m *NodeStatsSummary) Unmarshal(dAtA []byte) error { } return nil } -func (m *PaginationGetOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PaginationGetOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PaginationGetOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Page", wireType) - } - m.Page = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Page |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) - } - m.Limit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Limit |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PodReference) Unmarshal(dAtA []byte) error { +func (m *SupportBundleCollectionList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8230,17 +10001,17 @@ func (m *PodReference) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodReference: wiretype end group for non-group") + return fmt.Errorf("proto: SupportBundleCollectionList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodReference: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SupportBundleCollectionList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8250,29 +10021,30 @@ func (m *PodReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8282,23 +10054,25 @@ func (m *PodReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespace = string(dAtA[iNdEx:postIndex]) + m.Items = append(m.Items, SupportBundleCollection{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -8321,7 +10095,7 @@ func (m *PodReference) Unmarshal(dAtA []byte) error { } return nil } -func (m *Service) Unmarshal(dAtA []byte) error { +func (m *SupportBundleCollectionNodeStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8344,15 +10118,15 @@ func (m *Service) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Service: wiretype end group for non-group") + return fmt.Errorf("proto: SupportBundleCollectionNodeStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Service: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SupportBundleCollectionNodeStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8380,14 +10154,13 @@ func (m *Service) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - s := Protocol(dAtA[iNdEx:postIndex]) - m.Protocol = &s + m.NodeName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NodeNamespace", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8397,33 +10170,29 @@ func (m *Service) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Port == nil { - m.Port = &intstr.IntOrString{} - } - if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.NodeNamespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EndPort", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeType", wireType) } - var v int32 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8433,57 +10202,29 @@ func (m *Service) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.EndPort = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ICMPType", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated } - m.ICMPType = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ICMPCode", wireType) + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } + if postIndex > l { + return io.ErrUnexpectedEOF } - m.ICMPCode = &v - case 6: + m.NodeType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IGMPType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Completed", wireType) } - var v int32 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8493,15 +10234,15 @@ func (m *Service) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int32(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - m.IGMPType = &v - case 7: + m.Completed = bool(v != 0) + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8529,7 +10270,7 @@ func (m *Service) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.GroupAddress = string(dAtA[iNdEx:postIndex]) + m.Error = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -8552,7 +10293,7 @@ func (m *Service) Unmarshal(dAtA []byte) error { } return nil } -func (m *ServiceReference) Unmarshal(dAtA []byte) error { +func (m *SupportBundleCollectionStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8575,17 +10316,17 @@ func (m *ServiceReference) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ServiceReference: wiretype end group for non-group") + return fmt.Errorf("proto: SupportBundleCollectionStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceReference: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SupportBundleCollectionStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8595,29 +10336,30 @@ func (m *ServiceReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8627,23 +10369,25 @@ func (m *ServiceReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespace = string(dAtA[iNdEx:postIndex]) + m.Nodes = append(m.Nodes, SupportBundleCollectionNodeStatus{}) + if err := m.Nodes[len(m.Nodes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex diff --git a/pkg/apis/controlplane/v1beta2/generated.proto b/pkg/apis/controlplane/v1beta2/generated.proto index 1729daf44ca..da60b29c9ee 100644 --- a/pkg/apis/controlplane/v1beta2/generated.proto +++ b/pkg/apis/controlplane/v1beta2/generated.proto @@ -74,6 +74,24 @@ message AppliedToGroupPatch { repeated GroupMember removedGroupMembers = 3; } +message BasicAuthentication { + optional string username = 1; + + optional string password = 2; +} + +message BundleFileServer { + optional string url = 1; +} + +message BundleServerAuthConfiguration { + optional string bearerToken = 1; + + optional string apiKey = 2; + + optional BasicAuthentication basicAuthentication = 3; +} + // ClusterGroupMembers is a list of GroupMember objects or ipBlocks that are currently selected by a ClusterGroup. message ClusterGroupMembers { optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -411,3 +429,48 @@ message ServiceReference { optional string namespace = 2; } +// SupportBundleCollection is the message format of antrea/pkg/controller/types.SupportBundleCollection in an API response. +message SupportBundleCollection { + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time expiredAt = 2; + + optional string sinceTime = 3; + + optional BundleFileServer fileServer = 4; + + optional BundleServerAuthConfiguration authentication = 5; +} + +// SupportBundleCollectionList is a list of SupportBundleCollection objects. +message SupportBundleCollectionList { + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + repeated SupportBundleCollection items = 2; +} + +// SupportBundleCollectionNodeStatus is the status of a SupportBundleCollection on a Node. +message SupportBundleCollectionNodeStatus { + // The name of the Node that produces the status. + optional string nodeName = 1; + + // The namespace of the Node that produces the status. It is set only when NodeType is ExternalNode. + optional string nodeNamespace = 2; + + // The type of the Node that produces the status. The values include Node and ExternalNode. + optional string nodeType = 3; + + // The phase in which a SupportBundleCollection is on the Node. + optional bool completed = 4; + + optional string error = 5; +} + +// SupportBundleCollectionStatus is the status of a SupportBundleCollection. +message SupportBundleCollectionStatus { + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Nodes contains statuses produced on a list of Nodes. + repeated SupportBundleCollectionNodeStatus nodes = 2; +} + diff --git a/pkg/apis/controlplane/v1beta2/helper.go b/pkg/apis/controlplane/v1beta2/helper.go index 2fd9bd15787..64723da4848 100644 --- a/pkg/apis/controlplane/v1beta2/helper.go +++ b/pkg/apis/controlplane/v1beta2/helper.go @@ -14,7 +14,9 @@ package v1beta2 -import "fmt" +import ( + "fmt" +) func (r *NetworkPolicyReference) ToString() string { if r.Type == AntreaClusterNetworkPolicy { diff --git a/pkg/apis/controlplane/v1beta2/register.go b/pkg/apis/controlplane/v1beta2/register.go index c9a27f0c169..4fc35656305 100644 --- a/pkg/apis/controlplane/v1beta2/register.go +++ b/pkg/apis/controlplane/v1beta2/register.go @@ -76,6 +76,9 @@ func addKnownTypes(scheme *runtime.Scheme) error { &EgressGroup{}, &EgressGroupPatch{}, &EgressGroupList{}, + &SupportBundleCollectionList{}, + &SupportBundleCollection{}, + &SupportBundleCollectionStatus{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) diff --git a/pkg/apis/controlplane/v1beta2/types.go b/pkg/apis/controlplane/v1beta2/types.go index d05d7062e51..c5e62556f61 100644 --- a/pkg/apis/controlplane/v1beta2/types.go +++ b/pkg/apis/controlplane/v1beta2/types.go @@ -443,3 +443,65 @@ type EgressGroupList struct { metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` Items []EgressGroup `json:"items" protobuf:"bytes,2,rep,name=items"` } + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SupportBundleCollectionStatus is the status of a SupportBundleCollection. +type SupportBundleCollectionStatus struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Nodes contains statuses produced on a list of Nodes. + Nodes []SupportBundleCollectionNodeStatus `json:"nodes,omitempty" protobuf:"bytes,2,rep,name=nodes"` +} + +// SupportBundleCollectionNodeStatus is the status of a SupportBundleCollection on a Node. +type SupportBundleCollectionNodeStatus struct { + // The name of the Node that produces the status. + NodeName string `json:"nodeName,omitempty" protobuf:"bytes,1,opt,name=nodeName"` + // The namespace of the Node that produces the status. It is set only when NodeType is ExternalNode. + NodeNamespace string `json:"nodeNamespace,omitempty" protobuf:"bytes,2,opt,name=nodeNamespace"` + // The type of the Node that produces the status. The values include Node and ExternalNode. + NodeType string `json:"nodeType,omitempty" protobuf:"bytes,3,opt,name=nodeType"` + // The phase in which a SupportBundleCollection is on the Node. + Completed bool `json:"completed,omitempty" protobuf:"varint,4,opt,name=completed"` + Error string `json:"error,omitempty" protobuf:"bytes,5,opt,name=error"` +} + +type BundleFileServer struct { + URL string `json:"url" protobuf:"bytes,1,opt,name=url"` +} + +type BasicAuthentication struct { + Username string `json:"username" protobuf:"bytes,1,opt,name=username"` + Password string `json:"password" protobuf:"bytes,2,opt,name=password"` +} + +type BundleServerAuthConfiguration struct { + BearerToken string `json:"bearerToken,omitempty" protobuf:"bytes,1,opt,name=bearerToken"` + APIKey string `json:"apiKey,omitempty" protobuf:"bytes,2,opt,name=apiKey"` + BasicAuthentication *BasicAuthentication `json:"basicAuthentication,omitempty" protobuf:"bytes,3,opt,name=basicAuthentication"` +} + +// +genclient +// +genclient:nonNamespaced +// +genclient:onlyVerbs=list,get,watch +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SupportBundleCollection is the message format of antrea/pkg/controller/types.SupportBundleCollection in an API response. +type SupportBundleCollection struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + ExpiredAt metav1.Time `json:"expiredAt,omitempty" protobuf:"varint,2,opt,name=expiredAt"` + SinceTime string `json:"sinceTime,omitempty" protobuf:"bytes,3,opt,name=sinceTime"` + FileServer BundleFileServer `json:"fileServer,omitempty" protobuf:"bytes,4,opt,name=fileServer"` + Authentication BundleServerAuthConfiguration `json:"authentication,omitempty" protobuf:"bytes,5,opt,name=authentication"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SupportBundleCollectionList is a list of SupportBundleCollection objects. +type SupportBundleCollectionList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + Items []SupportBundleCollection `json:"items" protobuf:"bytes,2,rep,name=items"` +} diff --git a/pkg/apis/controlplane/v1beta2/zz_generated.conversion.go b/pkg/apis/controlplane/v1beta2/zz_generated.conversion.go index 3b0efc79e4b..d5cb10c6684 100644 --- a/pkg/apis/controlplane/v1beta2/zz_generated.conversion.go +++ b/pkg/apis/controlplane/v1beta2/zz_generated.conversion.go @@ -99,6 +99,36 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*BasicAuthentication)(nil), (*controlplane.BasicAuthentication)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_BasicAuthentication_To_controlplane_BasicAuthentication(a.(*BasicAuthentication), b.(*controlplane.BasicAuthentication), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*controlplane.BasicAuthentication)(nil), (*BasicAuthentication)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_controlplane_BasicAuthentication_To_v1beta2_BasicAuthentication(a.(*controlplane.BasicAuthentication), b.(*BasicAuthentication), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BundleFileServer)(nil), (*controlplane.BundleFileServer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_BundleFileServer_To_controlplane_BundleFileServer(a.(*BundleFileServer), b.(*controlplane.BundleFileServer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*controlplane.BundleFileServer)(nil), (*BundleFileServer)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_controlplane_BundleFileServer_To_v1beta2_BundleFileServer(a.(*controlplane.BundleFileServer), b.(*BundleFileServer), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*BundleServerAuthConfiguration)(nil), (*controlplane.BundleServerAuthConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_BundleServerAuthConfiguration_To_controlplane_BundleServerAuthConfiguration(a.(*BundleServerAuthConfiguration), b.(*controlplane.BundleServerAuthConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*controlplane.BundleServerAuthConfiguration)(nil), (*BundleServerAuthConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_controlplane_BundleServerAuthConfiguration_To_v1beta2_BundleServerAuthConfiguration(a.(*controlplane.BundleServerAuthConfiguration), b.(*BundleServerAuthConfiguration), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*ClusterGroupMembers)(nil), (*controlplane.ClusterGroupMembers)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta2_ClusterGroupMembers_To_controlplane_ClusterGroupMembers(a.(*ClusterGroupMembers), b.(*controlplane.ClusterGroupMembers), scope) }); err != nil { @@ -359,6 +389,46 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*SupportBundleCollection)(nil), (*controlplane.SupportBundleCollection)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_SupportBundleCollection_To_controlplane_SupportBundleCollection(a.(*SupportBundleCollection), b.(*controlplane.SupportBundleCollection), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*controlplane.SupportBundleCollection)(nil), (*SupportBundleCollection)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_controlplane_SupportBundleCollection_To_v1beta2_SupportBundleCollection(a.(*controlplane.SupportBundleCollection), b.(*SupportBundleCollection), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SupportBundleCollectionList)(nil), (*controlplane.SupportBundleCollectionList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_SupportBundleCollectionList_To_controlplane_SupportBundleCollectionList(a.(*SupportBundleCollectionList), b.(*controlplane.SupportBundleCollectionList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*controlplane.SupportBundleCollectionList)(nil), (*SupportBundleCollectionList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_controlplane_SupportBundleCollectionList_To_v1beta2_SupportBundleCollectionList(a.(*controlplane.SupportBundleCollectionList), b.(*SupportBundleCollectionList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SupportBundleCollectionNodeStatus)(nil), (*controlplane.SupportBundleCollectionNodeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_SupportBundleCollectionNodeStatus_To_controlplane_SupportBundleCollectionNodeStatus(a.(*SupportBundleCollectionNodeStatus), b.(*controlplane.SupportBundleCollectionNodeStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*controlplane.SupportBundleCollectionNodeStatus)(nil), (*SupportBundleCollectionNodeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_controlplane_SupportBundleCollectionNodeStatus_To_v1beta2_SupportBundleCollectionNodeStatus(a.(*controlplane.SupportBundleCollectionNodeStatus), b.(*SupportBundleCollectionNodeStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*SupportBundleCollectionStatus)(nil), (*controlplane.SupportBundleCollectionStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_SupportBundleCollectionStatus_To_controlplane_SupportBundleCollectionStatus(a.(*SupportBundleCollectionStatus), b.(*controlplane.SupportBundleCollectionStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*controlplane.SupportBundleCollectionStatus)(nil), (*SupportBundleCollectionStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_controlplane_SupportBundleCollectionStatus_To_v1beta2_SupportBundleCollectionStatus(a.(*controlplane.SupportBundleCollectionStatus), b.(*SupportBundleCollectionStatus), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*url.Values)(nil), (*PaginationGetOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_url_Values_To_v1beta2_PaginationGetOptions(a.(*url.Values), b.(*PaginationGetOptions), scope) }); err != nil { @@ -663,6 +733,72 @@ func Convert_controlplane_AppliedToGroupPatch_To_v1beta2_AppliedToGroupPatch(in return autoConvert_controlplane_AppliedToGroupPatch_To_v1beta2_AppliedToGroupPatch(in, out, s) } +func autoConvert_v1beta2_BasicAuthentication_To_controlplane_BasicAuthentication(in *BasicAuthentication, out *controlplane.BasicAuthentication, s conversion.Scope) error { + out.Username = in.Username + out.Password = in.Password + return nil +} + +// Convert_v1beta2_BasicAuthentication_To_controlplane_BasicAuthentication is an autogenerated conversion function. +func Convert_v1beta2_BasicAuthentication_To_controlplane_BasicAuthentication(in *BasicAuthentication, out *controlplane.BasicAuthentication, s conversion.Scope) error { + return autoConvert_v1beta2_BasicAuthentication_To_controlplane_BasicAuthentication(in, out, s) +} + +func autoConvert_controlplane_BasicAuthentication_To_v1beta2_BasicAuthentication(in *controlplane.BasicAuthentication, out *BasicAuthentication, s conversion.Scope) error { + out.Username = in.Username + out.Password = in.Password + return nil +} + +// Convert_controlplane_BasicAuthentication_To_v1beta2_BasicAuthentication is an autogenerated conversion function. +func Convert_controlplane_BasicAuthentication_To_v1beta2_BasicAuthentication(in *controlplane.BasicAuthentication, out *BasicAuthentication, s conversion.Scope) error { + return autoConvert_controlplane_BasicAuthentication_To_v1beta2_BasicAuthentication(in, out, s) +} + +func autoConvert_v1beta2_BundleFileServer_To_controlplane_BundleFileServer(in *BundleFileServer, out *controlplane.BundleFileServer, s conversion.Scope) error { + out.URL = in.URL + return nil +} + +// Convert_v1beta2_BundleFileServer_To_controlplane_BundleFileServer is an autogenerated conversion function. +func Convert_v1beta2_BundleFileServer_To_controlplane_BundleFileServer(in *BundleFileServer, out *controlplane.BundleFileServer, s conversion.Scope) error { + return autoConvert_v1beta2_BundleFileServer_To_controlplane_BundleFileServer(in, out, s) +} + +func autoConvert_controlplane_BundleFileServer_To_v1beta2_BundleFileServer(in *controlplane.BundleFileServer, out *BundleFileServer, s conversion.Scope) error { + out.URL = in.URL + return nil +} + +// Convert_controlplane_BundleFileServer_To_v1beta2_BundleFileServer is an autogenerated conversion function. +func Convert_controlplane_BundleFileServer_To_v1beta2_BundleFileServer(in *controlplane.BundleFileServer, out *BundleFileServer, s conversion.Scope) error { + return autoConvert_controlplane_BundleFileServer_To_v1beta2_BundleFileServer(in, out, s) +} + +func autoConvert_v1beta2_BundleServerAuthConfiguration_To_controlplane_BundleServerAuthConfiguration(in *BundleServerAuthConfiguration, out *controlplane.BundleServerAuthConfiguration, s conversion.Scope) error { + out.BearerToken = in.BearerToken + out.APIKey = in.APIKey + out.BasicAuthentication = (*controlplane.BasicAuthentication)(unsafe.Pointer(in.BasicAuthentication)) + return nil +} + +// Convert_v1beta2_BundleServerAuthConfiguration_To_controlplane_BundleServerAuthConfiguration is an autogenerated conversion function. +func Convert_v1beta2_BundleServerAuthConfiguration_To_controlplane_BundleServerAuthConfiguration(in *BundleServerAuthConfiguration, out *controlplane.BundleServerAuthConfiguration, s conversion.Scope) error { + return autoConvert_v1beta2_BundleServerAuthConfiguration_To_controlplane_BundleServerAuthConfiguration(in, out, s) +} + +func autoConvert_controlplane_BundleServerAuthConfiguration_To_v1beta2_BundleServerAuthConfiguration(in *controlplane.BundleServerAuthConfiguration, out *BundleServerAuthConfiguration, s conversion.Scope) error { + out.BearerToken = in.BearerToken + out.APIKey = in.APIKey + out.BasicAuthentication = (*BasicAuthentication)(unsafe.Pointer(in.BasicAuthentication)) + return nil +} + +// Convert_controlplane_BundleServerAuthConfiguration_To_v1beta2_BundleServerAuthConfiguration is an autogenerated conversion function. +func Convert_controlplane_BundleServerAuthConfiguration_To_v1beta2_BundleServerAuthConfiguration(in *controlplane.BundleServerAuthConfiguration, out *BundleServerAuthConfiguration, s conversion.Scope) error { + return autoConvert_controlplane_BundleServerAuthConfiguration_To_v1beta2_BundleServerAuthConfiguration(in, out, s) +} + func autoConvert_v1beta2_ClusterGroupMembers_To_controlplane_ClusterGroupMembers(in *ClusterGroupMembers, out *controlplane.ClusterGroupMembers, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta if in.EffectiveMembers != nil { @@ -1483,3 +1619,111 @@ func autoConvert_controlplane_ServiceReference_To_v1beta2_ServiceReference(in *c func Convert_controlplane_ServiceReference_To_v1beta2_ServiceReference(in *controlplane.ServiceReference, out *ServiceReference, s conversion.Scope) error { return autoConvert_controlplane_ServiceReference_To_v1beta2_ServiceReference(in, out, s) } + +func autoConvert_v1beta2_SupportBundleCollection_To_controlplane_SupportBundleCollection(in *SupportBundleCollection, out *controlplane.SupportBundleCollection, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.ExpiredAt = in.ExpiredAt + out.SinceTime = in.SinceTime + if err := Convert_v1beta2_BundleFileServer_To_controlplane_BundleFileServer(&in.FileServer, &out.FileServer, s); err != nil { + return err + } + if err := Convert_v1beta2_BundleServerAuthConfiguration_To_controlplane_BundleServerAuthConfiguration(&in.Authentication, &out.Authentication, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_SupportBundleCollection_To_controlplane_SupportBundleCollection is an autogenerated conversion function. +func Convert_v1beta2_SupportBundleCollection_To_controlplane_SupportBundleCollection(in *SupportBundleCollection, out *controlplane.SupportBundleCollection, s conversion.Scope) error { + return autoConvert_v1beta2_SupportBundleCollection_To_controlplane_SupportBundleCollection(in, out, s) +} + +func autoConvert_controlplane_SupportBundleCollection_To_v1beta2_SupportBundleCollection(in *controlplane.SupportBundleCollection, out *SupportBundleCollection, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.ExpiredAt = in.ExpiredAt + out.SinceTime = in.SinceTime + if err := Convert_controlplane_BundleFileServer_To_v1beta2_BundleFileServer(&in.FileServer, &out.FileServer, s); err != nil { + return err + } + if err := Convert_controlplane_BundleServerAuthConfiguration_To_v1beta2_BundleServerAuthConfiguration(&in.Authentication, &out.Authentication, s); err != nil { + return err + } + return nil +} + +// Convert_controlplane_SupportBundleCollection_To_v1beta2_SupportBundleCollection is an autogenerated conversion function. +func Convert_controlplane_SupportBundleCollection_To_v1beta2_SupportBundleCollection(in *controlplane.SupportBundleCollection, out *SupportBundleCollection, s conversion.Scope) error { + return autoConvert_controlplane_SupportBundleCollection_To_v1beta2_SupportBundleCollection(in, out, s) +} + +func autoConvert_v1beta2_SupportBundleCollectionList_To_controlplane_SupportBundleCollectionList(in *SupportBundleCollectionList, out *controlplane.SupportBundleCollectionList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]controlplane.SupportBundleCollection)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta2_SupportBundleCollectionList_To_controlplane_SupportBundleCollectionList is an autogenerated conversion function. +func Convert_v1beta2_SupportBundleCollectionList_To_controlplane_SupportBundleCollectionList(in *SupportBundleCollectionList, out *controlplane.SupportBundleCollectionList, s conversion.Scope) error { + return autoConvert_v1beta2_SupportBundleCollectionList_To_controlplane_SupportBundleCollectionList(in, out, s) +} + +func autoConvert_controlplane_SupportBundleCollectionList_To_v1beta2_SupportBundleCollectionList(in *controlplane.SupportBundleCollectionList, out *SupportBundleCollectionList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]SupportBundleCollection)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_controlplane_SupportBundleCollectionList_To_v1beta2_SupportBundleCollectionList is an autogenerated conversion function. +func Convert_controlplane_SupportBundleCollectionList_To_v1beta2_SupportBundleCollectionList(in *controlplane.SupportBundleCollectionList, out *SupportBundleCollectionList, s conversion.Scope) error { + return autoConvert_controlplane_SupportBundleCollectionList_To_v1beta2_SupportBundleCollectionList(in, out, s) +} + +func autoConvert_v1beta2_SupportBundleCollectionNodeStatus_To_controlplane_SupportBundleCollectionNodeStatus(in *SupportBundleCollectionNodeStatus, out *controlplane.SupportBundleCollectionNodeStatus, s conversion.Scope) error { + out.NodeName = in.NodeName + out.NodeNamespace = in.NodeNamespace + out.NodeType = controlplane.SupportBundleCollectionNodeType(in.NodeType) + out.Completed = in.Completed + out.Error = in.Error + return nil +} + +// Convert_v1beta2_SupportBundleCollectionNodeStatus_To_controlplane_SupportBundleCollectionNodeStatus is an autogenerated conversion function. +func Convert_v1beta2_SupportBundleCollectionNodeStatus_To_controlplane_SupportBundleCollectionNodeStatus(in *SupportBundleCollectionNodeStatus, out *controlplane.SupportBundleCollectionNodeStatus, s conversion.Scope) error { + return autoConvert_v1beta2_SupportBundleCollectionNodeStatus_To_controlplane_SupportBundleCollectionNodeStatus(in, out, s) +} + +func autoConvert_controlplane_SupportBundleCollectionNodeStatus_To_v1beta2_SupportBundleCollectionNodeStatus(in *controlplane.SupportBundleCollectionNodeStatus, out *SupportBundleCollectionNodeStatus, s conversion.Scope) error { + out.NodeName = in.NodeName + out.NodeNamespace = in.NodeNamespace + out.NodeType = string(in.NodeType) + out.Completed = in.Completed + out.Error = in.Error + return nil +} + +// Convert_controlplane_SupportBundleCollectionNodeStatus_To_v1beta2_SupportBundleCollectionNodeStatus is an autogenerated conversion function. +func Convert_controlplane_SupportBundleCollectionNodeStatus_To_v1beta2_SupportBundleCollectionNodeStatus(in *controlplane.SupportBundleCollectionNodeStatus, out *SupportBundleCollectionNodeStatus, s conversion.Scope) error { + return autoConvert_controlplane_SupportBundleCollectionNodeStatus_To_v1beta2_SupportBundleCollectionNodeStatus(in, out, s) +} + +func autoConvert_v1beta2_SupportBundleCollectionStatus_To_controlplane_SupportBundleCollectionStatus(in *SupportBundleCollectionStatus, out *controlplane.SupportBundleCollectionStatus, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Nodes = *(*[]controlplane.SupportBundleCollectionNodeStatus)(unsafe.Pointer(&in.Nodes)) + return nil +} + +// Convert_v1beta2_SupportBundleCollectionStatus_To_controlplane_SupportBundleCollectionStatus is an autogenerated conversion function. +func Convert_v1beta2_SupportBundleCollectionStatus_To_controlplane_SupportBundleCollectionStatus(in *SupportBundleCollectionStatus, out *controlplane.SupportBundleCollectionStatus, s conversion.Scope) error { + return autoConvert_v1beta2_SupportBundleCollectionStatus_To_controlplane_SupportBundleCollectionStatus(in, out, s) +} + +func autoConvert_controlplane_SupportBundleCollectionStatus_To_v1beta2_SupportBundleCollectionStatus(in *controlplane.SupportBundleCollectionStatus, out *SupportBundleCollectionStatus, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Nodes = *(*[]SupportBundleCollectionNodeStatus)(unsafe.Pointer(&in.Nodes)) + return nil +} + +// Convert_controlplane_SupportBundleCollectionStatus_To_v1beta2_SupportBundleCollectionStatus is an autogenerated conversion function. +func Convert_controlplane_SupportBundleCollectionStatus_To_v1beta2_SupportBundleCollectionStatus(in *controlplane.SupportBundleCollectionStatus, out *SupportBundleCollectionStatus, s conversion.Scope) error { + return autoConvert_controlplane_SupportBundleCollectionStatus_To_v1beta2_SupportBundleCollectionStatus(in, out, s) +} diff --git a/pkg/apis/controlplane/v1beta2/zz_generated.deepcopy.go b/pkg/apis/controlplane/v1beta2/zz_generated.deepcopy.go index 961fef5ded8..010e6b81c21 100644 --- a/pkg/apis/controlplane/v1beta2/zz_generated.deepcopy.go +++ b/pkg/apis/controlplane/v1beta2/zz_generated.deepcopy.go @@ -238,6 +238,59 @@ func (in *AppliedToGroupPatch) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BasicAuthentication) DeepCopyInto(out *BasicAuthentication) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicAuthentication. +func (in *BasicAuthentication) DeepCopy() *BasicAuthentication { + if in == nil { + return nil + } + out := new(BasicAuthentication) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BundleFileServer) DeepCopyInto(out *BundleFileServer) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleFileServer. +func (in *BundleFileServer) DeepCopy() *BundleFileServer { + if in == nil { + return nil + } + out := new(BundleFileServer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BundleServerAuthConfiguration) DeepCopyInto(out *BundleServerAuthConfiguration) { + *out = *in + if in.BasicAuthentication != nil { + in, out := &in.BasicAuthentication, &out.BasicAuthentication + *out = new(BasicAuthentication) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleServerAuthConfiguration. +func (in *BundleServerAuthConfiguration) DeepCopy() *BundleServerAuthConfiguration { + if in == nil { + return nil + } + out := new(BundleServerAuthConfiguration) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterGroupMembers) DeepCopyInto(out *ClusterGroupMembers) { *out = *in @@ -1018,3 +1071,112 @@ func (in *ServiceReference) DeepCopy() *ServiceReference { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SupportBundleCollection) DeepCopyInto(out *SupportBundleCollection) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.ExpiredAt.DeepCopyInto(&out.ExpiredAt) + out.FileServer = in.FileServer + in.Authentication.DeepCopyInto(&out.Authentication) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupportBundleCollection. +func (in *SupportBundleCollection) DeepCopy() *SupportBundleCollection { + if in == nil { + return nil + } + out := new(SupportBundleCollection) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SupportBundleCollection) 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 *SupportBundleCollectionList) DeepCopyInto(out *SupportBundleCollectionList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SupportBundleCollection, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupportBundleCollectionList. +func (in *SupportBundleCollectionList) DeepCopy() *SupportBundleCollectionList { + if in == nil { + return nil + } + out := new(SupportBundleCollectionList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SupportBundleCollectionList) 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 *SupportBundleCollectionNodeStatus) DeepCopyInto(out *SupportBundleCollectionNodeStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupportBundleCollectionNodeStatus. +func (in *SupportBundleCollectionNodeStatus) DeepCopy() *SupportBundleCollectionNodeStatus { + if in == nil { + return nil + } + out := new(SupportBundleCollectionNodeStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SupportBundleCollectionStatus) DeepCopyInto(out *SupportBundleCollectionStatus) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Nodes != nil { + in, out := &in.Nodes, &out.Nodes + *out = make([]SupportBundleCollectionNodeStatus, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupportBundleCollectionStatus. +func (in *SupportBundleCollectionStatus) DeepCopy() *SupportBundleCollectionStatus { + if in == nil { + return nil + } + out := new(SupportBundleCollectionStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SupportBundleCollectionStatus) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} diff --git a/pkg/apis/controlplane/zz_generated.deepcopy.go b/pkg/apis/controlplane/zz_generated.deepcopy.go index 85c5d46379f..499379d82c0 100644 --- a/pkg/apis/controlplane/zz_generated.deepcopy.go +++ b/pkg/apis/controlplane/zz_generated.deepcopy.go @@ -238,6 +238,59 @@ func (in *AppliedToGroupPatch) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BasicAuthentication) DeepCopyInto(out *BasicAuthentication) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicAuthentication. +func (in *BasicAuthentication) DeepCopy() *BasicAuthentication { + if in == nil { + return nil + } + out := new(BasicAuthentication) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BundleFileServer) DeepCopyInto(out *BundleFileServer) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleFileServer. +func (in *BundleFileServer) DeepCopy() *BundleFileServer { + if in == nil { + return nil + } + out := new(BundleFileServer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BundleServerAuthConfiguration) DeepCopyInto(out *BundleServerAuthConfiguration) { + *out = *in + if in.BasicAuthentication != nil { + in, out := &in.BasicAuthentication, &out.BasicAuthentication + *out = new(BasicAuthentication) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleServerAuthConfiguration. +func (in *BundleServerAuthConfiguration) DeepCopy() *BundleServerAuthConfiguration { + if in == nil { + return nil + } + out := new(BundleServerAuthConfiguration) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterGroupMembers) DeepCopyInto(out *ClusterGroupMembers) { *out = *in @@ -1018,3 +1071,112 @@ func (in *ServiceReference) DeepCopy() *ServiceReference { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SupportBundleCollection) DeepCopyInto(out *SupportBundleCollection) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.ExpiredAt.DeepCopyInto(&out.ExpiredAt) + out.FileServer = in.FileServer + in.Authentication.DeepCopyInto(&out.Authentication) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupportBundleCollection. +func (in *SupportBundleCollection) DeepCopy() *SupportBundleCollection { + if in == nil { + return nil + } + out := new(SupportBundleCollection) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SupportBundleCollection) 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 *SupportBundleCollectionList) DeepCopyInto(out *SupportBundleCollectionList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SupportBundleCollection, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupportBundleCollectionList. +func (in *SupportBundleCollectionList) DeepCopy() *SupportBundleCollectionList { + if in == nil { + return nil + } + out := new(SupportBundleCollectionList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SupportBundleCollectionList) 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 *SupportBundleCollectionNodeStatus) DeepCopyInto(out *SupportBundleCollectionNodeStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupportBundleCollectionNodeStatus. +func (in *SupportBundleCollectionNodeStatus) DeepCopy() *SupportBundleCollectionNodeStatus { + if in == nil { + return nil + } + out := new(SupportBundleCollectionNodeStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SupportBundleCollectionStatus) DeepCopyInto(out *SupportBundleCollectionStatus) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Nodes != nil { + in, out := &in.Nodes, &out.Nodes + *out = make([]SupportBundleCollectionNodeStatus, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupportBundleCollectionStatus. +func (in *SupportBundleCollectionStatus) DeepCopy() *SupportBundleCollectionStatus { + if in == nil { + return nil + } + out := new(SupportBundleCollectionStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SupportBundleCollectionStatus) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} diff --git a/pkg/apis/crd/v1alpha1/types.go b/pkg/apis/crd/v1alpha1/types.go index 4b013adb415..cebceeea445 100644 --- a/pkg/apis/crd/v1alpha1/types.go +++ b/pkg/apis/crd/v1alpha1/types.go @@ -801,7 +801,7 @@ type BundleNodes struct { } type BundleExternalNodes struct { - Namespace string + Namespace string `json:"namespace"` // List the names of certain ExternalNodes which are expected to collect and upload // bundle files. // +optional @@ -822,8 +822,9 @@ type BundleFileServer struct { type BundleServerAuthType string const ( - APIKey BundleServerAuthType = "APIKey" - BearerToken BundleServerAuthType = "BearerToken" + APIKey BundleServerAuthType = "APIKey" + BearerToken BundleServerAuthType = "BearerToken" + BasicAuthentication BundleServerAuthType = "BasicAuthentication" ) // BundleServerAuthConfiguration defines the authentication parameters that Antrea uses to access diff --git a/pkg/apiserver/apiserver.go b/pkg/apiserver/apiserver.go index f1c3c2b6839..1e29ec0a3b2 100644 --- a/pkg/apiserver/apiserver.go +++ b/pkg/apiserver/apiserver.go @@ -43,6 +43,7 @@ import ( "antrea.io/antrea/pkg/apiserver/handlers/webhook" "antrea.io/antrea/pkg/apiserver/registry/controlplane/egressgroup" "antrea.io/antrea/pkg/apiserver/registry/controlplane/nodestatssummary" + "antrea.io/antrea/pkg/apiserver/registry/controlplane/supportbundlecollection" "antrea.io/antrea/pkg/apiserver/registry/networkpolicy/addressgroup" "antrea.io/antrea/pkg/apiserver/registry/networkpolicy/appliedtogroup" "antrea.io/antrea/pkg/apiserver/registry/networkpolicy/clustergroupmember" @@ -61,6 +62,7 @@ import ( controllernetworkpolicy "antrea.io/antrea/pkg/controller/networkpolicy" "antrea.io/antrea/pkg/controller/querier" "antrea.io/antrea/pkg/controller/stats" + controllerbundlecollection "antrea.io/antrea/pkg/controller/supportbundlecollection" "antrea.io/antrea/pkg/features" ) @@ -93,6 +95,7 @@ type ExtraConfig struct { appliedToGroupStore storage.Interface networkPolicyStore storage.Interface egressGroupStore storage.Interface + bundleCollectionStore storage.Interface controllerQuerier querier.ControllerQuerier endpointQuerier controllernetworkpolicy.EndpointQuerier networkPolicyController *controllernetworkpolicy.NetworkPolicyController @@ -101,6 +104,7 @@ type ExtraConfig struct { caCertController *certificate.CACertController statsAggregator *stats.Aggregator networkPolicyStatusController *controllernetworkpolicy.StatusController + bundleCollectionController *controllerbundlecollection.Controller } // Config defines the config for Antrea apiserver. @@ -133,14 +137,15 @@ type completedConfig struct { func NewConfig( genericConfig *genericapiserver.Config, k8sClient kubernetes.Interface, - addressGroupStore, appliedToGroupStore, networkPolicyStore, groupStore, egressGroupStore storage.Interface, + addressGroupStore, appliedToGroupStore, networkPolicyStore, groupStore, egressGroupStore, supportBundleCollectionStore storage.Interface, caCertController *certificate.CACertController, statsAggregator *stats.Aggregator, controllerQuerier querier.ControllerQuerier, networkPolicyStatusController *controllernetworkpolicy.StatusController, endpointQuerier controllernetworkpolicy.EndpointQuerier, npController *controllernetworkpolicy.NetworkPolicyController, - egressController *egress.EgressController) *Config { + egressController *egress.EgressController, + bundleCollectionController *controllerbundlecollection.Controller) *Config { return &Config{ genericConfig: genericConfig, extraConfig: ExtraConfig{ @@ -149,6 +154,7 @@ func NewConfig( appliedToGroupStore: appliedToGroupStore, networkPolicyStore: networkPolicyStore, egressGroupStore: egressGroupStore, + bundleCollectionStore: supportBundleCollectionStore, caCertController: caCertController, statsAggregator: statsAggregator, controllerQuerier: controllerQuerier, @@ -156,6 +162,7 @@ func NewConfig( networkPolicyController: npController, networkPolicyStatusController: networkPolicyStatusController, egressController: egressController, + bundleCollectionController: bundleCollectionController, }, } } @@ -173,6 +180,7 @@ func installAPIGroup(s *APIServer, c completedConfig) error { groupAssociationStorage := groupassociation.NewREST(c.extraConfig.networkPolicyController) nodeStatsSummaryStorage := nodestatssummary.NewREST(c.extraConfig.statsAggregator) egressGroupStorage := egressgroup.NewREST(c.extraConfig.egressGroupStore) + bundleCollectionStorage := supportbundlecollection.NewREST(c.extraConfig.bundleCollectionStore) cpGroup := genericapiserver.NewDefaultAPIGroupInfo(controlplane.GroupName, Scheme, parameterCodec, Codecs) cpv1beta2Storage := map[string]rest.Storage{} cpv1beta2Storage["addressgroups"] = addressGroupStorage @@ -183,6 +191,7 @@ func installAPIGroup(s *APIServer, c completedConfig) error { cpv1beta2Storage["groupassociations"] = groupAssociationStorage cpv1beta2Storage["clustergroupmembers"] = clusterGroupMembershipStorage cpv1beta2Storage["egressgroups"] = egressGroupStorage + cpv1beta2Storage["supportbundlecollections"] = bundleCollectionStorage cpGroup.VersionedResourcesStorageMap["v1beta2"] = cpv1beta2Storage systemGroup := genericapiserver.NewDefaultAPIGroupInfo(system.GroupName, Scheme, metav1.ParameterCodec, Codecs) @@ -299,6 +308,10 @@ func installHandlers(c *ExtraConfig, s *genericapiserver.GenericAPIServer) { if features.DefaultFeatureGate.Enabled(features.AntreaIPAM) { s.Handler.NonGoRestfulMux.HandleFunc("/validate/ippool", webhook.HandlerForValidateFunc(ipam.ValidateIPPool)) } + + if features.DefaultFeatureGate.Enabled(features.SupportBundleCollection) { + s.Handler.NonGoRestfulMux.HandleFunc("/validate/supportbundlecollection", webhook.HandlerForValidateFunc(c.bundleCollectionController.Validate)) + } } func DefaultCAConfig() *certificate.CAConfig { diff --git a/pkg/apiserver/openapi/zz_generated.openapi.go b/pkg/apiserver/openapi/zz_generated.openapi.go index dc25b9f05d1..406edb1f025 100644 --- a/pkg/apiserver/openapi/zz_generated.openapi.go +++ b/pkg/apiserver/openapi/zz_generated.openapi.go @@ -30,319 +30,326 @@ import ( func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.AddressGroup": schema_pkg_apis_controlplane_v1beta2_AddressGroup(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.AddressGroupList": schema_pkg_apis_controlplane_v1beta2_AddressGroupList(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.AddressGroupPatch": schema_pkg_apis_controlplane_v1beta2_AddressGroupPatch(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.AppliedToGroup": schema_pkg_apis_controlplane_v1beta2_AppliedToGroup(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.AppliedToGroupList": schema_pkg_apis_controlplane_v1beta2_AppliedToGroupList(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.AppliedToGroupPatch": schema_pkg_apis_controlplane_v1beta2_AppliedToGroupPatch(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.ClusterGroupMembers": schema_pkg_apis_controlplane_v1beta2_ClusterGroupMembers(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.EgressGroup": schema_pkg_apis_controlplane_v1beta2_EgressGroup(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.EgressGroupList": schema_pkg_apis_controlplane_v1beta2_EgressGroupList(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.EgressGroupPatch": schema_pkg_apis_controlplane_v1beta2_EgressGroupPatch(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.ExternalEntityReference": schema_pkg_apis_controlplane_v1beta2_ExternalEntityReference(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.GroupAssociation": schema_pkg_apis_controlplane_v1beta2_GroupAssociation(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.GroupMember": schema_pkg_apis_controlplane_v1beta2_GroupMember(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.GroupReference": schema_pkg_apis_controlplane_v1beta2_GroupReference(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.IPBlock": schema_pkg_apis_controlplane_v1beta2_IPBlock(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.IPNet": schema_pkg_apis_controlplane_v1beta2_IPNet(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.MulticastGroupInfo": schema_pkg_apis_controlplane_v1beta2_MulticastGroupInfo(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NamedPort": schema_pkg_apis_controlplane_v1beta2_NamedPort(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NetworkPolicy": schema_pkg_apis_controlplane_v1beta2_NetworkPolicy(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NetworkPolicyList": schema_pkg_apis_controlplane_v1beta2_NetworkPolicyList(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NetworkPolicyNodeStatus": schema_pkg_apis_controlplane_v1beta2_NetworkPolicyNodeStatus(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NetworkPolicyPeer": schema_pkg_apis_controlplane_v1beta2_NetworkPolicyPeer(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NetworkPolicyReference": schema_pkg_apis_controlplane_v1beta2_NetworkPolicyReference(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NetworkPolicyRule": schema_pkg_apis_controlplane_v1beta2_NetworkPolicyRule(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NetworkPolicyStats": schema_pkg_apis_controlplane_v1beta2_NetworkPolicyStats(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NetworkPolicyStatus": schema_pkg_apis_controlplane_v1beta2_NetworkPolicyStatus(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NodeReference": schema_pkg_apis_controlplane_v1beta2_NodeReference(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NodeStatsSummary": schema_pkg_apis_controlplane_v1beta2_NodeStatsSummary(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.PaginationGetOptions": schema_pkg_apis_controlplane_v1beta2_PaginationGetOptions(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.PodReference": schema_pkg_apis_controlplane_v1beta2_PodReference(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.Service": schema_pkg_apis_controlplane_v1beta2_Service(ref), - "antrea.io/antrea/pkg/apis/controlplane/v1beta2.ServiceReference": schema_pkg_apis_controlplane_v1beta2_ServiceReference(ref), - "antrea.io/antrea/pkg/apis/crd/v1beta1.AgentCondition": schema_pkg_apis_crd_v1beta1_AgentCondition(ref), - "antrea.io/antrea/pkg/apis/crd/v1beta1.AntreaAgentInfo": schema_pkg_apis_crd_v1beta1_AntreaAgentInfo(ref), - "antrea.io/antrea/pkg/apis/crd/v1beta1.AntreaAgentInfoList": schema_pkg_apis_crd_v1beta1_AntreaAgentInfoList(ref), - "antrea.io/antrea/pkg/apis/crd/v1beta1.AntreaControllerInfo": schema_pkg_apis_crd_v1beta1_AntreaControllerInfo(ref), - "antrea.io/antrea/pkg/apis/crd/v1beta1.AntreaControllerInfoList": schema_pkg_apis_crd_v1beta1_AntreaControllerInfoList(ref), - "antrea.io/antrea/pkg/apis/crd/v1beta1.ControllerCondition": schema_pkg_apis_crd_v1beta1_ControllerCondition(ref), - "antrea.io/antrea/pkg/apis/crd/v1beta1.NetworkPolicyControllerInfo": schema_pkg_apis_crd_v1beta1_NetworkPolicyControllerInfo(ref), - "antrea.io/antrea/pkg/apis/crd/v1beta1.OVSInfo": schema_pkg_apis_crd_v1beta1_OVSInfo(ref), - "antrea.io/antrea/pkg/apis/stats/v1alpha1.AntreaClusterNetworkPolicyStats": schema_pkg_apis_stats_v1alpha1_AntreaClusterNetworkPolicyStats(ref), - "antrea.io/antrea/pkg/apis/stats/v1alpha1.AntreaClusterNetworkPolicyStatsList": schema_pkg_apis_stats_v1alpha1_AntreaClusterNetworkPolicyStatsList(ref), - "antrea.io/antrea/pkg/apis/stats/v1alpha1.AntreaNetworkPolicyStats": schema_pkg_apis_stats_v1alpha1_AntreaNetworkPolicyStats(ref), - "antrea.io/antrea/pkg/apis/stats/v1alpha1.AntreaNetworkPolicyStatsList": schema_pkg_apis_stats_v1alpha1_AntreaNetworkPolicyStatsList(ref), - "antrea.io/antrea/pkg/apis/stats/v1alpha1.MulticastGroup": schema_pkg_apis_stats_v1alpha1_MulticastGroup(ref), - "antrea.io/antrea/pkg/apis/stats/v1alpha1.MulticastGroupList": schema_pkg_apis_stats_v1alpha1_MulticastGroupList(ref), - "antrea.io/antrea/pkg/apis/stats/v1alpha1.NetworkPolicyStats": schema_pkg_apis_stats_v1alpha1_NetworkPolicyStats(ref), - "antrea.io/antrea/pkg/apis/stats/v1alpha1.NetworkPolicyStatsList": schema_pkg_apis_stats_v1alpha1_NetworkPolicyStatsList(ref), - "antrea.io/antrea/pkg/apis/stats/v1alpha1.PodReference": schema_pkg_apis_stats_v1alpha1_PodReference(ref), - "antrea.io/antrea/pkg/apis/stats/v1alpha1.RuleTrafficStats": schema_pkg_apis_stats_v1alpha1_RuleTrafficStats(ref), - "antrea.io/antrea/pkg/apis/stats/v1alpha1.TrafficStats": schema_pkg_apis_stats_v1alpha1_TrafficStats(ref), - "antrea.io/antrea/pkg/apis/system/v1beta1.SupportBundle": schema_pkg_apis_system_v1beta1_SupportBundle(ref), - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource": schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref), - "k8s.io/api/core/v1.Affinity": schema_k8sio_api_core_v1_Affinity(ref), - "k8s.io/api/core/v1.AttachedVolume": schema_k8sio_api_core_v1_AttachedVolume(ref), - "k8s.io/api/core/v1.AvoidPods": schema_k8sio_api_core_v1_AvoidPods(ref), - "k8s.io/api/core/v1.AzureDiskVolumeSource": schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref), - "k8s.io/api/core/v1.AzureFilePersistentVolumeSource": schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref), - "k8s.io/api/core/v1.AzureFileVolumeSource": schema_k8sio_api_core_v1_AzureFileVolumeSource(ref), - "k8s.io/api/core/v1.Binding": schema_k8sio_api_core_v1_Binding(ref), - "k8s.io/api/core/v1.CSIPersistentVolumeSource": schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref), - "k8s.io/api/core/v1.CSIVolumeSource": schema_k8sio_api_core_v1_CSIVolumeSource(ref), - "k8s.io/api/core/v1.Capabilities": schema_k8sio_api_core_v1_Capabilities(ref), - "k8s.io/api/core/v1.CephFSPersistentVolumeSource": schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref), - "k8s.io/api/core/v1.CephFSVolumeSource": schema_k8sio_api_core_v1_CephFSVolumeSource(ref), - "k8s.io/api/core/v1.CinderPersistentVolumeSource": schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref), - "k8s.io/api/core/v1.CinderVolumeSource": schema_k8sio_api_core_v1_CinderVolumeSource(ref), - "k8s.io/api/core/v1.ClientIPConfig": schema_k8sio_api_core_v1_ClientIPConfig(ref), - "k8s.io/api/core/v1.ComponentCondition": schema_k8sio_api_core_v1_ComponentCondition(ref), - "k8s.io/api/core/v1.ComponentStatus": schema_k8sio_api_core_v1_ComponentStatus(ref), - "k8s.io/api/core/v1.ComponentStatusList": schema_k8sio_api_core_v1_ComponentStatusList(ref), - "k8s.io/api/core/v1.ConfigMap": schema_k8sio_api_core_v1_ConfigMap(ref), - "k8s.io/api/core/v1.ConfigMapEnvSource": schema_k8sio_api_core_v1_ConfigMapEnvSource(ref), - "k8s.io/api/core/v1.ConfigMapKeySelector": schema_k8sio_api_core_v1_ConfigMapKeySelector(ref), - "k8s.io/api/core/v1.ConfigMapList": schema_k8sio_api_core_v1_ConfigMapList(ref), - "k8s.io/api/core/v1.ConfigMapNodeConfigSource": schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref), - "k8s.io/api/core/v1.ConfigMapProjection": schema_k8sio_api_core_v1_ConfigMapProjection(ref), - "k8s.io/api/core/v1.ConfigMapVolumeSource": schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref), - "k8s.io/api/core/v1.Container": schema_k8sio_api_core_v1_Container(ref), - "k8s.io/api/core/v1.ContainerImage": schema_k8sio_api_core_v1_ContainerImage(ref), - "k8s.io/api/core/v1.ContainerPort": schema_k8sio_api_core_v1_ContainerPort(ref), - "k8s.io/api/core/v1.ContainerState": schema_k8sio_api_core_v1_ContainerState(ref), - "k8s.io/api/core/v1.ContainerStateRunning": schema_k8sio_api_core_v1_ContainerStateRunning(ref), - "k8s.io/api/core/v1.ContainerStateTerminated": schema_k8sio_api_core_v1_ContainerStateTerminated(ref), - "k8s.io/api/core/v1.ContainerStateWaiting": schema_k8sio_api_core_v1_ContainerStateWaiting(ref), - "k8s.io/api/core/v1.ContainerStatus": schema_k8sio_api_core_v1_ContainerStatus(ref), - "k8s.io/api/core/v1.DaemonEndpoint": schema_k8sio_api_core_v1_DaemonEndpoint(ref), - "k8s.io/api/core/v1.DownwardAPIProjection": schema_k8sio_api_core_v1_DownwardAPIProjection(ref), - "k8s.io/api/core/v1.DownwardAPIVolumeFile": schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref), - "k8s.io/api/core/v1.DownwardAPIVolumeSource": schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref), - "k8s.io/api/core/v1.EmptyDirVolumeSource": schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref), - "k8s.io/api/core/v1.EndpointAddress": schema_k8sio_api_core_v1_EndpointAddress(ref), - "k8s.io/api/core/v1.EndpointPort": schema_k8sio_api_core_v1_EndpointPort(ref), - "k8s.io/api/core/v1.EndpointSubset": schema_k8sio_api_core_v1_EndpointSubset(ref), - "k8s.io/api/core/v1.Endpoints": schema_k8sio_api_core_v1_Endpoints(ref), - "k8s.io/api/core/v1.EndpointsList": schema_k8sio_api_core_v1_EndpointsList(ref), - "k8s.io/api/core/v1.EnvFromSource": schema_k8sio_api_core_v1_EnvFromSource(ref), - "k8s.io/api/core/v1.EnvVar": schema_k8sio_api_core_v1_EnvVar(ref), - "k8s.io/api/core/v1.EnvVarSource": schema_k8sio_api_core_v1_EnvVarSource(ref), - "k8s.io/api/core/v1.EphemeralContainer": schema_k8sio_api_core_v1_EphemeralContainer(ref), - "k8s.io/api/core/v1.EphemeralContainerCommon": schema_k8sio_api_core_v1_EphemeralContainerCommon(ref), - "k8s.io/api/core/v1.EphemeralVolumeSource": schema_k8sio_api_core_v1_EphemeralVolumeSource(ref), - "k8s.io/api/core/v1.Event": schema_k8sio_api_core_v1_Event(ref), - "k8s.io/api/core/v1.EventList": schema_k8sio_api_core_v1_EventList(ref), - "k8s.io/api/core/v1.EventSeries": schema_k8sio_api_core_v1_EventSeries(ref), - "k8s.io/api/core/v1.EventSource": schema_k8sio_api_core_v1_EventSource(ref), - "k8s.io/api/core/v1.ExecAction": schema_k8sio_api_core_v1_ExecAction(ref), - "k8s.io/api/core/v1.FCVolumeSource": schema_k8sio_api_core_v1_FCVolumeSource(ref), - "k8s.io/api/core/v1.FlexPersistentVolumeSource": schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref), - "k8s.io/api/core/v1.FlexVolumeSource": schema_k8sio_api_core_v1_FlexVolumeSource(ref), - "k8s.io/api/core/v1.FlockerVolumeSource": schema_k8sio_api_core_v1_FlockerVolumeSource(ref), - "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource": schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref), - "k8s.io/api/core/v1.GRPCAction": schema_k8sio_api_core_v1_GRPCAction(ref), - "k8s.io/api/core/v1.GitRepoVolumeSource": schema_k8sio_api_core_v1_GitRepoVolumeSource(ref), - "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource": schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref), - "k8s.io/api/core/v1.GlusterfsVolumeSource": schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref), - "k8s.io/api/core/v1.HTTPGetAction": schema_k8sio_api_core_v1_HTTPGetAction(ref), - "k8s.io/api/core/v1.HTTPHeader": schema_k8sio_api_core_v1_HTTPHeader(ref), - "k8s.io/api/core/v1.HostAlias": schema_k8sio_api_core_v1_HostAlias(ref), - "k8s.io/api/core/v1.HostPathVolumeSource": schema_k8sio_api_core_v1_HostPathVolumeSource(ref), - "k8s.io/api/core/v1.ISCSIPersistentVolumeSource": schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref), - "k8s.io/api/core/v1.ISCSIVolumeSource": schema_k8sio_api_core_v1_ISCSIVolumeSource(ref), - "k8s.io/api/core/v1.KeyToPath": schema_k8sio_api_core_v1_KeyToPath(ref), - "k8s.io/api/core/v1.Lifecycle": schema_k8sio_api_core_v1_Lifecycle(ref), - "k8s.io/api/core/v1.LifecycleHandler": schema_k8sio_api_core_v1_LifecycleHandler(ref), - "k8s.io/api/core/v1.LimitRange": schema_k8sio_api_core_v1_LimitRange(ref), - "k8s.io/api/core/v1.LimitRangeItem": schema_k8sio_api_core_v1_LimitRangeItem(ref), - "k8s.io/api/core/v1.LimitRangeList": schema_k8sio_api_core_v1_LimitRangeList(ref), - "k8s.io/api/core/v1.LimitRangeSpec": schema_k8sio_api_core_v1_LimitRangeSpec(ref), - "k8s.io/api/core/v1.List": schema_k8sio_api_core_v1_List(ref), - "k8s.io/api/core/v1.LoadBalancerIngress": schema_k8sio_api_core_v1_LoadBalancerIngress(ref), - "k8s.io/api/core/v1.LoadBalancerStatus": schema_k8sio_api_core_v1_LoadBalancerStatus(ref), - "k8s.io/api/core/v1.LocalObjectReference": schema_k8sio_api_core_v1_LocalObjectReference(ref), - "k8s.io/api/core/v1.LocalVolumeSource": schema_k8sio_api_core_v1_LocalVolumeSource(ref), - "k8s.io/api/core/v1.NFSVolumeSource": schema_k8sio_api_core_v1_NFSVolumeSource(ref), - "k8s.io/api/core/v1.Namespace": schema_k8sio_api_core_v1_Namespace(ref), - "k8s.io/api/core/v1.NamespaceCondition": schema_k8sio_api_core_v1_NamespaceCondition(ref), - "k8s.io/api/core/v1.NamespaceList": schema_k8sio_api_core_v1_NamespaceList(ref), - "k8s.io/api/core/v1.NamespaceSpec": schema_k8sio_api_core_v1_NamespaceSpec(ref), - "k8s.io/api/core/v1.NamespaceStatus": schema_k8sio_api_core_v1_NamespaceStatus(ref), - "k8s.io/api/core/v1.Node": schema_k8sio_api_core_v1_Node(ref), - "k8s.io/api/core/v1.NodeAddress": schema_k8sio_api_core_v1_NodeAddress(ref), - "k8s.io/api/core/v1.NodeAffinity": schema_k8sio_api_core_v1_NodeAffinity(ref), - "k8s.io/api/core/v1.NodeCondition": schema_k8sio_api_core_v1_NodeCondition(ref), - "k8s.io/api/core/v1.NodeConfigSource": schema_k8sio_api_core_v1_NodeConfigSource(ref), - "k8s.io/api/core/v1.NodeConfigStatus": schema_k8sio_api_core_v1_NodeConfigStatus(ref), - "k8s.io/api/core/v1.NodeDaemonEndpoints": schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref), - "k8s.io/api/core/v1.NodeList": schema_k8sio_api_core_v1_NodeList(ref), - "k8s.io/api/core/v1.NodeProxyOptions": schema_k8sio_api_core_v1_NodeProxyOptions(ref), - "k8s.io/api/core/v1.NodeResources": schema_k8sio_api_core_v1_NodeResources(ref), - "k8s.io/api/core/v1.NodeSelector": schema_k8sio_api_core_v1_NodeSelector(ref), - "k8s.io/api/core/v1.NodeSelectorRequirement": schema_k8sio_api_core_v1_NodeSelectorRequirement(ref), - "k8s.io/api/core/v1.NodeSelectorTerm": schema_k8sio_api_core_v1_NodeSelectorTerm(ref), - "k8s.io/api/core/v1.NodeSpec": schema_k8sio_api_core_v1_NodeSpec(ref), - "k8s.io/api/core/v1.NodeStatus": schema_k8sio_api_core_v1_NodeStatus(ref), - "k8s.io/api/core/v1.NodeSystemInfo": schema_k8sio_api_core_v1_NodeSystemInfo(ref), - "k8s.io/api/core/v1.ObjectFieldSelector": schema_k8sio_api_core_v1_ObjectFieldSelector(ref), - "k8s.io/api/core/v1.ObjectReference": schema_k8sio_api_core_v1_ObjectReference(ref), - "k8s.io/api/core/v1.PersistentVolume": schema_k8sio_api_core_v1_PersistentVolume(ref), - "k8s.io/api/core/v1.PersistentVolumeClaim": schema_k8sio_api_core_v1_PersistentVolumeClaim(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimCondition": schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimList": schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimSpec": schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimStatus": schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimTemplate": schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource": schema_k8sio_api_core_v1_PersistentVolumeClaimVolumeSource(ref), - "k8s.io/api/core/v1.PersistentVolumeList": schema_k8sio_api_core_v1_PersistentVolumeList(ref), - "k8s.io/api/core/v1.PersistentVolumeSource": schema_k8sio_api_core_v1_PersistentVolumeSource(ref), - "k8s.io/api/core/v1.PersistentVolumeSpec": schema_k8sio_api_core_v1_PersistentVolumeSpec(ref), - "k8s.io/api/core/v1.PersistentVolumeStatus": schema_k8sio_api_core_v1_PersistentVolumeStatus(ref), - "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource": schema_k8sio_api_core_v1_PhotonPersistentDiskVolumeSource(ref), - "k8s.io/api/core/v1.Pod": schema_k8sio_api_core_v1_Pod(ref), - "k8s.io/api/core/v1.PodAffinity": schema_k8sio_api_core_v1_PodAffinity(ref), - "k8s.io/api/core/v1.PodAffinityTerm": schema_k8sio_api_core_v1_PodAffinityTerm(ref), - "k8s.io/api/core/v1.PodAntiAffinity": schema_k8sio_api_core_v1_PodAntiAffinity(ref), - "k8s.io/api/core/v1.PodAttachOptions": schema_k8sio_api_core_v1_PodAttachOptions(ref), - "k8s.io/api/core/v1.PodCondition": schema_k8sio_api_core_v1_PodCondition(ref), - "k8s.io/api/core/v1.PodDNSConfig": schema_k8sio_api_core_v1_PodDNSConfig(ref), - "k8s.io/api/core/v1.PodDNSConfigOption": schema_k8sio_api_core_v1_PodDNSConfigOption(ref), - "k8s.io/api/core/v1.PodExecOptions": schema_k8sio_api_core_v1_PodExecOptions(ref), - "k8s.io/api/core/v1.PodIP": schema_k8sio_api_core_v1_PodIP(ref), - "k8s.io/api/core/v1.PodList": schema_k8sio_api_core_v1_PodList(ref), - "k8s.io/api/core/v1.PodLogOptions": schema_k8sio_api_core_v1_PodLogOptions(ref), - "k8s.io/api/core/v1.PodOS": schema_k8sio_api_core_v1_PodOS(ref), - "k8s.io/api/core/v1.PodPortForwardOptions": schema_k8sio_api_core_v1_PodPortForwardOptions(ref), - "k8s.io/api/core/v1.PodProxyOptions": schema_k8sio_api_core_v1_PodProxyOptions(ref), - "k8s.io/api/core/v1.PodReadinessGate": schema_k8sio_api_core_v1_PodReadinessGate(ref), - "k8s.io/api/core/v1.PodSecurityContext": schema_k8sio_api_core_v1_PodSecurityContext(ref), - "k8s.io/api/core/v1.PodSignature": schema_k8sio_api_core_v1_PodSignature(ref), - "k8s.io/api/core/v1.PodSpec": schema_k8sio_api_core_v1_PodSpec(ref), - "k8s.io/api/core/v1.PodStatus": schema_k8sio_api_core_v1_PodStatus(ref), - "k8s.io/api/core/v1.PodStatusResult": schema_k8sio_api_core_v1_PodStatusResult(ref), - "k8s.io/api/core/v1.PodTemplate": schema_k8sio_api_core_v1_PodTemplate(ref), - "k8s.io/api/core/v1.PodTemplateList": schema_k8sio_api_core_v1_PodTemplateList(ref), - "k8s.io/api/core/v1.PodTemplateSpec": schema_k8sio_api_core_v1_PodTemplateSpec(ref), - "k8s.io/api/core/v1.PortStatus": schema_k8sio_api_core_v1_PortStatus(ref), - "k8s.io/api/core/v1.PortworxVolumeSource": schema_k8sio_api_core_v1_PortworxVolumeSource(ref), - "k8s.io/api/core/v1.PreferAvoidPodsEntry": schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref), - "k8s.io/api/core/v1.PreferredSchedulingTerm": schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref), - "k8s.io/api/core/v1.Probe": schema_k8sio_api_core_v1_Probe(ref), - "k8s.io/api/core/v1.ProbeHandler": schema_k8sio_api_core_v1_ProbeHandler(ref), - "k8s.io/api/core/v1.ProjectedVolumeSource": schema_k8sio_api_core_v1_ProjectedVolumeSource(ref), - "k8s.io/api/core/v1.QuobyteVolumeSource": schema_k8sio_api_core_v1_QuobyteVolumeSource(ref), - "k8s.io/api/core/v1.RBDPersistentVolumeSource": schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref), - "k8s.io/api/core/v1.RBDVolumeSource": schema_k8sio_api_core_v1_RBDVolumeSource(ref), - "k8s.io/api/core/v1.RangeAllocation": schema_k8sio_api_core_v1_RangeAllocation(ref), - "k8s.io/api/core/v1.ReplicationController": schema_k8sio_api_core_v1_ReplicationController(ref), - "k8s.io/api/core/v1.ReplicationControllerCondition": schema_k8sio_api_core_v1_ReplicationControllerCondition(ref), - "k8s.io/api/core/v1.ReplicationControllerList": schema_k8sio_api_core_v1_ReplicationControllerList(ref), - "k8s.io/api/core/v1.ReplicationControllerSpec": schema_k8sio_api_core_v1_ReplicationControllerSpec(ref), - "k8s.io/api/core/v1.ReplicationControllerStatus": schema_k8sio_api_core_v1_ReplicationControllerStatus(ref), - "k8s.io/api/core/v1.ResourceFieldSelector": schema_k8sio_api_core_v1_ResourceFieldSelector(ref), - "k8s.io/api/core/v1.ResourceQuota": schema_k8sio_api_core_v1_ResourceQuota(ref), - "k8s.io/api/core/v1.ResourceQuotaList": schema_k8sio_api_core_v1_ResourceQuotaList(ref), - "k8s.io/api/core/v1.ResourceQuotaSpec": schema_k8sio_api_core_v1_ResourceQuotaSpec(ref), - "k8s.io/api/core/v1.ResourceQuotaStatus": schema_k8sio_api_core_v1_ResourceQuotaStatus(ref), - "k8s.io/api/core/v1.ResourceRequirements": schema_k8sio_api_core_v1_ResourceRequirements(ref), - "k8s.io/api/core/v1.SELinuxOptions": schema_k8sio_api_core_v1_SELinuxOptions(ref), - "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource": schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref), - "k8s.io/api/core/v1.ScaleIOVolumeSource": schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref), - "k8s.io/api/core/v1.ScopeSelector": schema_k8sio_api_core_v1_ScopeSelector(ref), - "k8s.io/api/core/v1.ScopedResourceSelectorRequirement": schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref), - "k8s.io/api/core/v1.SeccompProfile": schema_k8sio_api_core_v1_SeccompProfile(ref), - "k8s.io/api/core/v1.Secret": schema_k8sio_api_core_v1_Secret(ref), - "k8s.io/api/core/v1.SecretEnvSource": schema_k8sio_api_core_v1_SecretEnvSource(ref), - "k8s.io/api/core/v1.SecretKeySelector": schema_k8sio_api_core_v1_SecretKeySelector(ref), - "k8s.io/api/core/v1.SecretList": schema_k8sio_api_core_v1_SecretList(ref), - "k8s.io/api/core/v1.SecretProjection": schema_k8sio_api_core_v1_SecretProjection(ref), - "k8s.io/api/core/v1.SecretReference": schema_k8sio_api_core_v1_SecretReference(ref), - "k8s.io/api/core/v1.SecretVolumeSource": schema_k8sio_api_core_v1_SecretVolumeSource(ref), - "k8s.io/api/core/v1.SecurityContext": schema_k8sio_api_core_v1_SecurityContext(ref), - "k8s.io/api/core/v1.SerializedReference": schema_k8sio_api_core_v1_SerializedReference(ref), - "k8s.io/api/core/v1.Service": schema_k8sio_api_core_v1_Service(ref), - "k8s.io/api/core/v1.ServiceAccount": schema_k8sio_api_core_v1_ServiceAccount(ref), - "k8s.io/api/core/v1.ServiceAccountList": schema_k8sio_api_core_v1_ServiceAccountList(ref), - "k8s.io/api/core/v1.ServiceAccountTokenProjection": schema_k8sio_api_core_v1_ServiceAccountTokenProjection(ref), - "k8s.io/api/core/v1.ServiceList": schema_k8sio_api_core_v1_ServiceList(ref), - "k8s.io/api/core/v1.ServicePort": schema_k8sio_api_core_v1_ServicePort(ref), - "k8s.io/api/core/v1.ServiceProxyOptions": schema_k8sio_api_core_v1_ServiceProxyOptions(ref), - "k8s.io/api/core/v1.ServiceSpec": schema_k8sio_api_core_v1_ServiceSpec(ref), - "k8s.io/api/core/v1.ServiceStatus": schema_k8sio_api_core_v1_ServiceStatus(ref), - "k8s.io/api/core/v1.SessionAffinityConfig": schema_k8sio_api_core_v1_SessionAffinityConfig(ref), - "k8s.io/api/core/v1.StorageOSPersistentVolumeSource": schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref), - "k8s.io/api/core/v1.StorageOSVolumeSource": schema_k8sio_api_core_v1_StorageOSVolumeSource(ref), - "k8s.io/api/core/v1.Sysctl": schema_k8sio_api_core_v1_Sysctl(ref), - "k8s.io/api/core/v1.TCPSocketAction": schema_k8sio_api_core_v1_TCPSocketAction(ref), - "k8s.io/api/core/v1.Taint": schema_k8sio_api_core_v1_Taint(ref), - "k8s.io/api/core/v1.Toleration": schema_k8sio_api_core_v1_Toleration(ref), - "k8s.io/api/core/v1.TopologySelectorLabelRequirement": schema_k8sio_api_core_v1_TopologySelectorLabelRequirement(ref), - "k8s.io/api/core/v1.TopologySelectorTerm": schema_k8sio_api_core_v1_TopologySelectorTerm(ref), - "k8s.io/api/core/v1.TopologySpreadConstraint": schema_k8sio_api_core_v1_TopologySpreadConstraint(ref), - "k8s.io/api/core/v1.TypedLocalObjectReference": schema_k8sio_api_core_v1_TypedLocalObjectReference(ref), - "k8s.io/api/core/v1.Volume": schema_k8sio_api_core_v1_Volume(ref), - "k8s.io/api/core/v1.VolumeDevice": schema_k8sio_api_core_v1_VolumeDevice(ref), - "k8s.io/api/core/v1.VolumeMount": schema_k8sio_api_core_v1_VolumeMount(ref), - "k8s.io/api/core/v1.VolumeNodeAffinity": schema_k8sio_api_core_v1_VolumeNodeAffinity(ref), - "k8s.io/api/core/v1.VolumeProjection": schema_k8sio_api_core_v1_VolumeProjection(ref), - "k8s.io/api/core/v1.VolumeSource": schema_k8sio_api_core_v1_VolumeSource(ref), - "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource": schema_k8sio_api_core_v1_VsphereVirtualDiskVolumeSource(ref), - "k8s.io/api/core/v1.WeightedPodAffinityTerm": schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref), - "k8s.io/api/core/v1.WindowsSecurityContextOptions": schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": schema_pkg_apis_meta_v1_APIGroup(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": schema_pkg_apis_meta_v1_APIGroupList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": schema_pkg_apis_meta_v1_APIResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList": schema_pkg_apis_meta_v1_APIResourceList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions": schema_pkg_apis_meta_v1_APIVersions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ApplyOptions": schema_pkg_apis_meta_v1_ApplyOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition": schema_pkg_apis_meta_v1_Condition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.CreateOptions": schema_pkg_apis_meta_v1_CreateOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": schema_pkg_apis_meta_v1_DeleteOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration": schema_pkg_apis_meta_v1_Duration(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1": schema_pkg_apis_meta_v1_FieldsV1(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions": schema_pkg_apis_meta_v1_GetOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind": schema_pkg_apis_meta_v1_GroupKind(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupResource": schema_pkg_apis_meta_v1_GroupResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersion": schema_pkg_apis_meta_v1_GroupVersion(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery": schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind": schema_pkg_apis_meta_v1_GroupVersionKind(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionResource": schema_pkg_apis_meta_v1_GroupVersionResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.InternalEvent": schema_pkg_apis_meta_v1_InternalEvent(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector": schema_pkg_apis_meta_v1_LabelSelector(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement": schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.List": schema_pkg_apis_meta_v1_List(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta": schema_pkg_apis_meta_v1_ListMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions": schema_pkg_apis_meta_v1_ListOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry": schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime": schema_pkg_apis_meta_v1_MicroTime(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta": schema_pkg_apis_meta_v1_ObjectMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference": schema_pkg_apis_meta_v1_OwnerReference(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata": schema_pkg_apis_meta_v1_PartialObjectMetadata(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadataList": schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Patch": schema_pkg_apis_meta_v1_Patch(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PatchOptions": schema_pkg_apis_meta_v1_PatchOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions": schema_pkg_apis_meta_v1_Preconditions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.RootPaths": schema_pkg_apis_meta_v1_RootPaths(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR": schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Status": schema_pkg_apis_meta_v1_Status(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause": schema_pkg_apis_meta_v1_StatusCause(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails": schema_pkg_apis_meta_v1_StatusDetails(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Table": schema_pkg_apis_meta_v1_Table(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition": schema_pkg_apis_meta_v1_TableColumnDefinition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableOptions": schema_pkg_apis_meta_v1_TableOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow": schema_pkg_apis_meta_v1_TableRow(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition": schema_pkg_apis_meta_v1_TableRowCondition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Time": schema_pkg_apis_meta_v1_Time(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Timestamp": schema_pkg_apis_meta_v1_Timestamp(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta": schema_pkg_apis_meta_v1_TypeMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.UpdateOptions": schema_pkg_apis_meta_v1_UpdateOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.WatchEvent": schema_pkg_apis_meta_v1_WatchEvent(ref), - "k8s.io/apimachinery/pkg/runtime.RawExtension": schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref), - "k8s.io/apimachinery/pkg/runtime.TypeMeta": schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref), - "k8s.io/apimachinery/pkg/runtime.Unknown": schema_k8sio_apimachinery_pkg_runtime_Unknown(ref), - "k8s.io/apimachinery/pkg/util/intstr.IntOrString": schema_apimachinery_pkg_util_intstr_IntOrString(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.AddressGroup": schema_pkg_apis_controlplane_v1beta2_AddressGroup(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.AddressGroupList": schema_pkg_apis_controlplane_v1beta2_AddressGroupList(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.AddressGroupPatch": schema_pkg_apis_controlplane_v1beta2_AddressGroupPatch(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.AppliedToGroup": schema_pkg_apis_controlplane_v1beta2_AppliedToGroup(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.AppliedToGroupList": schema_pkg_apis_controlplane_v1beta2_AppliedToGroupList(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.AppliedToGroupPatch": schema_pkg_apis_controlplane_v1beta2_AppliedToGroupPatch(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.BasicAuthentication": schema_pkg_apis_controlplane_v1beta2_BasicAuthentication(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.BundleFileServer": schema_pkg_apis_controlplane_v1beta2_BundleFileServer(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.BundleServerAuthConfiguration": schema_pkg_apis_controlplane_v1beta2_BundleServerAuthConfiguration(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.ClusterGroupMembers": schema_pkg_apis_controlplane_v1beta2_ClusterGroupMembers(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.EgressGroup": schema_pkg_apis_controlplane_v1beta2_EgressGroup(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.EgressGroupList": schema_pkg_apis_controlplane_v1beta2_EgressGroupList(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.EgressGroupPatch": schema_pkg_apis_controlplane_v1beta2_EgressGroupPatch(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.ExternalEntityReference": schema_pkg_apis_controlplane_v1beta2_ExternalEntityReference(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.GroupAssociation": schema_pkg_apis_controlplane_v1beta2_GroupAssociation(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.GroupMember": schema_pkg_apis_controlplane_v1beta2_GroupMember(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.GroupReference": schema_pkg_apis_controlplane_v1beta2_GroupReference(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.IPBlock": schema_pkg_apis_controlplane_v1beta2_IPBlock(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.IPNet": schema_pkg_apis_controlplane_v1beta2_IPNet(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.MulticastGroupInfo": schema_pkg_apis_controlplane_v1beta2_MulticastGroupInfo(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NamedPort": schema_pkg_apis_controlplane_v1beta2_NamedPort(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NetworkPolicy": schema_pkg_apis_controlplane_v1beta2_NetworkPolicy(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NetworkPolicyList": schema_pkg_apis_controlplane_v1beta2_NetworkPolicyList(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NetworkPolicyNodeStatus": schema_pkg_apis_controlplane_v1beta2_NetworkPolicyNodeStatus(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NetworkPolicyPeer": schema_pkg_apis_controlplane_v1beta2_NetworkPolicyPeer(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NetworkPolicyReference": schema_pkg_apis_controlplane_v1beta2_NetworkPolicyReference(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NetworkPolicyRule": schema_pkg_apis_controlplane_v1beta2_NetworkPolicyRule(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NetworkPolicyStats": schema_pkg_apis_controlplane_v1beta2_NetworkPolicyStats(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NetworkPolicyStatus": schema_pkg_apis_controlplane_v1beta2_NetworkPolicyStatus(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NodeReference": schema_pkg_apis_controlplane_v1beta2_NodeReference(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.NodeStatsSummary": schema_pkg_apis_controlplane_v1beta2_NodeStatsSummary(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.PaginationGetOptions": schema_pkg_apis_controlplane_v1beta2_PaginationGetOptions(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.PodReference": schema_pkg_apis_controlplane_v1beta2_PodReference(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.Service": schema_pkg_apis_controlplane_v1beta2_Service(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.ServiceReference": schema_pkg_apis_controlplane_v1beta2_ServiceReference(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.SupportBundleCollection": schema_pkg_apis_controlplane_v1beta2_SupportBundleCollection(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.SupportBundleCollectionList": schema_pkg_apis_controlplane_v1beta2_SupportBundleCollectionList(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.SupportBundleCollectionNodeStatus": schema_pkg_apis_controlplane_v1beta2_SupportBundleCollectionNodeStatus(ref), + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.SupportBundleCollectionStatus": schema_pkg_apis_controlplane_v1beta2_SupportBundleCollectionStatus(ref), + "antrea.io/antrea/pkg/apis/crd/v1beta1.AgentCondition": schema_pkg_apis_crd_v1beta1_AgentCondition(ref), + "antrea.io/antrea/pkg/apis/crd/v1beta1.AntreaAgentInfo": schema_pkg_apis_crd_v1beta1_AntreaAgentInfo(ref), + "antrea.io/antrea/pkg/apis/crd/v1beta1.AntreaAgentInfoList": schema_pkg_apis_crd_v1beta1_AntreaAgentInfoList(ref), + "antrea.io/antrea/pkg/apis/crd/v1beta1.AntreaControllerInfo": schema_pkg_apis_crd_v1beta1_AntreaControllerInfo(ref), + "antrea.io/antrea/pkg/apis/crd/v1beta1.AntreaControllerInfoList": schema_pkg_apis_crd_v1beta1_AntreaControllerInfoList(ref), + "antrea.io/antrea/pkg/apis/crd/v1beta1.ControllerCondition": schema_pkg_apis_crd_v1beta1_ControllerCondition(ref), + "antrea.io/antrea/pkg/apis/crd/v1beta1.NetworkPolicyControllerInfo": schema_pkg_apis_crd_v1beta1_NetworkPolicyControllerInfo(ref), + "antrea.io/antrea/pkg/apis/crd/v1beta1.OVSInfo": schema_pkg_apis_crd_v1beta1_OVSInfo(ref), + "antrea.io/antrea/pkg/apis/stats/v1alpha1.AntreaClusterNetworkPolicyStats": schema_pkg_apis_stats_v1alpha1_AntreaClusterNetworkPolicyStats(ref), + "antrea.io/antrea/pkg/apis/stats/v1alpha1.AntreaClusterNetworkPolicyStatsList": schema_pkg_apis_stats_v1alpha1_AntreaClusterNetworkPolicyStatsList(ref), + "antrea.io/antrea/pkg/apis/stats/v1alpha1.AntreaNetworkPolicyStats": schema_pkg_apis_stats_v1alpha1_AntreaNetworkPolicyStats(ref), + "antrea.io/antrea/pkg/apis/stats/v1alpha1.AntreaNetworkPolicyStatsList": schema_pkg_apis_stats_v1alpha1_AntreaNetworkPolicyStatsList(ref), + "antrea.io/antrea/pkg/apis/stats/v1alpha1.MulticastGroup": schema_pkg_apis_stats_v1alpha1_MulticastGroup(ref), + "antrea.io/antrea/pkg/apis/stats/v1alpha1.MulticastGroupList": schema_pkg_apis_stats_v1alpha1_MulticastGroupList(ref), + "antrea.io/antrea/pkg/apis/stats/v1alpha1.NetworkPolicyStats": schema_pkg_apis_stats_v1alpha1_NetworkPolicyStats(ref), + "antrea.io/antrea/pkg/apis/stats/v1alpha1.NetworkPolicyStatsList": schema_pkg_apis_stats_v1alpha1_NetworkPolicyStatsList(ref), + "antrea.io/antrea/pkg/apis/stats/v1alpha1.PodReference": schema_pkg_apis_stats_v1alpha1_PodReference(ref), + "antrea.io/antrea/pkg/apis/stats/v1alpha1.RuleTrafficStats": schema_pkg_apis_stats_v1alpha1_RuleTrafficStats(ref), + "antrea.io/antrea/pkg/apis/stats/v1alpha1.TrafficStats": schema_pkg_apis_stats_v1alpha1_TrafficStats(ref), + "antrea.io/antrea/pkg/apis/system/v1beta1.SupportBundle": schema_pkg_apis_system_v1beta1_SupportBundle(ref), + "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource": schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref), + "k8s.io/api/core/v1.Affinity": schema_k8sio_api_core_v1_Affinity(ref), + "k8s.io/api/core/v1.AttachedVolume": schema_k8sio_api_core_v1_AttachedVolume(ref), + "k8s.io/api/core/v1.AvoidPods": schema_k8sio_api_core_v1_AvoidPods(ref), + "k8s.io/api/core/v1.AzureDiskVolumeSource": schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref), + "k8s.io/api/core/v1.AzureFilePersistentVolumeSource": schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref), + "k8s.io/api/core/v1.AzureFileVolumeSource": schema_k8sio_api_core_v1_AzureFileVolumeSource(ref), + "k8s.io/api/core/v1.Binding": schema_k8sio_api_core_v1_Binding(ref), + "k8s.io/api/core/v1.CSIPersistentVolumeSource": schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref), + "k8s.io/api/core/v1.CSIVolumeSource": schema_k8sio_api_core_v1_CSIVolumeSource(ref), + "k8s.io/api/core/v1.Capabilities": schema_k8sio_api_core_v1_Capabilities(ref), + "k8s.io/api/core/v1.CephFSPersistentVolumeSource": schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref), + "k8s.io/api/core/v1.CephFSVolumeSource": schema_k8sio_api_core_v1_CephFSVolumeSource(ref), + "k8s.io/api/core/v1.CinderPersistentVolumeSource": schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref), + "k8s.io/api/core/v1.CinderVolumeSource": schema_k8sio_api_core_v1_CinderVolumeSource(ref), + "k8s.io/api/core/v1.ClientIPConfig": schema_k8sio_api_core_v1_ClientIPConfig(ref), + "k8s.io/api/core/v1.ComponentCondition": schema_k8sio_api_core_v1_ComponentCondition(ref), + "k8s.io/api/core/v1.ComponentStatus": schema_k8sio_api_core_v1_ComponentStatus(ref), + "k8s.io/api/core/v1.ComponentStatusList": schema_k8sio_api_core_v1_ComponentStatusList(ref), + "k8s.io/api/core/v1.ConfigMap": schema_k8sio_api_core_v1_ConfigMap(ref), + "k8s.io/api/core/v1.ConfigMapEnvSource": schema_k8sio_api_core_v1_ConfigMapEnvSource(ref), + "k8s.io/api/core/v1.ConfigMapKeySelector": schema_k8sio_api_core_v1_ConfigMapKeySelector(ref), + "k8s.io/api/core/v1.ConfigMapList": schema_k8sio_api_core_v1_ConfigMapList(ref), + "k8s.io/api/core/v1.ConfigMapNodeConfigSource": schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref), + "k8s.io/api/core/v1.ConfigMapProjection": schema_k8sio_api_core_v1_ConfigMapProjection(ref), + "k8s.io/api/core/v1.ConfigMapVolumeSource": schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref), + "k8s.io/api/core/v1.Container": schema_k8sio_api_core_v1_Container(ref), + "k8s.io/api/core/v1.ContainerImage": schema_k8sio_api_core_v1_ContainerImage(ref), + "k8s.io/api/core/v1.ContainerPort": schema_k8sio_api_core_v1_ContainerPort(ref), + "k8s.io/api/core/v1.ContainerState": schema_k8sio_api_core_v1_ContainerState(ref), + "k8s.io/api/core/v1.ContainerStateRunning": schema_k8sio_api_core_v1_ContainerStateRunning(ref), + "k8s.io/api/core/v1.ContainerStateTerminated": schema_k8sio_api_core_v1_ContainerStateTerminated(ref), + "k8s.io/api/core/v1.ContainerStateWaiting": schema_k8sio_api_core_v1_ContainerStateWaiting(ref), + "k8s.io/api/core/v1.ContainerStatus": schema_k8sio_api_core_v1_ContainerStatus(ref), + "k8s.io/api/core/v1.DaemonEndpoint": schema_k8sio_api_core_v1_DaemonEndpoint(ref), + "k8s.io/api/core/v1.DownwardAPIProjection": schema_k8sio_api_core_v1_DownwardAPIProjection(ref), + "k8s.io/api/core/v1.DownwardAPIVolumeFile": schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref), + "k8s.io/api/core/v1.DownwardAPIVolumeSource": schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref), + "k8s.io/api/core/v1.EmptyDirVolumeSource": schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref), + "k8s.io/api/core/v1.EndpointAddress": schema_k8sio_api_core_v1_EndpointAddress(ref), + "k8s.io/api/core/v1.EndpointPort": schema_k8sio_api_core_v1_EndpointPort(ref), + "k8s.io/api/core/v1.EndpointSubset": schema_k8sio_api_core_v1_EndpointSubset(ref), + "k8s.io/api/core/v1.Endpoints": schema_k8sio_api_core_v1_Endpoints(ref), + "k8s.io/api/core/v1.EndpointsList": schema_k8sio_api_core_v1_EndpointsList(ref), + "k8s.io/api/core/v1.EnvFromSource": schema_k8sio_api_core_v1_EnvFromSource(ref), + "k8s.io/api/core/v1.EnvVar": schema_k8sio_api_core_v1_EnvVar(ref), + "k8s.io/api/core/v1.EnvVarSource": schema_k8sio_api_core_v1_EnvVarSource(ref), + "k8s.io/api/core/v1.EphemeralContainer": schema_k8sio_api_core_v1_EphemeralContainer(ref), + "k8s.io/api/core/v1.EphemeralContainerCommon": schema_k8sio_api_core_v1_EphemeralContainerCommon(ref), + "k8s.io/api/core/v1.EphemeralVolumeSource": schema_k8sio_api_core_v1_EphemeralVolumeSource(ref), + "k8s.io/api/core/v1.Event": schema_k8sio_api_core_v1_Event(ref), + "k8s.io/api/core/v1.EventList": schema_k8sio_api_core_v1_EventList(ref), + "k8s.io/api/core/v1.EventSeries": schema_k8sio_api_core_v1_EventSeries(ref), + "k8s.io/api/core/v1.EventSource": schema_k8sio_api_core_v1_EventSource(ref), + "k8s.io/api/core/v1.ExecAction": schema_k8sio_api_core_v1_ExecAction(ref), + "k8s.io/api/core/v1.FCVolumeSource": schema_k8sio_api_core_v1_FCVolumeSource(ref), + "k8s.io/api/core/v1.FlexPersistentVolumeSource": schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref), + "k8s.io/api/core/v1.FlexVolumeSource": schema_k8sio_api_core_v1_FlexVolumeSource(ref), + "k8s.io/api/core/v1.FlockerVolumeSource": schema_k8sio_api_core_v1_FlockerVolumeSource(ref), + "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource": schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref), + "k8s.io/api/core/v1.GRPCAction": schema_k8sio_api_core_v1_GRPCAction(ref), + "k8s.io/api/core/v1.GitRepoVolumeSource": schema_k8sio_api_core_v1_GitRepoVolumeSource(ref), + "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource": schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref), + "k8s.io/api/core/v1.GlusterfsVolumeSource": schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref), + "k8s.io/api/core/v1.HTTPGetAction": schema_k8sio_api_core_v1_HTTPGetAction(ref), + "k8s.io/api/core/v1.HTTPHeader": schema_k8sio_api_core_v1_HTTPHeader(ref), + "k8s.io/api/core/v1.HostAlias": schema_k8sio_api_core_v1_HostAlias(ref), + "k8s.io/api/core/v1.HostPathVolumeSource": schema_k8sio_api_core_v1_HostPathVolumeSource(ref), + "k8s.io/api/core/v1.ISCSIPersistentVolumeSource": schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref), + "k8s.io/api/core/v1.ISCSIVolumeSource": schema_k8sio_api_core_v1_ISCSIVolumeSource(ref), + "k8s.io/api/core/v1.KeyToPath": schema_k8sio_api_core_v1_KeyToPath(ref), + "k8s.io/api/core/v1.Lifecycle": schema_k8sio_api_core_v1_Lifecycle(ref), + "k8s.io/api/core/v1.LifecycleHandler": schema_k8sio_api_core_v1_LifecycleHandler(ref), + "k8s.io/api/core/v1.LimitRange": schema_k8sio_api_core_v1_LimitRange(ref), + "k8s.io/api/core/v1.LimitRangeItem": schema_k8sio_api_core_v1_LimitRangeItem(ref), + "k8s.io/api/core/v1.LimitRangeList": schema_k8sio_api_core_v1_LimitRangeList(ref), + "k8s.io/api/core/v1.LimitRangeSpec": schema_k8sio_api_core_v1_LimitRangeSpec(ref), + "k8s.io/api/core/v1.List": schema_k8sio_api_core_v1_List(ref), + "k8s.io/api/core/v1.LoadBalancerIngress": schema_k8sio_api_core_v1_LoadBalancerIngress(ref), + "k8s.io/api/core/v1.LoadBalancerStatus": schema_k8sio_api_core_v1_LoadBalancerStatus(ref), + "k8s.io/api/core/v1.LocalObjectReference": schema_k8sio_api_core_v1_LocalObjectReference(ref), + "k8s.io/api/core/v1.LocalVolumeSource": schema_k8sio_api_core_v1_LocalVolumeSource(ref), + "k8s.io/api/core/v1.NFSVolumeSource": schema_k8sio_api_core_v1_NFSVolumeSource(ref), + "k8s.io/api/core/v1.Namespace": schema_k8sio_api_core_v1_Namespace(ref), + "k8s.io/api/core/v1.NamespaceCondition": schema_k8sio_api_core_v1_NamespaceCondition(ref), + "k8s.io/api/core/v1.NamespaceList": schema_k8sio_api_core_v1_NamespaceList(ref), + "k8s.io/api/core/v1.NamespaceSpec": schema_k8sio_api_core_v1_NamespaceSpec(ref), + "k8s.io/api/core/v1.NamespaceStatus": schema_k8sio_api_core_v1_NamespaceStatus(ref), + "k8s.io/api/core/v1.Node": schema_k8sio_api_core_v1_Node(ref), + "k8s.io/api/core/v1.NodeAddress": schema_k8sio_api_core_v1_NodeAddress(ref), + "k8s.io/api/core/v1.NodeAffinity": schema_k8sio_api_core_v1_NodeAffinity(ref), + "k8s.io/api/core/v1.NodeCondition": schema_k8sio_api_core_v1_NodeCondition(ref), + "k8s.io/api/core/v1.NodeConfigSource": schema_k8sio_api_core_v1_NodeConfigSource(ref), + "k8s.io/api/core/v1.NodeConfigStatus": schema_k8sio_api_core_v1_NodeConfigStatus(ref), + "k8s.io/api/core/v1.NodeDaemonEndpoints": schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref), + "k8s.io/api/core/v1.NodeList": schema_k8sio_api_core_v1_NodeList(ref), + "k8s.io/api/core/v1.NodeProxyOptions": schema_k8sio_api_core_v1_NodeProxyOptions(ref), + "k8s.io/api/core/v1.NodeResources": schema_k8sio_api_core_v1_NodeResources(ref), + "k8s.io/api/core/v1.NodeSelector": schema_k8sio_api_core_v1_NodeSelector(ref), + "k8s.io/api/core/v1.NodeSelectorRequirement": schema_k8sio_api_core_v1_NodeSelectorRequirement(ref), + "k8s.io/api/core/v1.NodeSelectorTerm": schema_k8sio_api_core_v1_NodeSelectorTerm(ref), + "k8s.io/api/core/v1.NodeSpec": schema_k8sio_api_core_v1_NodeSpec(ref), + "k8s.io/api/core/v1.NodeStatus": schema_k8sio_api_core_v1_NodeStatus(ref), + "k8s.io/api/core/v1.NodeSystemInfo": schema_k8sio_api_core_v1_NodeSystemInfo(ref), + "k8s.io/api/core/v1.ObjectFieldSelector": schema_k8sio_api_core_v1_ObjectFieldSelector(ref), + "k8s.io/api/core/v1.ObjectReference": schema_k8sio_api_core_v1_ObjectReference(ref), + "k8s.io/api/core/v1.PersistentVolume": schema_k8sio_api_core_v1_PersistentVolume(ref), + "k8s.io/api/core/v1.PersistentVolumeClaim": schema_k8sio_api_core_v1_PersistentVolumeClaim(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimCondition": schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimList": schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimSpec": schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimStatus": schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimTemplate": schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref), + "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource": schema_k8sio_api_core_v1_PersistentVolumeClaimVolumeSource(ref), + "k8s.io/api/core/v1.PersistentVolumeList": schema_k8sio_api_core_v1_PersistentVolumeList(ref), + "k8s.io/api/core/v1.PersistentVolumeSource": schema_k8sio_api_core_v1_PersistentVolumeSource(ref), + "k8s.io/api/core/v1.PersistentVolumeSpec": schema_k8sio_api_core_v1_PersistentVolumeSpec(ref), + "k8s.io/api/core/v1.PersistentVolumeStatus": schema_k8sio_api_core_v1_PersistentVolumeStatus(ref), + "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource": schema_k8sio_api_core_v1_PhotonPersistentDiskVolumeSource(ref), + "k8s.io/api/core/v1.Pod": schema_k8sio_api_core_v1_Pod(ref), + "k8s.io/api/core/v1.PodAffinity": schema_k8sio_api_core_v1_PodAffinity(ref), + "k8s.io/api/core/v1.PodAffinityTerm": schema_k8sio_api_core_v1_PodAffinityTerm(ref), + "k8s.io/api/core/v1.PodAntiAffinity": schema_k8sio_api_core_v1_PodAntiAffinity(ref), + "k8s.io/api/core/v1.PodAttachOptions": schema_k8sio_api_core_v1_PodAttachOptions(ref), + "k8s.io/api/core/v1.PodCondition": schema_k8sio_api_core_v1_PodCondition(ref), + "k8s.io/api/core/v1.PodDNSConfig": schema_k8sio_api_core_v1_PodDNSConfig(ref), + "k8s.io/api/core/v1.PodDNSConfigOption": schema_k8sio_api_core_v1_PodDNSConfigOption(ref), + "k8s.io/api/core/v1.PodExecOptions": schema_k8sio_api_core_v1_PodExecOptions(ref), + "k8s.io/api/core/v1.PodIP": schema_k8sio_api_core_v1_PodIP(ref), + "k8s.io/api/core/v1.PodList": schema_k8sio_api_core_v1_PodList(ref), + "k8s.io/api/core/v1.PodLogOptions": schema_k8sio_api_core_v1_PodLogOptions(ref), + "k8s.io/api/core/v1.PodOS": schema_k8sio_api_core_v1_PodOS(ref), + "k8s.io/api/core/v1.PodPortForwardOptions": schema_k8sio_api_core_v1_PodPortForwardOptions(ref), + "k8s.io/api/core/v1.PodProxyOptions": schema_k8sio_api_core_v1_PodProxyOptions(ref), + "k8s.io/api/core/v1.PodReadinessGate": schema_k8sio_api_core_v1_PodReadinessGate(ref), + "k8s.io/api/core/v1.PodSecurityContext": schema_k8sio_api_core_v1_PodSecurityContext(ref), + "k8s.io/api/core/v1.PodSignature": schema_k8sio_api_core_v1_PodSignature(ref), + "k8s.io/api/core/v1.PodSpec": schema_k8sio_api_core_v1_PodSpec(ref), + "k8s.io/api/core/v1.PodStatus": schema_k8sio_api_core_v1_PodStatus(ref), + "k8s.io/api/core/v1.PodStatusResult": schema_k8sio_api_core_v1_PodStatusResult(ref), + "k8s.io/api/core/v1.PodTemplate": schema_k8sio_api_core_v1_PodTemplate(ref), + "k8s.io/api/core/v1.PodTemplateList": schema_k8sio_api_core_v1_PodTemplateList(ref), + "k8s.io/api/core/v1.PodTemplateSpec": schema_k8sio_api_core_v1_PodTemplateSpec(ref), + "k8s.io/api/core/v1.PortStatus": schema_k8sio_api_core_v1_PortStatus(ref), + "k8s.io/api/core/v1.PortworxVolumeSource": schema_k8sio_api_core_v1_PortworxVolumeSource(ref), + "k8s.io/api/core/v1.PreferAvoidPodsEntry": schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref), + "k8s.io/api/core/v1.PreferredSchedulingTerm": schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref), + "k8s.io/api/core/v1.Probe": schema_k8sio_api_core_v1_Probe(ref), + "k8s.io/api/core/v1.ProbeHandler": schema_k8sio_api_core_v1_ProbeHandler(ref), + "k8s.io/api/core/v1.ProjectedVolumeSource": schema_k8sio_api_core_v1_ProjectedVolumeSource(ref), + "k8s.io/api/core/v1.QuobyteVolumeSource": schema_k8sio_api_core_v1_QuobyteVolumeSource(ref), + "k8s.io/api/core/v1.RBDPersistentVolumeSource": schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref), + "k8s.io/api/core/v1.RBDVolumeSource": schema_k8sio_api_core_v1_RBDVolumeSource(ref), + "k8s.io/api/core/v1.RangeAllocation": schema_k8sio_api_core_v1_RangeAllocation(ref), + "k8s.io/api/core/v1.ReplicationController": schema_k8sio_api_core_v1_ReplicationController(ref), + "k8s.io/api/core/v1.ReplicationControllerCondition": schema_k8sio_api_core_v1_ReplicationControllerCondition(ref), + "k8s.io/api/core/v1.ReplicationControllerList": schema_k8sio_api_core_v1_ReplicationControllerList(ref), + "k8s.io/api/core/v1.ReplicationControllerSpec": schema_k8sio_api_core_v1_ReplicationControllerSpec(ref), + "k8s.io/api/core/v1.ReplicationControllerStatus": schema_k8sio_api_core_v1_ReplicationControllerStatus(ref), + "k8s.io/api/core/v1.ResourceFieldSelector": schema_k8sio_api_core_v1_ResourceFieldSelector(ref), + "k8s.io/api/core/v1.ResourceQuota": schema_k8sio_api_core_v1_ResourceQuota(ref), + "k8s.io/api/core/v1.ResourceQuotaList": schema_k8sio_api_core_v1_ResourceQuotaList(ref), + "k8s.io/api/core/v1.ResourceQuotaSpec": schema_k8sio_api_core_v1_ResourceQuotaSpec(ref), + "k8s.io/api/core/v1.ResourceQuotaStatus": schema_k8sio_api_core_v1_ResourceQuotaStatus(ref), + "k8s.io/api/core/v1.ResourceRequirements": schema_k8sio_api_core_v1_ResourceRequirements(ref), + "k8s.io/api/core/v1.SELinuxOptions": schema_k8sio_api_core_v1_SELinuxOptions(ref), + "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource": schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref), + "k8s.io/api/core/v1.ScaleIOVolumeSource": schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref), + "k8s.io/api/core/v1.ScopeSelector": schema_k8sio_api_core_v1_ScopeSelector(ref), + "k8s.io/api/core/v1.ScopedResourceSelectorRequirement": schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref), + "k8s.io/api/core/v1.SeccompProfile": schema_k8sio_api_core_v1_SeccompProfile(ref), + "k8s.io/api/core/v1.Secret": schema_k8sio_api_core_v1_Secret(ref), + "k8s.io/api/core/v1.SecretEnvSource": schema_k8sio_api_core_v1_SecretEnvSource(ref), + "k8s.io/api/core/v1.SecretKeySelector": schema_k8sio_api_core_v1_SecretKeySelector(ref), + "k8s.io/api/core/v1.SecretList": schema_k8sio_api_core_v1_SecretList(ref), + "k8s.io/api/core/v1.SecretProjection": schema_k8sio_api_core_v1_SecretProjection(ref), + "k8s.io/api/core/v1.SecretReference": schema_k8sio_api_core_v1_SecretReference(ref), + "k8s.io/api/core/v1.SecretVolumeSource": schema_k8sio_api_core_v1_SecretVolumeSource(ref), + "k8s.io/api/core/v1.SecurityContext": schema_k8sio_api_core_v1_SecurityContext(ref), + "k8s.io/api/core/v1.SerializedReference": schema_k8sio_api_core_v1_SerializedReference(ref), + "k8s.io/api/core/v1.Service": schema_k8sio_api_core_v1_Service(ref), + "k8s.io/api/core/v1.ServiceAccount": schema_k8sio_api_core_v1_ServiceAccount(ref), + "k8s.io/api/core/v1.ServiceAccountList": schema_k8sio_api_core_v1_ServiceAccountList(ref), + "k8s.io/api/core/v1.ServiceAccountTokenProjection": schema_k8sio_api_core_v1_ServiceAccountTokenProjection(ref), + "k8s.io/api/core/v1.ServiceList": schema_k8sio_api_core_v1_ServiceList(ref), + "k8s.io/api/core/v1.ServicePort": schema_k8sio_api_core_v1_ServicePort(ref), + "k8s.io/api/core/v1.ServiceProxyOptions": schema_k8sio_api_core_v1_ServiceProxyOptions(ref), + "k8s.io/api/core/v1.ServiceSpec": schema_k8sio_api_core_v1_ServiceSpec(ref), + "k8s.io/api/core/v1.ServiceStatus": schema_k8sio_api_core_v1_ServiceStatus(ref), + "k8s.io/api/core/v1.SessionAffinityConfig": schema_k8sio_api_core_v1_SessionAffinityConfig(ref), + "k8s.io/api/core/v1.StorageOSPersistentVolumeSource": schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref), + "k8s.io/api/core/v1.StorageOSVolumeSource": schema_k8sio_api_core_v1_StorageOSVolumeSource(ref), + "k8s.io/api/core/v1.Sysctl": schema_k8sio_api_core_v1_Sysctl(ref), + "k8s.io/api/core/v1.TCPSocketAction": schema_k8sio_api_core_v1_TCPSocketAction(ref), + "k8s.io/api/core/v1.Taint": schema_k8sio_api_core_v1_Taint(ref), + "k8s.io/api/core/v1.Toleration": schema_k8sio_api_core_v1_Toleration(ref), + "k8s.io/api/core/v1.TopologySelectorLabelRequirement": schema_k8sio_api_core_v1_TopologySelectorLabelRequirement(ref), + "k8s.io/api/core/v1.TopologySelectorTerm": schema_k8sio_api_core_v1_TopologySelectorTerm(ref), + "k8s.io/api/core/v1.TopologySpreadConstraint": schema_k8sio_api_core_v1_TopologySpreadConstraint(ref), + "k8s.io/api/core/v1.TypedLocalObjectReference": schema_k8sio_api_core_v1_TypedLocalObjectReference(ref), + "k8s.io/api/core/v1.Volume": schema_k8sio_api_core_v1_Volume(ref), + "k8s.io/api/core/v1.VolumeDevice": schema_k8sio_api_core_v1_VolumeDevice(ref), + "k8s.io/api/core/v1.VolumeMount": schema_k8sio_api_core_v1_VolumeMount(ref), + "k8s.io/api/core/v1.VolumeNodeAffinity": schema_k8sio_api_core_v1_VolumeNodeAffinity(ref), + "k8s.io/api/core/v1.VolumeProjection": schema_k8sio_api_core_v1_VolumeProjection(ref), + "k8s.io/api/core/v1.VolumeSource": schema_k8sio_api_core_v1_VolumeSource(ref), + "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource": schema_k8sio_api_core_v1_VsphereVirtualDiskVolumeSource(ref), + "k8s.io/api/core/v1.WeightedPodAffinityTerm": schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref), + "k8s.io/api/core/v1.WindowsSecurityContextOptions": schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": schema_pkg_apis_meta_v1_APIGroup(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": schema_pkg_apis_meta_v1_APIGroupList(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": schema_pkg_apis_meta_v1_APIResource(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList": schema_pkg_apis_meta_v1_APIResourceList(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions": schema_pkg_apis_meta_v1_APIVersions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ApplyOptions": schema_pkg_apis_meta_v1_ApplyOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Condition": schema_pkg_apis_meta_v1_Condition(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.CreateOptions": schema_pkg_apis_meta_v1_CreateOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": schema_pkg_apis_meta_v1_DeleteOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration": schema_pkg_apis_meta_v1_Duration(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1": schema_pkg_apis_meta_v1_FieldsV1(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions": schema_pkg_apis_meta_v1_GetOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind": schema_pkg_apis_meta_v1_GroupKind(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupResource": schema_pkg_apis_meta_v1_GroupResource(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersion": schema_pkg_apis_meta_v1_GroupVersion(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery": schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind": schema_pkg_apis_meta_v1_GroupVersionKind(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionResource": schema_pkg_apis_meta_v1_GroupVersionResource(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.InternalEvent": schema_pkg_apis_meta_v1_InternalEvent(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector": schema_pkg_apis_meta_v1_LabelSelector(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement": schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.List": schema_pkg_apis_meta_v1_List(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta": schema_pkg_apis_meta_v1_ListMeta(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions": schema_pkg_apis_meta_v1_ListOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry": schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime": schema_pkg_apis_meta_v1_MicroTime(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta": schema_pkg_apis_meta_v1_ObjectMeta(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference": schema_pkg_apis_meta_v1_OwnerReference(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata": schema_pkg_apis_meta_v1_PartialObjectMetadata(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadataList": schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Patch": schema_pkg_apis_meta_v1_Patch(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.PatchOptions": schema_pkg_apis_meta_v1_PatchOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions": schema_pkg_apis_meta_v1_Preconditions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.RootPaths": schema_pkg_apis_meta_v1_RootPaths(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR": schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Status": schema_pkg_apis_meta_v1_Status(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause": schema_pkg_apis_meta_v1_StatusCause(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails": schema_pkg_apis_meta_v1_StatusDetails(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Table": schema_pkg_apis_meta_v1_Table(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition": schema_pkg_apis_meta_v1_TableColumnDefinition(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableOptions": schema_pkg_apis_meta_v1_TableOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow": schema_pkg_apis_meta_v1_TableRow(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition": schema_pkg_apis_meta_v1_TableRowCondition(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Time": schema_pkg_apis_meta_v1_Time(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Timestamp": schema_pkg_apis_meta_v1_Timestamp(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta": schema_pkg_apis_meta_v1_TypeMeta(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.UpdateOptions": schema_pkg_apis_meta_v1_UpdateOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.WatchEvent": schema_pkg_apis_meta_v1_WatchEvent(ref), + "k8s.io/apimachinery/pkg/runtime.RawExtension": schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref), + "k8s.io/apimachinery/pkg/runtime.TypeMeta": schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref), + "k8s.io/apimachinery/pkg/runtime.Unknown": schema_k8sio_apimachinery_pkg_runtime_Unknown(ref), + "k8s.io/apimachinery/pkg/util/intstr.IntOrString": schema_apimachinery_pkg_util_intstr_IntOrString(ref), } } @@ -663,6 +670,84 @@ func schema_pkg_apis_controlplane_v1beta2_AppliedToGroupPatch(ref common.Referen } } +func schema_pkg_apis_controlplane_v1beta2_BasicAuthentication(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "username": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "password": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"username", "password"}, + }, + }, + } +} + +func schema_pkg_apis_controlplane_v1beta2_BundleFileServer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "url": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"url"}, + }, + }, + } +} + +func schema_pkg_apis_controlplane_v1beta2_BundleServerAuthConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "bearerToken": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "apiKey": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "basicAuthentication": { + SchemaProps: spec.SchemaProps{ + Ref: ref("antrea.io/antrea/pkg/apis/controlplane/v1beta2.BasicAuthentication"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.BasicAuthentication"}, + } +} + func schema_pkg_apis_controlplane_v1beta2_ClusterGroupMembers(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -1933,6 +2018,210 @@ func schema_pkg_apis_controlplane_v1beta2_ServiceReference(ref common.ReferenceC } } +func schema_pkg_apis_controlplane_v1beta2_SupportBundleCollection(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SupportBundleCollection is the message format of antrea/pkg/controller/types.SupportBundleCollection in an API response.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "expiredAt": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "sinceTime": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "fileServer": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("antrea.io/antrea/pkg/apis/controlplane/v1beta2.BundleFileServer"), + }, + }, + "authentication": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("antrea.io/antrea/pkg/apis/controlplane/v1beta2.BundleServerAuthConfiguration"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.BundleFileServer", "antrea.io/antrea/pkg/apis/controlplane/v1beta2.BundleServerAuthConfiguration", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_controlplane_v1beta2_SupportBundleCollectionList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SupportBundleCollectionList is a list of SupportBundleCollection objects.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("antrea.io/antrea/pkg/apis/controlplane/v1beta2.SupportBundleCollection"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.SupportBundleCollection", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_pkg_apis_controlplane_v1beta2_SupportBundleCollectionNodeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SupportBundleCollectionNodeStatus is the status of a SupportBundleCollection on a Node.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodeName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the Node that produces the status.", + Type: []string{"string"}, + Format: "", + }, + }, + "nodeNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "The namespace of the Node that produces the status. It is set only when NodeType is ExternalNode.", + Type: []string{"string"}, + Format: "", + }, + }, + "nodeType": { + SchemaProps: spec.SchemaProps{ + Description: "The type of the Node that produces the status. The values include Node and ExternalNode.", + Type: []string{"string"}, + Format: "", + }, + }, + "completed": { + SchemaProps: spec.SchemaProps{ + Description: "The phase in which a SupportBundleCollection is on the Node.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "error": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_controlplane_v1beta2_SupportBundleCollectionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SupportBundleCollectionStatus is the status of a SupportBundleCollection.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "nodes": { + SchemaProps: spec.SchemaProps{ + Description: "Nodes contains statuses produced on a list of Nodes.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("antrea.io/antrea/pkg/apis/controlplane/v1beta2.SupportBundleCollectionNodeStatus"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "antrea.io/antrea/pkg/apis/controlplane/v1beta2.SupportBundleCollectionNodeStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + func schema_pkg_apis_crd_v1beta1_AgentCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/pkg/apiserver/registry/controlplane/supportbundlecollection/rest.go b/pkg/apiserver/registry/controlplane/supportbundlecollection/rest.go new file mode 100644 index 00000000000..f113ebd4cb4 --- /dev/null +++ b/pkg/apiserver/registry/controlplane/supportbundlecollection/rest.go @@ -0,0 +1,103 @@ +// Copyright 2022 Antrea 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 supportbundlecollection + +import ( + "context" + + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/apis/meta/internalversion" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/apiserver/pkg/registry/rest" + + "antrea.io/antrea/pkg/apis/controlplane" + "antrea.io/antrea/pkg/apiserver/registry/networkpolicy" + "antrea.io/antrea/pkg/apiserver/storage" + "antrea.io/antrea/pkg/controller/supportbundlecollection/store" + "antrea.io/antrea/pkg/controller/types" +) + +// REST implements rest.Storage for NetworkPolicies. +type REST struct { + supportBundleCollectionStore storage.Interface +} + +var ( + _ rest.Storage = &REST{} + _ rest.Watcher = &REST{} + _ rest.Scoper = &REST{} + _ rest.Lister = &REST{} + _ rest.Getter = &REST{} +) + +// NewREST returns a REST object that will work against API services. +func NewREST(supportBundleCollectionStore storage.Interface) *REST { + return &REST{supportBundleCollectionStore} +} + +func (r *REST) New() runtime.Object { + return &controlplane.SupportBundleCollection{} +} + +func (r *REST) NewList() runtime.Object { + return &controlplane.SupportBundleCollectionList{} +} + +func (r *REST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) { + bundleCollection, exists, err := r.supportBundleCollectionStore.Get(name) + if err != nil { + return nil, errors.NewInternalError(err) + } + if !exists { + return nil, errors.NewNotFound(controlplane.Resource("supportbundlecollection"), name) + } + obj := new(controlplane.SupportBundleCollection) + store.ToSupportBundleCollectionMsg(bundleCollection.(*types.SupportBundleCollection), obj, true) + return obj, nil +} + +func (r *REST) List(ctx context.Context, options *internalversion.ListOptions) (runtime.Object, error) { + labelSelector := labels.Everything() + if options != nil && options.LabelSelector != nil { + labelSelector = options.LabelSelector + } + bundleCollections := r.supportBundleCollectionStore.List() + items := make([]controlplane.SupportBundleCollection, 0, len(bundleCollections)) + for i := range bundleCollections { + var item controlplane.SupportBundleCollection + store.ToSupportBundleCollectionMsg(bundleCollections[i].(*types.SupportBundleCollection), &item, true) + if labelSelector.Matches(labels.Set(item.Labels)) { + items = append(items, item) + } + } + list := &controlplane.SupportBundleCollectionList{Items: items} + return list, nil +} + +func (r *REST) NamespaceScoped() bool { + return false +} + +func (r *REST) Watch(ctx context.Context, options *internalversion.ListOptions) (watch.Interface, error) { + key, label, field := networkpolicy.GetSelectors(options) + return r.supportBundleCollectionStore.Watch(ctx, key, label, field) +} + +func (r *REST) ConvertToTable(ctx context.Context, obj runtime.Object, tableOptions runtime.Object) (*metav1.Table, error) { + return rest.NewDefaultTableConvertor(controlplane.Resource("supportbundlecollection")).ConvertToTable(ctx, obj, tableOptions) +} diff --git a/pkg/apiserver/registry/controlplane/supportbundlecollection/rest_test.go b/pkg/apiserver/registry/controlplane/supportbundlecollection/rest_test.go new file mode 100644 index 00000000000..a8cfde8181b --- /dev/null +++ b/pkg/apiserver/registry/controlplane/supportbundlecollection/rest_test.go @@ -0,0 +1,211 @@ +// Copyright 2022 Antrea 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 supportbundlecollection + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "k8s.io/apimachinery/pkg/apis/meta/internalversion" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/watch" + + "antrea.io/antrea/pkg/apis/controlplane" + "antrea.io/antrea/pkg/apis/crd/v1alpha1" + "antrea.io/antrea/pkg/controller/supportbundlecollection/store" + "antrea.io/antrea/pkg/controller/types" +) + +func TestRESTList(t *testing.T) { + testDuration := "2h" + expireMinutes, _ := time.ParseDuration("120m") + expireAt := v1.NewTime(time.Now().Add(expireMinutes)) + tests := []struct { + name string + supportBundleCollections []*types.SupportBundleCollection + labelSelector labels.Selector + expectedObj runtime.Object + }{ + { + name: "label selector selecting nothing", + supportBundleCollections: []*types.SupportBundleCollection{ + { + Name: "foo", + }, + }, + labelSelector: labels.Nothing(), + expectedObj: &controlplane.SupportBundleCollectionList{}, + }, + { + name: "label selector selecting everything", + supportBundleCollections: []*types.SupportBundleCollection{ + { + Name: "foo1", + ExpiredAt: expireAt, + SinceTime: testDuration, + FileServer: v1alpha1.BundleFileServer{ + URL: "https://1.1.1.1/bundles/upload", + }, + Authentication: controlplane.BundleServerAuthConfiguration{ + APIKey: "123456789", + }, + }, + { + Name: "foo2", + FileServer: v1alpha1.BundleFileServer{ + URL: "https://1.1.1.1/bundles/upload", + }, + Authentication: controlplane.BundleServerAuthConfiguration{ + BearerToken: "acretdfee53d==", + }, + ExpiredAt: expireAt, + }, + }, + labelSelector: labels.Everything(), + expectedObj: &controlplane.SupportBundleCollectionList{ + Items: []controlplane.SupportBundleCollection{ + { + ObjectMeta: v1.ObjectMeta{ + Name: "foo1", + }, + ExpiredAt: expireAt, + SinceTime: testDuration, + FileServer: controlplane.BundleFileServer{ + URL: "https://1.1.1.1/bundles/upload", + }, + Authentication: controlplane.BundleServerAuthConfiguration{ + APIKey: "123456789", + }, + }, + { + ObjectMeta: v1.ObjectMeta{ + Name: "foo2", + }, + ExpiredAt: expireAt, + FileServer: controlplane.BundleFileServer{ + URL: "https://1.1.1.1/bundles/upload", + }, + Authentication: controlplane.BundleServerAuthConfiguration{ + BearerToken: "acretdfee53d==", + }, + }, + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + storage := store.NewSupportBundleCollectionStore() + for _, obj := range tt.supportBundleCollections { + storage.Create(obj) + } + r := NewREST(storage) + actualObj, err := r.List(context.TODO(), &internalversion.ListOptions{LabelSelector: tt.labelSelector}) + assert.NoError(t, err) + assert.ElementsMatch(t, tt.expectedObj.(*controlplane.SupportBundleCollectionList).Items, actualObj.(*controlplane.SupportBundleCollectionList).Items) + for _, expObj := range tt.expectedObj.(*controlplane.SupportBundleCollectionList).Items { + obj, err := r.Get(context.Background(), expObj.Name, &v1.GetOptions{}) + assert.NoError(t, err) + assert.Equal(t, expObj, *(obj.(*controlplane.SupportBundleCollection))) + } + }) + } +} + +func TestWatch(t *testing.T) { + storage := store.NewSupportBundleCollectionStore() + expireAt := v1.Date(2022, 12, 31, 0, 0, 0, 0, time.UTC) + collection := &types.SupportBundleCollection{ + Name: "foo1", + ExpiredAt: expireAt, + SinceTime: "2h", + FileServer: v1alpha1.BundleFileServer{ + URL: "https://1.1.1.1/bundles/upload", + }, + Authentication: controlplane.BundleServerAuthConfiguration{ + APIKey: "123456789", + }, + } + + r := NewREST(storage) + watcher, err := r.Watch(context.TODO(), &internalversion.ListOptions{}) + require.NoError(t, err) + <-watcher.ResultChan() + err = storage.Create(collection) + require.NoError(t, err) + ev := <-watcher.ResultChan() + assert.Equal(t, watch.Added, ev.Type) + watchedObj, ok := ev.Object.(*controlplane.SupportBundleCollection) + assert.True(t, ok) + assert.Equal(t, collection.Name, watchedObj.Name) + err = storage.Delete(collection.Name) + require.NoError(t, err) + ev = <-watcher.ResultChan() + assert.Equal(t, watch.Deleted, ev.Type) + watchedObj, ok = ev.Object.(*controlplane.SupportBundleCollection) + assert.True(t, ok) + assert.Equal(t, collection.Name, watchedObj.Name) +} + +func TestWatchWithFilter(t *testing.T) { + storage := store.NewSupportBundleCollectionStore() + expireAt := v1.Date(2022, 12, 31, 0, 0, 0, 0, time.UTC) + collection := &types.SupportBundleCollection{ + SpanMeta: types.SpanMeta{ + NodeNames: sets.NewString("n1"), + }, + Name: "foo1", + ExpiredAt: expireAt, + SinceTime: "2h", + FileServer: v1alpha1.BundleFileServer{ + URL: "https://1.1.1.1/bundles/upload", + }, + Authentication: controlplane.BundleServerAuthConfiguration{ + APIKey: "123456789", + }, + } + + err := storage.Create(collection) + require.NoError(t, err) + for _, tc := range []struct { + nodeName string + received bool + }{ + {nodeName: "n1", received: true}, + {nodeName: "n2", received: false}, + } { + r := NewREST(storage) + watcher, err := r.Watch(context.TODO(), &internalversion.ListOptions{FieldSelector: fields.OneTermEqualSelector("nodeName", tc.nodeName)}) + require.NoError(t, err) + ev := <-watcher.ResultChan() + if tc.received { + assert.Equal(t, watch.Added, ev.Type) + watchedObj, ok := ev.Object.(*controlplane.SupportBundleCollection) + assert.True(t, ok) + assert.Equal(t, collection.Name, watchedObj.Name) + ev = <-watcher.ResultChan() + assert.Equal(t, watch.Bookmark, ev.Type) + } else { + assert.Equal(t, watch.Bookmark, ev.Type) + } + } +} diff --git a/pkg/client/clientset/versioned/typed/controlplane/v1beta2/controlplane_client.go b/pkg/client/clientset/versioned/typed/controlplane/v1beta2/controlplane_client.go index 5e8ab80f57c..3dc86897b64 100644 --- a/pkg/client/clientset/versioned/typed/controlplane/v1beta2/controlplane_client.go +++ b/pkg/client/clientset/versioned/typed/controlplane/v1beta2/controlplane_client.go @@ -33,6 +33,7 @@ type ControlplaneV1beta2Interface interface { GroupAssociationsGetter NetworkPoliciesGetter NodeStatsSummariesGetter + SupportBundleCollectionsGetter } // ControlplaneV1beta2Client is used to interact with features provided by the controlplane.antrea.io group. @@ -68,6 +69,10 @@ func (c *ControlplaneV1beta2Client) NodeStatsSummaries() NodeStatsSummaryInterfa return newNodeStatsSummaries(c) } +func (c *ControlplaneV1beta2Client) SupportBundleCollections() SupportBundleCollectionInterface { + return newSupportBundleCollections(c) +} + // NewForConfig creates a new ControlplaneV1beta2Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). diff --git a/pkg/client/clientset/versioned/typed/controlplane/v1beta2/fake/fake_controlplane_client.go b/pkg/client/clientset/versioned/typed/controlplane/v1beta2/fake/fake_controlplane_client.go index 379042ce82e..59086e60f56 100644 --- a/pkg/client/clientset/versioned/typed/controlplane/v1beta2/fake/fake_controlplane_client.go +++ b/pkg/client/clientset/versioned/typed/controlplane/v1beta2/fake/fake_controlplane_client.go @@ -1,4 +1,4 @@ -// Copyright 2021 Antrea Authors +// Copyright 2022 Antrea Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -54,6 +54,10 @@ func (c *FakeControlplaneV1beta2) NodeStatsSummaries() v1beta2.NodeStatsSummaryI return &FakeNodeStatsSummaries{c} } +func (c *FakeControlplaneV1beta2) SupportBundleCollections() v1beta2.SupportBundleCollectionInterface { + return &FakeSupportBundleCollections{c} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeControlplaneV1beta2) RESTClient() rest.Interface { diff --git a/pkg/client/clientset/versioned/typed/controlplane/v1beta2/fake/fake_supportbundlecollection.go b/pkg/client/clientset/versioned/typed/controlplane/v1beta2/fake/fake_supportbundlecollection.go new file mode 100644 index 00000000000..061fe9ccb65 --- /dev/null +++ b/pkg/client/clientset/versioned/typed/controlplane/v1beta2/fake/fake_supportbundlecollection.go @@ -0,0 +1,74 @@ +// Copyright 2022 Antrea 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 client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1beta2 "antrea.io/antrea/pkg/apis/controlplane/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeSupportBundleCollections implements SupportBundleCollectionInterface +type FakeSupportBundleCollections struct { + Fake *FakeControlplaneV1beta2 +} + +var supportbundlecollectionsResource = schema.GroupVersionResource{Group: "controlplane.antrea.io", Version: "v1beta2", Resource: "supportbundlecollections"} + +var supportbundlecollectionsKind = schema.GroupVersionKind{Group: "controlplane.antrea.io", Version: "v1beta2", Kind: "SupportBundleCollection"} + +// Get takes name of the supportBundleCollection, and returns the corresponding supportBundleCollection object, and an error if there is any. +func (c *FakeSupportBundleCollections) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.SupportBundleCollection, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(supportbundlecollectionsResource, name), &v1beta2.SupportBundleCollection{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta2.SupportBundleCollection), err +} + +// List takes label and field selectors, and returns the list of SupportBundleCollections that match those selectors. +func (c *FakeSupportBundleCollections) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.SupportBundleCollectionList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(supportbundlecollectionsResource, supportbundlecollectionsKind, opts), &v1beta2.SupportBundleCollectionList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta2.SupportBundleCollectionList{ListMeta: obj.(*v1beta2.SupportBundleCollectionList).ListMeta} + for _, item := range obj.(*v1beta2.SupportBundleCollectionList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested supportBundleCollections. +func (c *FakeSupportBundleCollections) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(supportbundlecollectionsResource, opts)) +} diff --git a/pkg/client/clientset/versioned/typed/controlplane/v1beta2/generated_expansion.go b/pkg/client/clientset/versioned/typed/controlplane/v1beta2/generated_expansion.go index 8a05241d9d3..1c4747d955e 100644 --- a/pkg/client/clientset/versioned/typed/controlplane/v1beta2/generated_expansion.go +++ b/pkg/client/clientset/versioned/typed/controlplane/v1beta2/generated_expansion.go @@ -1,4 +1,4 @@ -// Copyright 2021 Antrea Authors +// Copyright 2022 Antrea Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -27,3 +27,5 @@ type EgressGroupExpansion interface{} type GroupAssociationExpansion interface{} type NodeStatsSummaryExpansion interface{} + +type SupportBundleCollectionExpansion interface{} diff --git a/pkg/client/clientset/versioned/typed/controlplane/v1beta2/supportbundlecollection.go b/pkg/client/clientset/versioned/typed/controlplane/v1beta2/supportbundlecollection.go new file mode 100644 index 00000000000..dce1bb11baa --- /dev/null +++ b/pkg/client/clientset/versioned/typed/controlplane/v1beta2/supportbundlecollection.go @@ -0,0 +1,96 @@ +// Copyright 2022 Antrea 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 client-gen. DO NOT EDIT. + +package v1beta2 + +import ( + "context" + "time" + + v1beta2 "antrea.io/antrea/pkg/apis/controlplane/v1beta2" + scheme "antrea.io/antrea/pkg/client/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// SupportBundleCollectionsGetter has a method to return a SupportBundleCollectionInterface. +// A group's client should implement this interface. +type SupportBundleCollectionsGetter interface { + SupportBundleCollections() SupportBundleCollectionInterface +} + +// SupportBundleCollectionInterface has methods to work with SupportBundleCollection resources. +type SupportBundleCollectionInterface interface { + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.SupportBundleCollection, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta2.SupportBundleCollectionList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + SupportBundleCollectionExpansion +} + +// supportBundleCollections implements SupportBundleCollectionInterface +type supportBundleCollections struct { + client rest.Interface +} + +// newSupportBundleCollections returns a SupportBundleCollections +func newSupportBundleCollections(c *ControlplaneV1beta2Client) *supportBundleCollections { + return &supportBundleCollections{ + client: c.RESTClient(), + } +} + +// Get takes name of the supportBundleCollection, and returns the corresponding supportBundleCollection object, and an error if there is any. +func (c *supportBundleCollections) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.SupportBundleCollection, err error) { + result = &v1beta2.SupportBundleCollection{} + err = c.client.Get(). + Resource("supportbundlecollections"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of SupportBundleCollections that match those selectors. +func (c *supportBundleCollections) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.SupportBundleCollectionList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1beta2.SupportBundleCollectionList{} + err = c.client.Get(). + Resource("supportbundlecollections"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested supportBundleCollections. +func (c *supportBundleCollections) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("supportbundlecollections"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} diff --git a/pkg/controller/supportbundlecollection/controller.go b/pkg/controller/supportbundlecollection/controller.go new file mode 100644 index 00000000000..1ed823a53eb --- /dev/null +++ b/pkg/controller/supportbundlecollection/controller.go @@ -0,0 +1,679 @@ +// Copyright 2022 Antrea 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 supportbundlecollection + +import ( + "bytes" + "context" + "fmt" + "reflect" + "time" + + k8serrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/wait" + coreinformers "k8s.io/client-go/informers/core/v1" + "k8s.io/client-go/kubernetes" + corelisters "k8s.io/client-go/listers/core/v1" + "k8s.io/client-go/tools/cache" + "k8s.io/client-go/util/retry" + "k8s.io/client-go/util/workqueue" + "k8s.io/klog/v2" + + "antrea.io/antrea/pkg/apis/controlplane" + "antrea.io/antrea/pkg/apis/crd/v1alpha1" + "antrea.io/antrea/pkg/apiserver/storage" + clientset "antrea.io/antrea/pkg/client/clientset/versioned" + crdinformers "antrea.io/antrea/pkg/client/informers/externalversions/crd/v1alpha1" + crdlisters "antrea.io/antrea/pkg/client/listers/crd/v1alpha1" + "antrea.io/antrea/pkg/controller/types" +) + +const ( + controllerName = "SupportBundleCollectionController" + // How long to wait before retrying the processing of an ExternalNode change. + minRetryDelay = 5 * time.Second + maxRetryDelay = 300 * time.Second + // Set resyncPeriod to 0 to disable resyncing. + resyncPeriod time.Duration = 0 + // supportBundleCollectionRetryPeriod is the duration after which to retry a SupportBundleCollection + // request if it conflicts with a processing request. + supportBundleCollectionRetryPeriod = time.Second * 10 + + secretKeyWithAPIKey = "apikey" + secretKeyWithBearerToken = "token" + secretKeyWithUsername = "username" + secretKeyWithPassword = "password" +) + +const ( + processingNodesIndex = "processingNodes" + processingExternalNodesIndex = "processingExternalNodes" + processingNodesIndexValue = "processingNodes" +) + +// supportBundleCollectionAppliedTo is defined to maintain a SupportBundleCollection's required Nodes and ExternalNodes. +type supportBundleCollectionAppliedTo struct { + // The name of a SupportBundleCollection + name string + processNodes bool + enNamespace string +} + +func getSupportBundleCollectionKey(obj interface{}) (string, error) { + appliedTo := obj.(*supportBundleCollectionAppliedTo) + return appliedTo.name, nil +} + +func processingNodesIndexFunc(obj interface{}) ([]string, error) { + appliedTo := obj.(*supportBundleCollectionAppliedTo) + if !appliedTo.processNodes { + return []string{}, nil + } + return []string{processingNodesIndexValue}, nil +} + +func processingExternalNodesIndexFunc(obj interface{}) ([]string, error) { + appliedTo := obj.(*supportBundleCollectionAppliedTo) + if appliedTo.enNamespace == "" { + return []string{}, nil + } + return []string{appliedTo.enNamespace}, nil +} + +type Controller struct { + kubeClient kubernetes.Interface + crdClient clientset.Interface + + supportBundleCollectionInformer crdinformers.SupportBundleCollectionInformer + supportBundleCollectionLister crdlisters.SupportBundleCollectionLister + supportBundleCollectionListerSynced cache.InformerSynced + nodeLister corelisters.NodeLister + nodeListerSynced cache.InformerSynced + externalNodeLister crdlisters.ExternalNodeLister + externalNodeListerSynced cache.InformerSynced + + // queue maintains the ExternalNode objects that need to be synced. + queue workqueue.RateLimitingInterface + + // supportBundleCollectionStore is the storage where the populated internal support bundle collections are stored. + supportBundleCollectionStore storage.Interface + // supportBundleCollectionAppliedToStore is the storage where the required Nodes or ExternalNodes of a + // SupportBundleCollection are stored. + supportBundleCollectionAppliedToStore cache.Indexer +} + +func NewSupportBundleCollectionController( + kubeClient kubernetes.Interface, + crdClient clientset.Interface, + supportBundleInformer crdinformers.SupportBundleCollectionInformer, + nodeInformer coreinformers.NodeInformer, + externalNodeInformer crdinformers.ExternalNodeInformer, + supportBundleCollectionStore storage.Interface) *Controller { + c := &Controller{ + kubeClient: kubeClient, + crdClient: crdClient, + + supportBundleCollectionInformer: supportBundleInformer, + supportBundleCollectionLister: supportBundleInformer.Lister(), + supportBundleCollectionListerSynced: supportBundleInformer.Informer().HasSynced, + nodeLister: nodeInformer.Lister(), + nodeListerSynced: nodeInformer.Informer().HasSynced, + externalNodeLister: externalNodeInformer.Lister(), + externalNodeListerSynced: externalNodeInformer.Informer().HasSynced, + queue: workqueue.NewNamedRateLimitingQueue(workqueue.NewItemExponentialFailureRateLimiter(minRetryDelay, maxRetryDelay), "supportBundleCollection"), + supportBundleCollectionStore: supportBundleCollectionStore, + supportBundleCollectionAppliedToStore: cache.NewIndexer(getSupportBundleCollectionKey, cache.Indexers{ + processingNodesIndex: processingNodesIndexFunc, + processingExternalNodesIndex: processingExternalNodesIndexFunc, + }), + } + c.supportBundleCollectionInformer.Informer().AddEventHandlerWithResyncPeriod( + cache.ResourceEventHandlerFuncs{ + AddFunc: c.addSupportBundleCollection, + UpdateFunc: c.updateSupportBundleCollection, + DeleteFunc: c.deleteSupportBundleCollection, + }, + resyncPeriod) + return c +} + +// Run will create defaultWorkers workers (goroutines) which will process the SupportBundle events from the work queue. +func (c *Controller) Run(stopCh <-chan struct{}) { + defer c.queue.ShutDown() + + klog.InfoS("Starting", "controllerName", controllerName) + defer klog.InfoS("Shutting down", "controllerName", controllerName) + + if !cache.WaitForNamedCacheSync(controllerName, stopCh, c.supportBundleCollectionListerSynced, c.nodeListerSynced, c.externalNodeListerSynced) { + return + } + if err := c.reconcileSupportBundleCollections(); err != nil { + klog.ErrorS(err, "Failed to reconcile SupportBundleCollection") + return + } + + go wait.Until(c.worker, time.Second, stopCh) + + <-stopCh +} + +func (c *Controller) addSupportBundleCollection(obj interface{}) { + bundleCollection := obj.(*v1alpha1.SupportBundleCollection) + if isCollectionCompleted(bundleCollection) { + klog.InfoS("Processed SupportBundleCollection ADD event, collection is completed") + return + } + c.queue.Add(bundleCollection.Name) + klog.InfoS("Enqueued SupportBundleCollection ADD event", "name", bundleCollection.Name) +} + +// updateSupportBundleCollection adds the SupportBundleCollection name into queue if the conditions are updated. The +// changes in SupportBundleCollection.Spec is ignored, as we do not support Spec changes after the collection is started. +func (c *Controller) updateSupportBundleCollection(oldObj, newObj interface{}) { + bundleCollection := newObj.(*v1alpha1.SupportBundleCollection) + oldBundleCollection := oldObj.(*v1alpha1.SupportBundleCollection) + conditionChanged := !reflect.DeepEqual(bundleCollection.Status.Conditions, oldBundleCollection.Status.Conditions) + if !conditionChanged { + klog.V(2).InfoS("Processed SupportBundleCollection UPDATE event, Conditions not changed", "name", bundleCollection.Name) + return + } + c.queue.Add(bundleCollection.Name) + klog.InfoS("Enqueued SupportBundleCollection UPDATE event", "name", bundleCollection.Name) +} + +func (c *Controller) deleteSupportBundleCollection(obj interface{}) { + bundleCollection, ok := obj.(*v1alpha1.SupportBundleCollection) + if !ok { + tombstone, ok := obj.(cache.DeletedFinalStateUnknown) + if !ok { + klog.ErrorS(nil, "Error decoding object when deleting SupportBundleCollection with invalid type", "object", obj) + return + } + bundleCollection, ok = tombstone.Obj.(*v1alpha1.SupportBundleCollection) + if !ok { + klog.ErrorS(nil, "Error decoding object tombstone when deleting SupportBundleCollection with invalid type", "object", tombstone.Obj) + return + } + } + c.queue.Add(bundleCollection.Name) + klog.InfoS("Enqueued SupportBundleCollection DELETE event", "name", bundleCollection.Name) +} + +// reconcileExternalNodes reconciles all the existing support bundles which are in BundleProcessing phase. +func (c *Controller) reconcileSupportBundleCollections() error { + bundleList, err := c.supportBundleCollectionLister.List(labels.Everything()) + if err != nil { + return err + } + for _, bundle := range bundleList { + if isCollectionProcessing(bundle) { + // Continue processing the started SupportBundleCollection request if it is not completed before restart. + if err := c.createInternalSupportBundleCollection(bundle); err != nil { + klog.ErrorS(err, "Failed to reconcile SupportBundleCollection", "name", bundle.Name) + } + } + } + + return nil +} + +// worker is a long-running function that will continually call the processNextWorkItem function in +// order to read and process a message on the work queue. +func (c *Controller) worker() { + for c.processNextWorkItem() { + } +} + +func (c *Controller) processNextWorkItem() bool { + obj, quit := c.queue.Get() + if quit { + return false + } + defer c.queue.Done(obj) + + if key, ok := obj.(string); !ok { + c.queue.Forget(obj) + klog.Errorf("Expected string in SupportBundleCollection work queue but got %#v", obj) + return true + } else if err := c.syncSupportBundleCollection(key); err == nil { + // If no error occurs we Forget this item, so it does not get queued again until + // another change happens. + c.queue.Forget(key) + } else { + // Put the item back on the workqueue to handle any transient errors. + c.queue.AddRateLimited(key) + klog.ErrorS(err, "Error syncing SupportBundleCollection", "name", key) + } + return true +} + +func (c *Controller) syncSupportBundleCollection(key string) error { + bundle, err := c.supportBundleCollectionLister.Get(key) + if k8serrors.IsNotFound(err) { + return c.deleteInternalSupportBundleCollection(key) + } + // If the SupportBundleCollection is completed, remove the internal SupportBundleCollection. + if isCollectionCompleted(bundle) { + return c.deleteInternalSupportBundleCollection(key) + } + if !c.isCollectionAvailable(bundle) { + if err := c.processConflictedCollection(bundle); err != nil { + return err + } + return nil + } + if err := c.createInternalSupportBundleCollection(bundle); err != nil { + return err + } + return nil +} + +// createInternalSupportBundleCollection creates internal SupportBundle object and saves it into the storage. +func (c *Controller) createInternalSupportBundleCollection(bundle *v1alpha1.SupportBundleCollection) error { + // Calculate the expiration time with ExpirationMinutes and the created time of the resource. + // It is to ensure the expiration time of the internal support bundle collection resource is constant, and to + // ensure the processing is atomic even if SupportBundleCollectionController is restarted. + expiredDuration, err := time.ParseDuration(fmt.Sprintf("%dm", bundle.Spec.ExpirationMinutes)) + if err != nil { + klog.ErrorS(err, "Failed to parse expiration minute", "expirationMinute", bundle.Spec.ExpirationMinutes) + return err + } + expiredAt := bundle.ObjectMeta.CreationTimestamp.Add(expiredDuration) + now := time.Now() + + // Create a CollectionStarted failure condition on the CRD if time is expired. Return nil to avoid the event + // to be re-enqueued. + if !now.Before(expiredAt) { + conditions := []v1alpha1.SupportBundleCollectionCondition{ + { + Type: v1alpha1.CollectionFailure, + Status: metav1.ConditionTrue, + Reason: string(metav1.StatusReasonExpired), + LastTransitionTime: metav1.NewTime(time.Now()), + }, + { + Type: v1alpha1.CollectionCompleted, + Status: metav1.ConditionTrue, + LastTransitionTime: metav1.NewTime(time.Now()), + }, + } + if err := c.addConditions(bundle.Name, conditions); err != nil { + klog.ErrorS(err, "Failed to create a CollectionFailure condition") + return err + } + klog.InfoS("SupportBundleCollection is expired", "expiredAt", expiredAt, "now", now) + return nil + } + // Get expected Kubernetes Nodes defined in the CRD. + nodeNames, err := c.getBundleNodes(bundle.Spec.Nodes) + if err != nil { + klog.ErrorS(err, "Failed to get Nodes defined in the support bundle", "name", bundle.Name) + return err + } + // Get expected external Nodes defined in the CRD. + externalNodeNames, err := c.getBundleExternalNodes(bundle.Spec.ExternalNodes) + if err != nil { + klog.ErrorS(err, "Failed to get ExternalNodes defined in the support bundle", "name", bundle.Name) + return err + } + nodeSpan := nodeNames.Union(externalNodeNames) + _, oldInternalBundleExists, _ := c.supportBundleCollectionStore.Get(bundle.Name) + if oldInternalBundleExists { + klog.InfoS("Internal SupportBundleCollection already exists", "name", bundle.Name) + return nil + } + // Get authentication from the Secret provided in authentication field in the CRD + authentication, err := c.parseBundleAuth(bundle.Spec.Authentication) + if err != nil { + klog.ErrorS(err, "Failed to get authentication defined in the SupportBundleCollection CR", "name", bundle.Name, "authentication", bundle.Spec.Authentication) + return err + } + c.addInternalSupportBundleCollection(bundle, nodeSpan, authentication, metav1.NewTime(expiredAt)) + // Process the support bundle collection when time is up, this will create a CollectionFailure condition if the + // bundle collection is not completed in time because any Agent fails to upload the files and does not report + // the failure. + c.queue.AddAfter(bundle.Name, expiredAt.Sub(now)) + klog.InfoS("Created internal SupportBundleCollection", "name", bundle.Name) + return nil +} + +// getBundleNodes returns the names of the Nodes configured in the SupportBundleCollection. +func (c *Controller) getBundleNodes(nodes *v1alpha1.BundleNodes) (sets.String, error) { + if nodes == nil { + return sets.NewString(), nil + } + + // Return all Kubernetes Nodes if NodeNames is empty and NodeSelector is not specified. + if len(nodes.NodeNames) == 0 && nodes.NodeSelector == nil { + allNodes, err := c.nodeLister.List(labels.Everything()) + if err != nil { + return nil, fmt.Errorf("failed to list all Nodes in the cluster: %v", err) + } + nodeNames := sets.NewString() + for _, n := range allNodes { + nodeNames.Insert(n.Name) + } + return nodeNames, nil + } + + // Add the Nodes which are configured with the names defined in the resource. + nodeNames := sets.NewString() + for _, name := range nodes.NodeNames { + _, err := c.nodeLister.Get(name) + if err != nil { + if k8serrors.IsNotFound(err) { + continue + } + return nil, fmt.Errorf("unable to get Node %s: %v", name, err) + } + nodeNames.Insert(name) + } + // Add the Nodes which are configured with the given label. + if nodes.NodeSelector != nil { + nodeSelector, _ := metav1.LabelSelectorAsSelector(nodes.NodeSelector) + selectedNodes, err := c.nodeLister.List(nodeSelector) + if err != nil { + return nil, fmt.Errorf("failed to list Nodes with labels %s: %v", nodeSelector.String(), err) + } + for _, n := range selectedNodes { + nodeNames.Insert(n.Name) + } + } + return nodeNames, nil +} + +// getBundleExternalNodes returns the names of the ExternalNodes configured in the SupportBundleCollection. +func (c *Controller) getBundleExternalNodes(en *v1alpha1.BundleExternalNodes) (sets.String, error) { + if en == nil { + return sets.NewString(), nil + } + // Return all ExternalNodes in the en.Namespace if both NodeNames is empty and NodeSelector is not specified. + if len(en.NodeNames) == 0 && en.NodeSelector == nil { + allExternalNodes, err := c.externalNodeLister.ExternalNodes(en.Namespace).List(labels.Everything()) + if err != nil { + return nil, fmt.Errorf("failed to list all ExternalNodes in the namespace %s: %v", en.Namespace, err) + } + enNames := sets.NewString() + for _, n := range allExternalNodes { + enNames.Insert(n.Name) + } + return enNames, nil + } + + enNames := sets.NewString() + for _, name := range en.NodeNames { + _, err := c.externalNodeLister.ExternalNodes(en.Namespace).Get(name) + if err != nil { + if k8serrors.IsNotFound(err) { + continue + } + return nil, fmt.Errorf("unable to get existing ExternalNode %s/%s: %v", en.Namespace, name, err) + } + enNames.Insert(name) + } + if en.NodeSelector != nil { + nodeSelector, _ := metav1.LabelSelectorAsSelector(en.NodeSelector) + selectedNodes, err := c.externalNodeLister.ExternalNodes(en.Namespace).List(nodeSelector) + if err != nil { + return nil, fmt.Errorf("failed to list ExternalNodes with labels %s in namespace %s: %v", nodeSelector.String(), en.Namespace, err) + } + for _, n := range selectedNodes { + enNames.Insert(n.Name) + } + } + return enNames, nil +} + +func (c *Controller) deleteInternalSupportBundleCollection(key string) error { + _, exists, _ := c.supportBundleCollectionStore.Get(key) + if !exists { + klog.InfoS("Internal SupportBundleCollection does not exist", "name", key) + return nil + } + err := c.supportBundleCollectionStore.Delete(key) + if err != nil { + klog.ErrorS(err, "Failed to delete internal SupportBundleCollection", "name", key) + return err + } + if obj, exists, _ := c.supportBundleCollectionAppliedToStore.GetByKey(key); exists { + c.supportBundleCollectionAppliedToStore.Delete(obj) + } + klog.InfoS("Deleted internal SupportBundleCollection", "name", key) + return nil +} + +// parseBundleAuth returns the authentication from the Secret provided in BundleServerAuthConfiguration. +// The authentication is stored in the Secret Data with a key decided by the AuthType, and encoded using base64. +func (c *Controller) parseBundleAuth(authentication v1alpha1.BundleServerAuthConfiguration) (*controlplane.BundleServerAuthConfiguration, error) { + secretReference := authentication.AuthSecret + if secretReference == nil { + return nil, fmt.Errorf("authentication is not specified") + } + secret, err := c.kubeClient.CoreV1().Secrets(secretReference.Namespace).Get(context.TODO(), secretReference.Name, metav1.GetOptions{}) + if err != nil { + return nil, fmt.Errorf("unable to get Secret with name %s in Namespace %s: %v", secretReference.Name, secretReference.Namespace, err) + } + parseAuthValue := func(secretData map[string][]byte, key string) (string, error) { + authValue, found := secret.Data[key] + if !found { + return "", fmt.Errorf("not found authentication in Secret %s/%s with key %s", secretReference.Namespace, secretReference.Name, key) + } + return bytes.NewBuffer(authValue).String(), nil + } + switch authentication.AuthType { + case v1alpha1.APIKey: + value, err := parseAuthValue(secret.Data, secretKeyWithAPIKey) + if err != nil { + return nil, err + } + return &controlplane.BundleServerAuthConfiguration{ + APIKey: value, + }, nil + case v1alpha1.BearerToken: + value, err := parseAuthValue(secret.Data, secretKeyWithBearerToken) + if err != nil { + return nil, err + } + return &controlplane.BundleServerAuthConfiguration{ + BearerToken: value, + }, nil + case v1alpha1.BasicAuthentication: + username, err := parseAuthValue(secret.Data, secretKeyWithUsername) + if err != nil { + return nil, err + } + password, err := parseAuthValue(secret.Data, secretKeyWithPassword) + if err != nil { + return nil, err + } + return &controlplane.BundleServerAuthConfiguration{ + BasicAuthentication: &controlplane.BasicAuthentication{ + Username: username, + Password: password, + }, + }, nil + } + return nil, fmt.Errorf("unsupported authentication type %s", authentication.AuthType) +} + +// addInternalSupportBundleCollection adds internalBundle into supportBundleCollectionStore, and creates a +// supportBundleCollectionAppliedTo resource to maintain the SupportBundleCollection's required Nodes or ExternalNodes. +func (c *Controller) addInternalSupportBundleCollection( + bundleCollection *v1alpha1.SupportBundleCollection, + nodeSpan sets.String, + authentication *controlplane.BundleServerAuthConfiguration, + expiredAt metav1.Time) { + var processNodes bool + if bundleCollection.Spec.Nodes == nil { + processNodes = false + } else { + processNodes = true + } + var enNamespace string + if bundleCollection.Spec.ExternalNodes == nil { + enNamespace = "" + } else { + enNamespace = bundleCollection.Spec.ExternalNodes.Namespace + } + + appliedTo := &supportBundleCollectionAppliedTo{ + name: bundleCollection.Name, + processNodes: processNodes, + enNamespace: enNamespace, + } + c.supportBundleCollectionAppliedToStore.Add(appliedTo) + // Create internal SupportBundleCollection resource. + internalBundleCollection := &types.SupportBundleCollection{ + SpanMeta: types.SpanMeta{ + NodeNames: nodeSpan, + }, + Name: bundleCollection.Name, + UID: bundleCollection.UID, + SinceTime: bundleCollection.Spec.SinceTime, + FileServer: bundleCollection.Spec.FileServer, + ExpiredAt: expiredAt, + Authentication: *authentication, + } + _ = c.supportBundleCollectionStore.Create(internalBundleCollection) +} + +// processConflictedCollection adds a Started failure condition on the conflicted the SupportBundleCollection request, +// and re-enqueue the request after 10s. +func (c *Controller) processConflictedCollection(bundle *v1alpha1.SupportBundleCollection) error { + message := "another SupportBundleCollection is processing on Nodes or on ExternalNodes in the same namespace, retry in 10s" + condition := []v1alpha1.SupportBundleCollectionCondition{ + { + Type: v1alpha1.CollectionStarted, + Status: metav1.ConditionFalse, + Reason: string(metav1.StatusReasonConflict), + Message: message, + LastTransitionTime: metav1.NewTime(time.Now()), + }, + } + if err := c.addConditions(bundle.Name, condition); err != nil { + klog.ErrorS(err, "Failed to create a Started failed condition") + return err + } + c.queue.AddAfter(bundle.Name, supportBundleCollectionRetryPeriod) + return nil +} + +func (c *Controller) addConditions(bundleCollectionName string, conditions []v1alpha1.SupportBundleCollectionCondition) error { + if len(conditions) == 0 { + return nil + } + bundleCollection, getErr := c.supportBundleCollectionLister.Get(bundleCollectionName) + if getErr != nil { + return getErr + } + toUpdate := bundleCollection.DeepCopy() + if err := retry.RetryOnConflict(retry.DefaultRetry, func() error { + updatedConditions := appendConditions(toUpdate.Status.Conditions, conditions) + toUpdate.Status.Conditions = updatedConditions + klog.V(2).InfoS("Updating SupportBundleCollection", "SupportBundleCollection", klog.KObj(toUpdate)) + _, updateErr := c.crdClient.CrdV1alpha1().SupportBundleCollections().UpdateStatus(context.TODO(), toUpdate, metav1.UpdateOptions{}) + if updateErr != nil && k8serrors.IsConflict(updateErr) { + if toUpdate, getErr = c.crdClient.CrdV1alpha1().SupportBundleCollections().Get(context.TODO(), bundleCollectionName, metav1.GetOptions{}); getErr != nil { + return getErr + } + } + // Return the error from UPDATE. + return updateErr + }); err != nil { + return err + } + return nil +} + +// isCollectionAvailable checks if the bundleCollection can be processed at once. It returns true with these conditions: +// 1. the bundleCollection is started processing; +// 2. there are no processing SupportBundleCollections requiring to collect bundle files on any Nodes, if this one requires +// to collection files on Nodes; +// 3. there are no processing SupportBundleCollections requiring to collect bundle files on the ExternalNodes in the same +// Namespace as this one. +func (c *Controller) isCollectionAvailable(bundleCollection *v1alpha1.SupportBundleCollection) bool { + _, exists, _ := c.supportBundleCollectionAppliedToStore.GetByKey(bundleCollection.Name) + if exists { + return true + } + if bundleCollection.Spec.Nodes != nil { + bundleCollectionsForAllNodes, _ := c.supportBundleCollectionAppliedToStore.ByIndex(processingNodesIndex, processingNodesIndexValue) + if len(bundleCollectionsForAllNodes) > 0 { + return false + } + } + if bundleCollection.Spec.ExternalNodes != nil { + namespace := bundleCollection.Spec.ExternalNodes.Namespace + bundleCollectionsForExternalNodes, _ := c.supportBundleCollectionAppliedToStore.ByIndex(processingExternalNodesIndex, namespace) + if len(bundleCollectionsForExternalNodes) > 0 { + return false + } + } + return true +} + +// isCollectionCompleted check if CollectionCompleted condition with status ConditionTrue is added in the bundleCollection or not. +func isCollectionCompleted(bundleCollection *v1alpha1.SupportBundleCollection) bool { + for _, condition := range bundleCollection.Status.Conditions { + if condition.Type == v1alpha1.CollectionCompleted && condition.Status == metav1.ConditionTrue { + return true + } + } + return false +} + +// isCollectionProcessing check if CollectionStarted condition with status ConditionTrue is added in the bundleCollection or not. +func isCollectionProcessing(bundleCollection *v1alpha1.SupportBundleCollection) bool { + if isCollectionCompleted(bundleCollection) { + return false + } + for _, c := range bundleCollection.Status.Conditions { + if c.Type == v1alpha1.CollectionStarted && c.Status == metav1.ConditionTrue { + return true + } + } + return false +} + +func conditionEqualsIgnoreLastTransitionTime(a, b v1alpha1.SupportBundleCollectionCondition) bool { + a1 := a + a1.LastTransitionTime = metav1.Date(2018, 1, 1, 0, 0, 0, 0, time.UTC) + b1 := b + b1.LastTransitionTime = metav1.Date(2018, 1, 1, 0, 0, 0, 0, time.UTC) + return a1 == b1 +} + +func conditionExistsIgnoreLastTransitionTime(conditions []v1alpha1.SupportBundleCollectionCondition, condition v1alpha1.SupportBundleCollectionCondition) bool { + for _, c := range conditions { + if conditionEqualsIgnoreLastTransitionTime(c, condition) { + return true + } + } + return false +} + +func appendConditions(oldConditions, updatedConditions []v1alpha1.SupportBundleCollectionCondition) []v1alpha1.SupportBundleCollectionCondition { + newConditions := oldConditions + for _, c := range updatedConditions { + if conditionExistsIgnoreLastTransitionTime(newConditions, c) { + continue + } + newConditions = append(newConditions, c) + } + return newConditions +} diff --git a/pkg/controller/supportbundlecollection/controller_test.go b/pkg/controller/supportbundlecollection/controller_test.go new file mode 100644 index 00000000000..4c3a6480d1f --- /dev/null +++ b/pkg/controller/supportbundlecollection/controller_test.go @@ -0,0 +1,1481 @@ +// Copyright 2022 Antrea 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 supportbundlecollection + +import ( + "context" + "encoding/base64" + "fmt" + "sync" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + corev1 "k8s.io/api/core/v1" + k8serrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/informers" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/kubernetes/fake" + "k8s.io/client-go/util/workqueue" + + "antrea.io/antrea/pkg/apis/controlplane" + "antrea.io/antrea/pkg/apis/crd/v1alpha1" + clientset "antrea.io/antrea/pkg/client/clientset/versioned" + fakeclientset "antrea.io/antrea/pkg/client/clientset/versioned/fake" + crdinformers "antrea.io/antrea/pkg/client/informers/externalversions" + bundlecollectionstore "antrea.io/antrea/pkg/controller/supportbundlecollection/store" + "antrea.io/antrea/pkg/controller/types" +) + +const ( + informerDefaultResync = 30 * time.Second + + testKeyString = "it is a valid API key" + testTokenString = "it is a valid token" + secretWithAPIKey = "s1" + secretWithToken = "s2" + secretWithBasicAuth = "s3" + secretNamespace = "ns" +) + +type bundleNodes struct { + names []string + labels map[string]string +} + +type bundleExternalNodes struct { + namespace string + names []string + labels map[string]string +} + +type bundlePhase int + +const ( + pending bundlePhase = iota + processing + completed +) + +type bundleConfig struct { + name string + nodes *bundleNodes + externalNodes *bundleExternalNodes + authType v1alpha1.BundleServerAuthType + secretName string + secretNamespace string + conditions []v1alpha1.SupportBundleCollectionCondition + phase bundlePhase + createTime *time.Time +} + +func TestReconcileSupportBundles(t *testing.T) { + // Prepare test resources. + testConfigs := testBundleConfigs() + nodeConfigs, externalNodeConfigs := parseDependentResources(testConfigs) + coreObjects := prepareNodes(nodeConfigs) + crdObjects := prepareExternalNodes(externalNodeConfigs) + for _, c := range prepareBundleCollections(testConfigs) { + crdObjects = append(crdObjects, c) + } + + secret := &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "secret1", + Namespace: "default", + }, + Data: map[string][]byte{ + secretKeyWithAPIKey: []byte(base64.StdEncoding.EncodeToString([]byte("a valid API key"))), + }, + } + coreObjects = append(coreObjects, secret) + + testClient := newTestClient(coreObjects, crdObjects) + controller := newController(testClient) + stopCh := make(chan struct{}) + testClient.start(stopCh) + testClient.waitForSync(stopCh) + + processingBundleCollections := sets.NewString() + ignoredBundleCollections := sets.NewString() + for _, c := range testConfigs { + if c.phase == processing { + processingBundleCollections.Insert(c.name) + } else { + ignoredBundleCollections.Insert(c.name) + } + } + + err := controller.reconcileSupportBundleCollections() + assert.NoError(t, err) + + for _, name := range processingBundleCollections.List() { + _, exists, _ := controller.supportBundleCollectionStore.Get(name) + assert.True(t, exists) + _, appliedToExists, _ := controller.supportBundleCollectionAppliedToStore.GetByKey(name) + assert.True(t, appliedToExists) + } + + for _, name := range ignoredBundleCollections.List() { + _, exists, _ := controller.supportBundleCollectionStore.Get(name) + assert.False(t, exists) + _, appliedToExists, _ := controller.supportBundleCollectionAppliedToStore.GetByKey(name) + assert.False(t, appliedToExists) + } +} + +func parseDependentResources(configs []bundleConfig) ([]nodeConfig, []externalNodeConfig) { + nodeNames := sets.NewString() + nodeLabels := make(map[string]string) + externalNodeNames := make(map[string]sets.String) + externalNodeLabels := make(map[string]map[string]string) + for _, cfg := range configs { + if cfg.nodes != nil { + for _, name := range cfg.nodes.names { + nodeNames.Insert(name) + } + for k, v := range cfg.nodes.labels { + nodeLabels[k] = v + } + } + if cfg.externalNodes != nil { + _, exists := externalNodeNames[cfg.externalNodes.namespace] + if !exists { + externalNodeNames[cfg.externalNodes.namespace] = sets.NewString() + } + for _, name := range cfg.externalNodes.names { + externalNodeNames[cfg.externalNodes.namespace].Insert(name) + } + if len(cfg.externalNodes.labels) > 0 { + externalNodeLabels[cfg.externalNodes.namespace] = cfg.externalNodes.labels + } + } + } + var nodeConfigs []nodeConfig + var externalNodeConfigs []externalNodeConfig + for name := range nodeNames { + nodeConfigs = append(nodeConfigs, nodeConfig{name: name}) + } + nodeConfigs = append(nodeConfigs, nodeConfig{ + name: "selected-node", + labels: nodeLabels, + }) + for ns, names := range externalNodeNames { + for name := range names { + externalNodeConfigs = append(externalNodeConfigs, externalNodeConfig{ + namespace: ns, + name: name, + }) + } + } + for ns, labels := range externalNodeLabels { + externalNodeConfigs = append(externalNodeConfigs, externalNodeConfig{ + namespace: ns, + name: fmt.Sprintf("%s-selected-externalnode", ns), + labels: labels, + }) + } + return nodeConfigs, externalNodeConfigs +} + +func TestAddSupportBundleCollection(t *testing.T) { + testConfigs := testBundleConfigs() + bundleCollectionObjects := prepareBundleCollections(testConfigs) + testClient := newTestClient(nil, bundleCollectionObjects) + controller := &Controller{ + crdClient: testClient.crdClient, + queue: workqueue.NewNamedRateLimitingQueue(workqueue.NewItemExponentialFailureRateLimiter(minRetryDelay, maxRetryDelay), "supportBundle"), + } + + stopCh := make(chan struct{}) + testClient.start(stopCh) + + enqueuedBundleNames := sets.NewString() + stopEventKey := "stop" + wg := sync.WaitGroup{} + wg.Add(1) + go func() { + processNextWorkItem := func() bool { + obj, quit := controller.queue.Get() + if quit { + return false + } + defer controller.queue.Done(obj) + key, _ := obj.(string) + if key == stopEventKey { + return false + } + enqueuedBundleNames.Insert(key) + controller.queue.Forget(key) + return true + } + for processNextWorkItem() { + } + wg.Done() + }() + + initBundleCollections, err := testClient.crdClient.CrdV1alpha1().SupportBundleCollections().List(context.TODO(), metav1.ListOptions{}) + require.NoError(t, err) + expectedBundleCollections := sets.NewString() + for _, c := range testConfigs { + if c.phase != completed { + expectedBundleCollections.Insert(c.name) + } + } + collections := initBundleCollections.Items + for id := range collections { + controller.addSupportBundleCollection(&collections[id]) + } + controller.queue.Add(stopEventKey) + wg.Wait() + assert.Equal(t, expectedBundleCollections, enqueuedBundleNames) +} + +func TestSupportBundleCollectionEvents(t *testing.T) { + existingBundleCollection := generateSupportBundleResource(bundleConfig{ + name: "b0", + externalNodes: &bundleExternalNodes{namespace: "ns1"}, + authType: v1alpha1.APIKey, + secretName: "s1", + secretNamespace: "default", + conditions: []v1alpha1.SupportBundleCollectionCondition{ + { + Type: v1alpha1.CollectionStarted, + Status: metav1.ConditionTrue, + }, { + Type: v1alpha1.BundleCollected, + Status: metav1.ConditionTrue, + }, + }, + }) + testClient := newTestClient(nil, []runtime.Object{existingBundleCollection}) + controller := newController(testClient) + + stopCh := make(chan struct{}) + testClient.start(stopCh) + testClient.waitForSync(stopCh) + + enqueuedBundleNameCountMappings := make(map[string]int) + wg := sync.WaitGroup{} + wg.Add(1) + go func() { + processNextWorkItem := func() bool { + obj, quit := controller.queue.Get() + if quit { + return false + } + defer controller.queue.Done(obj) + key, _ := obj.(string) + if _, exists := enqueuedBundleNameCountMappings[key]; !exists { + enqueuedBundleNameCountMappings[key] = 0 + } + enqueuedBundleNameCountMappings[key] += 1 + controller.queue.Forget(key) + return true + } + for processNextWorkItem() { + } + wg.Done() + }() + + testBundleConfig := generateSupportBundleResource(bundleConfig{ + name: "b1", + nodes: &bundleNodes{}, + authType: v1alpha1.APIKey, + secretName: "s1", + secretNamespace: "default", + }) + bundleCollection, err := testClient.crdClient.CrdV1alpha1().SupportBundleCollections().Create(context.TODO(), testBundleConfig, metav1.CreateOptions{}) + require.NoError(t, err) + time.Sleep(time.Millisecond * 200) + + updateBundleStatus := func(oriBundleCollection *v1alpha1.SupportBundleCollection, updatedStatus v1alpha1.SupportBundleCollectionStatus) { + collection := &v1alpha1.SupportBundleCollection{ + ObjectMeta: oriBundleCollection.ObjectMeta, + Spec: oriBundleCollection.Spec, + Status: updatedStatus, + } + _, err := testClient.crdClient.CrdV1alpha1().SupportBundleCollections().UpdateStatus(context.TODO(), collection, metav1.UpdateOptions{}) + require.NoError(t, err) + time.Sleep(time.Millisecond * 200) + } + + updateBundleStatus(bundleCollection, v1alpha1.SupportBundleCollectionStatus{ + DesiredNodes: 10, + SucceededNodes: 0, + Conditions: []v1alpha1.SupportBundleCollectionCondition{ + { + Type: v1alpha1.CollectionStarted, + Status: metav1.ConditionTrue, + }, + }, + }) + updateBundleStatus(bundleCollection, v1alpha1.SupportBundleCollectionStatus{ + DesiredNodes: 10, + SucceededNodes: 1, + Conditions: []v1alpha1.SupportBundleCollectionCondition{ + { + Type: v1alpha1.CollectionStarted, + Status: metav1.ConditionTrue, + }, { + Type: v1alpha1.BundleCollected, + Status: metav1.ConditionTrue, + }, + }, + }) + updateBundleStatus(existingBundleCollection, v1alpha1.SupportBundleCollectionStatus{ + DesiredNodes: 10, + SucceededNodes: 5, + Conditions: []v1alpha1.SupportBundleCollectionCondition{ + { + Type: v1alpha1.CollectionStarted, + Status: metav1.ConditionTrue, + }, { + Type: v1alpha1.BundleCollected, + Status: metav1.ConditionTrue, + }, + }, + }) + updateBundleStatus(existingBundleCollection, v1alpha1.SupportBundleCollectionStatus{ + DesiredNodes: 10, + SucceededNodes: 7, + Conditions: []v1alpha1.SupportBundleCollectionCondition{ + { + Type: v1alpha1.CollectionStarted, + Status: metav1.ConditionTrue, + }, { + Type: v1alpha1.BundleCollected, + Status: metav1.ConditionTrue, + }, + { + Type: v1alpha1.CollectionFailure, + Status: metav1.ConditionTrue, + }, + }, + }) + err = testClient.crdClient.CrdV1alpha1().SupportBundleCollections().Delete(context.TODO(), testBundleConfig.Name, metav1.DeleteOptions{}) + require.NoError(t, err) + // Wait for data sync + time.Sleep(time.Millisecond * 200) + controller.queue.ShutDown() + wg.Wait() + eventCount, exists := enqueuedBundleNameCountMappings[testBundleConfig.Name] + assert.True(t, exists) + assert.Equal(t, 4, eventCount) + eventCount2, exists2 := enqueuedBundleNameCountMappings[existingBundleCollection.Name] + assert.True(t, exists2) + assert.Equal(t, 2, eventCount2) +} + +type nodeConfig struct { + name string + labels map[string]string +} + +func TestGetBundleNodes(t *testing.T) { + nodeObjects := prepareNodes([]nodeConfig{ + {name: "n1"}, + {name: "n2"}, + {name: "n3", labels: map[string]string{"test": "selected"}}, + {name: "n4", labels: map[string]string{"test": "selected"}}, + {name: "n5", labels: map[string]string{"test": "not-selected"}}, + }) + testClient := newTestClient(nodeObjects, nil) + nodeInformer := testClient.informerFactory.Core().V1().Nodes() + controller := &Controller{ + nodeLister: nodeInformer.Lister(), + } + stopCh := make(chan struct{}) + testClient.start(stopCh) + + testClient.waitForSync(stopCh) + + for _, tc := range []struct { + bundleNodes *v1alpha1.BundleNodes + expectedNodes sets.String + }{ + { + bundleNodes: &v1alpha1.BundleNodes{ + NodeNames: []string{"n1", "n2"}, + }, + expectedNodes: sets.NewString("n1", "n2"), + }, { + bundleNodes: &v1alpha1.BundleNodes{ + NodeSelector: &metav1.LabelSelector{ + MatchLabels: map[string]string{"test": "selected"}, + }, + }, + expectedNodes: sets.NewString("n3", "n4"), + }, { + bundleNodes: &v1alpha1.BundleNodes{ + NodeNames: []string{"n1", "n2"}, + NodeSelector: &metav1.LabelSelector{ + MatchLabels: map[string]string{"test": "selected"}, + }, + }, + expectedNodes: sets.NewString("n1", "n2", "n3", "n4"), + }, { + bundleNodes: &v1alpha1.BundleNodes{}, + expectedNodes: sets.NewString("n1", "n2", "n3", "n4", "n5"), + }, { + bundleNodes: nil, + expectedNodes: sets.NewString(), + }, { + bundleNodes: &v1alpha1.BundleNodes{ + NodeNames: []string{"n1", "not-exist"}, + }, + expectedNodes: sets.NewString("n1"), + }, + } { + actualNodes, err := controller.getBundleNodes(tc.bundleNodes) + assert.NoError(t, err, "failed to run getBundleNodes") + assert.Equal(t, tc.expectedNodes, actualNodes) + } +} + +type externalNodeConfig struct { + namespace string + name string + labels map[string]string +} + +func TestGetBundleExternalNodes(t *testing.T) { + externalNodeObjects := prepareExternalNodes([]externalNodeConfig{ + {namespace: "ns1", name: "n1"}, + {namespace: "ns1", name: "n2"}, + {namespace: "ns1", name: "n3", labels: map[string]string{"test": "selected"}}, + {namespace: "ns1", name: "n4", labels: map[string]string{"test": "not-selected"}}, + {namespace: "ns2", name: "n5", labels: map[string]string{"test": "selected"}}, + {namespace: "ns2", name: "n6", labels: map[string]string{"test": "selected"}}, + }) + testClient := newTestClient(nil, externalNodeObjects) + externalNodeInformer := testClient.crdInformerFactory.Crd().V1alpha1().ExternalNodes() + controller := &Controller{ + externalNodeLister: externalNodeInformer.Lister(), + } + stopCh := make(chan struct{}) + testClient.start(stopCh) + + testClient.waitForSync(stopCh) + + for _, tc := range []struct { + bundleNodes *v1alpha1.BundleExternalNodes + expectedNodes sets.String + }{ + { + bundleNodes: &v1alpha1.BundleExternalNodes{ + Namespace: "ns1", + NodeNames: []string{"n1", "n2"}, + }, + expectedNodes: sets.NewString("n1", "n2"), + }, { + bundleNodes: &v1alpha1.BundleExternalNodes{ + Namespace: "ns1", + NodeNames: []string{"n1"}, + NodeSelector: &metav1.LabelSelector{ + MatchLabels: map[string]string{"test": "selected"}, + }, + }, + expectedNodes: sets.NewString("n1", "n3"), + }, { + bundleNodes: &v1alpha1.BundleExternalNodes{ + Namespace: "ns1", + }, + expectedNodes: sets.NewString("n1", "n2", "n3", "n4"), + }, { + bundleNodes: nil, + expectedNodes: sets.NewString(), + }, + { + bundleNodes: &v1alpha1.BundleExternalNodes{ + Namespace: "ns1", + NodeNames: []string{"not-exist"}, + }, + expectedNodes: sets.NewString(), + }, + } { + actualNodes, err := controller.getBundleExternalNodes(tc.bundleNodes) + assert.NoError(t, err) + assert.Equal(t, tc.expectedNodes, actualNodes) + } +} + +type secretConfig struct { + name string + data map[string][]byte +} + +func TestParseBundleAuth(t *testing.T) { + ns := "ns-auth" + apiKey := testKeyString + token := testTokenString + usr := "user" + pwd := "pwd123456" + var secretObjects []runtime.Object + for _, s := range prepareSecrets(ns, []secretConfig{ + {name: "s1", data: map[string][]byte{secretKeyWithAPIKey: []byte(apiKey)}}, + {name: "s2", data: map[string][]byte{secretKeyWithBearerToken: []byte(token)}}, + {name: "s3", data: map[string][]byte{secretKeyWithUsername: []byte(usr), secretKeyWithPassword: []byte(pwd)}}, + {name: "invalid-base64", data: map[string][]byte{secretKeyWithAPIKey: []byte("invalid string to decode with base64")}}, + {name: "invalid-secret", data: map[string][]byte{"unknown": []byte(apiKey)}}, + }) { + secretObjects = append(secretObjects, s) + } + + testClient := newTestClient(secretObjects, nil) + controller := newController(testClient) + stopCh := make(chan struct{}) + testClient.start(stopCh) + + testClient.waitForSync(stopCh) + + for _, tc := range []struct { + authentication v1alpha1.BundleServerAuthConfiguration + expectedError string + expectedAuth *controlplane.BundleServerAuthConfiguration + }{ + { + authentication: v1alpha1.BundleServerAuthConfiguration{ + AuthType: v1alpha1.APIKey, + AuthSecret: &corev1.SecretReference{ + Namespace: ns, + Name: "s1", + }, + }, + expectedAuth: &controlplane.BundleServerAuthConfiguration{ + APIKey: testKeyString, + }, + }, + { + authentication: v1alpha1.BundleServerAuthConfiguration{ + AuthType: v1alpha1.BearerToken, + AuthSecret: &corev1.SecretReference{ + Namespace: ns, + Name: "s2", + }, + }, + expectedAuth: &controlplane.BundleServerAuthConfiguration{ + BearerToken: testTokenString, + }, + }, + { + authentication: v1alpha1.BundleServerAuthConfiguration{ + AuthType: v1alpha1.BasicAuthentication, + AuthSecret: &corev1.SecretReference{ + Namespace: ns, + Name: "s3", + }, + }, + expectedAuth: &controlplane.BundleServerAuthConfiguration{ + BasicAuthentication: &controlplane.BasicAuthentication{ + Username: usr, + Password: pwd, + }, + }, + }, + { + authentication: v1alpha1.BundleServerAuthConfiguration{ + AuthType: v1alpha1.BearerToken, + AuthSecret: &corev1.SecretReference{ + Namespace: ns, + Name: "invalid-secret", + }, + }, + expectedError: fmt.Sprintf("not found authentication in Secret %s/invalid-secret with key %s", ns, secretKeyWithBearerToken), + }, + { + authentication: v1alpha1.BundleServerAuthConfiguration{ + AuthType: v1alpha1.BearerToken, + AuthSecret: &corev1.SecretReference{ + Namespace: ns, + Name: "not-exist", + }, + }, + expectedError: fmt.Sprintf("unable to get Secret with name not-exist in Namespace %s", ns), + }, + { + authentication: v1alpha1.BundleServerAuthConfiguration{ + AuthType: v1alpha1.APIKey, + AuthSecret: nil, + }, + expectedError: "authentication is not specified", + }, + } { + auth, err := controller.parseBundleAuth(tc.authentication) + if tc.expectedError != "" { + assert.Contains(t, err.Error(), tc.expectedError) + } else { + assert.Equal(t, tc.expectedAuth, auth) + } + } +} + +func TestCreateAndDeleteInternalSupportBundleCollection(t *testing.T) { + coreObjects, crdObjects := prepareTopology() + testClient := newTestClient(coreObjects, crdObjects) + controller := newController(testClient) + stopCh := make(chan struct{}) + testClient.start(stopCh) + + testClient.waitForSync(stopCh) + + expiredDuration, _ := time.ParseDuration("-61m") + expiredCreationTime := time.Now().Add(expiredDuration) + testCases := []struct { + bundleConfig + expectedNodes sets.String + expectedAuth controlplane.BundleServerAuthConfiguration + expectedError string + expectFailure bool + }{ + { + bundleConfig: bundleConfig{ + name: "b1", + nodes: &bundleNodes{ + names: []string{"n1", "n2"}, + labels: map[string]string{"test": "selected"}, + }, + authType: v1alpha1.APIKey, + }, + expectedNodes: sets.NewString("n1", "n2", "n3", "n4"), + expectedAuth: controlplane.BundleServerAuthConfiguration{ + APIKey: testKeyString, + }, + }, + { + bundleConfig: bundleConfig{ + name: "b2", + externalNodes: &bundleExternalNodes{ + namespace: "ns1", + names: []string{"en1", "en2"}, + labels: map[string]string{"test": "selected"}, + }, + authType: v1alpha1.APIKey, + }, + expectedNodes: sets.NewString("en1", "en2", "en3"), + expectedAuth: controlplane.BundleServerAuthConfiguration{ + APIKey: testKeyString, + }, + }, + { + bundleConfig: bundleConfig{ + name: "b3", + nodes: &bundleNodes{ + names: []string{"n1", "n2"}, + }, + externalNodes: &bundleExternalNodes{ + namespace: "ns2", + }, + authType: v1alpha1.APIKey, + }, + expectedNodes: sets.NewString("n1", "n2", "en5"), + expectedAuth: controlplane.BundleServerAuthConfiguration{ + APIKey: testKeyString, + }, + }, + { + bundleConfig: bundleConfig{ + name: "b4", + externalNodes: &bundleExternalNodes{ + namespace: "ns2", + }, + authType: v1alpha1.BearerToken, + secretName: "s4", + secretNamespace: secretNamespace, + }, + expectedError: fmt.Sprintf("unable to get Secret with name s4 in Namespace %s", secretNamespace), + }, + { + bundleConfig: bundleConfig{ + name: "b5", + externalNodes: &bundleExternalNodes{ + namespace: "ns2", + }, + authType: v1alpha1.BearerToken, + createTime: &expiredCreationTime, + }, + expectFailure: true, + }, + } + + for _, tc := range testCases { + bundleConfig := tc.bundleConfig + if bundleConfig.secretName == "" { + secretName := secretWithAPIKey + if tc.bundleConfig.authType == v1alpha1.BearerToken { + secretName = secretWithToken + } + bundleConfig.secretName = secretName + bundleConfig.secretNamespace = secretNamespace + } + bundle, err := testClient.crdClient.CrdV1alpha1().SupportBundleCollections().Create(context.TODO(), generateSupportBundleResource(bundleConfig), metav1.CreateOptions{}) + require.Nil(t, err) + err = wait.PollImmediate(time.Millisecond*50, time.Second, func() (done bool, err error) { + _, getErr := controller.supportBundleCollectionLister.Get(tc.bundleConfig.name) + if getErr == nil { + return true, nil + } + if k8serrors.IsNotFound(getErr) { + return false, nil + } + return false, getErr + }) + assert.NoError(t, err) + err = controller.createInternalSupportBundleCollection(bundle) + if tc.expectedError != "" { + require.Error(t, err) + assert.Contains(t, err.Error(), tc.expectedError) + } else { + require.NoError(t, err) + if !tc.expectFailure { + obj, exists, err := controller.supportBundleCollectionStore.Get(bundle.Name) + require.NoError(t, err) + assert.True(t, exists) + _, exists, err = controller.supportBundleCollectionAppliedToStore.GetByKey(bundle.Name) + require.NoError(t, err) + assert.True(t, exists) + internalBundle, _ := obj.(*types.SupportBundleCollection) + assert.Equal(t, tc.expectedNodes, internalBundle.NodeNames) + assert.Equal(t, tc.expectedAuth, internalBundle.Authentication) + } else { + updatedBundle, err := testClient.crdClient.CrdV1alpha1().SupportBundleCollections().Get(context.TODO(), bundle.Name, metav1.GetOptions{}) + require.NoError(t, err) + conditions := updatedBundle.Status.Conditions + assert.True(t, len(conditions) > 0) + var exists bool + for _, c := range conditions { + if c.Type == v1alpha1.CollectionFailure && c.Status == metav1.ConditionTrue { + exists = true + break + } + } + assert.True(t, exists) + } + } + } + + // Test update span + err := testClient.client.CoreV1().Nodes().Delete(context.TODO(), "n3", metav1.DeleteOptions{}) + require.NoError(t, err) + updatedBundleCollection := generateSupportBundleResource( + bundleConfig{ + name: "b1", + nodes: &bundleNodes{ + names: []string{"n1", "n2"}, + labels: map[string]string{"test": "selected"}, + }, + authType: v1alpha1.APIKey, + secretName: "s1", + secretNamespace: secretNamespace, + }) + // Wait for data sync between client and nodeLister + time.Sleep(time.Millisecond * 500) + err = controller.createInternalSupportBundleCollection(updatedBundleCollection) + assert.NoError(t, err) + + // Test deletion. + for _, tc := range testCases { + err = controller.deleteInternalSupportBundleCollection(tc.name) + require.NoError(t, err) + _, exists, err := controller.supportBundleCollectionStore.Get(tc.name) + require.NoError(t, err) + assert.False(t, exists) + _, exists, err = controller.supportBundleCollectionAppliedToStore.GetByKey(tc.name) + require.NoError(t, err) + assert.False(t, exists) + } +} + +func TestSyncSupportBundleCollection(t *testing.T) { + coreObjects, crdObjects := prepareTopology() + expiredDuration, _ := time.ParseDuration("-70m") + expiredCreateTime := time.Now().Add(expiredDuration) + testCases := []struct { + bundleConfig + created bool + }{ + { + bundleConfig: bundleConfig{ + name: "b0", + nodes: &bundleNodes{ + labels: map[string]string{"test": "selected"}, + }, + authType: v1alpha1.APIKey, + }, + created: true, + }, { + bundleConfig: bundleConfig{ + name: "b1", + externalNodes: &bundleExternalNodes{ + namespace: "ns1", + labels: map[string]string{"test": "selected"}, + }, + authType: v1alpha1.APIKey, + conditions: []v1alpha1.SupportBundleCollectionCondition{ + { + Type: v1alpha1.CollectionStarted, + Status: metav1.ConditionTrue, + }, + }, + }, + created: true, + }, { + bundleConfig: bundleConfig{ + name: "b2", + externalNodes: &bundleExternalNodes{ + namespace: "ns1", + names: []string{"en1"}, + }, + authType: v1alpha1.APIKey, + conditions: []v1alpha1.SupportBundleCollectionCondition{ + { + Type: v1alpha1.CollectionCompleted, + Status: metav1.ConditionTrue, + }, + }, + }, + created: false, + }, { + bundleConfig: bundleConfig{ + name: "b3", + nodes: &bundleNodes{ + names: []string{"n1", "n3"}, + }, + authType: v1alpha1.BearerToken, + conditions: []v1alpha1.SupportBundleCollectionCondition{ + { + Type: v1alpha1.CollectionCompleted, + Status: metav1.ConditionTrue, + }, + { + Type: v1alpha1.CollectionFailure, + Status: metav1.ConditionTrue, + }, + }, + }, + created: false, + }, { + bundleConfig: bundleConfig{ + name: "b4", + externalNodes: &bundleExternalNodes{ + namespace: "ns2", + names: []string{"en4"}, + }, + authType: v1alpha1.APIKey, + conditions: []v1alpha1.SupportBundleCollectionCondition{ + { + Type: v1alpha1.CollectionCompleted, + Status: metav1.ConditionTrue, + }, + }, + createTime: &expiredCreateTime, + }, + }, { + bundleConfig: bundleConfig{ + name: "b5", + externalNodes: &bundleExternalNodes{ + namespace: "ns1", + names: []string{"en5"}, + }, + authType: v1alpha1.APIKey, + }, + created: false, + }, + } + + for _, tc := range testCases { + secretName := secretWithAPIKey + if tc.bundleConfig.authType == v1alpha1.BearerToken { + secretName = secretWithToken + } + bundleConfig := tc.bundleConfig + bundleConfig.secretName = secretName + bundleConfig.secretNamespace = secretNamespace + bundleCollection := generateSupportBundleResource(bundleConfig) + crdObjects = append(crdObjects, bundleCollection) + } + + testClient := newTestClient(coreObjects, crdObjects) + controller := newController(testClient) + stopCh := make(chan struct{}) + testClient.start(stopCh) + + testClient.waitForSync(stopCh) + + go controller.worker() + + for _, tc := range testCases { + err := wait.PollImmediate(time.Millisecond*100, time.Second, func() (done bool, err error) { + _, exists, err := controller.supportBundleCollectionStore.Get(tc.bundleConfig.name) + if err != nil { + return false, err + } + if exists != tc.created { + return false, nil + } + return true, nil + }) + assert.NoError(t, err) + } + +} +func TestAddInternalSupportBundleCollection(t *testing.T) { + testClient := newTestClient(nil, nil) + controller := newController(testClient) + + authentication := &controlplane.BundleServerAuthConfiguration{ + APIKey: "bundle_api_key", + } + expiredAt := metav1.NewTime(time.Now().Add(time.Minute * 60)) + + verifyBundleCollectionAppliedToStoreIndexers := func(indexer, indexerKey, collectionName string) { + selectedSupportBundleCollections, err := controller.supportBundleCollectionAppliedToStore.ByIndex(indexer, indexerKey) + assert.NoError(t, err) + for _, obj := range selectedSupportBundleCollections { + bundleAppliedTo := obj.(*supportBundleCollectionAppliedTo) + if bundleAppliedTo.name == collectionName { + return + } + } + t.Errorf("unabled to find supportBundleCollectionAppliedTo with name %s", collectionName) + } + for _, tc := range []struct { + name string + nodes *bundleNodes + externalNodes *bundleExternalNodes + nodeSpan sets.String + processingNodes bool + processingExternalNodes bool + }{ + { + name: "b1", + nodes: &bundleNodes{}, + nodeSpan: sets.NewString("n1", "n2", "n3", "n4"), + processingNodes: true, + }, { + name: "b2", + externalNodes: &bundleExternalNodes{namespace: "ns1"}, + nodeSpan: sets.NewString("en1", "en2", "en3", "en4"), + processingExternalNodes: true, + }, + } { + bundleConfig := bundleConfig{ + name: tc.name, + nodes: tc.nodes, + externalNodes: tc.externalNodes, + authType: v1alpha1.APIKey, + secretName: "s1", + secretNamespace: "default", + } + bundleCollection := generateSupportBundleResource(bundleConfig) + controller.addInternalSupportBundleCollection(bundleCollection, tc.nodeSpan, authentication, expiredAt) + _, exists, err := controller.supportBundleCollectionStore.Get(tc.name) + assert.NoError(t, err) + assert.True(t, exists) + _, exists, err = controller.supportBundleCollectionAppliedToStore.GetByKey(tc.name) + assert.NoError(t, err) + assert.True(t, exists) + if tc.processingNodes { + verifyBundleCollectionAppliedToStoreIndexers(processingNodesIndex, processingNodesIndexValue, tc.name) + } + if tc.processingExternalNodes { + verifyBundleCollectionAppliedToStoreIndexers(processingExternalNodesIndex, tc.externalNodes.namespace, tc.name) + } + } +} + +func TestIsCollectionAvailable(t *testing.T) { + testClient := newTestClient(nil, nil) + controller := newController(testClient) + // prepare test SupportBundleCollections + var testBundleCollections []*v1alpha1.SupportBundleCollection + for _, bc := range []bundleConfig{ + { + name: "b3", + nodes: &bundleNodes{ + names: []string{"n3", "n4"}, + labels: map[string]string{"test": "not-selected"}, + }, + authType: v1alpha1.APIKey, + secretName: "s1", + secretNamespace: "ns1", + }, { + name: "b4", + externalNodes: &bundleExternalNodes{ + namespace: "ns1", + names: []string{"n3", "n4"}, + labels: map[string]string{"test": "not-selected"}, + }, + authType: v1alpha1.APIKey, + secretName: "s1", + secretNamespace: "ns1", + }, { + name: "b5", + externalNodes: &bundleExternalNodes{ + namespace: "ns2", + names: []string{"n3", "n4"}, + labels: map[string]string{"test": "selected"}, + }, + authType: v1alpha1.APIKey, + secretName: "s1", + secretNamespace: "ns1", + }, { + name: "b6", + nodes: &bundleNodes{ + names: []string{"n3", "n4"}, + labels: map[string]string{"test": "not-selected"}, + }, + externalNodes: &bundleExternalNodes{ + namespace: "ns2", + names: []string{"n3", "n4"}, + labels: map[string]string{"test": "selected"}, + }, + authType: v1alpha1.APIKey, + secretName: "s1", + secretNamespace: "ns1", + }, + { + name: "b7", + nodes: &bundleNodes{ + names: []string{"n1", "n2"}, + labels: map[string]string{"test": "selected"}, + }, + authType: v1alpha1.APIKey, + secretName: "s1", + secretNamespace: "ns1", + }, + { + name: "b8", + externalNodes: &bundleExternalNodes{ + namespace: "ns1", + names: []string{"n3", "n4"}, + labels: map[string]string{"test": "not-selected"}, + }, + authType: v1alpha1.APIKey, + secretName: "s1", + secretNamespace: "ns1", + }, + } { + testBundleCollections = append(testBundleCollections, generateSupportBundleResource(bc)) + } + + processingCollections := map[string]*supportBundleCollectionAppliedTo{ + "b0": { + name: "b0", + processNodes: true, + }, + "b1": { + name: "b1", + enNamespace: "ns1", + }, + "b2": { + name: "b2", + processNodes: true, + enNamespace: "ns1", + }, + } + + for _, tc := range []struct { + existedAppliedTo string + availableCollections sets.String + unAvailableCollections sets.String + }{ + { + existedAppliedTo: "", + availableCollections: sets.NewString("b3", "b4", "b5", "b6", "b7", "b8"), + unAvailableCollections: sets.NewString(), + }, + { + existedAppliedTo: "b0", + availableCollections: sets.NewString("b4", "b5", "b8"), + unAvailableCollections: sets.NewString("b3", "b6", "b7"), + }, + { + existedAppliedTo: "b1", + availableCollections: sets.NewString("b3", "b5", "b6", "b7"), + unAvailableCollections: sets.NewString("b4", "b8"), + }, + { + existedAppliedTo: "b2", + availableCollections: sets.NewString("b5"), + unAvailableCollections: sets.NewString("b3", "b4", "b6", "b7", "b8"), + }, + } { + appliedTo, exists := processingCollections[tc.existedAppliedTo] + if exists { + err := controller.supportBundleCollectionAppliedToStore.Add(appliedTo) + assert.NoError(t, err) + } + availableCollections := sets.NewString() + unAvailableCollections := sets.NewString() + for _, collection := range testBundleCollections { + ok := controller.isCollectionAvailable(collection) + if ok { + availableCollections.Insert(collection.Name) + } else { + unAvailableCollections.Insert(collection.Name) + } + } + assert.Equal(t, tc.availableCollections, availableCollections) + assert.Equal(t, tc.unAvailableCollections, unAvailableCollections) + if exists { + err := controller.supportBundleCollectionAppliedToStore.Delete(appliedTo) + assert.NoError(t, err) + } + } +} + +func newController(tc *testClient) *Controller { + nodeInformer := tc.informerFactory.Core().V1().Nodes() + externalNodeInformer := tc.crdInformerFactory.Crd().V1alpha1().ExternalNodes() + supportBundleInformer := tc.crdInformerFactory.Crd().V1alpha1().SupportBundleCollections() + + store := bundlecollectionstore.NewSupportBundleCollectionStore() + fakeController := NewSupportBundleCollectionController(tc.client, tc.crdClient, supportBundleInformer, nodeInformer, externalNodeInformer, store) + return fakeController +} + +func testBundleConfigs() []bundleConfig { + return []bundleConfig{ + { + name: "bundle-created", + nodes: &bundleNodes{ + names: []string{"n1", "n2"}, + }, + authType: v1alpha1.APIKey, + secretName: "secret1", + secretNamespace: "default", + conditions: []v1alpha1.SupportBundleCollectionCondition{}, + phase: pending, + }, + { + name: "bundle-started", + externalNodes: &bundleExternalNodes{ + namespace: "ns2", + names: []string{"en1", "en2"}, + }, + authType: v1alpha1.APIKey, + secretName: "secret1", + secretNamespace: "default", + conditions: []v1alpha1.SupportBundleCollectionCondition{ + { + Type: v1alpha1.CollectionStarted, + Status: metav1.ConditionTrue, + }, + }, + phase: processing, + }, + { + name: "bundle-time-expired", + nodes: &bundleNodes{ + labels: map[string]string{"app": "bundle-test"}, + }, + authType: v1alpha1.APIKey, + secretName: "secret1", + secretNamespace: "default", + conditions: []v1alpha1.SupportBundleCollectionCondition{ + { + Type: v1alpha1.CollectionStarted, + Status: metav1.ConditionTrue, + }, + { + Type: v1alpha1.CollectionCompleted, + Status: metav1.ConditionTrue, + }, + { + Type: v1alpha1.CollectionFailure, + Status: metav1.ConditionTrue, + Reason: string(metav1.StatusReasonExpired), + }, + }, + phase: completed, + }, + { + name: "bundle-failed-start", + externalNodes: &bundleExternalNodes{ + namespace: "ns4", + labels: map[string]string{"app": "bundle-test"}, + }, + authType: v1alpha1.APIKey, + secretName: "secret1", + secretNamespace: "default", + conditions: []v1alpha1.SupportBundleCollectionCondition{ + { + Type: v1alpha1.CollectionStarted, + Status: metav1.ConditionFalse, + Reason: string(metav1.StatusReasonConflict), + }, + }, + phase: pending, + }, + { + name: "bundle-partial-success", + externalNodes: &bundleExternalNodes{ + namespace: "ns5", + labels: map[string]string{"app": "bundle-test"}, + }, + authType: v1alpha1.APIKey, + secretName: "secret1", + secretNamespace: "default", + conditions: []v1alpha1.SupportBundleCollectionCondition{ + { + Type: v1alpha1.CollectionStarted, + Status: metav1.ConditionTrue, + }, + { + Type: v1alpha1.BundleCollected, + Status: metav1.ConditionTrue, + }, + { + Type: v1alpha1.CollectionCompleted, + Status: metav1.ConditionTrue, + }, + { + Type: v1alpha1.CollectionFailure, + Status: metav1.ConditionTrue, + Reason: "Time is expired", + }, + }, + phase: completed, + }, + { + name: "bundle-success", + nodes: &bundleNodes{ + names: []string{"n1", "n6"}, + }, + authType: v1alpha1.APIKey, + secretName: "secret1`", + secretNamespace: "default", + conditions: []v1alpha1.SupportBundleCollectionCondition{ + { + Type: v1alpha1.CollectionStarted, + Status: metav1.ConditionTrue, + }, + { + Type: v1alpha1.BundleCollected, + Status: metav1.ConditionTrue, + }, + { + Type: v1alpha1.CollectionCompleted, + Status: metav1.ConditionTrue, + }, + { + Type: v1alpha1.CollectionFailure, + Status: metav1.ConditionFalse, + }, + }, + phase: completed, + }, + } +} + +func prepareBundleCollections(bundleConfigs []bundleConfig) []runtime.Object { + bundleCollections := make([]runtime.Object, 0) + for _, bc := range bundleConfigs { + collection := generateSupportBundleResource(bc) + bundleCollections = append(bundleCollections, collection) + } + return bundleCollections +} + +func generateSupportBundleResource(b bundleConfig) *v1alpha1.SupportBundleCollection { + bundle := &v1alpha1.SupportBundleCollection{ + ObjectMeta: metav1.ObjectMeta{ + Name: b.name, + CreationTimestamp: metav1.NewTime(time.Now()), + }, + Spec: v1alpha1.SupportBundleCollectionSpec{ + FileServer: v1alpha1.BundleFileServer{ + URL: "https://1.1.1.1:443/supportbundles/upload", + }, + ExpirationMinutes: 60, + SinceTime: "2h", + }, + } + if b.createTime != nil { + bundle.ObjectMeta.CreationTimestamp = metav1.NewTime(*b.createTime) + } + if b.nodes != nil { + bundle.Spec.Nodes = &v1alpha1.BundleNodes{} + if len(b.nodes.names) > 0 { + bundle.Spec.Nodes.NodeNames = b.nodes.names + } + if len(b.nodes.labels) > 0 { + bundle.Spec.Nodes.NodeSelector = &metav1.LabelSelector{ + MatchLabels: b.nodes.labels, + } + } + } + if b.externalNodes != nil { + en := b.externalNodes + exNode := &v1alpha1.BundleExternalNodes{ + Namespace: en.namespace, + } + if len(en.names) > 0 { + exNode.NodeNames = en.names + } + if len(en.labels) > 0 { + exNode.NodeSelector = &metav1.LabelSelector{ + MatchLabels: en.labels, + } + } + bundle.Spec.ExternalNodes = exNode + } + bundle.Spec.Authentication = v1alpha1.BundleServerAuthConfiguration{ + AuthType: b.authType, + AuthSecret: &corev1.SecretReference{ + Namespace: b.secretNamespace, + Name: b.secretName, + }, + } + bundle.Status = v1alpha1.SupportBundleCollectionStatus{ + Conditions: b.conditions, + } + return bundle +} + +func prepareNodes(nodeConfigs []nodeConfig) []runtime.Object { + var nodes []runtime.Object + for _, n := range nodeConfigs { + node := &corev1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: n.name, + Labels: n.labels, + }, + } + nodes = append(nodes, node) + } + return nodes +} + +func prepareExternalNodes(externalNodeConfigs []externalNodeConfig) []runtime.Object { + externalNodes := make([]runtime.Object, 0) + for _, en := range externalNodeConfigs { + externalNode := &v1alpha1.ExternalNode{ + ObjectMeta: metav1.ObjectMeta{ + Name: en.name, + Namespace: en.namespace, + Labels: en.labels, + }, + } + externalNodes = append(externalNodes, externalNode) + } + return externalNodes +} + +func prepareSecrets(ns string, secretConfigs []secretConfig) []*corev1.Secret { + secrets := make([]*corev1.Secret, 0) + for _, s := range secretConfigs { + secret := &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: s.name, + Namespace: ns, + }, + Data: s.data, + } + secrets = append(secrets, secret) + } + return secrets +} + +func prepareTopology() ([]runtime.Object, []runtime.Object) { + var coreObjects, crdObjects []runtime.Object + for _, n := range prepareNodes([]nodeConfig{ + {name: "n1"}, + {name: "n2"}, + {name: "n3", labels: map[string]string{"test": "selected"}}, + {name: "n4", labels: map[string]string{"test": "selected"}}, + {name: "n5", labels: map[string]string{"test": "not-selected"}}, + }) { + coreObjects = append(coreObjects, n) + } + for _, en := range prepareExternalNodes([]externalNodeConfig{ + {namespace: "ns1", name: "en1"}, + {namespace: "ns1", name: "en2"}, + {namespace: "ns1", name: "en3", labels: map[string]string{"test": "selected"}}, + {namespace: "ns1", name: "en4", labels: map[string]string{"test": "not-selected"}}, + {namespace: "ns2", name: "en5", labels: map[string]string{"test": "selected"}}, + }) { + crdObjects = append(crdObjects, en) + } + + apiKey := []byte(testKeyString) + token := []byte(testTokenString) + username := []byte("testUsername") + pwd := []byte("testPassword") + for _, s := range prepareSecrets(secretNamespace, []secretConfig{ + {name: secretWithAPIKey, data: map[string][]byte{secretKeyWithAPIKey: apiKey}}, + {name: secretWithToken, data: map[string][]byte{secretKeyWithBearerToken: token}}, + {name: secretWithBasicAuth, data: map[string][]byte{secretKeyWithUsername: username, secretKeyWithPassword: pwd}}, + }) { + coreObjects = append(coreObjects, s) + } + return coreObjects, crdObjects +} + +type testClient struct { + client kubernetes.Interface + crdClient clientset.Interface + informerFactory informers.SharedInformerFactory + crdInformerFactory crdinformers.SharedInformerFactory +} + +func newTestClient(coreObjects []runtime.Object, crdObjects []runtime.Object) *testClient { + client := fake.NewSimpleClientset(coreObjects...) + crdClient := fakeclientset.NewSimpleClientset(crdObjects...) + return &testClient{ + client: client, + crdClient: crdClient, + informerFactory: informers.NewSharedInformerFactory(client, informerDefaultResync), + crdInformerFactory: crdinformers.NewSharedInformerFactory(crdClient, informerDefaultResync), + } +} + +func (c *testClient) start(stopCh <-chan struct{}) { + c.informerFactory.Start(stopCh) + c.crdInformerFactory.Start(stopCh) +} + +func (c *testClient) waitForSync(stopCh <-chan struct{}) { + c.informerFactory.WaitForCacheSync(stopCh) + c.crdInformerFactory.WaitForCacheSync(stopCh) +} + +func (c *testClient) createSecrets(t *testing.T, ns string, secrets []secretConfig) { + for _, s := range secrets { + secret := &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: s.name, + Namespace: ns, + }, + Data: s.data, + } + _, err := c.client.CoreV1().Secrets(ns).Create(context.TODO(), secret, metav1.CreateOptions{}) + assert.NoError(t, err) + } +} + +func (c *testClient) createSupportBundleCollections(t *testing.T, bundleConfigs []bundleConfig) { + for _, b := range bundleConfigs { + bundle := generateSupportBundleResource(b) + _, err := c.crdClient.CrdV1alpha1().SupportBundleCollections().Create(context.TODO(), bundle, metav1.CreateOptions{}) + require.NoError(t, err) + } +} diff --git a/pkg/controller/supportbundlecollection/store/collection.go b/pkg/controller/supportbundlecollection/store/collection.go new file mode 100644 index 00000000000..ae156468091 --- /dev/null +++ b/pkg/controller/supportbundlecollection/store/collection.go @@ -0,0 +1,143 @@ +// Copyright 2022 Antrea 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 store + +import ( + "fmt" + "reflect" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + + "antrea.io/antrea/pkg/apis/controlplane" + "antrea.io/antrea/pkg/apiserver/storage" + "antrea.io/antrea/pkg/apiserver/storage/ram" + "antrea.io/antrea/pkg/controller/types" +) + +// supportBundleCollectionEvent implements storage.InternalEvent. +type supportBundleCollectionEvent struct { + // The current version of the stored SupportBundleCollection. + currBundleCollection *types.SupportBundleCollection + // The previous version of the stored SupportBundleCollection. + prevBundleCollection *types.SupportBundleCollection + // The key of this SupportBundleCollection. + Key string + ResourceVersion uint64 +} + +// ToWatchEvent converts the supportBundleCollectionEvent to *watch.Event based on the provided Selectors. It has the following features: +// 1. Added event will be generated if the Selectors was not interested in the object but is now. +// 2. Deleted event will be generated if the Selectors was interested in the object but is not now. +func (event *supportBundleCollectionEvent) ToWatchEvent(selectors *storage.Selectors, isInitEvent bool) *watch.Event { + prevObjSelected, currObjSelected := isSelected(event.Key, event.prevBundleCollection, event.currBundleCollection, selectors, isInitEvent) + + switch { + case !currObjSelected && !prevObjSelected: + // Watcher is not interested in that object. + return nil + case currObjSelected && !prevObjSelected: + // Watcher was not interested in that object but is now, an added event will be generated. + obj := new(controlplane.SupportBundleCollection) + ToSupportBundleCollectionMsg(event.currBundleCollection, obj, true) + return &watch.Event{Type: watch.Added, Object: obj} + case !currObjSelected && prevObjSelected: + // Watcher was interested in that object but is not interested now, a deleted event will be generated. + obj := new(controlplane.SupportBundleCollection) + ToSupportBundleCollectionMsg(event.prevBundleCollection, obj, false) + return &watch.Event{Type: watch.Deleted, Object: obj} + } + return nil +} + +func (event *supportBundleCollectionEvent) GetResourceVersion() uint64 { + return event.ResourceVersion +} + +var _ storage.GenEventFunc = genSupportBundleEvent + +// genSupportBundleEvent generates InternalEvent from the given versions of an SupportBundleCollection. +func genSupportBundleEvent(key string, prevObj, currObj interface{}, rv uint64) (storage.InternalEvent, error) { + if reflect.DeepEqual(prevObj, currObj) { + return nil, nil + } + + event := &supportBundleCollectionEvent{Key: key, ResourceVersion: rv} + + if prevObj != nil { + event.prevBundleCollection = prevObj.(*types.SupportBundleCollection) + } + if currObj != nil { + event.currBundleCollection = currObj.(*types.SupportBundleCollection) + } + + return event, nil +} + +// ToSupportBundleCollectionMsg converts the stored SupportBundleCollection to its message form. +// If includeBody is true, the detailed configurations are copied. +func ToSupportBundleCollectionMsg(in *types.SupportBundleCollection, out *controlplane.SupportBundleCollection, includeBody bool) { + out.Name = in.Name + out.UID = in.UID + if !includeBody { + return + } + out.ExpiredAt = in.ExpiredAt + out.SinceTime = in.SinceTime + out.FileServer = controlplane.BundleFileServer{ + URL: in.FileServer.URL, + } + out.Authentication = in.Authentication +} + +// SupportBundleCollectionKeyFunc knows how to get the key of a SupportBundleCollection. +func SupportBundleCollectionKeyFunc(obj interface{}) (string, error) { + bundle, ok := obj.(*types.SupportBundleCollection) + if !ok { + return "", fmt.Errorf("object is not *types.SupportBundleCollection: %v", obj) + } + return bundle.Name, nil +} + +// NewSupportBundleCollectionStore creates a store of SupportBundleCollection. +func NewSupportBundleCollectionStore() storage.Interface { + return ram.NewStore(SupportBundleCollectionKeyFunc, nil, genSupportBundleEvent, keyAndSpanSelectFunc, func() runtime.Object { return new(controlplane.SupportBundleCollection) }) +} + +// keyAndSpanSelectFunc returns whether the provided selectors match the key and/or the nodeNames. +func keyAndSpanSelectFunc(selectors *storage.Selectors, key string, obj interface{}) bool { + // If Key is present in selectors, the provided key must match it. + if selectors.Key != "" && key != selectors.Key { + return false + } + // If nodeName is present in selectors' Field selector, the provided nodeNames must contain it. + if nodeName, found := selectors.Field.RequiresExactMatch("nodeName"); found { + if !obj.(types.Span).Has(nodeName) { + return false + } + } + return true +} + +// isSelected determines if the previous and the current version of an object should be selected by the given selectors. +func isSelected(key string, prevObj, currObj interface{}, selectors *storage.Selectors, isInitEvent bool) (bool, bool) { + // We have filtered out init events that we are not interested in, so the current object must be selected. + if isInitEvent { + return false, true + } + prevObjSelected := !reflect.ValueOf(prevObj).IsNil() && keyAndSpanSelectFunc(selectors, key, prevObj) + currObjSelected := !reflect.ValueOf(currObj).IsNil() && keyAndSpanSelectFunc(selectors, key, currObj) + return prevObjSelected, currObjSelected +} diff --git a/pkg/controller/supportbundlecollection/validate.go b/pkg/controller/supportbundlecollection/validate.go new file mode 100644 index 00000000000..277d9aaba04 --- /dev/null +++ b/pkg/controller/supportbundlecollection/validate.go @@ -0,0 +1,89 @@ +// Copyright 2022 Antrea 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 supportbundlecollection + +import ( + "encoding/json" + "fmt" + "reflect" + + admv1 "k8s.io/api/admission/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/klog/v2" + + crdv1alpha1 "antrea.io/antrea/pkg/apis/crd/v1alpha1" +) + +func (c *Controller) Validate(review *admv1.AdmissionReview) *admv1.AdmissionResponse { + klog.V(2).Info("Validating SupportBundleCollection", "request", review.Request) + var newObj, oldObj crdv1alpha1.SupportBundleCollection + if review.Request.Object.Raw != nil { + if err := json.Unmarshal(review.Request.Object.Raw, &newObj); err != nil { + klog.ErrorS(err, "Error de-serializing current SupportBundleCollection") + return newAdmissionResponseForErr(err) + } + } + if review.Request.OldObject.Raw != nil { + if err := json.Unmarshal(review.Request.OldObject.Raw, &oldObj); err != nil { + klog.ErrorS(err, "Error de-serializing old IPPool") + return newAdmissionResponseForErr(err) + } + } + + validateProcessingCollection := func() *admv1.AdmissionResponse { + var msg string + allowed := true + _, exists, _ := c.supportBundleCollectionStore.Get(oldObj.Name) + if exists { + allowed = reflect.DeepEqual(oldObj.Spec, newObj.Spec) + if !allowed { + msg = fmt.Sprintf("SupportBundleCollection %s is started, cannot be updated", oldObj.Name) + } + } + return validationResult(allowed, msg) + } + + if review.Request.Operation == admv1.Update { + klog.V(2).Info("Validating UPDATE request for SupportBundleCollection") + if isCollectionCompleted(&oldObj) { + return validationResult(false, fmt.Sprintf("SupportBundleCollection %s is completed, cannot be updated", oldObj.Name)) + } + return validateProcessingCollection() + } + + return &admv1.AdmissionResponse{Allowed: true} +} + +func newAdmissionResponseForErr(err error) *admv1.AdmissionResponse { + return &admv1.AdmissionResponse{ + Result: &metav1.Status{ + Message: err.Error(), + }, + } +} + +func validationResult(allowed bool, msg string) *admv1.AdmissionResponse { + var result *metav1.Status + + if msg != "" { + result = &metav1.Status{ + Message: msg, + } + } + return &admv1.AdmissionResponse{ + Allowed: allowed, + Result: result, + } +} diff --git a/pkg/controller/supportbundlecollection/validate_test.go b/pkg/controller/supportbundlecollection/validate_test.go new file mode 100644 index 00000000000..11b5f80b762 --- /dev/null +++ b/pkg/controller/supportbundlecollection/validate_test.go @@ -0,0 +1,245 @@ +// Copyright 2022 Antrea 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 supportbundlecollection + +import ( + "encoding/json" + "testing" + "time" + + "github.com/stretchr/testify/assert" + adminv1 "k8s.io/api/admission/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/sets" + + "antrea.io/antrea/pkg/apis/controlplane" + crdv1alpha1 "antrea.io/antrea/pkg/apis/crd/v1alpha1" +) + +func TestValidateSupportBundleCollection(t *testing.T) { + bundleCollection := generateSupportBundleResource(bundleConfig{ + name: "b1", + nodes: &bundleNodes{ + labels: map[string]string{"test": "selected"}, + }, + externalNodes: &bundleExternalNodes{ + namespace: "ns1", + labels: map[string]string{"test": "selected"}, + }, + authType: crdv1alpha1.APIKey, + }) + authentication := &controlplane.BundleServerAuthConfiguration{ + APIKey: "bundle_api_key", + } + nodeSpan := sets.NewString("n1", "n2", "n3", "n4") + expiredAt := metav1.NewTime(time.Now().Add(time.Minute)) + + tests := []struct { + name string + existsInCache bool + existingStatus *crdv1alpha1.SupportBundleCollectionStatus + updatedCollection *bundleConfig + requestOperation adminv1.Operation + expectedResponse *adminv1.AdmissionResponse + }{ + { + name: "update before started", + existsInCache: false, + requestOperation: adminv1.Update, + updatedCollection: &bundleConfig{ + name: "b1", + nodes: &bundleNodes{ + labels: map[string]string{"test": "selected"}, + }, + externalNodes: &bundleExternalNodes{ + namespace: "ns1", + labels: map[string]string{"test": "selected"}, + names: []string{"en1"}, + }, + authType: crdv1alpha1.APIKey, + }, + expectedResponse: &adminv1.AdmissionResponse{Allowed: true}, + }, { + name: "delete before started", + existsInCache: false, + requestOperation: adminv1.Delete, + expectedResponse: &adminv1.AdmissionResponse{Allowed: true}, + }, { + name: "update after started", + existsInCache: true, + requestOperation: adminv1.Update, + updatedCollection: &bundleConfig{ + name: "b1", + nodes: &bundleNodes{ + labels: map[string]string{"test": "selected"}, + }, + externalNodes: &bundleExternalNodes{ + namespace: "ns1", + labels: map[string]string{"test": "selected"}, + names: []string{"en1"}, + }, + authType: crdv1alpha1.APIKey, + }, + expectedResponse: &adminv1.AdmissionResponse{ + Allowed: false, + Result: &metav1.Status{ + Message: "SupportBundleCollection b1 is started, cannot be updated", + }, + }, + }, { + name: "update status after started", + existsInCache: true, + requestOperation: adminv1.Update, + existingStatus: &crdv1alpha1.SupportBundleCollectionStatus{ + Conditions: []crdv1alpha1.SupportBundleCollectionCondition{ + {Type: crdv1alpha1.CollectionStarted, Status: metav1.ConditionTrue}, + }, + }, + updatedCollection: &bundleConfig{ + name: "b1", + nodes: &bundleNodes{ + labels: map[string]string{"test": "selected"}, + }, + externalNodes: &bundleExternalNodes{ + namespace: "ns1", + labels: map[string]string{"test": "selected"}, + }, + authType: crdv1alpha1.APIKey, + conditions: []crdv1alpha1.SupportBundleCollectionCondition{ + {Status: metav1.ConditionTrue, Type: crdv1alpha1.CollectionStarted}, + {Status: metav1.ConditionTrue, Type: crdv1alpha1.BundleCollected}, + }, + }, + expectedResponse: &adminv1.AdmissionResponse{Allowed: true}, + }, { + name: "update after completed", + existsInCache: true, + requestOperation: adminv1.Update, + existingStatus: &crdv1alpha1.SupportBundleCollectionStatus{ + Conditions: []crdv1alpha1.SupportBundleCollectionCondition{ + {Type: crdv1alpha1.CollectionStarted, Status: metav1.ConditionTrue}, + {Type: crdv1alpha1.CollectionCompleted, Status: metav1.ConditionTrue}, + }, + }, + updatedCollection: &bundleConfig{ + name: "b1", + nodes: &bundleNodes{ + labels: map[string]string{"test": "selected"}, + }, + externalNodes: &bundleExternalNodes{ + namespace: "ns1", + labels: map[string]string{"test": "selected"}, + names: []string{"en1"}, + }, + authType: crdv1alpha1.APIKey, + }, + expectedResponse: &adminv1.AdmissionResponse{ + Allowed: false, + Result: &metav1.Status{ + Message: "SupportBundleCollection b1 is completed, cannot be updated", + }, + }, + }, { + name: "update status after completed", + existsInCache: true, + requestOperation: adminv1.Update, + existingStatus: &crdv1alpha1.SupportBundleCollectionStatus{ + Conditions: []crdv1alpha1.SupportBundleCollectionCondition{ + {Type: crdv1alpha1.CollectionStarted, Status: metav1.ConditionTrue}, + {Type: crdv1alpha1.CollectionCompleted, Status: metav1.ConditionTrue}, + }, + }, + updatedCollection: &bundleConfig{ + name: "b1", + nodes: &bundleNodes{ + labels: map[string]string{"test": "selected"}, + }, + externalNodes: &bundleExternalNodes{ + namespace: "ns1", + labels: map[string]string{"test": "selected"}, + }, + authType: crdv1alpha1.APIKey, + conditions: []crdv1alpha1.SupportBundleCollectionCondition{ + {Status: metav1.ConditionTrue, Type: crdv1alpha1.CollectionStarted}, + {Status: metav1.ConditionTrue, Type: crdv1alpha1.BundleCollected}, + }, + }, + expectedResponse: &adminv1.AdmissionResponse{ + Allowed: false, + Result: &metav1.Status{ + Message: "SupportBundleCollection b1 is completed, cannot be updated", + }, + }, + }, { + name: "delete after started", + existsInCache: true, + existingStatus: &crdv1alpha1.SupportBundleCollectionStatus{ + Conditions: []crdv1alpha1.SupportBundleCollectionCondition{ + {Type: crdv1alpha1.CollectionStarted, Status: metav1.ConditionTrue}, + }, + }, + requestOperation: adminv1.Delete, + expectedResponse: &adminv1.AdmissionResponse{Allowed: true}, + }, { + name: "delete after completed", + existsInCache: true, + requestOperation: adminv1.Delete, + existingStatus: &crdv1alpha1.SupportBundleCollectionStatus{ + Conditions: []crdv1alpha1.SupportBundleCollectionCondition{ + {Type: crdv1alpha1.CollectionStarted, Status: metav1.ConditionTrue}, + {Type: crdv1alpha1.CollectionCompleted, Status: metav1.ConditionTrue}, + }, + }, + expectedResponse: &adminv1.AdmissionResponse{Allowed: true}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + stopCh := make(chan struct{}) + defer close(stopCh) + testClient := newTestClient(nil, nil) + controller := newController(testClient) + testClient.start(stopCh) + testClient.waitForSync(stopCh) + if tt.existsInCache { + controller.addInternalSupportBundleCollection(bundleCollection, nodeSpan, authentication, expiredAt) + } + oldBundleCollection := bundleCollection + if tt.existingStatus != nil { + oldBundleCollection.Status = *tt.existingStatus + } + newBundleCollection := oldBundleCollection + if tt.updatedCollection != nil { + newBundleCollection = generateSupportBundleResource(*tt.updatedCollection) + } + review := &adminv1.AdmissionReview{ + Request: &adminv1.AdmissionRequest{ + Name: bundleCollection.Name, + Operation: tt.requestOperation, + OldObject: runtime.RawExtension{Raw: marshal(oldBundleCollection)}, + Object: runtime.RawExtension{Raw: marshal(newBundleCollection)}, + }, + } + gotResponse := controller.Validate(review) + assert.Equal(t, tt.expectedResponse, gotResponse) + }) + } +} + +func marshal(object runtime.Object) []byte { + raw, _ := json.Marshal(object) + return raw +} diff --git a/pkg/controller/types/support_bundle_collection.go b/pkg/controller/types/support_bundle_collection.go new file mode 100644 index 00000000000..65f3c5307d2 --- /dev/null +++ b/pkg/controller/types/support_bundle_collection.go @@ -0,0 +1,35 @@ +// Copyright 2022 Antrea Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + "antrea.io/antrea/pkg/apis/controlplane" + "antrea.io/antrea/pkg/apis/crd/v1alpha1" +) + +type SupportBundleCollection struct { + SpanMeta + // UID of the internal SupportBundleCollection. + UID types.UID + // Name of the internal SupportBundleCollection, must be unique across all Support Bundle types + Name string + ExpiredAt metav1.Time + SinceTime string + FileServer v1alpha1.BundleFileServer + Authentication controlplane.BundleServerAuthConfiguration +} diff --git a/pkg/features/antrea_features.go b/pkg/features/antrea_features.go index 4049d3e8a66..c8a28e7cfa0 100644 --- a/pkg/features/antrea_features.go +++ b/pkg/features/antrea_features.go @@ -112,6 +112,10 @@ const ( // alpha: v1.8 // Enable running agent on an unmanaged VM/BM. ExternalNode featuregate.Feature = "ExternalNode" + + // alpha: v1.9 + // Enable collecting support bundle files with SupportBundleCollection CRD. + SupportBundleCollection featuregate.Feature = "SupportBundleCollection" ) var ( @@ -126,24 +130,25 @@ var ( // To add a new feature, define a key for it above and add it here. The features will be // available throughout Antrea binaries. DefaultAntreaFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{ - AntreaPolicy: {Default: true, PreRelease: featuregate.Beta}, - AntreaProxy: {Default: true, PreRelease: featuregate.Beta}, - Egress: {Default: true, PreRelease: featuregate.Beta}, - EndpointSlice: {Default: false, PreRelease: featuregate.Alpha}, - TopologyAwareHints: {Default: false, PreRelease: featuregate.Alpha}, - Traceflow: {Default: true, PreRelease: featuregate.Beta}, - AntreaIPAM: {Default: false, PreRelease: featuregate.Alpha}, - FlowExporter: {Default: false, PreRelease: featuregate.Alpha}, - NetworkPolicyStats: {Default: true, PreRelease: featuregate.Beta}, - NodePortLocal: {Default: true, PreRelease: featuregate.Beta}, - NodeIPAM: {Default: false, PreRelease: featuregate.Alpha}, - Multicast: {Default: false, PreRelease: featuregate.Alpha}, - Multicluster: {Default: false, PreRelease: featuregate.Alpha}, - SecondaryNetwork: {Default: false, PreRelease: featuregate.Alpha}, - ServiceExternalIP: {Default: false, PreRelease: featuregate.Alpha}, - TrafficControl: {Default: false, PreRelease: featuregate.Alpha}, - IPsecCertAuth: {Default: false, PreRelease: featuregate.Alpha}, - ExternalNode: {Default: false, PreRelease: featuregate.Alpha}, + AntreaPolicy: {Default: true, PreRelease: featuregate.Beta}, + AntreaProxy: {Default: true, PreRelease: featuregate.Beta}, + Egress: {Default: true, PreRelease: featuregate.Beta}, + EndpointSlice: {Default: false, PreRelease: featuregate.Alpha}, + TopologyAwareHints: {Default: false, PreRelease: featuregate.Alpha}, + Traceflow: {Default: true, PreRelease: featuregate.Beta}, + AntreaIPAM: {Default: false, PreRelease: featuregate.Alpha}, + FlowExporter: {Default: false, PreRelease: featuregate.Alpha}, + NetworkPolicyStats: {Default: true, PreRelease: featuregate.Beta}, + NodePortLocal: {Default: true, PreRelease: featuregate.Beta}, + NodeIPAM: {Default: false, PreRelease: featuregate.Alpha}, + Multicast: {Default: false, PreRelease: featuregate.Alpha}, + Multicluster: {Default: false, PreRelease: featuregate.Alpha}, + SecondaryNetwork: {Default: false, PreRelease: featuregate.Alpha}, + ServiceExternalIP: {Default: false, PreRelease: featuregate.Alpha}, + TrafficControl: {Default: false, PreRelease: featuregate.Alpha}, + IPsecCertAuth: {Default: false, PreRelease: featuregate.Alpha}, + ExternalNode: {Default: false, PreRelease: featuregate.Alpha}, + SupportBundleCollection: {Default: false, PreRelease: featuregate.Alpha}, } // UnsupportedFeaturesOnWindows records the features not supported on @@ -171,9 +176,10 @@ var ( // Node. Antrea Agent checks the enabled features if it is running on an // unmanaged VM/BM, and fails the startup if an unsupported feature is enabled. supportedFeaturesOnExternalNode = map[featuregate.Feature]struct{}{ - ExternalNode: {}, - AntreaPolicy: {}, - NetworkPolicyStats: {}, + ExternalNode: {}, + AntreaPolicy: {}, + NetworkPolicyStats: {}, + SupportBundleCollection: {}, } )