-
Notifications
You must be signed in to change notification settings - Fork 13
issue #53 - adding config-map support - adding secret support - using… #64
issue #53 - adding config-map support - adding secret support - using… #64
Conversation
compilation error reported:
|
Yes, I am aware. That's why this is "work in progress" |
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.
mentioning just tab/space issue
My concern is that to publish a simple integration without needing a config-map or secret now requires hitting additional keys or making additional selections. The "flow" is a bit erratic to be reminded of config-maps and secrets each time you start a new integration. But if we add more menus, that becomes confusing as well. Do we then have three menus -- Start Integration, Start Integration with Config Map, Start Integration with Secret? What happens when we then add additional resources and individual properties? That becomes two more menus... We could possibly go with Start Integration and provide a list of options -- Simple, Properties, Resources, Config Map, and Secret -- they choose one and we go down the rabbit hole with their selection. That reduces it to a single click for a simple integration. |
Changing the flow slightly. Now we front the flow by asking the user what they are trying to accomplish (simple integration, integration with config-map, or integration with secret). Based on their selection, we route them accordingly. A simple integration does not require any further input from the user, so it just does the deed. Selecting Config Map moves on to enable them to select a config-map from the list of config-maps already registered in the Kubernetes system. Same thing for Secrets. I think this gives us the room we need to move forward with adding Property- and Resource- style deployments in additional PRs. |
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.
if not too much work, it would be nice to split the PR in 2:
- the part to create configmap and secrets
- the part improving the Camel-K integration commands using configmap and secret.
advantages:
- smaller PR to review
- the part to create configmap and secrets will be nice to contribute upstream, so picking a single PR could ease the process.
The ConfigMap file is dealing with Config AND secret, seems better to rename it.
sharing already this feedback. My minikube is corrupt and not sure when i will be able to have it get back to test more
src/IntegrationUtils.ts
Outdated
let selectedConfigMap = undefined; | ||
let selectedSecret = undefined; | ||
await vscode.window.showQuickPick(['Simple', 'Config-Map', 'Secret'], { | ||
placeHolder: 'If your integration requires a Config-map or Secret, select that. Or use Simple for a basic integration.' |
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.
why there is a cap for the H
in placeHolder
? I thought it would be simply placeholder
as it is a "common" word.
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.
'placeHolder' is part of the vscode API - https://code.visualstudio.com/api/references/vscode-api#QuickPickOptions
@@ -201,6 +203,9 @@ export function activate(context: vscode.ExtensionContext) { | |||
let startIntegration = vscode.commands.registerCommand('camelk.startintegration', async (uri:vscode.Uri) => { await runTheFile(uri);}); | |||
context.subscriptions.push(startIntegration); | |||
|
|||
// add commands to create config-map and secret objects from .properties files |
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.
not sure this comment useful.
renaming the class and the method should be enough to make it clear.
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.
Leaving the comment. I think it's provides additional context without a lot of overhead (a single comment line).
I manage to install Kubernetes locally. I don't have access to any other errors. By putting breakpoints, I noticed that it is because it doesn't find the "camel.apache.org/v1alpha1" when calling 'api-versions'. I think the error should be clearer for a normal user. (it is normal to not find it as I didn't install it) |
there is an error when trying to create a config map with space:
EDIT: seems not possible, the error reported is: |
well, having errors even with a simple name
In fact it is because the path to the file contains a space
using enclosed path is working
|
see microsoft/vscode#9827 |
console.log(`commandString = ${commandString}`); | ||
let runKubectl = child_process.exec(commandString, { cwd : foldername}); | ||
runKubectl.stdout.on('data', function (data) { | ||
resolve(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.
you are just checking for any content on stdout. Is that really a sufficient test to determine if the integration has been created successfully?
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.
Yes, because deploying a new integration takes a long time. This is why we now have decorators and a status tooltip for each "deployed" integration that shows up in the system. The state changes over time through a few states and it's better to get it out there and wait for the result.
I have moved them down like I did the Start Apache Camel-K Integration menu: |
@lhein thanks to your help with cleaning up the tests and promise issues, we're down to just a couple of things that ONLY crop up on Travis:
and then at the end...
I'm not seeing anything obvious on the sanitize.go test, but would be happy with the improved stability we have now and could spin that off into #69 |
… k8s api - adding drop-downs for selection of config-map or secret - fixing typescript compile issue - streamlined prompts - addressed commit feedback - updated readme - addressed second round of feedback - fixed some promise issues discovered with missing rejects - test cleanup - additional promise cleanup Signed-off-by: Brian Fitzpatrick <[email protected]>
Took care of one more promise rejected message that was showing up at runtime in the console. Woot! Still have two left in the tests, but we're getting there @lhein |
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.
Reviewed as good as possible. Due to not having a working camelk install locally I wasn't able to test run it but Brian provided a video showing functionality which looked good. Remaining rejected promises can be handled in #69.
… k8s api
Signed-off-by: Brian Fitzpatrick [email protected]