-
Notifications
You must be signed in to change notification settings - Fork 44
[minor] Support BYO ClusterIssuer #1983
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
base: master
Are you sure you want to change the base?
Changes from all commits
f13d927
18b241b
5f46485
b19160b
8d953b9
23ed913
4c96936
cf88f10
a340122
f0fe68e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,6 +36,7 @@ | |
| from .catalogs import supportedCatalogs | ||
|
|
||
| from mas.cli.validators import ( | ||
| ClusterIssuerValidator, | ||
| InstanceIDFormatValidator, | ||
| WorkspaceIDFormatValidator, | ||
| WorkspaceNameFormatValidator, | ||
|
|
@@ -51,6 +52,7 @@ | |
| getStorageClasses, | ||
| getClusterVersion, | ||
| isClusterVersionInRange, | ||
| getClusterIssuers, | ||
| configureIngressForPathBasedRouting | ||
| ) | ||
| from mas.devops.mas import ( | ||
|
|
@@ -846,7 +848,6 @@ def configDNSAndCerts(self): | |
| "Unless you see an error during the ocp-verify stage indicating that the secret can not be determined you do not need to set this and can leave the response empty" | ||
| ]) | ||
| self.promptForString("Cluster ingress certificate secret name", "ocp_ingress_tls_secret_name", default="") | ||
|
|
||
| self.printH1("Configure Domain & Certificate Management") | ||
| configureDomainAndCertMgmt = self.yesOrNo('Configure domain & certificate management') | ||
| if configureDomainAndCertMgmt: | ||
|
|
@@ -886,13 +887,34 @@ def configDNSAndCerts(self): | |
| # Use MAS default self-signed cluster issuer with the default domain | ||
| self.setParam("dns_provider", "") | ||
| self.setParam("mas_domain", "") | ||
| self.setParam("mas_cluster_issuer", "") | ||
|
Contributor
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. What's the reason we don't need this set to empty here now, wouldn't we still want this set to "" in this case? |
||
| self.manualCerts = self.yesOrNo("Configure manual certificates") | ||
| self.setParam("mas_manual_cert_mgmt", self.manualCerts) | ||
| if self.getParam("mas_manual_cert_mgmt"): | ||
| self.manualCertsDir = self.promptForDir("Enter the path containing the manual certificates", mustExist=True) | ||
| else: | ||
| self.manualCertsDir = None | ||
| else: | ||
| # Configuring domain | ||
| if self.yesOrNo('Configure custom domain'): | ||
|
Contributor
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. I find the current flow a bit confusing ... Do you want to configure domain and cert management? No Feel like most customers would have answered Yes to the first one, even if they wanted what's in the second path. Think we should have a single path through this taking customers through the options, with a single prompt asking them to pick how they want to manage the certs: This can then be easily extended by @rawa-resul for his work to add support for Issuer as an alternative to ClusterIssuer. |
||
| self.promptForString("MAS top-level domain", "mas_domain") | ||
| else: | ||
| self.setParam("mas_domain", "") | ||
|
|
||
| # Configuring DNS | ||
| if self.yesOrNo("Do you want MAS to set up its own (self-signed) cluster issuer?"): | ||
| self.setParam("mas_cluster_issuer", "") | ||
| else: | ||
| self.printDescription([ | ||
| "Select the ClusterIssuer to use from the list below:", | ||
| ]) | ||
| clusterIssuers = getClusterIssuers(self.dynamicClient) | ||
| if clusterIssuers is not None and len(clusterIssuers) > 0: | ||
| for clusterIssuer in clusterIssuers: | ||
| print_formatted_text(HTML(f"<LightSlateGrey> - {clusterIssuer.metadata.name}</LightSlateGrey>")) | ||
| self.params['mas_cluster_issuer'] = prompt(HTML('<Yellow>MAS Cluster Issuer</Yellow> '), validator=ClusterIssuerValidator(), validate_while_typing=False) | ||
| else: | ||
| print_formatted_text(HTML("<Red>No ClusterIssuers found on this cluster. MAS will use self-signed certificates.</Red>")) | ||
| self.setParam("mas_cluster_issuer", "") | ||
|
|
||
| @logMethodCall | ||
| def configDNSAndCertsCloudflare(self): | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.