Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIx KAAP Issues #181

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import java.util.function.Predicate;
import java.util.stream.Collectors;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;

@Slf4j
Expand Down Expand Up @@ -210,11 +211,11 @@ private AuthConfig getAuthConfig() {
)
.contains(spec.getSpecName()) && spec.isEnabled();

final boolean authEnabled = getValueAssertSame(
final boolean authEnabled = BooleanUtils.isTrue(getValueAssertSame(
filterComponents,
spec -> parseConfigValueBool(spec.getConfig(), "authenticationEnabled"),
false,
"authenticationEnabled").booleanValue();
"authenticationEnabled"));
if (!authEnabled) {
log.info("Found authenticationEnabled=false, auth will be disabled in the CRD");
return AuthConfig.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import java.util.Map;
import java.util.Objects;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;

@Slf4j
public class AutorecoverySpecGenerator extends BaseSpecGenerator<AutorecoverySpec> {
Expand Down Expand Up @@ -82,8 +83,9 @@ public void internalGenerateSpec() {
isRestartOnConfigMapChange = isPodDependantOnConfigMap(deploymentSpec.getTemplate());
priorityClassName = spec.getPriorityClassName();
config = convertConfigMapData(configMap);
if (!config.containsKey("ensemblePlacementPolicy")) {
config.put("ensemblePlacementPolicy", "");
Object ensemblePlacementPolicy = config.get("ensemblePlacementPolicy");
if (ensemblePlacementPolicy instanceof String policy && StringUtils.isBlank(policy)) {
config.remove("ensemblePlacementPolicy");
}
tlsEntryConfig = createTlsEntryConfig(deployment);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,9 @@ public StatefulSet generateStatefulSet() {
);
} else {
persistentVolumeClaims.add(createPersistentVolumeClaim(journalVolumeName, spec.getVolumes().getJournal(),
labels));
Map.of()));
persistentVolumeClaims.add(createPersistentVolumeClaim(ledgersVolumeName, spec.getVolumes().getLedgers(),
labels));
Map.of()));
rithick-ctds marked this conversation as resolved.
Show resolved Hide resolved
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ public void patchStatefulSet() {
} else {
final VolumeConfig dataVolume = spec.getDataVolume();
persistentVolumeClaims.add(
createPersistentVolumeClaim(dataStorageVolumeName, dataVolume, labels)
createPersistentVolumeClaim(dataStorageVolumeName, dataVolume, Map.of())
rithick-ctds marked this conversation as resolved.
Show resolved Hide resolved
);
}

Expand Down
Loading