Skip to content

Question regarding protobuf issue #105

Open
@johnSchnake

Description

@johnSchnake

I'm not sure if this is a bug or I'm missing something basic.

I've used isopod to s=kube.get(secret=...) and I can print the secret and it has all the correct information. However, if I try to print s.type I get a panic:

panic: valueToStarlark: unknown type v1.SecretType

goroutine 1 [running]:
github.com/stripe/skycfg/internal/go/skycfg.valueToStarlark({0x20c9340, 0xc0004ae3b0, 0xc00041ab18})
	/Users/jschnake/go/pkg/mod/github.com/stripe/skycfg@v0.1.0/internal/go/skycfg/proto_message.go:307 +0x5a8
github.com/stripe/skycfg/internal/go/skycfg.(*skyProtoMessage).Attr(0xc00040e6c0, {0xc00041ab18, 0xc00040e6c0})
	/Users/jschnake/go/pkg/mod/github.com/stripe/skycfg@v0.1.0/internal/go/skycfg/proto_message.go:162 +0x145

The protobuf code has the type field there though:

// Secret holds secret data of a certain type. The total bytes of the values in
// the Data field must be less than MaxSecretSize bytes.
message Secret {
  // Standard object's metadata.
  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  // +optional
  optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  ...
  ...
  // Used to facilitate programmatic handling of secret data.
  // +optional
  optional string type = 3;
}

I feel like I must be missing something? Any help would be appreciated as I'm new to trying to utilize the protobuf code. Its mostly unnecessary for my use-case but I really wanted to utilize the kube built-ins you wrote. If you have a suggestion there I'd be open to it. It seemed difficult to pull out the kube built-ins on their own.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions