Skip to content

Commit

Permalink
added csr hosts for orderer node (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
adityajoshi12 authored Dec 16, 2021
1 parent 73aa2b4 commit 04378f0
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions kubectl-hlf/cmd/ordnode/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ func (c *createCmd) run(args []string) error {
return err
}

csrHosts := []string{
"127.0.0.1",
"localhost",
}
csrHosts = append(csrHosts, k8sIP)
csrHosts = append(csrHosts, c.ordererOpts.Name)
csrHosts = append(csrHosts, fmt.Sprintf("%s.%s", c.ordererOpts.Name, c.ordererOpts.NS))

fabricOrderer := &v1alpha1.FabricOrdererNode{
TypeMeta: v1.TypeMeta{
Kind: "FabricOrdererNode",
Expand Down Expand Up @@ -110,12 +118,8 @@ func (c *createCmd) run(args []string) error {
Cacert: base64.StdEncoding.EncodeToString([]byte(certAuth.Status.TlsCert)),
},
Csr: v1alpha1.Csr{
Hosts: []string{
"127.0.0.1",
"localhost",
k8sIP,
},
CN: "",
Hosts: csrHosts,
CN: "",
},
Enrollid: c.ordererOpts.EnrollID,
Enrollsecret: c.ordererOpts.EnrollPW,
Expand Down

0 comments on commit 04378f0

Please sign in to comment.