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

Discrepancy between IAMPartialPolicy CRD and the Go Client Type #495

Closed
2 of 3 tasks
lostick opened this issue Jun 28, 2021 · 3 comments
Closed
2 of 3 tasks

Discrepancy between IAMPartialPolicy CRD and the Go Client Type #495

lostick opened this issue Jun 28, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@lostick
Copy link

lostick commented Jun 28, 2021

Checklist

  • I did not find a related open issue.
  • I did not find a solution in the troubleshooting guide
  • If this issue is time-sensitive, I have submitted a corresponding issue with GCP support.

Bug Description

I'm unable to create an IAMPartialPolicy resource with the latest version (1.54.0) of Config Connector.
The Go client throws an error, as IAMPartialPolicySpec does not match the CRD schema def.

Solution:
Use IAMResourceRef type in IAMPartialPolicySpec.

type IAMPartialPolicySpec struct {
	/* Optional. The list of IAM bindings managed by Config Connector. */
	// +optional
	Bindings []PartialpolicyBindings `json:"bindings,omitempty"`

	/* Immutable. Required. The GCP resource to set the IAM policy on (e.g. organization, project...) */
	ResourceRef v1alpha1.IAMResourceRef `json:"resourceRef"`
}

Additional Diagnostic Information

Kubernetes Cluster Version

v1.19.9-gke.1900

Config Connector Version

1.54.0

Config Connector Mode

cluster

Log Output

E0627 20:28:36.073935       1 iam.go:33] Unable to create IAM Policy abc-iam-role-admin: IAMPartialPolicy.iam.cnrm.cloud.google.com "abc-iam-role-admin" is invalid: spec.resourceRef.kind: Required value

Steps to Reproduce

Steps to reproduce the issue

Create a new iamv1beta1.IAMPartialPolicy resource with the Go client.

@lostick lostick added the bug Something isn't working label Jun 28, 2021
@xiaobaitusi
Copy link
Contributor

Hi @lostick, thanks for reporting the issue. We will look into fixing this!

@xiaobaitusi
Copy link
Contributor

v1.55.0 should have fixed this issue. Let us know if that works!

@lostick
Copy link
Author

lostick commented Jul 7, 2021

Thanks @xiaobaitusi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants