class RevisionHistoryEnricher extends BaseEnricher {

    @Override
    public void create(PlatformMode platformMode, KubernetesListBuilder builder) {
        final Integer maxRevisionHistories = Configs.asInt(getConfig(Config.limit));

        log.info("Adding revision history limit to %s", maxRevisionHistories);

        if(platformMode == PlatformMode.kubernetes) {
            builder.accept(new TypedVisitor<DeploymentBuilder>() {
                @Override
                public void visit(DeploymentBuilder item) {
                    item.editOrNewSpec()
                            .withRevisionHistoryLimit(maxRevisionHistories)
                            .endSpec();
                }
            });
        } else {
            builder.accept(new TypedVisitor<DeploymentConfigBuilder>() {
                @Override
                public void visit(DeploymentConfigBuilder item) {
                    item.editOrNewSpec()
                            .withRevisionHistoryLimit(maxRevisionHistories)
                            .endSpec();
                }
            });
        }
    }

    public  RevisionHistoryEnricher(MavenEnricherContext buildContext);

}