|
120 | 120 | {{- $redpandaYaml := (dict "redpanda" $redpanda "schema_registry" (get (fromJson (include "redpanda.schemaRegistry" (dict "a" (list $state)))) "r") "pandaproxy" (get (fromJson (include "redpanda.pandaProxyListener" (dict "a" (list $state)))) "r") "config_file" "/etc/redpanda/redpanda.yaml") -}} |
121 | 121 | {{- if $includeNonHashableItems -}} |
122 | 122 | {{- $_ := (set $redpandaYaml "rpk" (get (fromJson (include "redpanda.rpkNodeConfig" (dict "a" (list $state $pool)))) "r")) -}} |
123 | | -{{- $_ := (set $redpandaYaml "pandaproxy_client" (get (fromJson (include "redpanda.kafkaClient" (dict "a" (list $state)))) "r")) -}} |
124 | | -{{- $_ := (set $redpandaYaml "schema_registry_client" (get (fromJson (include "redpanda.kafkaClient" (dict "a" (list $state)))) "r")) -}} |
| 123 | +{{- $_ := (set $redpandaYaml "pandaproxy_client" (get (fromJson (include "redpanda.kafkaClient" (dict "a" (list $state "pandaproxy")))) "r")) -}} |
| 124 | +{{- $_ := (set $redpandaYaml "schema_registry_client" (get (fromJson (include "redpanda.kafkaClient" (dict "a" (list $state "schema_registry")))) "r")) -}} |
125 | 125 | {{- if (and (and (get (fromJson (include "redpanda.RedpandaAtLeast_23_3_0" (dict "a" (list $state)))) "r") $state.Values.auditLogging.enabled) (get (fromJson (include "redpanda.Auth.IsSASLEnabled" (dict "a" (list $state.Values.auth)))) "r")) -}} |
126 | | -{{- $_ := (set $redpandaYaml "audit_log_client" (get (fromJson (include "redpanda.kafkaClient" (dict "a" (list $state)))) "r")) -}} |
| 126 | +{{- $_ := (set $redpandaYaml "audit_log_client" (get (fromJson (include "redpanda.kafkaClient" (dict "a" (list $state "audit_log")))) "r")) -}} |
127 | 127 | {{- end -}} |
128 | 128 | {{- end -}} |
129 | 129 | {{- $_is_returning = true -}} |
|
465 | 465 |
|
466 | 466 | {{- define "redpanda.kafkaClient" -}} |
467 | 467 | {{- $state := (index .a 0) -}} |
| 468 | +{{- $clientType := (index .a 1) -}} |
468 | 469 | {{- range $_ := (list 1) -}} |
469 | 470 | {{- $_is_returning := false -}} |
470 | 471 | {{- $brokerList := (list) -}} |
| 472 | +{{- $useLocalhostKey := (printf "%s_client.use_localhost" $clientType) -}} |
| 473 | +{{- $useLocalhost := false -}} |
| 474 | +{{- $_506_val_ok := (get (fromJson (include "_shims.dicttest" (dict "a" (list $state.Values.config.node $useLocalhostKey (coalesce nil))))) "r") -}} |
| 475 | +{{- $val := (index $_506_val_ok 0) -}} |
| 476 | +{{- $ok := (index $_506_val_ok 1) -}} |
| 477 | +{{- if $ok -}} |
| 478 | +{{- if (kindIs "bool" $val) -}} |
| 479 | +{{- $useLocalhost = (eq $val true) -}} |
| 480 | +{{- else -}}{{- if (kindIs "string" $val) -}} |
| 481 | +{{- $strVal := (get (fromJson (include "_shims.typeassertion" (dict "a" (list "string" $val)))) "r") -}} |
| 482 | +{{- $useLocalhost = (or (or (or (eq $strVal "true") (eq $strVal "True")) (eq $strVal "TRUE")) (eq $strVal "1")) -}} |
| 483 | +{{- end -}} |
| 484 | +{{- end -}} |
| 485 | +{{- end -}} |
| 486 | +{{- if $useLocalhost -}} |
| 487 | +{{- $brokerList = (concat (default (list) $brokerList) (list (dict "address" "localhost" "port" ($state.Values.listeners.kafka.port | int)))) -}} |
| 488 | +{{- else -}} |
471 | 489 | {{- range $_, $broker := (get (fromJson (include "redpanda.BrokerList" (dict "a" (list $state -1)))) "r") -}} |
472 | 490 | {{- $brokerList = (concat (default (list) $brokerList) (list (dict "address" $broker "port" ($state.Values.listeners.kafka.port | int)))) -}} |
473 | 491 | {{- end -}} |
474 | 492 | {{- if $_is_returning -}} |
475 | 493 | {{- break -}} |
476 | 494 | {{- end -}} |
| 495 | +{{- end -}} |
477 | 496 | {{- $kafkaTLS := $state.Values.listeners.kafka.tls -}} |
478 | 497 | {{- $brokerTLS := (coalesce nil) -}} |
479 | 498 | {{- if (get (fromJson (include "redpanda.InternalTLS.IsEnabled" (dict "a" (list $state.Values.listeners.kafka.tls $state.Values.tls)))) "r") -}} |
|
623 | 642 | {{- end -}} |
624 | 643 | {{- $enabledOptions := (dict "true" true "1" true "" true) -}} |
625 | 644 | {{- $lockMemory := false -}} |
626 | | -{{- $_671_value_14_ok_15 := (get (fromJson (include "_shims.dicttest" (dict "a" (list $flags "--lock-memory" "")))) "r") -}} |
627 | | -{{- $value_14 := (index $_671_value_14_ok_15 0) -}} |
628 | | -{{- $ok_15 := (index $_671_value_14_ok_15 1) -}} |
| 645 | +{{- $_692_value_14_ok_15 := (get (fromJson (include "_shims.dicttest" (dict "a" (list $flags "--lock-memory" "")))) "r") -}} |
| 646 | +{{- $value_14 := (index $_692_value_14_ok_15 0) -}} |
| 647 | +{{- $ok_15 := (index $_692_value_14_ok_15 1) -}} |
629 | 648 | {{- if $ok_15 -}} |
630 | 649 | {{- $lockMemory = (ternary (index $enabledOptions $value_14) false (hasKey $enabledOptions $value_14)) -}} |
631 | 650 | {{- $_ := (unset $flags "--lock-memory") -}} |
632 | 651 | {{- end -}} |
633 | 652 | {{- $overprovisioned := false -}} |
634 | | -{{- $_678_value_16_ok_17 := (get (fromJson (include "_shims.dicttest" (dict "a" (list $flags "--overprovisioned" "")))) "r") -}} |
635 | | -{{- $value_16 := (index $_678_value_16_ok_17 0) -}} |
636 | | -{{- $ok_17 := (index $_678_value_16_ok_17 1) -}} |
| 653 | +{{- $_699_value_16_ok_17 := (get (fromJson (include "_shims.dicttest" (dict "a" (list $flags "--overprovisioned" "")))) "r") -}} |
| 654 | +{{- $value_16 := (index $_699_value_16_ok_17 0) -}} |
| 655 | +{{- $ok_17 := (index $_699_value_16_ok_17 1) -}} |
637 | 656 | {{- if $ok_17 -}} |
638 | 657 | {{- $overprovisioned = (ternary (index $enabledOptions $value_16) false (hasKey $enabledOptions $value_16)) -}} |
639 | 658 | {{- $_ := (unset $flags "--overprovisioned") -}} |
|
0 commit comments