Added Envoy yaml files; updated mobilemarketingapigw to use the Envoy ConfigMap
This commit is contained in:
		
							parent
							
								
									32a5ef2069
								
							
						
					
					
						commit
						341d964008
					
				@ -35,6 +35,9 @@ stages:
 | 
				
			|||||||
        - script: 'oc project $(OpenShiftProject)'
 | 
					        - script: 'oc project $(OpenShiftProject)'
 | 
				
			||||||
          failOnStderr: true
 | 
					          failOnStderr: true
 | 
				
			||||||
          displayName: 'Set OpenShift Project Context'
 | 
					          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-'
 | 
					        - script: 'oc process -f ./deploy/aro/mobilemarketingapigw/mobilemarketingapigw-deploy-template.yml -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) | oc apply -f-'
 | 
				
			||||||
          failOnStderr: true
 | 
					          failOnStderr: true
 | 
				
			||||||
          displayName: 'Ensure Mobile Marketing API Gateway OpenShift DeploymentConfig and Service'
 | 
					          displayName: 'Ensure Mobile Marketing API Gateway OpenShift DeploymentConfig and Service'
 | 
				
			||||||
@ -28,11 +28,11 @@ static_resources:
 | 
				
			|||||||
                  prefix: "/m/"
 | 
					                  prefix: "/m/"
 | 
				
			||||||
                route:
 | 
					                route:
 | 
				
			||||||
                  auto_host_rewrite: true
 | 
					                  auto_host_rewrite: true
 | 
				
			||||||
                  prefix_rewrite: "/marketingapi/"
 | 
					                  prefix_rewrite: "/marketing-api/"
 | 
				
			||||||
                  cluster: marketing
 | 
					                  cluster: marketing
 | 
				
			||||||
              - name: "m-long"
 | 
					              - name: "m-long"
 | 
				
			||||||
                match:
 | 
					                match:
 | 
				
			||||||
                  prefix: "/marketingapi/"
 | 
					                  prefix: "/marketing-api/"
 | 
				
			||||||
                route:
 | 
					                route:
 | 
				
			||||||
                  auto_host_rewrite: true
 | 
					                  auto_host_rewrite: true
 | 
				
			||||||
                  cluster: marketing
 | 
					                  cluster: marketing
 | 
				
			||||||
@ -24,13 +24,23 @@ objects:
 | 
				
			|||||||
          app: ${APPLICATION_NAME}
 | 
					          app: ${APPLICATION_NAME}
 | 
				
			||||||
          deploymentconfig: ${APPLICATION_NAME}
 | 
					          deploymentconfig: ${APPLICATION_NAME}
 | 
				
			||||||
      spec:
 | 
					      spec:
 | 
				
			||||||
 | 
					        volumes:
 | 
				
			||||||
 | 
					        - name: config
 | 
				
			||||||
 | 
					          configMap:
 | 
				
			||||||
 | 
					            name: ${APPLICATION_NAME}-config-map
 | 
				
			||||||
 | 
					            items:
 | 
				
			||||||
 | 
					            - key: envoy.yml
 | 
				
			||||||
 | 
					              path: envoy.yml
 | 
				
			||||||
        containers:
 | 
					        containers:
 | 
				
			||||||
          - env:
 | 
					          - env:
 | 
				
			||||||
              - name: PATH_BASE
 | 
					              - name: PATH_BASE
 | 
				
			||||||
                value: /mobilemarketingapigw
 | 
					                value: /${APPLICATION_NAME}
 | 
				
			||||||
            image: docker-registry.default.svc:5000/${IMAGE_REGISTRY_PROJECT_NAME}/${APPLICATION_NAME}:latest
 | 
					            image: docker-registry.default.svc:5000/${IMAGE_REGISTRY_PROJECT_NAME}/${APPLICATION_NAME}:latest
 | 
				
			||||||
            imagePullPolicy: Always
 | 
					            imagePullPolicy: Always
 | 
				
			||||||
            name: ${APPLICATION_NAME}
 | 
					            name: ${APPLICATION_NAME}
 | 
				
			||||||
 | 
					            volumeMounts:
 | 
				
			||||||
 | 
					            - name: envoy-volume
 | 
				
			||||||
 | 
					              mountPath: /etc/envoy
 | 
				
			||||||
            ports:
 | 
					            ports:
 | 
				
			||||||
            - containerPort: 8080
 | 
					            - containerPort: 8080
 | 
				
			||||||
              protocol: TCP
 | 
					              protocol: TCP
 | 
				
			||||||
