astefanutti commented on a change in pull request #723: Automatically configure 
global build strategy
URL: https://github.com/apache/camel-k/pull/723#discussion_r290710210
 
 

 ##########
 File path: pkg/controller/build/schedule_pod.go
 ##########
 @@ -135,6 +156,9 @@ func newBuildPod(build *v1alpha1.Build, operatorImage 
string) *corev1.Pod {
                ObjectMeta: metav1.ObjectMeta{
                        Namespace: build.Namespace,
                        Name:      buildPodName(build.Spec.Meta),
+                       Labels: map[string]string{
+                               "camel.apache.org/build": build.Name,
+                       },
                },
                Spec: corev1.PodSpec{
                        ServiceAccountName: "camel-k-operator",
 
 Review comment:
   I wonder if that'd make sense we create a dedicated SA for build pods. I 
think they don't need the full permissions, for example pod creation, that can 
be seen as a security risk: 
https://kubernetes.io/docs/reference/access-authn-authz/authorization/#privilege-escalation-via-pod-creation.
 It's not directly related to this PR, so more a note for future work.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to