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

scaleway: terraform support #15892

Merged
merged 13 commits into from Sep 29, 2023

Conversation

Mia-Cross
Copy link
Contributor

This PR adds the support for the generation of Terraform files when creating and updating clusters.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 8, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @Mia-Cross. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@Mia-Cross Mia-Cross marked this pull request as ready for review September 8, 2023 16:57
@k8s-ci-robot k8s-ci-robot added area/documentation area/provider/scaleway Issues or PRs related to Scaleway provider and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Sep 8, 2023
@hakman
Copy link
Member

hakman commented Sep 8, 2023

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 8, 2023
Copy link
Member

@hakman hakman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mia-Cross mostly LGTM, with a few small nits. Could you take a look?

Comment on lines 773 to 775
if cluster.Spec.GetCloudProvider() == kops.CloudProviderScaleway {
shouldPrecreateDNS = true
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During dry-run should not pre-create DNS records.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I meant to write this line in the Terraform part and not the DryRun part.
This may be temporary as I am considering creating a model and a task for the DNS record resource. But I have not had any conflict if I pre-create DNS records even for Terraform clusters.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove it from here? I don't want to forget about it and have different behaviour from other cloud providers.

Copy link
Contributor Author

@Mia-Cross Mia-Cross Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The model and task for DNS record are ready. I removed the exception for the pre-creation of DNS records with Terraform from apply_cluster.go.
Instead the records get pre-created in the kubernetes.tf file with the placeholder IP and with ignore_changes on the data field because its value will be changed outside of Terraform (similar to the way the etcd volumes are handled)

upup/pkg/fi/cloudup/apply_cluster.go Outdated Show resolved Hide resolved
@Mia-Cross
Copy link
Contributor Author

/retest

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 28, 2023
@Mia-Cross
Copy link
Contributor Author

/retest

@hakman hakman added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Sep 29, 2023
Copy link
Member

@hakman hakman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Mia-Cross, LGTM!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 29, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 29, 2023
@k8s-ci-robot k8s-ci-robot merged commit e12f3dc into kubernetes:master Sep 29, 2023
22 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.29 milestone Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/documentation area/provider/scaleway Issues or PRs related to Scaleway provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants