Skip to content

Commit

Permalink
Merge pull request #3570 from kubevirt-bot/cherry-pick-3507-to-releas…
Browse files Browse the repository at this point in the history
…e-0.30

[release-0.30] Remove modifications on the default privileged SCC.
  • Loading branch information
kubevirt-bot committed Jun 16, 2020
2 parents 736b4ae + 2a081b0 commit 74627cf
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions pkg/virt-operator/install-strategy/strategy.go
Expand Up @@ -296,26 +296,9 @@ func GenerateCurrentInstallStrategy(config *operatorutil.KubeVirtDeploymentConfi
if err != nil {
return nil, fmt.Errorf("error generating virt-handler deployment %v", err)
}
strategy.daemonSets = append(strategy.daemonSets, handler)

prefix := "system:serviceaccount"
typeMeta := metav1.TypeMeta{
Kind: customSCCPrivilegedAccountsType,
}

strategy.daemonSets = append(strategy.daemonSets, handler)
strategy.sccs = append(strategy.sccs, components.GetAllSCC(config.GetNamespace())...)

// deprecated, keep it for backwards compatibility
strategy.customSCCPrivileges = append(strategy.customSCCPrivileges, &customSCCPrivilegedAccounts{
TypeMeta: typeMeta,
TargetSCC: "privileged",
ServiceAccounts: []string{
fmt.Sprintf("%s:%s:%s", prefix, config.GetNamespace(), rbac.HandlerServiceAccountName),
fmt.Sprintf("%s:%s:%s", prefix, config.GetNamespace(), rbac.ApiServiceAccountName),
fmt.Sprintf("%s:%s:%s", prefix, config.GetNamespace(), rbac.ControllerServiceAccountName),
},
})

strategy.apiServices = components.NewVirtAPIAPIServices(config.GetNamespace())
strategy.certificateSecrets = components.NewCertSecrets(config.GetNamespace(), operatorNamespace)
strategy.certificateSecrets = append(strategy.certificateSecrets, components.NewCACertSecret(operatorNamespace))
Expand Down

0 comments on commit 74627cf

Please sign in to comment.