Skip to content

Commit

Permalink
fix: Cert hosts for JetStream EventBus (#2827)
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Wang <whynowy@gmail.com>
  • Loading branch information
whynowy authored Nov 28, 2023
1 parent 2721ca9 commit ec96ecd
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion api/event-bus.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/event-bus.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/jsonschema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@
"description": "ReloaderContainerTemplate contains customized spec for config reloader container"
},
"replicas": {
"description": "Redis StatefulSet size",
"description": "JetStream StatefulSet size",
"format": "int32",
"type": "integer"
},
Expand Down
2 changes: 1 addition & 1 deletion api/openapi-spec/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion controllers/eventbus/installer/jetstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,10 @@ func (r *jetStreamInstaller) createSecrets(ctx context.Context) error {
}

// Generate TLS self signed certificate for Jetstream cluster nodes: includes TLS private key, certificate, and CA certificate
clusterNodeHosts := []string{fmt.Sprintf("*.%s.%s.svc", generateJetStreamServiceName(r.eventBus), r.eventBus.Namespace)}
clusterNodeHosts := []string{
fmt.Sprintf("*.%s.%s.svc.cluster.local", generateJetStreamServiceName(r.eventBus), r.eventBus.Namespace),
fmt.Sprintf("*.%s.%s.svc", generateJetStreamServiceName(r.eventBus), r.eventBus.Namespace),
}
r.logger.Infof("cluster node hosts: %+v", clusterNodeHosts)
clusterKeyPEM, clusterCertPEM, clusterCACertPEM, err := tls.CreateCerts(certOrg, clusterNodeHosts, time.Now().Add(10*365*24*time.Hour), true, true) // expires in 10 years
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/eventbus/v1alpha1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/apis/eventbus/v1alpha1/jetstream_eventbus.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
type JetStreamBus struct {
// JetStream version, such as "2.7.3"
Version string `json:"version,omitempty" protobuf:"bytes,1,opt,name=version"`
// Redis StatefulSet size
// JetStream StatefulSet size
// +kubebuilder:default=3
Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"`
// ContainerTemplate contains customized spec for Nats JetStream container
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/eventbus/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ec96ecd

Please sign in to comment.