sematic-ai / sematic

An open-source ML pipeline development platform
Other
973 stars 59 forks source link

Allow custom annotations & labels #1123

Closed augray closed 4 months ago

augray commented 5 months ago

Allow annotations and labels to be specified in KubernetesResourceRequirements IF they have been allow-listed using a server config. The reason we need to have an allow-list is that allowing the user to arbitrarily specify annotations and labels can contain foot-guns (ex: a user specifying a label of sematic.ai/component: api might wind up having their pod be considered part of the Sematic k8s service object). In the worst case, they can contain security holes (ex: an annotation of kubernetes.io/psp: eks.privileged).

Testing

Deployed a server with this code to staging. Then: