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

Unable to update status #57

Open
kshamajain99 opened this issue Sep 25, 2020 · 2 comments · Fixed by #58
Open

Unable to update status #57

kshamajain99 opened this issue Sep 25, 2020 · 2 comments · Fixed by #58
Labels
bug Something isn't working must-to-have

Comments

@kshamajain99
Copy link
Collaborator

Is this a BUG REPORT or FEATURE REQUEST?:
Bug

What happened:
IAM policy was updated by adding a forbidden policy. But, status was not updated to PolicyNotAllowed. Instead controller was returning following error

2020-09-25T00:23:35.892Z	ERROR	controllers.iamrole_controller.UpdateStatus	Unable to update status	{"request_id": "41e0254d-a604-41e6-a6c4-13e6cc81850f", "status": "PolicyNotAllowed", "error": "Iamrole.iammanager.keikoproj.io \"iamrole\" is invalid: status.lastUpdatedTimestamp: Invalid value: \"null\": status.lastUpdatedTimestamp in body must be of type string: \"null\""}
github.com/go-logr/zapr.(*zapLogger).Error
	/go/pkg/mod/github.com/go-logr/[email protected]/zapr.go:128
github.com/keikoproj/iam-manager/controllers.(*IamroleReconciler).UpdateStatus
	/workspace/controllers/iamrole_controller.go:360
github.com/keikoproj/iam-manager/controllers.(*IamroleReconciler).HandleReconcile
	/workspace/controllers/iamrole_controller.go:144
github.com/keikoproj/iam-manager/controllers.(*IamroleReconciler).Reconcile
	/workspace/controllers/iamrole_controller.go:98
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:256
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:232
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:211
k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1
	/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:152
k8s.io/apimachinery/pkg/util/wait.JitterUntil
	/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:153
k8s.io/apimachinery/pkg/util/wait.Until
	/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:88```

**What you expected to happen**:
CR status should have updated to PolicyNotAllowed

**Environment**:
- iam-manager version
- Kubernetes version :

$ kubectl version -o yaml

@kshamajain99 kshamajain99 added the bug Something isn't working label Sep 25, 2020
@kshamajain99
Copy link
Collaborator Author

kshamajain99 commented Sep 25, 2020

@kshamajain99
Copy link
Collaborator Author

Temporary fix has been made by #60.

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

Successfully merging a pull request may close this issue.

1 participant