Skip to content

Commit

Permalink
OCM-6419 | feat: fetch OIDC thumbprint from CS
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom McKay committed Apr 24, 2024
1 parent 5935b9c commit 4fee338
Show file tree
Hide file tree
Showing 23 changed files with 39,765 additions and 38,851 deletions.
21 changes: 14 additions & 7 deletions cmd/create/cluster/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3236,7 +3236,14 @@ func run(cmd *cobra.Command, _ []string) {
if !output.HasFlag() || r.Reporter.IsTerminal() {
r.Reporter.Infof("Preparing to create OIDC Provider.")
}
oidcprovider.Cmd.Run(oidcprovider.Cmd, []string{clusterName, mode, ""})

runner := oidcprovider.CreateOidcProviderRunner()
err = runner(nil, r, oidcprovider.NewCreateOidcProviderCommand(),
[]string{clusterName, mode, ""})
if err != nil {
r.Reporter.Errorf("%s", err)
os.Exit(1)
}
} else {
output := ""
if len(operatorRoles) == 0 {
Expand Down Expand Up @@ -3353,12 +3360,12 @@ func GenerateContractDisplay(contract *accountsv1.Contract) string {
numberOfVCPUs, numberOfClusters := ocm.GetNumsOfVCPUsAndClusters(dimensions)

contractDisplay := fmt.Sprintf(`
+---------------------+----------------+
| Start Date |%s |
| End Date |%s |
| Number of vCPUs: |'%s' |
| Number of clusters: |'%s' |
+---------------------+----------------+
+---------------------+----------------+
| Start Date |%s |
| End Date |%s |
| Number of vCPUs: |'%s' |
| Number of clusters: |'%s' |
+---------------------+----------------+
`,
contract.StartDate().Format(format),
contract.EndDate().Format(format),
Expand Down
7 changes: 4 additions & 3 deletions cmd/create/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ func init() {
Cmd.AddCommand(cluster.Cmd)
Cmd.AddCommand(idp.Cmd)
Cmd.AddCommand(machinepool.Cmd)
Cmd.AddCommand(oidcconfig.Cmd)
Cmd.AddCommand(oidcprovider.Cmd)
Cmd.AddCommand(oidcconfig.NewCreateOidcConfigCommand())
oidcProviderCmd := oidcprovider.NewCreateOidcProviderCommand()
Cmd.AddCommand(oidcProviderCmd)
Cmd.AddCommand(operatorroles.Cmd)
Cmd.AddCommand(userrole.Cmd)
Cmd.AddCommand(ocmrole.Cmd)
Expand All @@ -75,7 +76,7 @@ func init() {
globallyAvailableCommands := []*cobra.Command{
accountroles.Cmd, operatorroles.Cmd,
userrole.Cmd, ocmrole.Cmd,
oidcprovider.Cmd,
oidcProviderCmd,
}
arguments.MarkRegionHidden(Cmd, globallyAvailableCommands)
}

0 comments on commit 4fee338

Please sign in to comment.