Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Events missing on pods due to use of deprecated metadata.selfLink #484

Closed
AlexLast opened this issue Jul 6, 2021 · 3 comments · Fixed by #507
Closed

Events missing on pods due to use of deprecated metadata.selfLink #484

AlexLast opened this issue Jul 6, 2021 · 3 comments · Fixed by #507

Comments

@AlexLast
Copy link

AlexLast commented Jul 6, 2021

Since upgrading to Kubernetes 1.20 we no longer get kiam related events on pods due to the use of the deprecated metadata.selfLink field. This was deprecated in Kubernetes 1.16 and removed in 1.20

We see error logs relating to this in kiam-server, example:

ERROR: logging before flag.Parse: E0706 15:08:28.333117       1 event.go:260] Could not construct reference to: '&v1.Pod{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, 
<redacted>
 due to: 'selfLink was empty, can't make reference'. Will not report event: 'Warning' 'KiamCredentialError' 'failed retrieving credentials: AccessDenied: User: arn:aws:sts::<redacted>:assumed-role/<redacted>/<redacted> is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::<redacted>:role/<redacted>'

Looks like it's using EventRecorder from client-go although v7.0.0 looks pretty old, I'm guessing the client libraries will need updating to use a version that constructs the object reference using different fields.

@pjaak
Copy link

pjaak commented Aug 4, 2021

I am also getting the same issues sadly and its effecting my pods ability to access AWS resources:

Screen Shot 2021-08-05 at 8 52 33 am

Screen Shot 2021-08-05 at 9 35 39 am

I am not sure what to do tbh.

@jjo
Copy link
Contributor

jjo commented Oct 20, 2021

also facing this issue (v1.20), with other projects also, example of a related fix kubernetes-csi/external-provisioner#323

@jjo
Copy link
Contributor

jjo commented Oct 26, 2021

In case you want to stage #507 PR's image, I pushed it to docker.io/xjjo/kiam:jjo-fix-issue-484-libs-v0.20, ie use image: xjjo/kiam:jjo-fix-issue-484-libs-v0.20 in the manifests.

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

Successfully merging a pull request may close this issue.

3 participants