@ -39,6 +49,13 @@ objects:
 | 
				
			|||||||
            resources: {}
 | 
					            resources: {}
 | 
				
			||||||
            terminationMessagePath: /dev/termination-log
 | 
					            terminationMessagePath: /dev/termination-log
 | 
				
			||||||
            terminationMessagePolicy: File
 | 
					            terminationMessagePolicy: File
 | 
				
			||||||
 | 
					            volumes:
 | 
				
			||||||
 | 
					            - name: envoy-volume
 | 
				
			||||||
 | 
					              configMap:
 | 
				
			||||||
 | 
					                name: mobilemarketingapigw-config-map
 | 
				
			||||||
 | 
					                items:
 | 
				
			||||||
 | 
					                - key: envoy.yml
 | 
				
			||||||
 | 
					                  path: envoy.yml
 | 
				
			||||||
        dnsPolicy: ClusterFirst
 | 
					        dnsPolicy: ClusterFirst
 | 
				
			||||||
        restartPolicy: Always
 | 
					        restartPolicy: Always
 | 
				
			||||||
        schedulerName: default-scheduler
 | 
					        schedulerName: default-scheduler
 | 
				
			||||||
 | 
				
			|||||||
@ -9,7 +9,7 @@ static_resources:
 | 
				
			|||||||
  - address:
 | 
					  - address:
 | 
				
			||||||
      socket_address:
 | 
					      socket_address:
 | 
				
			||||||
        address: 0.0.0.0
 | 
					        address: 0.0.0.0
 | 
				
			||||||
        port_value: 80
 | 
					        port_value: 8080
 | 
				
			||||||
    filter_chains:
 | 
					    filter_chains:
 | 
				
			||||||
    - filters:
 | 
					    - filters:
 | 
				
			||||||
      - name: envoy.http_connection_manager
 | 
					      - name: envoy.http_connection_manager
 | 
				
			||||||
