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

Updating deployment.yaml doesn't reflect into openshift #4472

Open
surnandi-git opened this issue Sep 15, 2024 · 3 comments
Open

Updating deployment.yaml doesn't reflect into openshift #4472

surnandi-git opened this issue Sep 15, 2024 · 3 comments

Comments

@surnandi-git
Copy link

Type: Bug

Describe the bug

Since Auto Deploy is not happening, I was copying the image id and putting it into deplyment yaml to get the app refreshed. Performing the same in through code, isn't working.

Expected Behavior

Saving the deployment yaml file should be reflected into the OpenShift deployment. And a new pod should be created (terminating existing)

Current Behavior

It doesn't reflect change made into OpenShift, although it shows save. Upon relaod it brings the older file from server

Steps to Reproduce

  1. Have a application created through using deployment from git
  2. Estiblish webhook for auto build
  3. Make some code change and observe the build
  4. Capture the new image id from VSCode -> Image Stream -> Select your image and copy the image id
  5. Go to VSCode -> Deployments -> Select your deployment (yaml opens up)
  6. Update the image id in the deployment yaml
  7. Save the file.

Environment

OpenShift
VSCode Extension

Extension version: 1.16.0
VS Code version: Code 1.93.0 (Universal) (4849ca9bdf9666755eb463db297b69e5385090e3, 2024-09-04T13:02:38.431Z)
OS version: Darwin arm64 23.6.0
Modes:

System Info
Item Value
CPUs Apple M1 (8 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 268, 88, 41
Memory (System) 16.00GB (3.22GB free)
Process Argv
Screen Reader yes
VM 0%
@mohitsuman
Copy link
Collaborator

@datho7561 can you please look into this ?

@datho7561
Copy link
Contributor

We don't currently support this. The feature of loading the YAML for a resource on the cluster is intended to be read-only.

However, I think it's a good idea to apply the changes to the cluster when the document is saved.

@adietish how does intellij-kubernetes handle this? If I recall correctly, when the user saves the document, there used to be a pop up that asked if they wanted to apply the changes, but you changed it at some point? I can't seem to get intellij-kubernetes running on my computer right now.

@adietish
Copy link
Contributor

adietish commented Sep 18, 2024

@datho7561:

@adietish how does intellij-kubernetes handle this? If I recall correctly, when the user saves the document, there used to be a pop up that asked if they wanted to apply the changes, but you changed it at some point? I can't seem to get intellij-kubernetes running on my computer right now.

yes, intellij-kubernetes notifies the user that the changes in the editor are not present in the resource that exists on the cluster. You can then "push" it to the cluster. Some users find this notification distracting though.
Saving to the cluster is a bit tricky. The cluster may have updates (ex. resource version, UUID, etc.) that you dont have in your local document yet. The way to avoid conflicts is by doing so called server-side-apply. You send the document to the cluser and it'll merge it: https://kubernetes.io/docs/reference/using-api/server-side-apply/

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

No branches or pull requests

4 participants