@@ -845,6 +845,22 @@ func TestGoHelmEquivalence(t *testing.T) {
845845 // generally results in invalid inputs.
846846 values := redpanda.PartialValues {
847847 Enterprise : & redpanda.PartialEnterprise {License : ptr .To ("LICENSE_PLACEHOLDER" )},
848+ External : & redpanda.PartialExternalConfig {
849+ // include, required and tpl are not yet implemented in gotohelm package
850+ Domain : ptr .To ("{{ trunc 4 .Values.external.prefixTemplate | lower | repeat 3 }}-testing " ),
851+ Type : ptr .To (corev1 .ServiceTypeLoadBalancer ),
852+ PrefixTemplate : ptr .To ("$POD_ORDINAL-XYZ-$(echo -n $HOST_IP_ADDRESS | sha256sum | head -c 7)" ),
853+ ExternalDNS : & redpanda.PartialEnableable {Enabled : ptr .To (true )},
854+ },
855+ Statefulset : & redpanda.PartialStatefulset {
856+ ExtraVolumeMounts : ptr .To (`- name: test-extra-volume
857+ mountPath: {{ upper "/fake/lifecycle" }}` ),
858+ ExtraVolumes : ptr .To (`- name: test-extra-volume
859+ secret:
860+ secretName: {{ trunc 5 .Values.enterprise.license }}-sts-lifecycle
861+ defaultMode: 0774` ),
862+ InitContainers : GetInitContainer (),
863+ },
848864 }
849865
850866 // We're not interested in tests, console, or connectors so always disable
@@ -904,7 +920,7 @@ func TestGoHelmEquivalence(t *testing.T) {
904920 return strings .Compare (aStr , bStr )
905921 })
906922
907- const stsIdx = 12
923+ const stsIdx = 14
908924
909925 // resource.Quantity is a special object. To Ensure they compare correctly,
910926 // we'll round trip it through JSON so the internal representations will
@@ -924,3 +940,65 @@ func TestGoHelmEquivalence(t *testing.T) {
924940 assert .Equal (t , helmObjs [i ], goObjs [i ])
925941 }
926942}
943+
944+ func GetInitContainer () * struct {
945+ Configurator * struct {
946+ ExtraVolumeMounts * string "json:\" extraVolumeMounts,omitempty\" "
947+ Resources map [string ]any "json:\" resources,omitempty\" "
948+ } "json:\" configurator,omitempty\" "
949+ FSValidator * struct {
950+ Enabled * bool "json:\" enabled,omitempty\" "
951+ Resources map [string ]any "json:\" resources,omitempty\" "
952+ ExtraVolumeMounts * string "json:\" extraVolumeMounts,omitempty\" "
953+ ExpectedFS * string "json:\" expectedFS,omitempty\" "
954+ } "json:\" fsValidator,omitempty\" "
955+ SetDataDirOwnership * struct {
956+ Enabled * bool "json:\" enabled,omitempty\" "
957+ Resources map [string ]any "json:\" resources,omitempty\" "
958+ ExtraVolumeMounts * string "json:\" extraVolumeMounts,omitempty\" "
959+ } "json:\" setDataDirOwnership,omitempty\" "
960+ SetTieredStorageCacheDirOwnership * struct {
961+ Resources map [string ]any "json:\" resources,omitempty\" "
962+ ExtraVolumeMounts * string "json:\" extraVolumeMounts,omitempty\" "
963+ } "json:\" setTieredStorageCacheDirOwnership,omitempty\" "
964+ Tuning * struct {
965+ Resources map [string ]any "json:\" resources,omitempty\" "
966+ ExtraVolumeMounts * string "json:\" extraVolumeMounts,omitempty\" "
967+ } "json:\" tuning,omitempty\" "
968+ ExtraInitContainers * string "json:\" extraInitContainers,omitempty\" "
969+ } {
970+ return & struct {
971+ Configurator * struct {
972+ ExtraVolumeMounts * string "json:\" extraVolumeMounts,omitempty\" "
973+ Resources map [string ]any "json:\" resources,omitempty\" "
974+ } "json:\" configurator,omitempty\" "
975+ FSValidator * struct {
976+ Enabled * bool "json:\" enabled,omitempty\" "
977+ Resources map [string ]any "json:\" resources,omitempty\" "
978+ ExtraVolumeMounts * string "json:\" extraVolumeMounts,omitempty\" "
979+ ExpectedFS * string "json:\" expectedFS,omitempty\" "
980+ } "json:\" fsValidator,omitempty\" "
981+ SetDataDirOwnership * struct {
982+ Enabled * bool "json:\" enabled,omitempty\" "
983+ Resources map [string ]any "json:\" resources,omitempty\" "
984+ ExtraVolumeMounts * string "json:\" extraVolumeMounts,omitempty\" "
985+ } "json:\" setDataDirOwnership,omitempty\" "
986+ SetTieredStorageCacheDirOwnership * struct {
987+ Resources map [string ]any "json:\" resources,omitempty\" "
988+ ExtraVolumeMounts * string "json:\" extraVolumeMounts,omitempty\" "
989+ } "json:\" setTieredStorageCacheDirOwnership,omitempty\" "
990+ Tuning * struct {
991+ Resources map [string ]any "json:\" resources,omitempty\" "
992+ ExtraVolumeMounts * string "json:\" extraVolumeMounts,omitempty\" "
993+ } "json:\" tuning,omitempty\" "
994+ ExtraInitContainers * string "json:\" extraInitContainers,omitempty\" "
995+ }{
996+ ExtraInitContainers : ptr .To (`- name: "test-init-container"
997+ image: "mintel/docker-alpine-bash-curl-jq:latest"
998+ command: [ "/bin/bash", "-c" ]
999+ args:
1000+ - |
1001+ set -xe
1002+ echo "Hello World!"` ),
1003+ }
1004+ }
0 commit comments