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

Add support for creating encrypted volume #80

Merged
merged 1 commit into from
Oct 26, 2018

Conversation

leakingtapan
Copy link
Contributor

Fixes: #16

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: leakingtapan

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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 24, 2018
@coveralls
Copy link

coveralls commented Oct 24, 2018

Pull Request Test Coverage Report for Build 85

  • 48 of 58 (82.76%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.6%) to 50.932%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/cloud/cloud.go 38 48 79.17%
Totals Coverage Status
Change from base Build 83: 1.6%
Covered Lines: 574
Relevant Lines: 1127

💛 - Coveralls

pkg/cloud/cloud.go Show resolved Hide resolved
pkg/cloud/cloud.go Outdated Show resolved Hide resolved
}
if len(diskOptions.KmsKeyID) > 0 {
request.KmsKeyId = aws.String(diskOptions.KmsKeyID)
request.Encrypted = aws.Bool(true)
Copy link
Member

Choose a reason for hiding this comment

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

What happen if diskOptions.Encrypted is true and diskOptions.KmsKeyID is empty? Is this something we want to handle?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In case of KmsKeyID is empty, EBS will use a default key to create the volume if Encrypted is set true. See: https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#CreateVolumeInput

Encrypted bool
// fully qualified resource name to the key to use for encryption.
// example: arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef
KmsKeyID string
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to have only this field (and get rid of Encrypted)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See above comment

@bertinatto
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 26, 2018
@k8s-ci-robot k8s-ci-robot merged commit 87e2ece into kubernetes-sigs:master Oct 26, 2018
@leakingtapan leakingtapan deleted the kms branch October 26, 2018 15:51
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. 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants