Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mhofsche authored and afalhambra-hivemq committed Dec 2, 2024
1 parent 2aafa5d commit 1d74023
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 13 deletions.
2 changes: 1 addition & 1 deletion charts/hivemq-platform/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ Returns:
{{- define "hivemq-platform.has-cluster-replication-config" }}
{{- $replicationConfig := .hivemqClusterReplication }}
{{- $contains := "" }}
{{- if (hasKey $repliationConfig "replicaCount") }}
{{- if (hasKey $replicationConfig "replicaCount") }}
{{- $contains = true }}
{{- end }}
{{- $contains }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1848,6 +1848,10 @@ tests:
hivemqClientEventHistory:
enabled: true
lifetime: 1000
hivemqOverloadProtection:
enabled: true
hivemqClusterReplication:
replicaCount: 2
asserts:
- exists:
path: data["config.xml"]
Expand All @@ -1873,6 +1877,9 @@ tests:
<discovery>
<extension/>
</discovery>
<replication>
<replica-count>2</replica-count>
</replication>
</cluster>
<!-- required and should not be configured different -->
<health-api>
Expand Down Expand Up @@ -1902,6 +1909,9 @@ tests:
<enabled>true</enabled>
<lifetime>1000</lifetime>
</client-event-history>
<overload-protection>
<enabled>true</enabled>
</overload-protection>
<restrictions>
<max-connections>-1</max-connections>
<incoming-bandwidth-throttling>0</incoming-bandwidth-throttling>
Expand Down Expand Up @@ -2025,6 +2035,10 @@ tests:
hivemqClientEventHistory:
enabled: false
lifetime: 14
hivemqOverloadProtection:
enabled: false
hivemqClusterReplication:
replicaCount: 1
asserts:
- exists:
path: data["config.xml"]
Expand All @@ -2050,6 +2064,9 @@ tests:
<discovery>
<extension/>
</discovery>
<replication>
<replica-count>1</replica-count>
</replication>
</cluster>
<!-- required and should not be configured different -->
<health-api>
Expand Down Expand Up @@ -2079,6 +2096,9 @@ tests:
<enabled>false</enabled>
<lifetime>14</lifetime>
</client-event-history>
<overload-protection>
<enabled>false</enabled>
</overload-protection>
<restrictions>
<max-connections>1</max-connections>
<incoming-bandwidth-throttling>2</incoming-bandwidth-throttling>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1879,6 +1879,10 @@ tests:
hivemqClientEventHistory:
enabled: true
lifetime: 1000
hivemqOverloadProtection:
enabled: true
hivemqClusterReplication:
replicaCount: 2
asserts:
- exists:
path: data["config.xml"]
Expand All @@ -1905,6 +1909,9 @@ tests:
<discovery>
<extension/>
</discovery>
<replication>
<replica-count>2</replica-count>
</replication>
</cluster>
<!-- required and should not be configured different -->
<health-api>
Expand Down Expand Up @@ -1934,6 +1941,9 @@ tests:
<enabled>true</enabled>
<lifetime>1000</lifetime>
</client-event-history>
<overload-protection>
<enabled>true</enabled>
</overload-protection>
<restrictions>
<max-connections>-1</max-connections>
<incoming-bandwidth-throttling>0</incoming-bandwidth-throttling>
Expand Down Expand Up @@ -2057,6 +2067,10 @@ tests:
hivemqClientEventHistory:
enabled: false
lifetime: 14
hivemqOverloadProtection:
enabled: false
hivemqClusterReplication:
replicaCount: 1
asserts:
- exists:
path: data["config.xml"]
Expand All @@ -2083,6 +2097,9 @@ tests:
<discovery>
<extension/>
</discovery>
<replication>
<replica-count>1</replica-count>
</replication>
</cluster>
<!-- required and should not be configured different -->
<health-api>
Expand Down Expand Up @@ -2112,6 +2129,9 @@ tests:
<enabled>false</enabled>
<lifetime>14</lifetime>
</client-event-history>
<overload-protection>
<enabled>false</enabled>
</overload-protection>
<restrictions>
<max-connections>1</max-connections>
<incoming-bandwidth-throttling>2</incoming-bandwidth-throttling>
Expand Down
22 changes: 12 additions & 10 deletions charts/hivemq-platform/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,20 +213,12 @@
},
"type" : "object"
},
"hivemqOverloadProtection" : {
"description" : "Configures HiveMQ Cluster overload protection. See https://docs.hivemq.com/hivemq/latest/user-guide/overload-protection.html.",
"properties" : {
"enabled" : {
"description" : "Enables the HiveMQ Cluster overload protection."
"type" : "boolean"
}
},
"type" : "object"
},
"hivemqClusterReplication" : {
"description" : "Configures HiveMQ Cluster replication. See https://docs.hivemq.com/hivemq/latest/user-guide/cluster.html#replication.",
"properties" : {
"replicaCount" : {
"description" : "Number of replicas to be persisted across cluster nodes.",
"minimum": 1,
"type" : "integer"
}
},
Expand Down Expand Up @@ -382,6 +374,16 @@
},
"type" : "object"
},
"hivemqOverloadProtection" : {
"description" : "Configures HiveMQ Cluster overload protection. See https://docs.hivemq.com/hivemq/latest/user-guide/overload-protection.html.",
"properties" : {
"enabled" : {
"description" : "Enables the HiveMQ Cluster overload protection.",
"type" : "boolean"
}
},
"type" : "object"
},
"hivemqRestrictions" : {
"description" : "Configures the HiveMQ restriction options. See https://docs.hivemq.com/hivemq/latest/user-guide/restrictions.html.",
"properties" : {
Expand Down
4 changes: 2 additions & 2 deletions charts/hivemq-platform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,12 @@ license:
# enabled: false
# lifetime: 604800

# Configures HiveMQ Cluster overload protection
# Configures HiveMQ Cluster overload protection.
# See https://docs.hivemq.com/hivemq/latest/user-guide/overload-protection.html
#hivemqOverloadProtection:
# enabled: true

# Configures HiveMQ Cluster replication
# Configures HiveMQ Cluster replication.
# See https://docs.hivemq.com/hivemq/latest/user-guide/cluster.html#replication
#hivemqClusterReplication:
# replicaCount: 2
Expand Down

0 comments on commit 1d74023

Please sign in to comment.