File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ Defining a mutation or validation controller is as simple as:
42
42
@Singleton
43
43
@Named (VALIDATING_CONTROLLER )
44
44
public AdmissionController<Ingress > validatingController() {
45
- return new AdmissionController<> ((resource, operation) - > {
45
+ return new AdmissionController<> ((resource, oldResource, operation) - > {
46
46
if (resource. getMetadata(). getLabels() == null
47
47
|| resource. getMetadata(). getLabels(). get(APP_NAME_LABEL_KEY ) == null ) {
48
48
throw new NotAllowedException (" Missing label: " + APP_NAME_LABEL_KEY );
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ the [async version](https://github.com/java-operator-sdk/admission-controller-fr
113
113
of admission controller implementation.)
114
114
115
115
` ` ` java
116
- new AdmissionController<>((resource,operation) -> {
116
+ new AdmissionController<>((resource, oldResource, operation) -> {
117
117
if(resource.getMetadata().getLabels() == null || resource.getMetadata().getLabels().get(APP_NAME_LABEL_KEY) == null){
118
118
throw new NotAllowedException("Missing label: "+APP_NAME_LABEL_KEY);
119
119
}
You can’t perform that action at this time.
0 commit comments