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

feat: support namespace for trial template #827

Merged
merged 3 commits into from
Sep 29, 2019

Conversation

gaocegege
Copy link
Member

@gaocegege gaocegege commented Sep 27, 2019

Signed-off-by: Ce Gao gaoce@caicloud.io

What this PR does / why we need it:

Add a namespace field for the template.

Release note:



This change is Reviewable

@gaocegege
Copy link
Member Author

/retest

@gaocegege
Copy link
Member Author

/assign @hougangliu @johnugeorge

@gaocegege
Copy link
Member Author

/hold

@gaocegege
Copy link
Member Author

Need to add an onChange to fetch trial templates.

@gaocegege gaocegege changed the title feat: Update namespace in UI feat: support namespace for trial template Sep 28, 2019
@gaocegege
Copy link
Member Author

/retest

2 similar comments
@gaocegege
Copy link
Member Author

/retest

@gaocegege
Copy link
Member Author

/retest

@gaocegege
Copy link
Member Author

Peek 2019-09-28 09-49

@gaocegege
Copy link
Member Author

/assign @johnugeorge @hougangliu

@@ -150,7 +151,10 @@ func (k *KatibClient) GetTrialTemplates(namespace ...string) (map[string]string,
ns := getNamespace(namespace...)
trialTemplates := &apiv1.ConfigMap{}

if err := k.client.Get(context.Background(), types.NamespacedName{Name: experimentsv1alpha3.DefaultTrialConfigMapName, Namespace: ns}, trialTemplates); err != nil {
err := k.client.Get(context.TODO(), types.NamespacedName{Name: experimentsv1alpha3.DefaultTrialConfigMapName, Namespace: ns}, trialTemplates)
Copy link
Member

Choose a reason for hiding this comment

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

return k.GetConfigMap(experimentsv1alpha3.DefaultTrialConfigMapName, namespace)

BTW, now trialTemplate can be stored in any configmap, should we always get/update it in default ConfigMap?

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 can refactor it in another PR. Now #774 is in higher priority.

Copy link
Member

Choose a reason for hiding this comment

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

sure

Signed-off-by: Ce Gao <gaoce@caicloud.io>
Signed-off-by: Ce Gao <gaoce@caicloud.io>
Signed-off-by: Ce Gao <gaoce@caicloud.io>
@gaocegege
Copy link
Member Author

/cc @hougangliu

Addressed the comments, PTAL

@hougangliu
Copy link
Member

/approve
/lgtm

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hougangliu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gaocegege
Copy link
Member Author

/hold cancel

@gaocegege
Copy link
Member Author

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants