-
Notifications
You must be signed in to change notification settings - Fork 68
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
WIP: feat(generate-config): create config with existing service account #1588
Conversation
Service accounts (generally any credentials) cannot be passed thru flags due to them being saved in plain form to bash history. We had initial design for that case in docs. Idea was to use json file provided from service account command. WDYT? |
I was planning to go with it in the beginning, but it occurred to me that credntial can be in some other format too, for which user wll have to reconstruct it, that could be bit time taking, hence dropped the idea to have it as main method to get the credentials.
I will agree, hence there are twoflags - |
We can use json file as input and env variables presence(user running .env file) Do we need more options? |
I would not be worried about it because:
|
Since we designed that command many things changed: we now have secret in service accounts create as output I'm wondering if we actually approached problem right: Do we really want to supply users service account? That will have numerous benefits:
|
@rkpattnaik780 we need to put some research on this as there are different opinions how we should do it. Mainly there is big trend in current users to disable sa creation in context generate command. |
FYI (low priority) @jackdelahunt @dimakis |
4e94580
to
1d47e67
Compare
1d47e67
to
c7ea1ac
Compare
`) | ||
|
||
templateSecret = heredoc.Doc(` | ||
templateConfigMap = heredoc.Doc(` |
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.
@wtrocki
This PR changes generate-config
command to skip creating a service account. And replaces secret with configmap.
Is that good to be verified? |
Yes, I will be updating help texts and examples in a while. |
pkg/cmd/generate/configurations.go
Outdated
envConfig = template.Must(template.New(envFormat).Parse(templateEnv)) | ||
jsonConfig = template.Must(template.New(jsonFormat).Parse(templateJSON)) | ||
propertiesConfig = template.Must(template.New(propertiesFormat).Parse(templateProperties)) | ||
congMapTemplateConfig = template.Must(template.New(configmapFormat).Parse(templateConfigMap)) |
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.
I think we might need to add some documentation/msg. Something like:
That will smoothen backwards compatibility issue |
Configurations successfully saved to "{{.FilePath}}" | ||
|
||
You can now create new service accounts or use existing ones to connect to the service(s) |
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.
As user I'm wondering how.
Can we be more specific?.
Run rhoas service-account create etc.
Verification steps work 👍 |
…ce account (#1588)" This reverts commit 3a558a9. Signed-off-by: Ramakrishna Pattnaik <[email protected]>
rhoas generate-config
should not create service-account.Verification Steps
--type
to beconfigmap
rhoas generate-config
shouldn't create a service account.ToDo:
Type of change