Skip to content

Commit

Permalink
Merge pull request #3528 from mihivagyok/cherry-pick-pr3489-use-restr…
Browse files Browse the repository at this point in the history
…icted-namespace

[Pick #3489] Use restricted namespace for opensource calico-apiserver (v1.34)
  • Loading branch information
marvin-tigera authored Oct 28, 2024
2 parents 4420a6c + 112f043 commit 64f8bcc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/render/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,13 @@ func (c *apiServerComponent) Objects() ([]client.Object, []client.Object) {
namespacedEnterpriseObjects = append(namespacedEnterpriseObjects, c.cfg.TrustedBundle.ConfigMap(QueryserverNamespace))
}

podSecurityNamespaceLabel := PodSecurityStandard(PSSRestricted)
if c.hostNetwork() {
podSecurityNamespaceLabel = PSSPrivileged
}
// Global OSS-only objects.
globalCalicoObjects := []client.Object{
CreateNamespace(rmeta.APIServerNamespace(operatorv1.Calico), c.cfg.Installation.KubernetesProvider, PSSPrivileged),
CreateNamespace(rmeta.APIServerNamespace(operatorv1.Calico), c.cfg.Installation.KubernetesProvider, podSecurityNamespaceLabel),
}

// Compile the final arrays based on the variant.
Expand Down

0 comments on commit 64f8bcc

Please sign in to comment.