AB#2394 Change KMS to be deployed as DaemonSet (#69)

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2022-09-05 10:22:40 +02:00 committed by GitHub
parent 71fb62fe31
commit f8c01a0298
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ type kmsDeployment struct {
Service k8s.Service Service k8s.Service
ClusterRole rbac.ClusterRole ClusterRole rbac.ClusterRole
ClusterRoleBinding rbac.ClusterRoleBinding ClusterRoleBinding rbac.ClusterRoleBinding
Deployment apps.Deployment Deployment apps.DaemonSet
MasterSecret k8s.Secret MasterSecret k8s.Secret
} }
@ -117,19 +117,21 @@ func NewKMSDeployment(csp string, config KMSConfig) *kmsDeployment {
}, },
}, },
}, },
Deployment: apps.Deployment{ Deployment: apps.DaemonSet{
TypeMeta: meta.TypeMeta{ TypeMeta: meta.TypeMeta{
APIVersion: "apps/v1", APIVersion: "apps/v1",
Kind: "Deployment", Kind: "DaemonSet",
}, },
ObjectMeta: meta.ObjectMeta{ ObjectMeta: meta.ObjectMeta{
Labels: map[string]string{ Labels: map[string]string{
"k8s-app": "kms", "k8s-app": "kms",
"component": "kms",
"kubernetes.io/cluster-service": "true",
}, },
Name: "kms", Name: "kms",
Namespace: kmsNamespace, Namespace: kmsNamespace,
}, },
Spec: apps.DeploymentSpec{ Spec: apps.DaemonSetSpec{
Selector: &meta.LabelSelector{ Selector: &meta.LabelSelector{
MatchLabels: map[string]string{ MatchLabels: map[string]string{
"k8s-app": "kms", "k8s-app": "kms",