redradrat / aws-iam-operator

AWS IAM Operator for Kubernetes
Apache License 2.0
32 stars 7 forks source link

Attachment of Policy to User gives error #12

Closed divyaprakash18 closed 3 years ago

divyaprakash18 commented 4 years ago

While attaching the policy to user controller gives error and policy doesn't get attached. Users and Policies tested independently and no issue with them. Attachment of Policy to Role also works.

File:

apiVersion: aws-iam.redradrat.xyz/v1beta1
kind: PolicyAttachment
metadata:
  name: policyattachment-sample-dpy
  namespace: capabilities
spec:
  policy:
    name: policy-sample-test-dpy
    namespace: capabilities
  target:
    type: User
    name: user-dpy
    namespace: capabilities

Error on controller: ERROR controller-runtime.controller Reconciler error {"controller": "policyattachment", "request": "default/policyattachment-sample-dpy", "error": "defined references do not exist for PolicyAttachment 'policyattachment-sample-dpy/default"}