TWSE-getway.yaml

mail@pastecode.io avatar
unknown
yaml
2 years ago
1.9 kB
1
Indexable
Never
# NOTE: Before deploying to a production environment, please review the documentation -> https://aka.ms/self-hosted-gateway-production
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: TWSE-getway-env
data:
  config.service.endpoint: "https://alice-apim-resource.management.azure-api.net/subscriptions/737303a1-750e-4ca4-9ae7-a1858f703630/resourceGroups/18th-Alice-APIM/providers/Microsoft.ApiManagement/service/alice-apim-resource?api-version=2021-01-01-preview"
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: TWSE-getway
spec:
  replicas: 1
  selector:
    matchLabels:
      app: TWSE-getway
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 0
      maxSurge: 25%
  template:
    metadata:
      labels:
        app: TWSE-getway
    spec:
      terminationGracePeriodSeconds: 60
      containers:
      - name: TWSE-getway
        image: mcr.microsoft.com/azure-api-management/gateway:latest
        ports:
        - name: http
          containerPort: 8080
        - name: https
          containerPort: 8081
        readinessProbe:
          httpGet:
            path: /internal-status-0123456789abcdef
            port: http
            scheme: HTTP
          initialDelaySeconds: 0
          periodSeconds: 5
          failureThreshold: 3
          successThreshold: 1
        env:
        - name: config.service.auth
          valueFrom:
            secretKeyRef:
              name: TWSE-getway-token
              key: value
        envFrom:
        - configMapRef:
            name: TWSE-getway-env
---
apiVersion: v1
kind: Service
metadata:
  name: TWSE-getway
spec:
  type: LoadBalancer
  externalTrafficPolicy: Local
  ports:
  - name: http
    port: 80
    targetPort: 8080
  - name: https
    port: 443
    targetPort: 8081
  selector:
    app: TWSE-getway