-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add manifests #32
Add manifests #32
Conversation
@CodiumAI-Agent /review |
PR Analysis
PR Feedback
How to use
|
@CodiumAI-Agent /improve |
src/app/Utils/KruizeUIConstants.ts
Outdated
export const KRUIZE_API_URL = process.env.KRUIZE_APP_API_URL || undefined; | ||
export const KRUIZE_API_PORT = process.env.KRUIZE_APP_API_PORT || undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: It's better to provide a default value for the environment variables in case they are not set. This can prevent potential issues of these variables being undefined.
export const KRUIZE_API_URL = process.env.KRUIZE_APP_API_URL || undefined; | |
export const KRUIZE_API_PORT = process.env.KRUIZE_APP_API_PORT || undefined; | |
export const KRUIZE_API_URL = process.env.KRUIZE_APP_API_URL || 'http://localhost'; | |
export const KRUIZE_API_PORT = process.env.KRUIZE_APP_API_PORT || '8080'; |
07271de
to
575b9fa
Compare
Dockerfile.minikube.deploy
Outdated
@@ -0,0 +1,28 @@ | |||
FROM node:16 AS builder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this Dockerfile specific to minikube? If so why? If not please rename it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed it, Thanks for the review
deploy.sh
Outdated
@@ -1,4 +1,17 @@ | |||
#!/bin/bash | |||
|
|||
export KRUIZE_UI_IMAGE="docker.io/bharathappali/kruize-ui:central-config" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated to quay.io/kruize/kruize-ui:test
deploy.sh
Outdated
@@ -1,4 +1,17 @@ | |||
#!/bin/bash | |||
|
|||
export KRUIZE_UI_IMAGE="docker.io/bharathappali/kruize-ui:central-config" | |||
KRUIZE_UI_MANIFEST_FILE="kruize-ui-nginx-setup.yml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes we use envsubst to create the yaml and this is the file we update in dynamic and static folders
|
||
POD_NAME="kruize-ui-nginx-pod" | ||
SERVICE_NAME="kruize-ui-nginx-service" | ||
NAMESPACE="monitoring" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
monitoring is only for minikube. For openshift, we are using openshift-tuning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have -e option which will set the namespace based on deployment platform
kruize-ui.yml
Outdated
@@ -0,0 +1,42 @@ | |||
apiVersion: apps/v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file might need to be deleted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted
@@ -0,0 +1,68 @@ | |||
apiVersion: v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All yaml files need to use the suffix .yaml
and not .yml
in line with the convention that we are following in all the other repos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed it to yaml
spec: | ||
containers: | ||
- name: kruize-ui-nginx-container | ||
image: docker.io/bharathappali/kruize-ui:central-config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated to kruize ui images on quay
spec: | ||
containers: | ||
- name: kruize-ui-nginx-container | ||
image: bharathappali/kruize-ui:test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to be updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated to kruize ui images on quay
// const Context = useContext(nodeContext); | ||
// const ip = Context['cluster']; | ||
// const port = Context['autotune']; | ||
// | ||
// let k_url: string; | ||
// | ||
// if (ip) { | ||
// k_url = ip + ':' + port; | ||
// } else { | ||
// k_url = 'kruize'; | ||
// } | ||
// const list_experiments_url = 'http://' + k_url + '/listRecommendations'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the commented code
// const Context = useContext(nodeContext); | ||
// const ip = Context['cluster']; | ||
// const port = Context['autotune']; | ||
// let k_url: string; | ||
// | ||
// if (ip) { | ||
// k_url = ip + ':' + port; | ||
// } else { | ||
// k_url = 'kruize'; | ||
// } | ||
// const list_recommendations_url = | ||
// 'http://' + | ||
// k_url + | ||
// '/listRecommendations?experiment_name=' + | ||
// sessionStorage.getItem('Experiment Name') + | ||
// '&latest=false'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the commented code
// const Context = useContext(nodeContext); | ||
// const ip = Context['cluster']; | ||
// const port = Context['autotune']; | ||
// let k_url: string; | ||
// | ||
// if (ip) { | ||
// k_url = ip + ':' + port; | ||
// } else { | ||
// k_url = 'kruize'; | ||
// } | ||
// | ||
// const list_recommendations_url = | ||
// 'http://' + k_url + '/listRecommendations?experiment_name=' + props.SREdata.experiment_name + '&latest=false'; | ||
// const list_experiment_url = 'http://' + k_url + '/listExperiments'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the commented code
src/app/CentralConfig.tsx
Outdated
} | ||
} | ||
|
||
export { getRecommendationsURLWithParams, getListExperimentsURL, getHostname, getPort, getRecommendationsURL }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we follow the practice of adding an extra line towards the end of each file so that minus sign is not there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the extra line, Thanks for reviewing
// const ip = Context['cluster']; | ||
// const port = Context['autotune']; | ||
|
||
console.log("hello"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove this console log statement as it just prints hello
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
// const Context = useContext(nodeContext); | ||
// const ip = Context['cluster']; | ||
// const port = Context['autotune']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove these comments as they are not relevant to the current setup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I have removed them now, thanks for the pointer
src/app/CentralConfig.tsx
Outdated
if (isProduction) { | ||
return window.location.port || (window.location.protocol === "https:" ? "443" : "80"); | ||
} else { | ||
return process.env.AUTOTUNE_PORT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change the variable name AUTOTUNE_PORT to KRUIZE_PORT everywhere to make it consistent with the terminology used in the readme and everywhere else in ui
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated to KRUIZE_PORT
6934ff7
to
d6e7fb3
Compare
Clean up and update deployment files push scripts for demo Use non-root user nginx Update docker file update the k_url stuff Update Nginx port Update the config port Signed-off-by: bharathappali <abharath@redhat.com>
99df86a
to
23313c7
Compare
Dockerfile.old
Outdated
@@ -0,0 +1,40 @@ | |||
FROM node:16 AS builder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please delete this file .... dont need this for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted the old docker file
spec: | ||
containers: | ||
- name: kruize-ui-nginx-container | ||
image: docker.io/bharathappali/kruize-ui:central-config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the right image here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These will be generated by the deploy script and I have left them unchanged after moving the kruize demos way of depployment. Will change it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the image as quay.io/kruize/kruize-ui:test
spec: | ||
containers: | ||
- name: kruize-ui-nginx-container | ||
image: bharathappali/kruize-ui:test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Image should be from the kruize repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the image as quay.io/kruize/kruize-ui:test
Signed-off-by: bharathappali <abharath@redhat.com>
Signed-off-by: bharathappali <abharath@redhat.com>
Signed-off-by: bharathappali <abharath@redhat.com>
Signed-off-by: bharathappali <abharath@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.