@ -103,37 +103,37 @@ static_resources:
 | 
				
			|||||||
    lb_policy: round_robin
 | 
					    lb_policy: round_robin
 | 
				
			||||||
    hosts:
 | 
					    hosts:
 | 
				
			||||||
    - socket_address:
 | 
					    - socket_address:
 | 
				
			||||||
        address: webshoppingagg
 | 
					        address: webshoppingagg.__OpenShiftProject__.svc:8080
 | 
				
			||||||
        port_value: 80
 | 
					        port_value: 8080
 | 
				
			||||||
  - name: catalog
 | 
					  - name: catalog
 | 
				
			||||||
    connect_timeout: 0.25s
 | 
					    connect_timeout: 0.25s
 | 
				
			||||||
    type: strict_dns
 | 
					    type: strict_dns
 | 
				
			||||||
    lb_policy: round_robin
 | 
					    lb_policy: round_robin
 | 
				
			||||||
    hosts:
 | 
					    hosts:
 | 
				
			||||||
    - socket_address:
 | 
					    - socket_address:
 | 
				
			||||||
        address: catalog-api
 | 
					        address: catalogapi.__OpenShiftProject__.svc:8080
 | 
				
			||||||
        port_value: 80
 | 
					        port_value: 8080
 | 
				
			||||||
  - name: basket
 | 
					  - name: basket
 | 
				
			||||||
    connect_timeout: 0.25s
 | 
					    connect_timeout: 0.25s
 | 
				
			||||||
    type: strict_dns
 | 
					    type: strict_dns
 | 
				
			||||||
    lb_policy: round_robin
 | 
					    lb_policy: round_robin
 | 
				
			||||||
    hosts:
 | 
					    hosts:
 | 
				
			||||||
    - socket_address:
 | 
					    - socket_address:
 | 
				
			||||||
        address: basket-api
 | 
					        address: basketapi.__OpenShiftProject__.svc:8080
 | 
				
			||||||
        port_value: 80
 | 
					        port_value: 8080
 | 
				
			||||||
  - name: ordering
 | 
					  - name: ordering
 | 
				
			||||||
    connect_timeout: 0.25s
 | 
					    connect_timeout: 0.25s
 | 
				
			||||||
    type: strict_dns
 | 
					    type: strict_dns
 | 
				
			||||||
    lb_policy: round_robin
 | 
					    lb_policy: round_robin
 | 
				
			||||||
    hosts:
 | 
					    hosts:
 | 
				
			||||||
    - socket_address:
 | 
					    - socket_address:
 | 
				
			||||||
        address: ordering-api
 | 
					        address: orderingapi.__OpenShiftProject__.svc:8080
 | 
				
			||||||
        port_value: 80
 | 
					        port_value: 8080
 | 
				
			||||||
  - name: signalr-hub
 | 
					  - name: signalr-hub
 | 
				
			||||||
    connect_timeout: 0.25s
 | 
					    connect_timeout: 0.25s
 | 
				
			||||||
    type: strict_dns
 | 
					    type: strict_dns
 | 
				
			||||||
    lb_policy: round_robin
 | 
					    lb_policy: round_robin
 | 
				
			||||||
    hosts:
 | 
					    hosts:
 | 
				
			||||||
    - socket_address:
 | 
					    - socket_address:
 | 
				
			||||||
        address: ordering-signalrhub
 | 
					        address: orderingsignalrhub.__OpenShiftProject__.svc:8080
 | 
				
			||||||
        port_value: 80
 | 
					        port_value: 8080
 | 
				
			||||||
@ -9,7 +9,7 @@ static_resources:
 | 
				
			|||||||
  - address:
 | 
					  - address:
 | 
				
			||||||
      socket_address:
 | 
					      socket_address:
 | 
				
			||||||
        address: 0.0.0.0
 | 
					        address: 0.0.0.0
 | 
				
			||||||
        port_value: 80
 | 
					        port_value: 8080
 | 
				
			||||||
    filter_chains:
 | 
					    filter_chains:
 | 
				
			||||||
    - filters:
 | 
					    - filters:
 | 
				
			||||||
      - name: envoy.http_connection_manager
 | 
					      - name: envoy.http_connection_manager
 | 
				
			||||||
@ -63,13 +63,13 @@ static_resources:
 | 
				
			|||||||
    lb_policy: round_robin
 | 
					    lb_policy: round_robin
 | 
				
			||||||
    hosts:
 | 
					    hosts:
 | 
				
			||||||
    - socket_address:
 | 
					    - socket_address:
 | 
				
			||||||
        address: marketing-api
 | 
					        address: marketingapi.__OpenShiftProject__.svc:8080
 | 
				
			||||||
        port_value: 80
 | 
					        port_value: 8080
 | 
				
			||||||
  - name: locations
 | 
					  - name: locations
 | 
				
			||||||
    connect_timeout: 0.25s
 | 
					    connect_timeout: 0.25s
 | 
				
			||||||
    type: strict_dns
 | 
					    type: strict_dns
 | 
				
			||||||
    lb_policy: round_robin
 | 
					    lb_policy: round_robin
 | 
				
			||||||
    hosts:
 | 
					    hosts:
 | 
				
			||||||
    - socket_address:
 | 
					    - socket_address:
 | 
				
			||||||
        address: locations-api
 | 
					        address: locationsapi.__OpenShiftProject__.svc:8080
 | 
				
			||||||
        port_value: 80
 | 
					        port_value: 8080
 | 
				
			||||||
