-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #306 from m-lab/sandbox-kinkade
Adds a new deployment, service and ingress for GMX.
- Loading branch information
Showing
3 changed files
with
104 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: gmx-server | ||
namespace: default | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
# Used to match pre-existing pods that may be affected during updates. | ||
run: gmx-server | ||
strategy: | ||
rollingUpdate: | ||
maxSurge: 1 | ||
maxUnavailable: 1 | ||
type: RollingUpdate | ||
# Pod template. | ||
template: | ||
metadata: | ||
labels: | ||
# Note: run=gmx-server should match a service config with a | ||
# public IP and port so that it is publically accessible. | ||
run: gmx-server | ||
spec: | ||
containers: | ||
- image: measurementlab/github-maintenance-exporter:v0.1 | ||
name: gmx-server | ||
args: ["--storage.state-file=/var/lib/gmx/gmx-state"] | ||
env: | ||
- name: GITHUB_WEBHOOK_SECRET | ||
valueFrom: | ||
secretKeyRef: | ||
name: gmx-webhook-secret | ||
key: gmx-webhook-secret | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 9999 | ||
resources: | ||
requests: | ||
memory: "500M" | ||
cpu: "200m" | ||
volumeMounts: | ||
- mountPath: /var/lib/gmx | ||
name: gmx-storage | ||
# Disks created manually, can be named here explicitly using | ||
# gcePersistentDisk instead of the persistentVolumeClaim. | ||
volumes: | ||
- name: gmx-storage | ||
persistentVolumeClaim: | ||
claimName: auto-gmx-disk0 |
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,41 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
annotations: | ||
prometheus.io/scrape: 'true' | ||
name: gmx-tls-service | ||
namespace: default | ||
spec: | ||
ports: | ||
- port: 9999 | ||
protocol: TCP | ||
targetPort: 9999 | ||
selector: | ||
# Pods with labels matching this key/value pair will be publically | ||
# accessible through the service IP and port. | ||
run: gmx-server | ||
sessionAffinity: None | ||
type: NodePort | ||
--- | ||
apiVersion: extensions/v1beta1 | ||
kind: Ingress | ||
metadata: | ||
name: gmx-tls | ||
namespace: default | ||
annotations: | ||
kubernetes.io/tls-acme: "true" | ||
kubernetes.io/ingress.class: "nginx" | ||
spec: | ||
tls: | ||
- hosts: | ||
- gmx.{{GCLOUD_PROJECT}}.measurementlab.net | ||
secretName: gmx-tls | ||
rules: | ||
- host: gmx.{{GCLOUD_PROJECT}}.measurementlab.net | ||
http: | ||
paths: | ||
- path: / | ||
backend: | ||
serviceName: gmx-tls-service | ||
servicePort: 9999 | ||
|