Skip to content

Commit

Permalink
refactor: replace custom dekorator impl with upstream ones
Browse files Browse the repository at this point in the history
  • Loading branch information
iocanel committed Sep 23, 2020
1 parent 50e9da5 commit c32da06
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 77 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@
import io.dekorate.kubernetes.decorator.ApplyServiceAccountNamedDecorator;
import io.dekorate.kubernetes.decorator.ApplyWorkingDirDecorator;
import io.dekorate.kubernetes.decorator.RemoveAnnotationDecorator;
import io.dekorate.kubernetes.decorator.RemoveFromMatchingLabelsDecorator;
import io.dekorate.kubernetes.decorator.RemoveFromSelectorDecorator;
import io.dekorate.kubernetes.decorator.RemoveLabelDecorator;
import io.dekorate.logger.NoopLogger;
import io.dekorate.processor.SimpleFileReader;
import io.dekorate.processor.SimpleFileWriter;
Expand Down Expand Up @@ -582,8 +585,9 @@ private void applyAnnotations(Session session, Project project, String target, P
// apply Openshift specific configuration
private void applyVanillaKubernetesSpecificConfig(Session session, KubernetesConfig kubernetesConfig) {
if (!kubernetesConfig.addVersionToLabelSelectors) {
session.resources().decorate(KUBERNETES, new DeploymentRemoveLabelSelectorDecorator(Labels.VERSION));
session.resources().decorate(KUBERNETES, new ServiceRemoveLabelSelectorDecorator(Labels.VERSION));
session.resources().decorate(KUBERNETES, new RemoveLabelDecorator(Labels.VERSION));
session.resources().decorate(KUBERNETES, new RemoveFromSelectorDecorator(Labels.VERSION));
session.resources().decorate(KUBERNETES, new RemoveFromMatchingLabelsDecorator(Labels.VERSION));
}
}

Expand All @@ -592,9 +596,8 @@ private void applyOpenshiftSpecificConfig(Session session, OpenshiftConfig opens
session.resources().decorate(OPENSHIFT, new AddLabelDecorator(new Label(OPENSHIFT_APP_RUNTIME, QUARKUS)));

if (!openshiftConfig.addVersionToLabelSelectors) {
session.resources().decorate(OPENSHIFT,
new DeploymentConfigRemoveLabelSelectorDecorator(Labels.VERSION));
session.resources().decorate(OPENSHIFT, new ServiceRemoveLabelSelectorDecorator(Labels.VERSION));
session.resources().decorate(OPENSHIFT, new RemoveLabelDecorator(Labels.VERSION));
session.resources().decorate(OPENSHIFT, new RemoveFromSelectorDecorator(Labels.VERSION));
}
}

Expand Down

This file was deleted.

This file was deleted.

0 comments on commit c32da06

Please sign in to comment.