-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Allow local filesystem state stores (to aid CI pull-request workflows) #6465
Allow local filesystem state stores (to aid CI pull-request workflows) #6465
Conversation
Hi @ari-becker. 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 Once the patch is verified, the new status will be reflected by the 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. |
/ok-to-test |
Test failure is about the CI server not having credentials to create a cluster in /retest |
how this is supposed to work? Currently when people create cluster, the s3 will contain all information what nodes is supposed to fetch. I mean that when instance is started - the cloudinit script will fetch the configuration from the state store. Now if this state store is located in your local machine, the instance cannot fetch that information? |
@zetaab As I said in #6463, the use case is for running dry-runs on pull requests in a CI environment. The CI build for the pull request downloads the state to the local filesystem, runs |
+1 to the PR. I was thinking of raise something similar myself. Perhaps to make sure people don't "accidentally" use this in prod. We could instead add a CLI flag such as I also am working on a pipeline for kops and it changing the state store during a pull request is a bit of a pain. I am fortunately using the cloudformation output which means that instances do not need to pull much from the state store on start up as the cluster.spec is in the UserData script. |
Hi @zetaab @ari-becker is there any update on this? I initially thought that I could get around not having this for our CI pipeline because when using cloudformation, like in my case, I assumed that Therefore, I ran into a situation, where changes from I don't mind implementing the |
@Smirl I ran into an issue about a week ago where, upon a dry-run of a fresh cluster creation with a I worked around it by creating IAM profiles outside of Kops which are fixed to point to the relevant state bucket, and therefore not dependent on what's in |
I’d really appreciate some more documentation about the use case and it’s implications (like that it won’t work for real clusters and tests only). It will confuse our users otherwise. |
/retest |
One thing we could do is put this behind a feature-flag ... ( I'm going to move this out of 1.12, because as we discussed in office hours we really want to prioritize getting 1.12 out. But if it's behind a featureflag, I think it could still go in to 1.12 as it's a fairly small change. /milestone 1.13 |
@chrisz100 I've added some documentation. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale We've worked around this issue by rethinking how we built our infrastructure pipelines, but I imagine that this is still a common usecase for many CI workflows, so it is not stale. |
@ari-becker Would you mind sharing your current workflow? I’ve also been looking into various ways to achieve similar functionality. |
@colinhoglund we have a pipeline that can re-create our infrastructure from scratch, so we made the pipeline a function of various inputs to change relevant values for a given infrastructure run (we use Dhall to make the configurations/scripts functional). Now, instead of a PR build telling us what to expect when we run the infrastructure scripts for real, we have a PR build create an entire environment using those same infrastructure scripts. Because infrastructure is versioned, we can be reasonably confident that a test that shows success doing an automatic, real migration from X->Y (where X is the current production infrastructure version) in a non-production environment means that an automatic, real migration from X->Y in production will be successful. So far we haven't had any production outages yet from this approach (mostly thanks to the safety which Dhall provides), but I think most organizations would think of such an approach as being too aggressive and unsafe. |
It would be great if we could get this merged /test pull-kops-e2e-kubernetes-aws |
/test pull-kops-e2e-kubernetes-aws |
@robinpercy @rdrgmnzs Could you guys please look into this? I have been waiting for this for a while now. It is also helpful for setting up |
/test pull-kops-verify-gomod |
Hi, I've built kops 1.13.1 with this patch and worked it into our pipeline, using the --state flag after an aws s3 sync when planning changes:
it prevents the
Am I doing something wrong or is this the expected behaviour? |
/test pull-kops-e2e-kubernetes-aws |
bump. This is really useful in specific cases. |
I just tested this out myself and it works as expected. @justinsb @mikesplain do you think this needs to be behind a feature flag? It is new functionality: no one can currently use /lgtm and sorry for the delay! |
/approve I think we can cherry-pick this back to 1.17. I will try to add a warning message for this usage in a separate PR as well. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ari-becker, rifelpet 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 |
Just a short mention/reminder that the docs/continuous_integration.md still mentions this PR as open, and the lack of this functionality as a "current limitation". Might it be worth updating to reflect what is now possible (and how one would use this)? 😍 |
I haven't been using it yet but once we upgrade to Kops 1.17 and start using it I'll be sure to update that docs page, unless someone else gets to it first :) |
Update wording to note that kubernetes#6465 was merged and add an AWS example of a dry run.
Allows the usage of state storage based on the local filesystem, based on the
file://
prefix/protocol, as documented.Fixes #6463.