-
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
Add snapshot-controller #10730
Add snapshot-controller #10730
Conversation
ba2d638
to
12519fe
Compare
@@ -29,7 +29,7 @@ kind: StorageClass | |||
metadata: | |||
name: kops-ssd-1-17 | |||
annotations: | |||
storageclass.beta.kubernetes.io/is-default-class: "true" | |||
storageclass.beta.kubernetes.io/is-default-class: "{{ if .CloudConfig.AWSEBSCSIDriver.Enabled }}{{ else }}false{{ end }}" |
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.
I have a patch in the works that will require some coordination here, both with the annotation name and with surrounding the creation of the StorageClass objects in a conditional block.
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.
Yeah I really dislike the annotation path here for controlling which is the default. It made rolling out some best practices for new clusters + not breaking old oddly difficult back when I did this.
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.
See #10733 for my patch on the subject. We'll have to resolve a bunch of conflicts, depending on which one goes in first.
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.
We'll merge yours first
12519fe
to
5330809
Compare
/milestone v1.20 |
/milestone v1.21 |
5330809
to
1a62361
Compare
1a62361
to
4c0538b
Compare
if c == nil { | ||
return nil | ||
cc := clusterSpec.CloudConfig | ||
if cc.AWSEBSCSIDriver == nil { |
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.
do we need to check if cc is not nil?
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.
This would fail the tests if we had to, I think. This probably gets explicitly set in one of the former builders.
pkg/model/iam/iam_builder.go
Outdated
"ec2:DescribeAvailabilityZones", | ||
"ec2:DescribeSnapshots", | ||
), | ||
Resource: stringorslice.Slice([]string{"*"}), |
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.
The example policy has tag conditions on DeleteSnapshot:
I'm wondering if we could do the same, and perhaps even further restrict it based on a tag containing the cluster name
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.
Yep. that makes sense.
@@ -16,7 +15,7 @@ kind: StorageClass | |||
metadata: | |||
name: gp2 | |||
annotations: | |||
storageclass.kubernetes.io/is-default-class: "false" | |||
storageclass.beta.kubernetes.io/is-default-class: "false" |
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.
is this addition still needed? I see upstream docs refer to the non-beta annotation.
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.
This was a mistake. Reverted.
this looks good to me other than the integration test conflicts. I'll let someone else take a second pass at the new API fields. We should revert #11530 in this PR as well. |
4c0538b
to
7242d4d
Compare
I want to cherry-pick this one to 1.21, so cannot revert that change directly in this PR. In addition the test need to be further modified to install the snapshot controller. |
7242d4d
to
94bd218
Compare
Looks like this still needs a rebase to get rid of a merge commit. |
94bd218
to
073cab7
Compare
Classic mistake of only checking if the struct exists, not if it was actually enabled. |
/hold |
8071ae2
to
07e316b
Compare
Also added encryption back in |
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.
/hold cancel
07e316b
to
1740b23
Compare
@olemarkus: The following test 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. |
Update upup/models/cloudup/resources/addons/storage-aws.addons.k8s.io/v1.15.0.yaml.template Co-authored-by: Peter Rifel <[email protected]> Update upup/models/cloudup/resources/addons/storage-aws.addons.k8s.io/v1.15.0.yaml.template Co-authored-by: Peter Rifel <[email protected]>
1740b23
to
46e13c0
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hakman, 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 |
…730-origin-release-1.21 Automated cherry pick of #10730: Bump snapshot-controller version
Will install external-snapshotter
Also modifies AWS storage to use a csi-specific storageclass and default to gp3 by default if ebs csi driver is installed.