-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat: implement aws-eks-addon datasource #29613
base: main
Are you sure you want to change the base?
Conversation
078e8b3
to
56f34f9
Compare
56f34f9
to
c6a5e2d
Compare
@viceice : can you please take another look? I've addressed your comment and all checks are green. thank you :) |
…ecks, and cleanup code smells
@viceice : apologies for the code smells and anti patterns as typescript isn't my daily language. I did try my best to understand and address your comments, hopefully the latest revision looks better to you. cheers. |
@jzhn please see the code review comment above when you get the time |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the re-request review button when done
Co-authored-by: Michael Kriese <[email protected]>
I am interested in using this datasource for eks but currently is not compiling. It seems like in this line |
Nice work @jzhn , do you think it is possible to update the PRs with last main ? And re-request a review ? Thanks a lot |
}); | ||
|
||
export type EksAddonsFilter = z.infer<typeof EKSAddonsFilterSchema>; | ||
export EksAddonsFilterJson = Json.pipe(EksAddonsFilterSchema); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export EksAddonsFilterJson = Json.pipe(EksAddonsFilterSchema); | |
export const EksAddonsFilter = Json.pipe(EksAddonsFilterSchema); |
Json
needs to be imported from our schema utils.
import { cache } from '../../../util/cache/package/decorator'; | ||
import { Datasource } from '../datasource'; | ||
import type { GetReleasesConfig, ReleaseResult } from '../types'; | ||
import { EksAddonsFilterJson } from './schema'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { EksAddonsFilterJson } from './schema'; | |
import { EksAddonsFilter } from './schema'; |
async getReleases({ | ||
packageName: serializedFilter, | ||
}: GetReleasesConfig): Promise<ReleaseResult | null> { | ||
const filter = EksAddonsFilterJson.safeParse(serializedFilter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const filter = EksAddonsFilterJson.safeParse(serializedFilter); | |
const filter = EksAddonsFilter.safeParse(serializedFilter); |
Changes
Add a new datasource,
aws-eks-addon
. It uses similar design as existingaws-machine-image
andaws-rds
to use AWS JavaScript SDK to call APIs to fetch AWS EKS addon versions.Context
AWS EKS Addons are Kubernetes data-plane components under EKS's management, like kube-proxy and coredns. The addons are usually semver versioned, and released regularly for new features and security patches. AWS EKS provides API
DescribeAddonVersions
to allow users to query available addon versions per target Kubernetes version.As platform engineer, I often need to ensure my EKS clusters are running with up-to-date addons. Before this PR, renovate is unable to fetch list of available EKS addon versions that's specific to my cluster version and region. This is a popular ask of renovate users.
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: