Skip to content

Commit

Permalink
[#1086] use cr.name as broker name in restricted mode
Browse files Browse the repository at this point in the history
  • Loading branch information
gtully authored and brusdev committed Jan 23, 2025
1 parent 83f68cc commit fc30ea0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion controllers/activemqartemis_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2036,7 +2036,7 @@ func (reconciler *ActiveMQArtemisReconcilerImpl) PodTemplateSpecForCR(customReso
brokerPropertiesMapData["_cert-roles"] = cert_roles.String()

foundationalProps := newPropsWithHeader()
fmt.Fprintln(foundationalProps, "name=amq-broker")
fmt.Fprintf(foundationalProps, "name=%s\n", customResource.Name)
fmt.Fprintln(foundationalProps, "criticalAnalyzer=false")
fmt.Fprintln(foundationalProps, "journalDirectory=/app/data")
fmt.Fprintln(foundationalProps, "bindingsDirectory=/app/data/bindings")
Expand Down
4 changes: 2 additions & 2 deletions pkg/utils/artemis/artemis.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ type Artemis struct {
jolokia jolokia.IJolokia
}

func GetArtemisAgentForRestricted(client rtclient.Client, ordinalFqdn string) *Artemis {
func GetArtemisAgentForRestricted(client rtclient.Client, brokerName string, ordinalFqdn string) *Artemis {
artemis := Artemis{
ip: ordinalFqdn,
jolokiaPort: jolokia.JOLOKIA_AGENT_PORT,
name: "amq-broker",
name: brokerName,
jolokia: jolokia.GetRestrictedJolokia(client, ordinalFqdn, jolokia.JOLOKIA_AGENT_PORT, "/jolokia"),
}
return &artemis
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/jolokia_client/jolokia_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func GetMinimalJolokiaAgents(cr *v1beta1.ActiveMQArtemis, client rtclient.Client

ordinalFqdn := common.OrdinalFQDNS(cr.Name, cr.Namespace, i)

artemis := mgmt.GetArtemisAgentForRestricted(client, ordinalFqdn)
artemis := mgmt.GetArtemisAgentForRestricted(client, cr.Name, ordinalFqdn)

jkInfo := JkInfo{
Artemis: artemis,
Expand Down

0 comments on commit fc30ea0

Please sign in to comment.