-
Notifications
You must be signed in to change notification settings - Fork 66
feat(ws): frontend Makefile to support deploy #534
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(ws): frontend Makefile to support deploy #534
Conversation
5d96d21
to
572e8e0
Compare
b13dd34
to
85c4bf7
Compare
workspaces/frontend/Makefile
Outdated
.PHONY: deploy | ||
deploy: kustomize ## Deploy frontend to the K8s cluster specified in ~/.kube/config. | ||
cd manifests/kustomize/overlays/istio && $(KUSTOMIZE) edit set image workspaces-frontend=${IMG} | ||
$(KUSTOMIZE) apply -k manifests/kustomize/overlays/istio |
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 line is wrong - should be $(KUBECTL)
As written - trying to run this commend results in:
/Users/astonebe/Development/Code/GitHub/kubeflow-notebooks/workspaces/frontend/bin/kustomize apply -k manifests/kustomize/overlays/istio
Error: unknown command "apply" for "kustomize"
Run 'kustomize --help' for usage.
gmake: *** [Makefile:62: deploy] Error 1
please test your changes before having PR ready for review 🙇
workspaces/frontend/Makefile
Outdated
|
||
.PHONY: undeploy | ||
undeploy: kustomize ## Undeploy frontend from the K8s cluster specified in ~/.kube/config. | ||
$(KUSTOMIZE) delete -k manifests/kustomize/overlays/istio --ignore-not-found=true |
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.
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.
fixed
mkoushni@mkoushni-thinkpadp14sgen2i:~/Applications/Notebook/notebooks/workspaces/frontend$ make deploy
cd manifests/kustomize/overlays/istio && /home/mkoushni/Applications/Notebook/notebooks/workspaces/frontend/bin/kustomize edit set image workspaces-frontend=nbv2-frontend:latest
kubectl apply -k manifests/kustomize/overlays/istio
namespace/kubeflow-workspaces unchanged
service/workspaces-frontend unchanged
deployment.apps/workspaces-frontend unchanged
destinationrule.networking.istio.io/workspaces-frontend created
virtualservice.networking.istio.io/workspaces-frontend created
authorizationpolicy.security.istio.io/workspaces-frontend created
mkoushni@mkoushni-thinkpadp14sgen2i:~/Applications/Notebook/notebooks/workspaces/frontend$ make undeploy
kubectl delete -k manifests/kustomize/overlays/istio --ignore-not-found=true
namespace "kubeflow-workspaces" deleted
service "workspaces-frontend" deleted
deployment.apps "workspaces-frontend" deleted
destinationrule.networking.istio.io "workspaces-frontend" deleted
virtualservice.networking.istio.io "workspaces-frontend" deleted
authorizationpolicy.security.istio.io "workspaces-frontend" deleted
istio crd installation for makefile testing : |
6232d4b
to
d445adf
Compare
.gitignore
Outdated
.LSOverride | ||
._* | ||
._* | ||
/workspaces/frontend/bin/ |
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.
d445adf
to
f997f47
Compare
Signed-off-by: CI Bot <[email protected]>
f997f47
to
68d3471
Compare
/ok-to-test
|
Signed-off-by: Mathew Wicks <[email protected]>
/ok-to-test |
Thanks @mkoushni and @andyatmiami, next step is to use this in a CICD test? /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: thesuperzapper 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 |
d5652e6
into
kubeflow:notebooks-v2
* feat(ws): frontend Makefile to support deploy Signed-off-by: CI Bot <[email protected]> * mathew: fix 1 Signed-off-by: Mathew Wicks <[email protected]> --------- Signed-off-by: CI Bot <[email protected]> Signed-off-by: Mathew Wicks <[email protected]> Co-authored-by: Mathew Wicks <[email protected]>
* feat(ws): frontend Makefile to support deploy Signed-off-by: CI Bot <[email protected]> * mathew: fix 1 Signed-off-by: Mathew Wicks <[email protected]> --------- Signed-off-by: CI Bot <[email protected]> Signed-off-by: Mathew Wicks <[email protected]> Co-authored-by: Mathew Wicks <[email protected]>
Add standardized Makefile for workspaces/frontend in notebooks-v2
related #528
Description
Introduce a Makefile under workspaces/frontend in the notebooks-v2 branch to streamline common build and deployment workflows for the frontend service.
The Makefile should follow the same structure and conventions already established in the controller and backend components, providing consistency across the project. It should include targets for building, pushing, and deploying the frontend container image, as well as handling cross-platform builds and undeployment from remote clusters.
This enables developers to work with the frontend service in a uniform way without needing custom scripts, ensuring easier onboarding, fewer errors, and alignment with the broader project tooling.
Scope
Place Makefile at the root of workspaces/frontend.
Expose standardized targets:
docker-build: build local frontend image
docker-push: push frontend image to registry
docker-buildx: build/push cross-platform images with BuildKit
deploy: deploy frontend via kustomize into Kubernetes cluster
undeploy: remove frontend resources from the cluster
Include helper targets like help, clean, and dependency installation (e.g., kustomize).
Support overriding image name/tag, container tool, and Kustomize directory through environment variables.