1
0
mirror of https://github.com/google/nomulus synced 2025-12-23 06:15:42 +00:00

Update proxy resources, increase ssl handshake timeout (#2819)

This commit is contained in:
Pavlo Tkach
2025-09-05 14:09:55 -04:00
committed by GitHub
parent 77ab80f3dc
commit 6bbd7a2290
9 changed files with 41 additions and 25 deletions

View File

@@ -99,7 +99,7 @@ spec:
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
name: frontend name: frontend
minReplicas: 8 minReplicas: 12
maxReplicas: 16 maxReplicas: 16
metrics: metrics:
- type: Resource - type: Resource

View File

@@ -119,6 +119,7 @@ public class SslClientInitializer<C extends Channel> extends ChannelInitializer<
sslContextBuilder sslContextBuilder
.build() .build()
.newHandler(channel.alloc(), hostProvider.apply(channel), portProvider.apply(channel)); .newHandler(channel.alloc(), hostProvider.apply(channel), portProvider.apply(channel));
sslHandler.setHandshakeTimeoutMillis(20000);
// Enable hostname verification. // Enable hostname verification.
SSLEngine sslEngine = sslHandler.engine(); SSLEngine sslEngine = sslHandler.engine();

View File

@@ -139,6 +139,8 @@ public class SslServerInitializer<C extends Channel> extends ChannelInitializer<
logger.atInfo().log("Available Cipher Suites: %s", sslContext.cipherSuites()); logger.atInfo().log("Available Cipher Suites: %s", sslContext.cipherSuites());
SslHandler sslHandler = sslContext.newHandler(channel.alloc()); SslHandler sslHandler = sslContext.newHandler(channel.alloc());
sslHandler.setHandshakeTimeoutMillis(20000);
if (requireClientCert) { if (requireClientCert) {
Promise<X509Certificate> clientCertificatePromise = channel.eventLoop().newPromise(); Promise<X509Certificate> clientCertificatePromise = channel.eventLoop().newPromise();
Future<Channel> unusedFuture = Future<Channel> unusedFuture =
@@ -159,15 +161,15 @@ public class SslServerInitializer<C extends Channel> extends ChannelInitializer<
} }
logger.atInfo().log( logger.atInfo().log(
""" """
--SSL Information-- --SSL Information--
Client Certificate Hash: %s Client Certificate Hash: %s
SSL Protocol: %s SSL Protocol: %s
Cipher Suite: %s Cipher Suite: %s
Not Before: %s Not Before: %s
Not After: %s Not After: %s
Client Certificate Type: %s Client Certificate Type: %s
Client Certificate Length: %s Client Certificate Length: %s
""", """,
getCertificateHash(clientCertificate), getCertificateHash(clientCertificate),
sslSession.getProtocol(), sslSession.getProtocol(),
sslSession.getCipherSuite(), sslSession.getCipherSuite(),

View File

@@ -31,7 +31,6 @@ do
echo "Updating cluster ${parts[0]} in zone ${parts[1]}..." echo "Updating cluster ${parts[0]} in zone ${parts[1]}..."
gcloud container clusters get-credentials "${parts[0]}" \ gcloud container clusters get-credentials "${parts[0]}" \
--project "${project}" --zone "${parts[1]}" --project "${project}" --zone "${parts[1]}"
kubectl apply -f "./kubernetes/proxy-limit-range.yaml" --force
sed s/GCP_PROJECT/${project}/g "./kubernetes/proxy-deployment-${environment}.yaml" | \ sed s/GCP_PROJECT/${project}/g "./kubernetes/proxy-deployment-${environment}.yaml" | \
kubectl apply -f - kubectl apply -f -
kubectl apply -f "./kubernetes/proxy-service.yaml" --force kubectl apply -f "./kubernetes/proxy-service.yaml" --force

View File

@@ -33,6 +33,13 @@ spec:
port: health-check port: health-check
initialDelaySeconds: 15 initialDelaySeconds: 15
periodSeconds: 20 periodSeconds: 20
resources:
requests:
cpu: "400m"
memory: "350Mi"
limits:
cpu: "600m"
memory: "512Mi"
imagePullPolicy: Always imagePullPolicy: Always
args: ["--env", "production_canary"] args: ["--env", "production_canary"]
env: env:

View File

@@ -33,6 +33,13 @@ spec:
port: health-check port: health-check
initialDelaySeconds: 15 initialDelaySeconds: 15
periodSeconds: 20 periodSeconds: 20
resources:
requests:
cpu: "400m"
memory: "350Mi"
limits:
cpu: "600m"
memory: "512Mi"
imagePullPolicy: Always imagePullPolicy: Always
args: ["--env", "production"] args: ["--env", "production"]
env: env:

View File

@@ -33,6 +33,13 @@ spec:
port: health-check port: health-check
initialDelaySeconds: 15 initialDelaySeconds: 15
periodSeconds: 20 periodSeconds: 20
resources:
requests:
cpu: "400m"
memory: "350Mi"
limits:
cpu: "600m"
memory: "512Mi"
imagePullPolicy: Always imagePullPolicy: Always
args: ["--env", "sandbox_canary", "--log"] args: ["--env", "sandbox_canary", "--log"]
env: env:

View File

@@ -33,6 +33,13 @@ spec:
port: health-check port: health-check
initialDelaySeconds: 15 initialDelaySeconds: 15
periodSeconds: 20 periodSeconds: 20
resources:
requests:
cpu: "400m"
memory: "350Mi"
limits:
cpu: "600m"
memory: "512Mi"
imagePullPolicy: Always imagePullPolicy: Always
args: ["--env", "sandbox", "--log"] args: ["--env", "sandbox", "--log"]
env: env:

View File

@@ -1,14 +0,0 @@
apiVersion: v1
kind: LimitRange
metadata:
name: resource-limits
namespace: default
spec:
limits:
- type: Container
default:
cpu: "600m"
memory: "512Mi"
defaultRequest:
cpu: "400m"
memory: "350Mi"