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

IAMPolicyMember GoClient resourceRef type doesn't match schema in document #413

Closed
2 of 3 tasks
micnncim opened this issue Mar 2, 2021 · 6 comments
Closed
2 of 3 tasks
Labels
bug Something isn't working

Comments

@micnncim
Copy link

micnncim commented Mar 2, 2021

Checklist

Bug Description

I'm trying to use the Go client package for IAMPolicyMember based on https://cloud.google.com/config-connector/docs/reference/resource-docs/iam/iampolicymember#external_project_level_policy_member. But the package doesn't match the schema in the document.

In the doc:

// ...
  spec:
    member: serviceAccount:iampolicymember-dep-projectlevel@${PROJECT_ID?}.iam.gserviceaccount.com
    role: roles/storage.admin
    resourceRef:
      apiVersion: resourcemanager.cnrm.cloud.google.com/v1beta1
      kind: Project
      external: projects/${PROJECT_ID?}

In the package (https://github.com/GoogleCloudPlatform/k8s-config-connector/blob/f158208856e727336001b17397cbaa4c918d2ba4/pkg/apis/k8s/v1alpha1/condition_types.go#L29-L37):

type ResourceRef struct {
	/* The external name of the referenced resource */
	External string `json:"external,omitempty"`
	/* Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names */
	Name string `json:"name,omitempty"`
	/* Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ */
	Namespace string `json:"namespace,omitempty"`
}

Therefore, I can't specify a response properly.

Additional Diagnostic Information

Kubernetes Cluster Version

N/A

Config Connector Version

N/A

Config Connector Mode

N/A

Log Output

N/A

Steps to Reproduce

Steps to reproduce the issue

$ go get github.com/GoogleCloudPlatform/k8s-config-connector@1.40.0

YAML snippets

N/A

@micnncim micnncim added the bug Something isn't working label Mar 2, 2021
@maqiuyujoyce
Copy link
Collaborator

Hi @micnncim , thank you for reporting the issue. We'll look into fixing it. Will post updates when we have new information.

@micnncim
Copy link
Author

micnncim commented Apr 8, 2021

@maqiuyujoyce Hi, how is the progress? Anything I can help with?

@maqiuyujoyce
Copy link
Collaborator

Hi @micnncim thank you for your follow up and offering for help! We are still working on it. Will post updates when the fix is out.

@caieo caieo changed the title Client package's type doesn't match schema in document IAMPolicyMember GoClient resourceRef type doesn't match schema in document Apr 30, 2021
@aw185176
Copy link

aw185176 commented May 4, 2021

Gently pinging this thread to mention that this issue is blocking us from sunsetting our homerolled KCC Go types.

@jcanseco
Copy link
Member

jcanseco commented May 4, 2021

Hi @aw185176, thanks for elaborating on the impact that this issue has on you. Such details help us with prioritization.

A fix is currently being worked on, and the estimate of a "few weeks" given in the other thread still holds true. We'll update this thread when the fix is released.

@maqiuyujoyce
Copy link
Collaborator

The issue should be fixed in Config Connector v1.50.0.

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

4 participants