Created
January 20, 2021 19:26
-
-
Save likamrat/41934ee30bb812bfd14fa53b310f4fa6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: trip-deployment | |
namespace: api | |
labels: | |
deploy: trips | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: | |
app: trips | |
template: | |
metadata: | |
labels: | |
app: trips | |
spec: | |
containers: | |
- image: "{{registry}}.azurecr.io/trips:1.0" | |
imagePullPolicy: Always | |
name: trips | |
livenessProbe: | |
httpGet: | |
path: /api/trips/healthcheck | |
port: 80 | |
initialDelaySeconds: 10 | |
periodSeconds: 30 | |
readinessProbe: | |
httpGet: | |
path: /api/trips/healthcheck | |
port: 80 | |
initialDelaySeconds: 5 | |
periodSeconds: 5 | |
ports: | |
- containerPort: 80 | |
name: http | |
protocol: TCP | |
- containerPort: 443 | |
name: https | |
protocol: TCP | |
env: | |
- name: PORT | |
value: '80' | |
- name: OPENAPI_DOCS_URI | |
value: 'http://localhost' | |
- name: DEBUG_LOGGING | |
value: 'true' | |
envFrom: | |
- secretRef: | |
name: sql | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: trips | |
namespace: api | |
spec: | |
type: ClusterIP | |
selector: | |
app: trips | |
ports: | |
- protocol: TCP | |
name: trips-http | |
port: 80 | |
targetPort: 80 | |
- protocol: TCP | |
name: trips-https | |
port: 443 | |
targetPort: 443 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment