You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 2, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: content/en/docs/help/operator.md
+88-15
Original file line number
Diff line number
Diff line change
@@ -515,7 +515,7 @@ spec:
515
515
deploymentPlan:
516
516
livenessProbe:
517
517
tcpSocket:
518
-
port: 8181
518
+
port: 8161
519
519
initialDelaySeconds: 30,
520
520
timeoutSeconds: 5,
521
521
```
@@ -818,8 +818,34 @@ spec:
818
818
value: -XshowSettings:system
819
819
820
820
```
821
+
---
822
+
**NOTE**
823
+
824
+
You are configuring an array of [envVar](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#envvar-v1-core) which is a very powerfull concept. Proceed with care, taking due respect to any environment the operator may set and depend on. For full documentation see the [Kubernetes Documentation](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/)
825
+
826
+
There are a few well-known environment variables that are used by the operator internally to configure brokers, as shown below
827
+
828
+
* JAVA_ARGS_APPEND
829
+
* JAVA_OPTS
830
+
* DEBUG_ARGS
821
831
822
-
Note: you are configuring an array of [envVar](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#envvar-v1-core) which is a very powerfull concept. Proceed with care, taking due respect to any environment the operator may set and depend on. For full documentation see the [Kubernetes Documentation](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/)
832
+
If you want to add some values to any of them, make sure you define it in **spec.env** using `value` field. If you use `valueFrom` for the env var you will get validation error condition in your CR's status.
833
+
834
+
If you really need `valueFrom` to define the values for the above env vars you can use a different var and then reference it in the internal var's `value` field.
## Providing additional brokerProperties configuration from a secret
845
-
It is possible to replace the use of the activemqartemisaddresses CRD and much of the activemqartemissecurities CRD with configuration via broker properties. This can necessitate a large amount of configuration in the CR.brokerProperties field.
846
871
In order to provide a way to split or orgainse these properties by file or by secret, an extra mount can be used to provide a secret that will be treated as an additional source of broker properties configuration.
847
872
848
873
Using an **extraMounts** secret with a suffix "-bp" will cause the operator to auto mount the secret and make the broker aware of it's location. In addition the CR.Status.Condition[BrokerPropertiesApplied] will reflect the content of this secret.
849
874
850
-
Broker properties are applied in order, starting with the CR.brokerProperties and then with the "-bp" auto mounts in turn. Keys (or property files) from secrets are applied in alphabetical order.
875
+
Broker properties are applied in order, starting with the CR.brokerProperties and then with the "-bp" auto mounts in turn. Keys (or property files) from secrets are applied in alphabetical order and the supported formats are text and JSON.
876
+
877
+
To configure the global max size with text brokerProperties configuration from a "-bp" secret:
878
+
879
+
```yaml
880
+
apiVersion: v1
881
+
kind: Secret
882
+
metadata:
883
+
name: config-bp
884
+
stringData:
885
+
globalMem.properties: |
886
+
globalMaxSize=512M
887
+
```
888
+
889
+
```yaml
890
+
apiVersion: broker.amq.io/v1beta1
891
+
kind: ActiveMQArtemis
892
+
metadata:
893
+
name: ex-aao
894
+
spec:
895
+
deploymentPlan:
896
+
extraMounts:
897
+
secrets:
898
+
- "config-bp"
899
+
```
900
+
901
+
To configure the global max size with JSON brokerProperties configuration from a "-bp" secret:
902
+
903
+
```yaml
904
+
apiVersion: v1
905
+
kind: Secret
906
+
metadata:
907
+
name: config-bp
908
+
stringData:
909
+
globalMem.json: |
910
+
{"globalMaxSize":"512M"}
911
+
```
912
+
913
+
```yaml
914
+
apiVersion: broker.amq.io/v1beta1
915
+
kind: ActiveMQArtemis
916
+
metadata:
917
+
name: ex-aao
918
+
spec:
919
+
deploymentPlan:
920
+
extraMounts:
921
+
secrets:
922
+
- "config-bp"
923
+
```
851
924
852
925
To configure a specific broker instance in a "-bp" secret, use `broker-N` as the prefix for a key in the secret data. For example:
853
926
@@ -894,6 +967,9 @@ spec:
894
967
```
895
968
When the CR is deployed the broker in pod 0 broker will get `globalMaxSize=512M` and pod 1 broker will get `globalMaxSize=12M`. While both will get properties from `journal1.properties` of secret **config-1-bp** and `journal2.properties` from secret **config-2-bp**.
896
969
970
+
## Replace ActiveMQArtemisAddress and ActiveMQArtemisSecurity CRDs with broker properties
971
+
The ActiveMQArtemisAddress and ActiveMQArtemisSecurity CRDs are deprecated in favour of the configuration via broker properties. It is possible to replace the use of the activemqartemisaddresses CRD and much of the activemqartemissecurities CRD with configuration via broker properties.
972
+
897
973
## Configuring Logging for Brokers
898
974
899
975
By default the operator deploys a broker with a default logging configuration that comes with the [Artemis container image]
@@ -993,14 +1069,12 @@ In addition, you need to expose the console, for example
993
1069
apiVersion: broker.amq.io/v1beta1
994
1070
kind: ActiveMQArtemis
995
1071
metadata:
996
-
name: ex-aao
1072
+
name: artemis-with-metrics
997
1073
spec:
998
-
deploymentPlan:
999
-
size: 1
1000
-
enableMetricsPlugin: true
1001
-
image: placeholder
1002
1074
console:
1003
1075
expose: true
1076
+
deploymentPlan:
1077
+
enableMetricsPlugin: true
1004
1078
```
1005
1079
1006
1080
### Enable JVM metrics
@@ -1011,12 +1085,11 @@ JVM memory metrics are enabled by default. Use the `spec.brokerProperties` field
1011
1085
apiVersion: broker.amq.io/v1beta1
1012
1086
kind: ActiveMQArtemis
1013
1087
metadata:
1014
-
name: artemis-jvm
1088
+
name: artemis-with-metrics
1015
1089
spec:
1016
1090
console:
1017
1091
expose: true
1018
1092
deploymentPlan:
1019
-
size: 1
1020
1093
enableMetricsPlugin: true
1021
1094
brokerProperties:
1022
1095
- "metricsConfiguration.jvmGc=true"
@@ -1026,22 +1099,22 @@ spec:
1026
1099
1027
1100
### Monitor broker metrics by using Prometheus
1028
1101
1029
-
The operator will expose a containerPort named **wsconj** for the Prometheus to monitor. The following
1102
+
The operator will expose a port named **console-jolokia** for the Prometheus to monitor. The following
1030
1103
is a sample Prometheus ServiceMonitor resource
1031
1104
1032
1105
```yaml
1033
1106
apiVersion: monitoring.coreos.com/v1
1034
1107
kind: ServiceMonitor
1035
1108
metadata:
1036
-
name: example-app
1109
+
name: artemis-with-metrics-monitor
1037
1110
labels:
1038
1111
team: prometheus
1039
1112
spec:
1040
1113
selector:
1041
1114
matchLabels:
1042
-
application: ex-aao-app
1115
+
application: artemis-with-metrics-app
1043
1116
endpoints:
1044
-
- port: wconsj
1117
+
- port: console-jolokia
1045
1118
```
1046
1119
For a complete example please refer to this [artemiscloud example](https://github.com/artemiscloud/artemiscloud-examples/tree/main/operator/prometheus).
0 commit comments