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

Set new container image in deployments (former Deployment UI) #7587

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

marcosdiez
Copy link
Contributor

@marcosdiez marcosdiez commented Jan 12, 2023

closes #7576

image

image

image

For this to work, I had to an unexpected API verb:

apiV1Ws.GET("/deployment/{namespace}/{deployment}/allreplicasets"), which lists all replica sets from a deployment so we can show the previous deployment images

Also, on the replicasets, I had to add a two new maps called:

  • ContainerImagesMap
  • InitContainerImagesMap

their key is the container name, their value is the container image, again, so I can list them.

That does add redundancy, for currently all objects have two lists: ContainerNames and InitContainerNames that don't have the container names.
Should I open a separate PR to refactor so that we just use ContainerNames and InitContainerNames but as maps instead of lists ?

On the new Set Image dialog, maybe we should have link with the image image instead of buttons ?

I explicitly ignrored init container images, because since they can have the same name as container images, I though that would clutter the UI.

Also, I could have made a table instead of changing one image at a time, but I can't see any real use case for that.

Suggestions are welcome

This PR can be tested using the following containers:

  • marcosdiez/dashboard-api:v2.7.0.b
  • marcosdiez/dashboard-web:v2.7.0.b

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 12, 2023
@codecov
Copy link

codecov bot commented Jan 12, 2023

Codecov Report

Merging #7587 (03cc778) into master (4da872e) will decrease coverage by 0.33%.
Report is 99 commits behind head on master.
The diff coverage is 15.62%.

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7587      +/-   ##
==========================================
- Coverage   42.24%   41.92%   -0.33%     
==========================================
  Files         219      217       -2     
  Lines       12191    12182       -9     
  Branches      179      179              
==========================================
- Hits         5150     5107      -43     
- Misses       6743     6790      +47     
+ Partials      298      285      -13     

add deploy button to deployments

deploy dialog exists. now it needs to work

we now load the containers

Deploy UI looks good

the UI does almost everything I expect

tableData comes reverse sorted

small UI changes

we can now read the value the dialog returns

label change

setimage

IT WORKS git statusgit status

done with the backend

cleanup

backend: it's now called cansetimage

renaming to setimage

it's called setimage now, almost everywhere

ui looks good now

fix replicaset tests

fixed all api tests

go fmt

style change

npm run fix
@k8s-ci-robot k8s-ci-robot added language/de Updates or issues for German translations. language/fr Updates or issues for French translations. language/ja Updates or issues for Japanese translations. language/ko Updates or issues for Korean translations. language/zh Updates or issues for Chinese translations. labels Jan 13, 2023
@marcosdiez marcosdiez changed the title WIP: Deployment UI Set new container image in deployments (former Deployment UI) Jan 13, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 13, 2023
@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Mar 17, 2023
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 16, 2023
@marcosdiez
Copy link
Contributor Author

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 16, 2023
Copy link
Contributor

@azro352 azro352 left a comment

Choose a reason for hiding this comment

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

Add french translations

@@ -986,6 +990,10 @@
<source>Last Seen</source>
<target>Dernière vue</target>
</trans-unit>
<trans-unit id="3902185219890107813" datatype="html">
<source>Select container...</source>
<target state="new">Select container...</target>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<target state="new">Select container...</target>
<target state="new">Choisissez un conteneur...</target>

@@ -102,6 +102,10 @@
<source>Every Service Account has a Secret with valid Bearer Token that can be used to log in to Dashboard. To find out more about how to configure and use Bearer Tokens, please refer to the <x id="START_LINK" ctype="x-a" equiv-text="&quot;\uFFFD#2\uFFFD&quot;"/>Authentication<x id="CLOSE_LINK" ctype="x-a" equiv-text="&quot;\uFFFD/#2\uFFFD&quot;"/> section.</source>
<target state="new">Chaque compte de service a un Secret associé avec un jeton porteur (Bearer Token) valide qui peut être utilisé pour se connecter au Dashboard. Pour en savoir plus sur la façon de configurer et utiliser des jetons porteurs, veuillez vous référer à la section <x id="START_LINK" ctype="x-a" equiv-text="&lt;a&gt;"/>Authentification<x id="CLOSE_LINK" ctype="x-a" equiv-text="&lt;/a&gt;"/>.</target>
</trans-unit>
<trans-unit id="1274528669625762639" datatype="html">
<source>Set a new container image</source>
<target state="new">Set a new container image</target>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<target state="new">Set a new container image</target>
<target state="new">Définir une nouvelle image de conteneur</target>

@@ -1150,6 +1158,10 @@
<source>Access modes</source>
<target>Modes d&apos;accès</target>
</trans-unit>
<trans-unit id="4572206383883804416" datatype="html">
<source>Set Image</source>
<target state="new">Set Image</target>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<target state="new">Set Image</target>
<target state="new">Définir l'image</target>

@@ -1402,6 +1414,10 @@
<source>Egress Rules</source>
<target state="new">Egress Rules</target>
</trans-unit>
<trans-unit id="5643209019947694032" datatype="html">
<source>container image</source>
<target state="new">container image</target>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<target state="new">container image</target>
<target state="new">image du conteneur</target>

@@ -1504,6 +1520,10 @@
<source>Exit Code</source>
<target state="new">Exit Code</target>
</trans-unit>
<trans-unit id="5966254721262198145" datatype="html">
<source>Previous Image Name (click to use)</source>
<target state="new">Previous Image Name (click to use)</target>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<target state="new">Previous Image Name (click to use)</target>
<target state="new">Nom de l'image précédente (cliquer pour utiliser)</target>

@@ -1964,6 +1992,10 @@
<source>NAMESPACES</source>
<target>ESPACES DE NOMS</target>
</trans-unit>
<trans-unit id="7574968363077451152" datatype="html">
<source>Previous Deployment Date</source>
<target state="new">Previous Deployment Date</target>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<target state="new">Previous Deployment Date</target>
<target state="new">Date du déploiement précédent</target>

@@ -1884,6 +1908,10 @@
<source>Init Containers</source>
<target>Conteneurs d&apos;initilisation</target>
</trans-unit>
<trans-unit id="7286769344436324609" datatype="html">
<source>Set Container Image</source>
<target state="new">Set Container Image</target>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<target state="new">Set Container Image</target>
<target state="new">Définir l'image d'un conteneur</target>

@@ -1600,6 +1620,10 @@
<source>TCP Socket</source>
<target state="new">TCP Socket</target>
</trans-unit>
<trans-unit id="6406804063343897494" datatype="html">
<source>A container image will be replaced on <x id="INTERPOLATION" equiv-text="&quot;\uFFFD0\uFFFD&quot;"/> <x id="INTERPOLATION_1" equiv-text="&quot;\uFFFD1\uFFFD&quot;"/>.</source>
<target state="new">A container image will be replaced on <x id="INTERPOLATION" equiv-text="&quot;\uFFFD0\uFFFD&quot;"/> <x id="INTERPOLATION_1" equiv-text="&quot;\uFFFD1\uFFFD&quot;"/>.</target>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<target state="new">A container image will be replaced on <x id="INTERPOLATION" equiv-text="&quot;\uFFFD0\uFFFD&quot;"/> <x id="INTERPOLATION_1" equiv-text="&quot;\uFFFD1\uFFFD&quot;"/>.</target>
<target state="new">L'image d'un conteneur sera remplacée sur le <x id="INTERPOLATION" equiv-text="&quot;\uFFFD0\uFFFD&quot;"/> <x id="INTERPOLATION_1" equiv-text="&quot;\uFFFD1\uFFFD&quot;"/>.</target>

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: marcosdiez
Once this PR has been reviewed and has the lgtm label, please assign maciaszczykm for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 22, 2024
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@marcosdiez
Copy link
Contributor Author

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 22, 2024
@marcosdiez
Copy link
Contributor Author

@maciaszczykm hi. could we merge my PR sometime this year ?

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 26, 2024
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 22, 2024
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@marcosdiez
Copy link
Contributor Author

test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/de Updates or issues for German translations. language/fr Updates or issues for French translations. language/ja Updates or issues for Japanese translations. language/ko Updates or issues for Korean translations. language/zh Updates or issues for Chinese translations. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI for kubectl set image DEPLOYMENT_NAME CONTAINER_NAME=IMAGE_URL
4 participants