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 #19 from deep-diver/gke-deployment
Gke deployment
- Loading branch information
Showing
8 changed files
with
143 additions
and
17 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,54 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: clip-search | ||
name: clip-search | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: clip-search | ||
template: | ||
metadata: | ||
labels: | ||
app: clip-search | ||
spec: | ||
containers: | ||
# image registry URI should be replaced once GitHub Action is set up | ||
- image: gcr.io/titanium-vision-318200/search_service | ||
name: search-service-p4sml | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 8080 | ||
protocol: TCP | ||
livenessProbe: | ||
httpGet: | ||
path: /alive | ||
port: 8080 | ||
initialDelaySeconds: 90 | ||
periodSeconds: 10 | ||
readinessProbe: | ||
httpGet: | ||
path: /ready | ||
port: 8080 | ||
initialDelaySeconds: 90 | ||
periodSeconds: 10 | ||
resources: | ||
limits: | ||
cpu: 1500m | ||
memory: 4G | ||
--- | ||
apiVersion: autoscaling/v1 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: clip-search-hpa | ||
|
||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: clip-search | ||
minReplicas: 1 | ||
maxReplicas: 3 | ||
targetCPUUtilizationPercentage: 80 |
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,8 @@ | ||
apiVersion: networking.gke.io/v1 | ||
kind: ManagedCertificate | ||
metadata: | ||
name: gde | ||
spec: | ||
domains: | ||
# should be replaced once GitHub Action is set up | ||
- mlgde.com |
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,19 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: gde | ||
annotations: | ||
kubernetes.io/ingress.global-static-ip-name: gde | ||
networking.gke.io/managed-certificates: gde | ||
kubernetes.io/ingress.class: "gce" | ||
spec: | ||
rules: | ||
- http: | ||
paths: | ||
- path: /* | ||
pathType: ImplementationSpecific | ||
backend: | ||
service: | ||
name: gde | ||
port: | ||
number: 80 |
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,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: gde | ||
spec: | ||
selector: | ||
app: clip-search | ||
type: ClusterIP | ||
ports: | ||
- protocol: TCP | ||
port: 80 | ||
targetPort: 8080 |
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 |
---|---|---|
|
@@ -8,3 +8,4 @@ flask | |
gunicorn==19.3.0 | ||
flask-cors | ||
direct-redis | ||
flask-healthz |