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

feat: Add a predefined configmap to store theia preferences #174

Merged
merged 5 commits into from
Nov 24, 2021

Conversation

vinokurig
Copy link
Contributor

@vinokurig vinokurig commented Oct 28, 2021

Signed-off-by: Igor Vinokur ivinokur@redhat.com

What does this PR do?

  • Create a predefined K8s secret per nemaespace to store theia preferences.
  • Include the preference secret to the workspcae-secrets role, to be able to manage it outside.

See #172 (comment)

Screenshot/screencast of this PR

What issues does this PR fix or reference?

eclipse-che/che#20622

How to test this PR?

  1. Start a workspace and open a terminal from the ide container.
  2. Send an HTTP request to the kubernetes API to edit user-preferences secret: curl -X POST <kubernetes API url>/api/v1/namespaces/<namespace name>/secrets/workspace-theia-secret --header "Content-Type: application/json-patch+json" -d '[{ "op": "add", "path": "/data", "value": { "key": "" } }]'

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

@che-bot
Copy link
Contributor

che-bot commented Oct 28, 2021

✅ E2E Happy path tests succeed 🎉

See Details

Test product:

  • Use comment "[crw-ci-test]" to rerun happy path E2E test.
  • Use comment "[crw-ci-test --rebuild]" to re-build the images and rerun happy path E2E test.

Eclipse Che QE channel: https://mattermost.eclipse.org/eclipse/channels/eclipse-che-qe

Signed-off-by: Igor Vinokur <ivinokur@redhat.com>
Copy link
Contributor

@metlos metlos left a comment

Choose a reason for hiding this comment

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

Is this secret bound to a workspace or to a namespace/user? Would it make sense to label or annotate these secrets?

@che-bot
Copy link
Contributor

che-bot commented Oct 28, 2021

✅ E2E Happy path tests succeed 🎉

See Details

Test product:

  • Use comment "[crw-ci-test]" to rerun happy path E2E test.
  • Use comment "[crw-ci-test --rebuild]" to re-build the images and rerun happy path E2E test.

Eclipse Che QE channel: https://mattermost.eclipse.org/eclipse/channels/eclipse-che-qe

@vinokurig
Copy link
Contributor Author

@metlos

Is this secret bound to a workspace or to a namespace/user?

The secret is bound to a namespace/user.

Would it make sense to label or annotate these secrets?

There is no label in the current workspace-credentials-secret which has similar purpose. Please propose one, if it is really needed.

@skabashnyuk
Copy link
Contributor

Are we going to have a separate secret for each ide? Should we make the name of it ide-neutral? For example editor-preferences?

@svor
Copy link
Contributor

svor commented Nov 2, 2021

@vinokurig would it be a problem to save preferences of all editors in one secret?

@benoitf
Copy link
Contributor

benoitf commented Nov 2, 2021

Are we going to have a separate secret for each ide? Should we make the name of it ide-neutral? For example editor-preferences?

I think it's what @l0rd wanted (preferences per ide)

@skabashnyuk
Copy link
Contributor

skabashnyuk commented Nov 2, 2021

Are we going to have a separate secret for each ide? Should we make the name of it ide-neutral? For example editor-preferences?

I think it's what @l0rd wanted (preferences per ide)

Can we do that in a way that we don't need to adjust che-server's source code for each?
For example one-secret with prefixed properties?

@benoitf
Copy link
Contributor

benoitf commented Nov 2, 2021

I would say for sure it makes sense that as there are multiple editors and we don't know all editors in advance, it should be generic enough

@vinokurig
Copy link
Contributor Author

@svor @skabashnyuk @benoitf @l0rd Renamed the secret to workspace-preferences-secret so that we can use it as a single secret for all editors

@che-bot
Copy link
Contributor

che-bot commented Nov 2, 2021

✅ E2E Happy path tests succeed 🎉

See Details

Test product:

  • Use comment "[crw-ci-test]" to rerun happy path E2E test.
  • Use comment "[crw-ci-test --rebuild]" to re-build the images and rerun happy path E2E test.

Eclipse Che QE channel: https://mattermost.eclipse.org/eclipse/channels/eclipse-che-qe

@l0rd
Copy link
Contributor

l0rd commented Nov 2, 2021

I am ok with this approach

@vinokurig
Copy link
Contributor Author

I am going to merge it after the che-theia part is finished.

@vinokurig
Copy link
Contributor Author

@skabashnyuk @l0rd From the discussion here it was decided to use config-map for storing preferences. My last commit reworks the PR to use config-map instead of secret, could you please take a look?

@vinokurig vinokurig changed the title feat: Add a predefined secret to store theia preferences feat: Add a predefined configmap to store theia preferences Nov 18, 2021
@vinokurig
Copy link
Contributor Author

depends on eclipse-che/che-operator#1180

@che-bot
Copy link
Contributor

che-bot commented Nov 18, 2021

❌ E2E Happy path tests failed ❗

See Details

Test product:

  • Use comment "[crw-ci-test]" to rerun happy path E2E test.
  • Use comment "[crw-ci-test --rebuild]" to re-build the images and rerun happy path E2E test.

Eclipse Che QE channel: https://mattermost.eclipse.org/eclipse/channels/eclipse-che-qe

@che-bot
Copy link
Contributor

che-bot commented Nov 19, 2021

✅ E2E Happy path tests succeed 🎉

See Details

Test product:

  • Use comment "[crw-ci-test]" to rerun happy path E2E test.
  • Use comment "[crw-ci-test --rebuild]" to re-build the images and rerun happy path E2E test.

Eclipse Che QE channel: https://mattermost.eclipse.org/eclipse/channels/eclipse-che-qe

@svor
Copy link
Contributor

svor commented Nov 22, 2021

@skabashnyuk ok to merge?

@vinokurig vinokurig merged commit cf741db into main Nov 24, 2021
@vinokurig vinokurig deleted the che-20622-1 branch November 24, 2021 10:23
@che-bot che-bot added this to the 7.40 milestone Nov 24, 2021
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.

8 participants