Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

feat: azure kms provider as static pod #3667

Merged
merged 2 commits into from
Sep 14, 2020
Merged

Conversation

aramase
Copy link
Member

@aramase aramase commented Aug 5, 2020

Reason for Change:

Things to complete as part of this PR:

  • Update tests
  • Update docs
  • Check cluster upgrade scenario

Issue Fixed:

Requirements:

Notes:
Tested cluster upgrade:

  1. Created an aks-engine cluster with enableEncryptionWithExternalKms: true.
  2. Validated secret in etcd is encrypted after cluster is deployed and secret is created.
  3. Upgraded the cluster to a newer version using custom aks-engine build with the static pod changes.
  4. Validated the secret is still encrypted after upgrade, the new kms provider static pod is running and kubectl get secrets returns the decoded content.
➜ kubectl get pods -n kube-system -l component=azure-kms-provider
NAME                                       READY   STATUS    RESTARTS   AGE
azure-kms-provider-k8s-master-14691719-0   1/1     Running   0          33m

@codecov
Copy link

codecov bot commented Aug 11, 2020

Codecov Report

Merging #3667 into master will increase coverage by 0.00%.
The diff coverage is 83.58%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3667   +/-   ##
=======================================
  Coverage   73.19%   73.20%           
=======================================
  Files         148      148           
  Lines       25394    25428   +34     
=======================================
+ Hits        18587    18614   +27     
- Misses       5671     5679    +8     
+ Partials     1136     1135    -1     
Impacted Files Coverage Δ
pkg/api/common/const.go 40.00% <ø> (ø)
pkg/engine/templates_generated.go 52.91% <38.88%> (-0.51%) ⬇️
pkg/api/components.go 97.15% <100.00%> (+0.20%) ⬆️
pkg/api/defaults-kubelet.go 96.82% <100.00%> (+0.01%) ⬆️
pkg/api/k8s_versions.go 100.00% <100.00%> (ø)
pkg/engine/armvariables.go 86.44% <100.00%> (-0.06%) ⬇️
pkg/engine/artifacts.go 99.15% <100.00%> (+0.01%) ⬆️
pkg/engine/template_generator.go 82.40% <100.00%> (+0.20%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c670571...d74f373. Read the comment docs.

@craiglpeters craiglpeters added this to In progress in backlog Sep 3, 2020
@stale
Copy link

stale bot commented Sep 11, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 11, 2020
@stale stale bot removed the stale label Sep 11, 2020
@aramase aramase changed the title [WIP] feat: azure kms provider as static pod feat: azure kms provider as static pod Sep 11, 2020
@aramase
Copy link
Member Author

aramase commented Sep 11, 2020

This PR is ready for review.

cc @ritazh

@@ -159,13 +159,6 @@ write_files:
content: !!binary |
{{CloudInitData "labelNodesSystemdService"}}

- path: /etc/systemd/system/kms.service
Copy link
Member

Choose a reason for hiding this comment

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

So basically we are deprecating all systemd foo in favor of everything being deliverd via daemonset?

Copy link
Member

Choose a reason for hiding this comment

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

Actually nevermind I see it's a system Pod

@@ -113,7 +113,6 @@ const (
kubernetesMasterGenerateProxyCertsScript = "k8s/cloud-init/artifacts/generateproxycerts.sh"
kubernetesCustomSearchDomainsScript = "k8s/cloud-init/artifacts/setup-custom-search-domains.sh"
kubeletSystemdService = "k8s/cloud-init/artifacts/kubelet.service"
kmsSystemdService = "k8s/cloud-init/artifacts/kms.service"
Copy link
Member

Choose a reason for hiding this comment

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

We should be able to delete the parts/k8s/cloud-init/artifacts/kms.service file entirely from the codebase now

Copy link
Member Author

Choose a reason for hiding this comment

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

deleted parts/k8s/cloud-init/artifacts/kms.service

Copy link
Member

@jackfrancis jackfrancis left a comment

Choose a reason for hiding this comment

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

/lgtm

backlog automation moved this from In progress to Review in progress Sep 14, 2020
@acs-bot acs-bot added the lgtm label Sep 14, 2020
@jackfrancis jackfrancis merged commit 6f2abc7 into Azure:master Sep 14, 2020
backlog automation moved this from Review in progress to Done Sep 14, 2020
@acs-bot
Copy link

acs-bot commented Sep 14, 2020

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aramase, jackfrancis

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

@aramase aramase deleted the kms branch September 14, 2020 22:51
penggu pushed a commit to penggu/aks-engine that referenced this pull request Oct 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
backlog
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants