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

feat: vendor infrastructure provider APIs #190

Merged
merged 12 commits into from
Sep 27, 2023

Conversation

dkoshkin
Copy link
Contributor

@dkoshkin dkoshkin commented Sep 26, 2023

@jimmidyson and I were briefly talking about this idea. Here is an attempt of using infra provider types that are synced from upstream repos. It is easier to work with Go types instead of unstructured.
Switched the AWS region handler to use these new types to show that it works.

An important part of this PR is the automated syncing. I added it as makefile targets to keep it simple, but can be extended if no longer enough as we add additional providers.

make/apis.mk Outdated Show resolved Hide resolved
@dkoshkin dkoshkin force-pushed the dkoshkin/feat-vendored-external-apis branch 2 times, most recently from 09599be to c3de5e4 Compare September 27, 2023 00:35
@dkoshkin dkoshkin force-pushed the dkoshkin/feat-vendored-external-apis branch from 957e666 to da83e66 Compare September 27, 2023 01:03
@dkoshkin
Copy link
Contributor Author

aec5363 here is a fun idea @faiq and I saw in some CAPI provider (don't remember which one), using a separate go.mod for each provider. This has the benefit of using dependabot to keep the version updated.

If we don't want this, we should still bring in the directory change from that commit, I think placing it in the more explicit dir is nicer common/pkg/external/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/.

@jimmidyson
Copy link
Member

I love this! I've taken the liberty of making a few changes (all can be reverted if you disagree with what I've done btw):

  • Use go mod cache paths instead of vendoring

  • Moving stuff around a bit (not the final API destination btw): moved placeholder modues into hack/third-party for what feels like a "cleaner", never-import-this, kinda place.

  • Added CAPD to show how we can extend this for other providers nice and easily

  • Fixed up build stuff, golangci-lint ignoring, etc and added pre-commit hook to ensure it is kept up to date

@jimmidyson jimmidyson changed the title feat: vendor infrastructure prvider APIs feat: vendor infrastructure provider APIs Sep 27, 2023
@github-actions github-actions bot added feature and removed feature labels Sep 27, 2023
make/examples.mk Show resolved Hide resolved
make/go.mk Show resolved Hide resolved
.pre-commit-config.yaml Show resolved Hide resolved
.golangci.yml Show resolved Hide resolved
@dkoshkin dkoshkin merged commit 2a712d3 into main Sep 27, 2023
10 checks passed
@dkoshkin dkoshkin deleted the dkoshkin/feat-vendored-external-apis branch September 27, 2023 13:53
dkoshkin pushed a commit that referenced this pull request Oct 19, 2023
🤖 I have created a release *beep* *boop*
---


## 0.2.0 (2023-10-19)

<!-- Release notes generated using configuration in .github/release.yaml
at main -->

## What's Changed
### Exciting New Features 🎉
* feat: AWS cluster config patch by @jimmidyson in
#172
* feat: Combine generic variables with provider specific variables by
@jimmidyson in
#173
* feat: Use external patch for Docker provider custom image by
@jimmidyson in
#188
* feat: vendor infrastructure provider APIs by @dkoshkin in
#190
* feat: Introduce scheme and decoder helpers by @jimmidyson in
#191
* feat: add imageRegistryCredentials handler by @dkoshkin in
#174
* feat: Deploy default clusterclasses via helm by @jimmidyson in
#198
* feat: Add Calico CNI AWS ingress rules by @jimmidyson in
#206
* feat: CAPA v2.2.4 by @jimmidyson in
#211
* feat: Add worker configs var and handler by @dkoshkin in
#208
* feat: adds aws ebs config by @faiq in
#192
* feat: add AWS IAM instance profile patch by @dkoshkin in
#216
* feat: Calico 3.26.3 by @jimmidyson in
#218
* feat: add AWS instance type patch by @dkoshkin in
#217
* feat: variables and patches for AWS AMI spec by @supershal in
#225
* feat: add VPC ID and Subnet IDs patch by @dkoshkin in
#220
* feat: deploy AWS CPI by @faiq in
#229
### Fixes 🔧
* fix: bring back missing docker handlers by @dkoshkin in
#187
* fix: typo in docker cluster config api by @supershal in
#205
* fix: move provider fields under aws and docker by @dkoshkin in
#204
* fix: Correctly set external cloud provider for AWS by @jimmidyson in
#210
* fix: Adds AWS Calico installation configmap by @jimmidyson in
#212
* fix: Ensure CNI ingress rules are added to AWSCluster by @jimmidyson
in #213
* fix: Reduce log verbosity for http proxy variable not found by
@jimmidyson in
#214
* fix: Don't set AWS region as required by @dkoshkin in
#219
### Other Changes
* build: Add example files to release artifacts by @jimmidyson in
#169
* build: Add AWS clusterclass example by @jimmidyson in
#162
* refactor: Move generic handlers into generic directory by @jimmidyson
in #171
* ci: Simplify shell configuration by setting defaults by @jimmidyson in
#184
* build: Disable fortify hardener to enable local debugging by
@jimmidyson in
#186
* docs: Add more details about single var by @jimmidyson in
#185
* refactor: Move meta handlers to provider packages by @jimmidyson in
#193
* refactor: Use consistent decoder in mutators by @jimmidyson in
#196
* build: Suppress devbox envrc update notification by @jimmidyson in
#197
* build: Consistent behaviour in addons update scripts by @jimmidyson in
#207
* build: Allow past year in license header by @jimmidyson in
#209
* build: Increase golangci-lint timeout for slower GHA runners by
@jimmidyson in
#222
* refactor: Always use unstructured in patch generators by @jimmidyson
in #221
* build: Update tools by @jimmidyson in
#223
* refactor: Remove usage of non-meta handlers by @dkoshkin in
#226

## New Contributors
* @supershal made their first contribution in
#205

**Full Changelog**:
v0.1.2...v0.2.0

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants