-
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
Put versioned API of cluster into state store #9229
Put versioned API of cluster into state store #9229
Conversation
f0db5c0
to
e91cd71
Compare
ce94c0d
to
83c5e4c
Compare
/kind bug |
This will have some effect on Terraform users, who currently expect to run |
My plan to address the issue of the instancegroup specs being written prior to |
I'm putting a hold on this due to the Terraform issue. For now I'll pursue moving state into the |
Would managing the cluster and instance group manifests via terraform fix the issue? TF does have the aws_s3_bucket_object resource type. Rather than kops uploading the object to s3 directly it could write the object to the .tf files and have terraform manage them. Would that be sufficient? We wouldn't use it for any of the PKI secrets, just the manifests |
@rifelpet that would probably address the issue, modulo race conditions during the update itself. |
83c5e4c
to
917a16e
Compare
9a434e1
to
30faa3a
Compare
/test pull-kops-e2e-kubernetes-do-kubetest2 |
/cc @justinsb |
/test pull-kops-e2e-k8s-gce |
30faa3a
to
21e15dc
Compare
Still looks good to me /lgtm |
21e15dc
to
53695fc
Compare
@johngmyers: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
/retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: olemarkus 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 |
This addresses two problems:
The "completed" cluster spec, stored in the file
cluster.spec
in the state store, is stored using the unversioned API. This is contrary to apimachinery rules, which state that APIs should be persisted in a versioned form of the API, and limits our ability to change the unversioned API.The
cluster.spec
file is written atkops edit
(etc.) time, causing some aspects of the cluster's operation to change prior to runningkops update cluster --yes
.This PR starts writing the versioned API to a new
cluster-completed.spec
. This new file is only written atkops update cluster --yes
time.This PR fixes readers of the completed cluster spec to deserialize as the versioned API.
It also does not address storage of
cluster-completed.spec
through a k8s state store.I am considering a future PR that would write the
cluster-completed.spec
file as aManagedFile
, replacing the VFS API method added here.