Browse Source

Added Envoy yaml files; updated mobilemarketingapigw to use the Envoy ConfigMap

pull/1259/head
Tim McCarthy 5 years ago
parent
commit
341d964008
6 changed files with 50 additions and 30 deletions
  1. +3
    -0
      deploy/aro/mobilemarketingapigw/azure-pipelines.yml
  2. +2
    -2
      deploy/aro/mobilemarketingapigw/envoy.yml
  3. +18
    -1
      deploy/aro/mobilemarketingapigw/mobilemarketingapigw-deploy-template.yml
  4. +11
    -11
      deploy/aro/mobileshoppingapigw/envoy.yml
  5. +5
    -5
      deploy/aro/webmarketingapigw/envoy.yml
  6. +11
    -11
      deploy/aro/webshoppingapigw/envoy.yml

+ 3
- 0
deploy/aro/mobilemarketingapigw/azure-pipelines.yml View File

@ -35,6 +35,9 @@ stages:
- script: 'oc project $(OpenShiftProject)'
failOnStderr: true
displayName: 'Set OpenShift Project Context'
- script: 'oc create configmap mobilemarketingapigw --from-file=./deploy/aro/mobilemarketingapigw/envoy.yml'
failOnStderr: true
displayName: 'Add Envoy ConfigMap'
- script: 'oc process -f ./deploy/aro/mobilemarketingapigw/mobilemarketingapigw-deploy-template.yml -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) | oc apply -f-'
failOnStderr: true
displayName: 'Ensure Mobile Marketing API Gateway OpenShift DeploymentConfig and Service'

deploy/aro/mobilemarketingapigw/envoy.yaml → deploy/aro/mobilemarketingapigw/envoy.yml View File

@ -28,11 +28,11 @@ static_resources:
prefix: "/m/"
route:
auto_host_rewrite: true
prefix_rewrite: "/marketingapi/"
prefix_rewrite: "/marketing-api/"
cluster: marketing
- name: "m-long"
match:
prefix: "/marketingapi/"
prefix: "/marketing-api/"
route:
auto_host_rewrite: true
cluster: marketing

+ 18
- 1
deploy/aro/mobilemarketingapigw/mobilemarketingapigw-deploy-template.yml View File

@ -24,13 +24,23 @@ objects:
app: ${APPLICATION_NAME}
deploymentconfig: ${APPLICATION_NAME}
spec:
volumes:
- name: config
configMap:
name: ${APPLICATION_NAME}-config-map
items:
- key: envoy.yml
path: envoy.yml
containers:
- env:
- name: PATH_BASE
value: /mobilemarketingapigw
value: /${APPLICATION_NAME}
image: docker-registry.default.svc:5000/${IMAGE_REGISTRY_PROJECT_NAME}/${APPLICATION_NAME}:latest
imagePullPolicy: Always
name: ${APPLICATION_NAME}
volumeMounts:
- name: envoy-volume
mountPath: /etc/envoy
ports:
- containerPort: 8080
protocol: TCP
@ -39,6 +49,13 @@ objects:
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumes:
- name: envoy-volume
configMap:
name: mobilemarketingapigw-config-map
items:
- key: envoy.yml
path: envoy.yml
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler


deploy/aro/mobileshoppingapigw/envoy.yaml → deploy/aro/mobileshoppingapigw/envoy.yml View File

@ -9,7 +9,7 @@ static_resources:
- address:
socket_address:
address: 0.0.0.0
port_value: 80
port_value: 8080
filter_chains:
- filters:
- name: envoy.http_connection_manager
@ -103,37 +103,37 @@ static_resources:
lb_policy: round_robin
hosts:
- socket_address:
address: webshoppingagg
port_value: 80
address: webshoppingagg.__OpenShiftProject__.svc:8080
port_value: 8080
- name: catalog
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: catalog-api
port_value: 80
address: catalogapi.__OpenShiftProject__.svc:8080
port_value: 8080
- name: basket
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: basket-api
port_value: 80
address: basketapi.__OpenShiftProject__.svc:8080
port_value: 8080
- name: ordering
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: ordering-api
port_value: 80
address: orderingapi.__OpenShiftProject__.svc:8080
port_value: 8080
- name: signalr-hub
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: ordering-signalrhub
port_value: 80
address: orderingsignalrhub.__OpenShiftProject__.svc:8080
port_value: 8080

deploy/aro/webmarketingapigw/envoy.yaml → deploy/aro/webmarketingapigw/envoy.yml View File

@ -9,7 +9,7 @@ static_resources:
- address:
socket_address:
address: 0.0.0.0
port_value: 80
port_value: 8080
filter_chains:
- filters:
- name: envoy.http_connection_manager
@ -63,13 +63,13 @@ static_resources:
lb_policy: round_robin
hosts:
- socket_address:
address: marketing-api
port_value: 80
address: marketingapi.__OpenShiftProject__.svc:8080
port_value: 8080
- name: locations
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: locations-api
port_value: 80
address: locationsapi.__OpenShiftProject__.svc:8080
port_value: 8080

deploy/aro/webshoppingapigw/envoy.yaml → deploy/aro/webshoppingapigw/envoy.yml View File

@ -9,7 +9,7 @@ static_resources:
- address:
socket_address:
address: 0.0.0.0
port_value: 80
port_value: 8080
filter_chains:
- filters:
- name: envoy.http_connection_manager
@ -103,37 +103,37 @@ static_resources:
lb_policy: round_robin
hosts:
- socket_address:
address: webshoppingagg
port_value: 80
address: webshoppingagg.__OpenShiftProject__.svc:8080
port_value: 8080
- name: catalog
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: catalog-api
port_value: 80
address: catalogapi.__OpenShiftProject__.svc:8080
port_value: 8080
- name: basket
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: basket-api
port_value: 80
address: basketapi.__OpenShiftProject__.svc:8080
port_value: 8080
- name: ordering
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: ordering-api
port_value: 80
address: orderingapi.__OpenShiftProject__.svc:8080
port_value: 8080
- name: signalr-hub
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: ordering-signalrhub
port_value: 80
address: orderingsignalrhub.__OpenShiftProject__.svc:8080
port_value: 8080

Loading…
Cancel
Save