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

Deploy container image to cluster #3798

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

datho7561
Copy link
Collaborator

@datho7561 datho7561 commented Jan 11, 2024

  • Add "Create Deployment from Container Image URL" wizard to project context menu
    • It uses the VS Code text input
    • It has a back button and remembers what you've entered when you go back, similar to what Victor did for the login workflow
    • Once the deployment's been created, the logs for the container are opened in the OpenShift Terminal
  • Add demo gif and walkthrough entry for "Create Deployment from Container Image URL"
  • Add "Delete" context menu item for Kubernetes objects (eg. Deployments)
  • Add "Watch logs" context menu item for Kubernetes objects (eg. Deployments)

deploy-a-container-image

Closes #2418

Signed-off-by: David Thompson davthomp@redhat.com

@datho7561
Copy link
Collaborator Author

@mohitsuman when you have a change, could you please tell me what do you think about this workflow?

Copy link

codecov bot commented Jan 11, 2024

Codecov Report

Attention: 97 lines in your changes are missing coverage. Please review.

Comparison is base (025aa38) 33.12% compared to head (baa68eb) 32.81%.
Report is 12 commits behind head on main.

❗ Current head baa68eb differs from pull request most recent head beb234f. Consider uploading reports for the commit beb234f to get more accurate results

Files Patch % Lines
src/deployment.ts 10.52% 85 Missing ⚠️
src/explorer.ts 31.25% 11 Missing ⚠️
src/oc/ocWrapper.ts 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3798      +/-   ##
==========================================
- Coverage   33.12%   32.81%   -0.31%     
==========================================
  Files          84       85       +1     
  Lines        6195     6311     +116     
  Branches     1270     1287      +17     
==========================================
+ Hits         2052     2071      +19     
- Misses       4143     4240      +97     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@datho7561 datho7561 force-pushed the 2418-deploy-docker-image branch 2 times, most recently from baa68eb to 0ae4c62 Compare January 11, 2024 19:16
vrubezhny
vrubezhny previously approved these changes Jan 15, 2024
Copy link
Contributor

@vrubezhny vrubezhny left a comment

Choose a reason for hiding this comment

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

Looks and works good,

Please take into account the suggestions listed inline

src/deployment.ts Show resolved Hide resolved
src/deployment.ts Show resolved Hide resolved
src/deployment.ts Outdated Show resolved Hide resolved
- Add "Create Deployment from Container Image URL" wizard to project context menu
  - It uses the VS Code text input
  - It has a back button and remembers what you've entered when you go
    back, similar to what Victor did for the login workflow
  - Once the deployment's been created, the logs for the container are
    opened in the OpenShift Terminal
- Add demo gif and walkthrough entry for "Create Deployment from
  Container Image URL"
- Add "Delete" context menu item for Kubernetes objects (eg.
  Deployments)
- Add "Watch logs" context menu item for Kubernetes objects (eg.
  Deployments)

Closes redhat-developer#2418

Signed-off-by: David Thompson <davthomp@redhat.com>
@vrubezhny
Copy link
Contributor

vrubezhny commented Jan 16, 2024

Some more things to take a look at:

After I deleted the container image I've deployed earlier to my Kind cluster and [updating/rebasing/rebuilding] restarting the OS Tools I see the following error message:

image

PS: Probably that's because I've left /Deployment-my-fedora-gtk3-mutter-java-node.yaml deployment YAML file opened in editor. I can't reproduce the error after I closed this editor.

@datho7561
Copy link
Collaborator Author

I looked into how Kubernetes handles specifying which ports to expose to the network internal to the cluster. Roland seemed to think this is done as a part of the Docker/OCI image creation (i.e. adding EXPOSE 8080 to the Dockerfile/Containerfile to expose 8080). After some Googling, this seems to be the case. As a result, I don't think that we need to add another step in the wizard to specify the port. If the user wants to expose the container outside of the cluster, they can use the feature Muthu added for creating a Route.

Copy link
Contributor

@vrubezhny vrubezhny left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks!

@datho7561 datho7561 merged commit 4218e28 into redhat-developer:main Jan 17, 2024
4 checks passed
@datho7561 datho7561 deleted the 2418-deploy-docker-image branch January 17, 2024 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to deploy docker images to connected OpenShift cluster
2 participants