Skip to content

Commit

Permalink
fix: ensure metadata and selector are available
Browse files Browse the repository at this point in the history
  • Loading branch information
iocanel committed Mar 22, 2023
1 parent 664d97f commit 244232b
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@
import io.dekorate.kubernetes.decorator.AddInitContainerDecorator;
import io.dekorate.kubernetes.decorator.AddLabelDecorator;
import io.dekorate.kubernetes.decorator.AddLivenessProbeDecorator;
import io.dekorate.kubernetes.decorator.AddMetadataToTemplateDecorator;
import io.dekorate.kubernetes.decorator.AddMountDecorator;
import io.dekorate.kubernetes.decorator.AddPvcVolumeDecorator;
import io.dekorate.kubernetes.decorator.AddReadinessProbeDecorator;
import io.dekorate.kubernetes.decorator.AddRoleBindingResourceDecorator;
import io.dekorate.kubernetes.decorator.AddSecretVolumeDecorator;
import io.dekorate.kubernetes.decorator.AddSelectorToDeploymentSpecDecorator;
import io.dekorate.kubernetes.decorator.AddServiceAccountResourceDecorator;
import io.dekorate.kubernetes.decorator.AddStartupProbeDecorator;
import io.dekorate.kubernetes.decorator.ApplicationContainerDecorator;
Expand Down Expand Up @@ -238,6 +240,10 @@ private static Collection<DecoratorBuildItem> createLabelDecorators(Optional<Pro
PlatformConfiguration config, List<KubernetesLabelBuildItem> labels) {

List<DecoratorBuildItem> result = new ArrayList<>();

result.add(new DecoratorBuildItem(target, new AddMetadataToTemplateDecorator()));
result.add(new DecoratorBuildItem(target, new AddSelectorToDeploymentSpecDecorator()));

labels.forEach(l -> {
result.add(new DecoratorBuildItem(l.getTarget(),
new AddLabelDecorator(name, l.getKey(), l.getValue())));
Expand Down Expand Up @@ -809,4 +815,4 @@ private static Map<String, Integer> verifyPorts(List<KubernetesPortBuildItem> ku
}
return result;
}
}
}

0 comments on commit 244232b

Please sign in to comment.