Hi,

I am unsure exactly who this concerns, but I have been using the `ginkgo` conformance tests for my project [nodejs-k8s](https://github.com/Megapixel99/nodejs-k8s) and I have been running into some issues parsing the protobuf data which is sent from the tests. I am not entirely sure if I am doing something incorrectly (or if this is even the correct project for this issue); however, assuming I am doing everything properly, the protobuf data being sent from the tests seems to be corrupted.

The command I am using to run the tests is:
`kubetest2 noop --kubeconfig=./test-config --v 10 --test=ginkgo`

and my `kubeconfig` file can be found here: 
https://github.com/Megapixel99/nodejs-k8s/blob/f2c0f14f17b16d3093aa33a45dfdcd01b373c460/test-config

When running the tests I am logging the method, headers, and body of every request sent to the server [via this code here](https://github.com/Megapixel99/nodejs-k8s/blob/f2c0f14f17b16d3093aa33a45dfdcd01b373c460/index.js#L90-L95). Upon decoding the protobuf data; however, I am constantly getting errors.

For example, the payload sent with this test: `[sig-node] Secrets should be consumable from pods in env vars [NodeConformance] [Conformance]` when converted using `NodeJS`s built-in [`Buffer.toString`](https://nodejs.org/api/buffer.html#buftostringencoding-start-end) method I get the following results:

converted to base64 it is:
```
azhzAAoPCgJ2MRIJTmFtZXNwYWNlEvsBCvIBCgxzZWNyZXRzLTg0ODASABoAIgAqADIAOABCAFoYCg1lMmUtZnJhbWV3b3JrEgdzZWNyZXRzWi8KB2UyZS1ydW4SJDBkMTNmYmNlLWNmMzMtNDFkNS05YmJiLWQyZDY3YjEwMzBkOVosCiBwb2Qtc2VjdXJpdHkua3ViZXJuZXRlcy5pby9hdWRpdBIIYmFzZWxpbmVaLgoicG9kLXNlY3VyaXR5Lmt1YmVybmV0ZXMuaW8vZW5mb3JjZRIIYmFzZWxpbmVaKwofcG9kLXNlY3VyaXR5Lmt1YmVybmV0ZXMuaW8vd2FybhIIYmFzZWxpbmUSABoCCgAaACIA
``` 
and converted to UTF-8 it is:
```
k8s

v1	Namespace�
�

secrets-8480"*28BZ
e2e-frameworksecretsZ/
e2e-run$0d13fbce-cf33-41d5-9bbb-d2d67b1030d9Z,
 pod-security.kubernetes.io/audibaselineZ.
"pod-security.kubernetes.io/enforcbaselineZ+
pod-security.kubernetes.io/warbaseline
"
```
and converted to binary it is:
```
k8s

v1	Namespaceû
ò

secrets-8480"*28BZ
e2e-frameworksecretsZ/
e2e-run$0d13fbce-cf33-41d5-9bbb-d2d67b1030d9Z,
 pod-security.kubernetes.io/audibaselineZ.
"pod-security.kubernetes.io/enforcbaselineZ+
pod-security.kubernetes.io/warbaseline
"
```
When showing the hidden characters with [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) (after converting the data to UTF-8) I see:
```
k8s\u0000\n\u000f\n\u0002v1\u0012\tNamespace\u0012�\u0002\n�\u0001\n\u000fsecrets-8480\u0012\u0000\u001a\u0000\"\u0000*\u00002\u00008\u0000B\u0000Z\u001b\n\re2e-framework\u0012\nnamespacesZ/\n\u0007e2e-run\u0012$0d13fbce-cf33-41d5-9bbb-d2d67b1030d9Z,\n pod-security.kubernetes.io/audit\u0012\bbaselineZ.\n\"pod-security.kubernetes.io/enforce\u0012\bbaselineZ+\n\u001fpod-security.kubernetes.io/warn\u0012\bbaseline\u0012\u0000\u001a\u0002\n\u0000\u001a\u0000\"\u0000
```
Upon trying to decode the base64 data above in https://www.protobufpal.com/ using the proto below (which was taken from [this file](https://github.com/kubernetes/kubernetes/blob/1ebc3d2a6480f3679c28d0bc3d486ad93e95084f/staging/src/k8s.io/api/core/v1/generated.proto#L2376) and modified slightly to fix the references):
```
syntax = "proto2";

package openapitools;

import "google/protobuf/struct.proto";

message Namespace {
  optional ObjectMeta metadata = 1;
  optional NamespaceSpec spec = 2;
  optional NamespaceStatus status = 3;
}
message NamespaceCondition {
  optional string type = 1;
  optional string status = 2;
  optional Time lastTransitionTime = 4;
  optional string reason = 5;
  optional string message = 6;
}
message NamespaceSpec {
  repeated string finalizers = 1;
}
message NamespaceStatus {
  optional string phase = 1;
  repeated NamespaceCondition conditions = 2;
}
message ObjectMeta {
  optional string name = 1;
  optional string generateName = 2;
  optional string namespace = 3;
  optional string selfLink = 4;
  optional string uid = 5;
  optional string resourceVersion = 6;
  optional int64 generation = 7;
  optional Time creationTimestamp = 8;
  optional Time deletionTimestamp = 9;
  optional int64 deletionGracePeriodSeconds = 10;
  map<string, string> labels = 11;
  map<string, string> annotations = 12;
  repeated OwnerReference ownerReferences = 13;
  repeated string finalizers = 14;
  repeated ManagedFieldsEntry managedFields = 17;
}
message OwnerReference {
  optional string apiVersion = 5;
  optional string kind = 1;
  optional string name = 3;
  optional string uid = 4;
  optional bool controller = 6;
  optional bool blockOwnerDeletion = 7;
}
message ManagedFieldsEntry {
  optional string manager = 1;
  optional string operation = 2;
  optional string apiVersion = 3;
  optional Time time = 4;
  optional string fieldsType = 6;
  optional FieldsV1 fieldsV1 = 7;
  optional string subresource = 8;
}
message FieldsV1 {
  optional bytes Raw = 1;
}
message Time {
  optional int64 seconds = 1;
  optional int32 nanos = 2;
}
```
I receive the error `Unable to parse encoded message`, also when trying to parse the protobuf data using [protobufjs](https://www.npmjs.com/package/protobufjs) and the same proto as above I receive the error:
```
Error: invalid wire type 7 at offset 6
    at Reader.skipType (/Users/seth/Desktop/temp/coding/k8s/node_modules/protobufjs/src/reader.js:382:19)
    at Reader.skipType (/Users/seth/Desktop/temp/coding/k8s/node_modules/protobufjs/src/reader.js:373:22)
```
And wire type 7 is an indicator of a corrupted buffer as mentioned here: https://github.com/protobufjs/protobuf.js/wiki/How-to-reverse-engineer-a-buffer-by-hand#so-what-are-those-wire-types.

While it is possible that I am doing something wrong. Everything I have read about protocol buffers seems to indicate the protobuf data sent in the http request should (almost) match the spec defined in the proto file ie
```
{
  1: value,
  2: value,
  ....
}
```
and not what I am currently seeing.

Let me know if I need to provide anything else or if I am doing something incorrectly.
Conformance tests possibly sending corrupt protobuf (Protocol Buffer) data?
This is a GitHub Issue
repo:kubernetes
owner:kubernetes
Title : Conformance tests possibly sending corrupt protobuf (Protocol Buffer) data?
Issue date:

--- start body ---
Hi,

I am unsure exactly who this concerns, but I have been using the `ginkgo` conformance tests for my project [nodejs-k8s](https://github.com/Megapixel99/nodejs-k8s) and I have been running into some issues parsing the protobuf data which is sent from the tests. I am not entirely sure if I am doing something incorrectly (or if this is even the correct project for this issue); however, assuming I am doing everything properly, the protobuf data being sent from the tests seems to be corrupted.

The command I am using to run the tests is:
`kubetest2 noop --kubeconfig=./test-config --v 10 --test=ginkgo`

and my `kubeconfig` file can be found here: 
https://github.com/Megapixel99/nodejs-k8s/blob/f2c0f14f17b16d3093aa33a45dfdcd01b373c460/test-config

When running the tests I am logging the method, headers, and body of every request sent to the server [via this code here](https://github.com/Megapixel99/nodejs-k8s/blob/f2c0f14f17b16d3093aa33a45dfdcd01b373c460/index.js#L90-L95). Upon decoding the protobuf data; however, I am constantly getting errors.

For example, the payload sent with this test: `[sig-node] Secrets should be consumable from pods in env vars [NodeConformance] [Conformance]` when converted using `NodeJS`s built-in [`Buffer.toString`](https://nodejs.org/api/buffer.html#buftostringencoding-start-end) method I get the following results:

converted to base64 it is:
```
azhzAAoPCgJ2MRIJTmFtZXNwYWNlEvsBCvIBCgxzZWNyZXRzLTg0ODASABoAIgAqADIAOABCAFoYCg1lMmUtZnJhbWV3b3JrEgdzZWNyZXRzWi8KB2UyZS1ydW4SJDBkMTNmYmNlLWNmMzMtNDFkNS05YmJiLWQyZDY3YjEwMzBkOVosCiBwb2Qtc2VjdXJpdHkua3ViZXJuZXRlcy5pby9hdWRpdBIIYmFzZWxpbmVaLgoicG9kLXNlY3VyaXR5Lmt1YmVybmV0ZXMuaW8vZW5mb3JjZRIIYmFzZWxpbmVaKwofcG9kLXNlY3VyaXR5Lmt1YmVybmV0ZXMuaW8vd2FybhIIYmFzZWxpbmUSABoCCgAaACIA
``` 
and converted to UTF-8 it is:
```
k8s

v1	Namespace�
�

secrets-8480"*28BZ
e2e-frameworksecretsZ/
e2e-run$0d13fbce-cf33-41d5-9bbb-d2d67b1030d9Z,
 pod-security.kubernetes.io/audibaselineZ.
"pod-security.kubernetes.io/enforcbaselineZ+
pod-security.kubernetes.io/warbaseline
"
```
and converted to binary it is:
```
k8s

v1	Namespaceû
ò

secrets-8480"*28BZ
e2e-frameworksecretsZ/
e2e-run$0d13fbce-cf33-41d5-9bbb-d2d67b1030d9Z,
 pod-security.kubernetes.io/audibaselineZ.
"pod-security.kubernetes.io/enforcbaselineZ+
pod-security.kubernetes.io/warbaseline
"
```
When showing the hidden characters with [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) (after converting the data to UTF-8) I see:
```
k8s\u0000\n\u000f\n\u0002v1\u0012\tNamespace\u0012�\u0002\n�\u0001\n\u000fsecrets-8480\u0012\u0000\u001a\u0000\"\u0000*\u00002\u00008\u0000B\u0000Z\u001b\n\re2e-framework\u0012\nnamespacesZ/\n\u0007e2e-run\u0012$0d13fbce-cf33-41d5-9bbb-d2d67b1030d9Z,\n pod-security.kubernetes.io/audit\u0012\bbaselineZ.\n\"pod-security.kubernetes.io/enforce\u0012\bbaselineZ+\n\u001fpod-security.kubernetes.io/warn\u0012\bbaseline\u0012\u0000\u001a\u0002\n\u0000\u001a\u0000\"\u0000
```
Upon trying to decode the base64 data above in https://www.protobufpal.com/ using the proto below (which was taken from [this file](https://github.com/kubernetes/kubernetes/blob/1ebc3d2a6480f3679c28d0bc3d486ad93e95084f/staging/src/k8s.io/api/core/v1/generated.proto#L2376) and modified slightly to fix the references):
```
syntax = "proto2";

package openapitools;

import "google/protobuf/struct.proto";

message Namespace {
  optional ObjectMeta metadata = 1;
  optional NamespaceSpec spec = 2;
  optional NamespaceStatus status = 3;
}
message NamespaceCondition {
  optional string type = 1;
  optional string status = 2;
  optional Time lastTransitionTime = 4;
  optional string reason = 5;
  optional string message = 6;
}
message NamespaceSpec {
  repeated string finalizers = 1;
}
message NamespaceStatus {
  optional string phase = 1;
  repeated NamespaceCondition conditions = 2;
}
message ObjectMeta {
  optional string name = 1;
  optional string generateName = 2;
  optional string namespace = 3;
  optional string selfLink = 4;
  optional string uid = 5;
  optional string resourceVersion = 6;
  optional int64 generation = 7;
  optional Time creationTimestamp = 8;
  optional Time deletionTimestamp = 9;
  optional int64 deletionGracePeriodSeconds = 10;
  map<string, string> labels = 11;
  map<string, string> annotations = 12;
  repeated OwnerReference ownerReferences = 13;
  repeated string finalizers = 14;
  repeated ManagedFieldsEntry managedFields = 17;
}
message OwnerReference {
  optional string apiVersion = 5;
  optional string kind = 1;
  optional string name = 3;
  optional string uid = 4;
  optional bool controller = 6;
  optional bool blockOwnerDeletion = 7;
}
message ManagedFieldsEntry {
  optional string manager = 1;
  optional string operation = 2;
  optional string apiVersion = 3;
  optional Time time = 4;
  optional string fieldsType = 6;
  optional FieldsV1 fieldsV1 = 7;
  optional string subresource = 8;
}
message FieldsV1 {
  optional bytes Raw = 1;
}
message Time {
  optional int64 seconds = 1;
  optional int32 nanos = 2;
}
```
I receive the error `Unable to parse encoded message`, also when trying to parse the protobuf data using [protobufjs](https://www.npmjs.com/package/protobufjs) and the same proto as above I receive the error:
```
Error: invalid wire type 7 at offset 6
    at Reader.skipType (/Users/seth/Desktop/temp/coding/k8s/node_modules/protobufjs/src/reader.js:382:19)
    at Reader.skipType (/Users/seth/Desktop/temp/coding/k8s/node_modules/protobufjs/src/reader.js:373:22)
```
And wire type 7 is an indicator of a corrupted buffer as mentioned here: https://github.com/protobufjs/protobuf.js/wiki/How-to-reverse-engineer-a-buffer-by-hand#so-what-are-those-wire-types.

While it is possible that I am doing something wrong. Everything I have read about protocol buffers seems to indicate the protobuf data sent in the http request should (almost) match the spec defined in the proto file ie
```
{
  1: value,
  2: value,
  ....
}
```
and not what I am currently seeing.

Let me know if I need to provide anything else or if I am doing something incorrectly.
--- end body ---
