forked from Azure/azure-cli-extensions
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Zetia/fix ssl secret flag #224
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
83912d7
fix bug: update operation doesn't respect sslSecret parameter
zetiaatgithub 2bdeb56
fix bug: update operation doesn't respect sslSecret parameter
zetiaatgithub 936c48b
fix typo
zetiaatgithub cf86708
Merge branch 'k8s-extension/public' into zetia/fix-sslSecret-flag
bavneetsingh16 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -366,14 +366,17 @@ def Update(self, cmd, resource_group_name, cluster_name, auto_upgrade_minor_vers | |
|
||
configuration_protected_settings = _dereference(self.reference_mapping, configuration_protected_settings) | ||
|
||
if self.sslKeyPemFile in configuration_protected_settings and \ | ||
self.sslCertPemFile in configuration_protected_settings: | ||
logger.info(f"Both {self.sslKeyPemFile} and {self.sslCertPemFile} are set, update ssl key.") | ||
fe_ssl_cert_file = configuration_protected_settings.get(self.sslCertPemFile) | ||
fe_ssl_key_file = configuration_protected_settings.get(self.sslKeyPemFile) | ||
|
||
if fe_ssl_cert_file and fe_ssl_key_file: | ||
self.__set_inference_ssl_from_file(configuration_protected_settings, fe_ssl_cert_file, fe_ssl_key_file) | ||
fe_ssl_secret = _get_value_from_config_protected_config( | ||
self.SSL_SECRET, configuration_settings, configuration_protected_settings) | ||
fe_ssl_cert_file = configuration_protected_settings.get(self.sslCertPemFile) | ||
fe_ssl_key_file = configuration_protected_settings.get(self.sslKeyPemFile) | ||
# always take ssl key/cert first, then secret if key/cert file is not provided | ||
if fe_ssl_cert_file and fe_ssl_key_file: | ||
logger.info(f"Both {self.sslKeyPemFile} and {self.sslCertPemFile} are set, update ssl key.") | ||
self.__set_inference_ssl_from_file(configuration_protected_settings, fe_ssl_cert_file, fe_ssl_key_file) | ||
elif fe_ssl_secret: | ||
logger.info(f"{self.SSL_SECRET} is set, update ssl secret.") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here too reword the message to "...set, updating ssl secret." There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed |
||
self.__set_inference_ssl_from_secret(configuration_settings, fe_ssl_secret) | ||
|
||
# if no entries are existed in configuration_protected_settings, configuration_settings, return whatever passed | ||
# in the Update function(empty dict or None). | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Minor, reword the message to "...set, updating ssl key."
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.
Fixed