Skip to content

fix: deprecate install webhook #1616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 23, 2022
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 @@ -66,6 +66,7 @@ public Operator(KubernetesClient kubernetesClient, ConfigurationService configur
}

/** Adds a shutdown hook that automatically calls {@link #stop()} when the app shuts down. */
@Deprecated(forRemoval = true)
public void installShutdownHook() {
Runtime.getRuntime().addShutdownHook(new Thread(this::stop));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ Operator startOperator(boolean stopOnInformerErrorDuringStartup, boolean addStop
}
});
operator.register(reconciler);
operator.installShutdownHook();
operator.start();
return operator;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public static void main(String[] args) {
new Operator(client, c -> c.withLeaderElectionConfiguration(leaderElectionConfiguration));

operator.register(new LeaderElectionTestReconciler(identity));
operator.installShutdownHook();
operator.start();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public static void main(String[] args) throws IOException {
configOverrider -> configOverrider.replacingNamedDependentResourceConfig(
SchemaDependentResource.NAME,
new ResourcePollerConfig(300, MySQLDbConfig.loadFromEnvironmentVars())));
operator.installShutdownHook();
operator.start();

new FtBasic(new TkFork(new FkRegex("/health", "ALL GOOD!")), 8080).start(Exit.NEVER);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public static void main(String[] args) throws IOException {
Operator operator = new Operator(client);
operator.register(new TomcatReconciler());
operator.register(new WebappReconciler(client));
operator.installShutdownHook();
operator.start();

new FtBasic(new TkFork(new FkRegex("/health", "ALL GOOD.")), 8080).start(Exit.NEVER);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public static void main(String[] args) throws IOException {
} else {
operator.register(new WebPageStandaloneDependentsReconciler(client));
}
operator.installShutdownHook();
operator.start();

new FtBasic(new TkFork(new FkRegex("/health", "ALL GOOD!")), 8080).start(Exit.NEVER);
Expand Down