-
Notifications
You must be signed in to change notification settings - Fork 813
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TLS to Fleetautoscaler webhook service
Add TLS CA Bundle verification if HTTPS scheme is used. Environment variables to configure main scaling parameters. Now both HTTP and HTTPS webhook servers could be used simultaneously in different fleetautoscalers. Add tutorial on using HTTPS webhook fleetautoscaler.
- Loading branch information
Showing
12 changed files
with
504 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Copyright 2018 Google Inc. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Define a Service for the autoscaler-webhook | ||
|
||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: autoscaler-tls-service | ||
labels: | ||
app: autoscaler-webhook-tls | ||
spec: | ||
selector: | ||
app: autoscaler-webhook-tls | ||
ports: | ||
- port: 8000 | ||
protocol: TCP | ||
name: https | ||
targetPort: autoscaler | ||
--- | ||
# Deploy a pod to run the autoscaler-webhook code | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: autoscaler-webhook-tls | ||
namespace: default | ||
labels: | ||
app: autoscaler-webhook-tls | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: autoscaler-webhook-tls | ||
template: | ||
metadata: | ||
labels: | ||
app: autoscaler-webhook-tls | ||
spec: | ||
#serviceAccount: autoscaler-webhook | ||
volumes: | ||
- name: secret-volume | ||
secret: | ||
secretName: autoscalersecret | ||
containers: | ||
- name: autoscaler-webhook | ||
image: gcr.io/agones-images/autoscaler-webhook:0.2 | ||
imagePullPolicy: Always | ||
volumeMounts: | ||
- mountPath: /home/service/certs | ||
name: secret-volume | ||
ports: | ||
- name: autoscaler | ||
containerPort: 8000 | ||
livenessProbe: | ||
httpGet: | ||
scheme: HTTPS | ||
path: /health | ||
port: 8000 | ||
initialDelaySeconds: 3 | ||
periodSeconds: 5 | ||
env: | ||
- name: MIN_REPLICAS_COUNT | ||
value: "2" | ||
- name: REPLICA_UPSCALE_TRIGGER | ||
value: "0.7" | ||
- name: REPLICA_DOWNSCALE_TRIGGER | ||
value: "0.3" | ||
- name: "SCALE_FACTOR" | ||
value: "2" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.