Skip to content

Commit d7fd79a

Browse files
committed
Remove spec from status update
1 parent 3888079 commit d7fd79a

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

kubernetes/charts/weblogic-operator/templates/_operator-clusterrole-general.tpl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@ rules:
2121
resources: ["customresourcedefinitions"]
2222
verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"]
2323
- apiGroups: ["weblogic.oracle"]
24-
resources: ["domains"]
24+
resources: ["domains", "domains/status"]
2525
verbs: ["get", "list", "watch", "update", "patch"]
26-
- apiGroups: ["weblogic.oracle"]
27-
resources: ["domains/status"]
28-
verbs: ["update"]
2926
- apiGroups: ["extensions"]
3027
resources: ["ingresses"]
3128
verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"]

operator/src/main/java/oracle/kubernetes/operator/DomainStatusUpdater.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,10 @@ public NextAction apply(Packet packet) {
682682
private static NextAction doDomainUpdate(
683683
Domain dom, DomainPresenceInfo info, Packet packet, Step conflictStep, Step next) {
684684
V1ObjectMeta meta = dom.getMetadata();
685+
686+
// remove spec
687+
dom.setSpec(null);
688+
685689
NextAction na = new NextAction();
686690
na.invoke(
687691
new CallBuilder()
@@ -703,7 +707,8 @@ public NextAction onFailure(Packet packet, CallResponse<Domain> callResponse) {
703707

704708
@Override
705709
public NextAction onSuccess(Packet packet, CallResponse<Domain> callResponse) {
706-
info.setDomain(callResponse.getResult());
710+
// Do not set domain on info since status update is a PUT
711+
// info.setDomain(callResponse.getResult());
707712
return doNext(packet);
708713
}
709714
}),

0 commit comments

Comments
 (0)