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
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public R create(R target, P primary, Context<P> context) {

public R update(R actual, R target, P primary, Context<P> context) {
var updatedActual = processor.replaceSpecOnActual(actual, target, context);
return prepare(target, primary, "Updating").replace(updatedActual);
return prepare(target, primary, "Updating").createOrReplace(updatedActual);
}

public Result<R> match(R actualResource, P primary, Context<P> context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public <T extends HasMetadata> T create(Class<T> type, T resource) {
}

public <T extends HasMetadata> T replace(Class<T> type, T resource) {
return kubernetesClient.resources(type).inNamespace(namespace).replace(resource);
return kubernetesClient.resources(type).inNamespace(namespace).createOrReplace(resource);
}

@SuppressWarnings("unchecked")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public UpdateControl<CreateUpdateEventFilterTestCustomResource> reconcile(
client
.configMaps()
.inNamespace(resource.getMetadata().getNamespace())
.replace(configMap);
.createOrReplace(configMap);
informerEventSource.handleRecentResourceUpdate(resourceID,
newConfigMap, configMap);
} catch (RuntimeException e) {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<sonar.host.url>https://sonarcloud.io</sonar.host.url>

<junit.version>5.8.2</junit.version>
<fabric8-client.version>5.12.0</fabric8-client.version>
<fabric8-client.version>5.12.1</fabric8-client.version>
<slf4j.version>1.7.36</slf4j.version>
<log4j.version>2.17.2</log4j.version>
<mokito.version>4.4.0</mokito.version>
Expand Down