Skip to content

Commit 5314fcc

Browse files
authored
improve: allow to provide name to GenericKubernetesDependentResource (operator-framework#2720)
Signed-off-by: Attila Mészáros <[email protected]>
1 parent e764a11 commit 5314fcc

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/dependent/kubernetes/GenericKubernetesDependentResource.java

+10-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,17 @@ public GenericKubernetesDependentResource(GroupVersionKind groupVersionKind) {
1515
this(GroupVersionKindPlural.from(groupVersionKind));
1616
}
1717

18+
public GenericKubernetesDependentResource(GroupVersionKind groupVersionKind, String name) {
19+
this(GroupVersionKindPlural.from(groupVersionKind), name);
20+
}
21+
1822
public GenericKubernetesDependentResource(GroupVersionKindPlural groupVersionKind) {
19-
super(GenericKubernetesResource.class);
23+
super(GenericKubernetesResource.class, null);
24+
this.groupVersionKind = groupVersionKind;
25+
}
26+
27+
public GenericKubernetesDependentResource(GroupVersionKindPlural groupVersionKind, String name) {
28+
super(GenericKubernetesResource.class, name);
2029
this.groupVersionKind = groupVersionKind;
2130
}
2231

0 commit comments

Comments
 (0)