INFRA-3388 | Saqib | Fixes checkstyle warnings
This commit is contained in:
@@ -29,14 +29,14 @@ public interface ManifestRepository extends JpaRepository<Manifest, Long> {
|
||||
+ "where lb.data ->> 'endpoint' = :endpoint ", nativeQuery = true)
|
||||
Optional<Long> findIdByEndpoint(String endpoint);
|
||||
|
||||
@Query(value = "SELECT " +
|
||||
"CASE " +
|
||||
"WHEN CAST(d.data AS jsonb) -> 'exposedPorts' @> CAST('[{\"name\": \"secondary-service-port\"}]' AS jsonb) THEN true " +
|
||||
"ELSE false " +
|
||||
"END as has_secondary_service_port " +
|
||||
"FROM manifest m " +
|
||||
"JOIN deployment d ON m.id = d.manifest_id " +
|
||||
"WHERE m.id = :manifestId", nativeQuery = true)
|
||||
@Query(value = "SELECT "
|
||||
+ "CASE "
|
||||
+ "WHEN CAST(d.data AS jsonb) -> 'exposedPorts' @> CAST('[{\"name\": \"secondary-service-port\"}]' AS jsonb) THEN true "
|
||||
+ "ELSE false "
|
||||
+ "END as has_secondary_service_port "
|
||||
+ "FROM manifest m "
|
||||
+ "JOIN deployment d ON m.id = d.manifest_id "
|
||||
+ "WHERE m.id = :manifestId", nativeQuery = true)
|
||||
boolean hasSecondaryServicePort(@Param("manifestId") Long manifestId);
|
||||
|
||||
}
|
||||
|
||||
@@ -266,10 +266,11 @@ public class KubeOperationService {
|
||||
}
|
||||
|
||||
private void deleteExposedIngress(Long manifestId, KIngress resource) {
|
||||
KIngress exposedIngress = new KIngress(resource.getName()+"-exposed",
|
||||
KIngress exposedIngress = new KIngress(resource.getName() + "-exposed",
|
||||
resource.getNameSpace());
|
||||
try {
|
||||
log.info("Deleting additional exposed ingress {} ,manifestId={}", exposedIngress.getName(), manifestId);
|
||||
log.info("Deleting additional exposed ingress {} ,manifestId={}",
|
||||
exposedIngress.getName(), manifestId);
|
||||
kubeClient.deleteNamespacedObject(exposedIngress);
|
||||
} catch (ApiException e) {
|
||||
if (e.getCode() == HttpStatus.NOT_FOUND.value()) {
|
||||
|
||||
Reference in New Issue
Block a user