@ -9,7 +9,7 @@ static_resources:
 | 
				
			|||||||
  - address:
 | 
					  - address:
 | 
				
			||||||
      socket_address:
 | 
					      socket_address:
 | 
				
			||||||
        address: 0.0.0.0
 | 
					        address: 0.0.0.0
 | 
				
			||||||
        port_value: 80
 | 
					        port_value: 8080
 | 
				
			||||||
    filter_chains:
 | 
					    filter_chains:
 | 
				
			||||||
    - filters:
 | 
					    - filters:
 | 
				
			||||||
      - name: envoy.http_connection_manager
 | 
					      - name: envoy.http_connection_manager
 | 
				
			||||||
@ -103,37 +103,37 @@ static_resources:
 | 
				
			|||||||
    lb_policy: round_robin
 | 
					    lb_policy: round_robin
 | 
				
			||||||
    hosts:
 | 
					    hosts:
 | 
				
			||||||
    - socket_address:
 | 
					    - socket_address:
 | 
				
			||||||
        address: webshoppingagg
 | 
					        address: webshoppingagg.__OpenShiftProject__.svc:8080
 | 
				
			||||||
        port_value: 80
 | 
					        port_value: 8080
 | 
				
			||||||
  - name: catalog
 | 
					  - name: catalog
 | 
				
			||||||
    connect_timeout: 0.25s
 | 
					    connect_timeout: 0.25s
 | 
				
			||||||
    type: strict_dns
 | 
					    type: strict_dns
 | 
				
			||||||
    lb_policy: round_robin
 | 
					    lb_policy: round_robin
 | 
				
			||||||
    hosts:
 | 
					    hosts:
 | 
				
			||||||
    - socket_address:
 | 
					    - socket_address:
 | 
				
			||||||
        address: catalog-api
 | 
					        address: catalogapi.__OpenShiftProject__.svc:8080
 | 
				
			||||||
        port_value: 80
 | 
					        port_value: 8080
 | 
				
			||||||
  - name: basket
 | 
					  - name: basket
 | 
				
			||||||
    connect_timeout: 0.25s
 | 
					    connect_timeout: 0.25s
 | 
				
			||||||
    type: strict_dns
 | 
					    type: strict_dns
 | 
				
			||||||
    lb_policy: round_robin
 | 
					    lb_policy: round_robin
 | 
				
			||||||
    hosts:
 | 
					    hosts:
 | 
				
			||||||
    - socket_address:
 | 
					    - socket_address:
 | 
				
			||||||
        address: basket-api
 | 
					        address: basketapi.__OpenShiftProject__.svc:8080
 | 
				
			||||||
        port_value: 80
 | 
					        port_value: 8080
 | 
				
			||||||
  - name: ordering
 | 
					  - name: ordering
 | 
				
			||||||
    connect_timeout: 0.25s
 | 
					    connect_timeout: 0.25s
 | 
				
			||||||
    type: strict_dns
 | 
					    type: strict_dns
 | 
				
			||||||
    lb_policy: round_robin
 | 
					    lb_policy: round_robin
 | 
				
			||||||
    hosts:
 | 
					    hosts:
 | 
				
			||||||
    - socket_address:
 | 
					    - socket_address:
 | 
				
			||||||
        address: ordering-api
 | 
					        address: orderingapi.__OpenShiftProject__.svc:8080
 | 
				
			||||||
        port_value: 80
 | 
					        port_value: 8080
 | 
				
			||||||
  - name: signalr-hub
 | 
					  - name: signalr-hub
 | 
				
			||||||
    connect_timeout: 0.25s
 | 
					    connect_timeout: 0.25s
 | 
				
			||||||
    type: strict_dns
 | 
					    type: strict_dns
 | 
				
			||||||
    lb_policy: round_robin
 | 
					    lb_policy: round_robin
 | 
				
			||||||
    hosts:
 | 
					    hosts:
 | 
				
			||||||
    - socket_address:
 | 
					    - socket_address:
 | 
				
			||||||
        address: ordering-signalrhub
 | 
					        address: orderingsignalrhub.__OpenShiftProject__.svc:8080
 | 
				
			||||||
        port_value: 80
 | 
					        port_value: 8080
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user