Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify Labels for Katib Components #1611

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/v1beta1/trial-configmap-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ spec:
description: Training model optimizer (sdg, adam or ftrl)
reference: optimizer
configMap:
configMapName: trial-template
configMapName: trial-templates
configMapNamespace: kubeflow
templatePath: defaultTrialTemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Job
metadata:
name: katib-cert-generator
namespace: kubeflow
labels:
katib.kubeflow.org/component: cert-generator
spec:
template:
metadata:
Expand Down
7 changes: 3 additions & 4 deletions manifests/v1beta1/components/controller/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@ kind: Deployment
metadata:
name: katib-controller
namespace: kubeflow
# TODO (andreyvelich): Modify labels to follow k8s guidelines.
labels:
app: katib-controller
katib.kubeflow.org/component: controller
spec:
replicas: 1
selector:
matchLabels:
app: katib-controller
katib.kubeflow.org/component: controller
template:
metadata:
labels:
app: katib-controller
katib.kubeflow.org/component: controller
annotations:
prometheus.io/scrape: "true"
sidecar.istio.io/inject: "false"
Expand Down
4 changes: 3 additions & 1 deletion manifests/v1beta1/components/controller/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Service
metadata:
name: katib-controller
namespace: kubeflow
labels:
katib.kubeflow.org/component: controller
annotations:
prometheus.io/port: "8080"
prometheus.io/scheme: http
Expand All @@ -17,4 +19,4 @@ spec:
port: 8080
targetPort: 8080
selector:
app: katib-controller
katib.kubeflow.org/component: controller
4 changes: 2 additions & 2 deletions manifests/v1beta1/components/controller/trial-templates.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: trial-template
name: trial-templates
namespace: kubeflow
labels:
app: katib-trial-templates
katib.kubeflow.org/component: trial-templates
data:
defaultTrialTemplate.yaml: |-
apiVersion: batch/v1
Expand Down
7 changes: 3 additions & 4 deletions manifests/v1beta1/components/db-manager/db-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@ kind: Deployment
metadata:
name: katib-db-manager
namespace: kubeflow
# TODO (andreyvelich): Modify labels to follow k8s guidelines.
labels:
app: katib-db-manager
katib.kubeflow.org/component: db-manager
spec:
replicas: 1
selector:
matchLabels:
app: katib-db-manager
katib.kubeflow.org/component: db-manager
template:
metadata:
labels:
app: katib-db-manager
katib.kubeflow.org/component: db-manager
annotations:
sidecar.istio.io/inject: "false"
spec:
Expand Down
4 changes: 2 additions & 2 deletions manifests/v1beta1/components/db-manager/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ metadata:
name: katib-db-manager
namespace: kubeflow
labels:
app: katib-db-manager
katib.kubeflow.org/component: db-manager
spec:
type: ClusterIP
ports:
- port: 6789
protocol: TCP
name: api
selector:
app: katib-db-manager
katib.kubeflow.org/component: db-manager
7 changes: 3 additions & 4 deletions manifests/v1beta1/components/mysql/mysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@ kind: Deployment
metadata:
name: katib-mysql
namespace: kubeflow
# TODO (andreyvelich): Modify labels to follow k8s guidelines.
labels:
app: katib-mysql
katib.kubeflow.org/component: mysql
spec:
replicas: 1
selector:
matchLabels:
app: katib-mysql
katib.kubeflow.org/component: mysql
strategy:
type: Recreate
template:
metadata:
labels:
app: katib-mysql
katib.kubeflow.org/component: mysql
annotations:
sidecar.istio.io/inject: "false"
spec:
Expand Down
4 changes: 2 additions & 2 deletions manifests/v1beta1/components/mysql/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ metadata:
name: katib-mysql
namespace: kubeflow
labels:
app: katib-mysql
katib.kubeflow.org/component: mysql
spec:
type: ClusterIP
ports:
- port: 3306
protocol: TCP
name: dbapi
selector:
app: katib-mysql
katib.kubeflow.org/component: mysql
4 changes: 2 additions & 2 deletions manifests/v1beta1/components/ui/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: katib-ui
namespace: kubeflow
labels:
app: katib-ui
katib.kubeflow.org/component: ui
spec:
type: ClusterIP
ports:
Expand All @@ -13,4 +13,4 @@ spec:
name: ui
targetPort: 8080
selector:
app: katib-ui
katib.kubeflow.org/component: ui
7 changes: 3 additions & 4 deletions manifests/v1beta1/components/ui/ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@ kind: Deployment
metadata:
name: katib-ui
namespace: kubeflow
# TODO (andreyvelich): Modify labels to follow k8s guidelines.
labels:
app: katib-ui
katib.kubeflow.org/component: ui
spec:
replicas: 1
selector:
matchLabels:
app: katib-ui
katib.kubeflow.org/component: ui
template:
metadata:
labels:
app: katib-ui
katib.kubeflow.org/component: ui
annotations:
sidecar.istio.io/inject: "false"
spec:
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller.v1beta1/consts/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ const (
AnnotationIstioSidecarInjectValue = "false"

// LabelTrialTemplateConfigMapName is the label name for the Trial templates configMap
LabelTrialTemplateConfigMapName = "app"
LabelTrialTemplateConfigMapName = "katib.kubeflow.org/component"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use katib.kubeflow.org or automl.kubeflow.org?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine with both, it's better to take what is easier for user to see the Katib components.
WDYT @johnugeorge @alculquicondor @kubeflow/wg-training-leads ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there other projects that would potentially use automl.kubeflow.org/component?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, we have only Katib project in Kubeflow for AutoML

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the "component" part might be exclusive to katib.

Of course, you could do automl.kubeflow.org/component: katib-ui, but maybe it's overkill.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, so in the future if we have more projects for AutoML we can extend it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we decided on the WG Meeting we will use katib.kubeflow.org for now since it is easier to indicate project for the user.
@gaocegege @alculquicondor @johnugeorge if you are fine with the changes, please leave your lgtm

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

// LabelTrialTemplateConfigMapValue is the label value for the Trial templates configMap
LabelTrialTemplateConfigMapValue = "katib-trial-templates"
LabelTrialTemplateConfigMapValue = "trial-templates"

// TrialTemplateParamReplaceFormat is the format to make substitution in Trial template from Names in TrialParameters
// E.g if Name = learningRate, according value in Trial template must be ${trialParameters.learningRate}
Expand Down