Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Defining a mutation or validation controller is as simple as:
@Singleton
@Named(VALIDATING_CONTROLLER)
public AdmissionController<Ingress> validatingController() {
return new AdmissionController<>((resource, operation) -> {
return new AdmissionController<>((resource, oldResource, operation) -> {
if (resource.getMetadata().getLabels() == null
|| resource.getMetadata().getLabels().get(APP_NAME_LABEL_KEY) == null) {
throw new NotAllowedException("Missing label: " + APP_NAME_LABEL_KEY);
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ the [async version](https://github.com/java-operator-sdk/admission-controller-fr
of admission controller implementation.)

```java
new AdmissionController<>((resource,operation) -> {
new AdmissionController<>((resource, oldResource, operation) -> {
if(resource.getMetadata().getLabels() == null || resource.getMetadata().getLabels().get(APP_NAME_LABEL_KEY) == null){
throw new NotAllowedException("Missing label: "+APP_NAME_LABEL_KEY);
}
Expand Down