Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question regarding protobuf issue #105

Open
johnSchnake opened this issue Mar 10, 2022 · 0 comments
Open

Question regarding protobuf issue #105

johnSchnake opened this issue Mar 10, 2022 · 0 comments

Comments

@johnSchnake
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant