Created
January 21, 2022 13:56
-
-
Save welshstew/f12d967747a5037e05cc5d811a6ebfbf to your computer and use it in GitHub Desktop.
mtls-support
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: | |
| labels: | |
| app: customer | |
| version: v1 | |
| name: customer | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: customer | |
| version: v1 | |
| template: | |
| metadata: | |
| labels: | |
| app: customer | |
| version: v1 | |
| annotations: | |
| sidecar.istio.io/inject: "true" | |
| spec: | |
| containers: | |
| - env: | |
| - name: JAVA_OPTIONS | |
| value: -Xms15m -Xmx15m -Xmn15m | |
| name: customer | |
| image: quay.io/redhattraining/ossm-customer:1.0 | |
| imagePullPolicy: Always | |
| ports: | |
| - containerPort: 8080 | |
| name: http | |
| protocol: TCP | |
| - containerPort: 8778 | |
| name: jolokia | |
| protocol: TCP | |
| - containerPort: 9779 | |
| name: prometheus | |
| protocol: TCP | |
| livenessProbe: | |
| exec: | |
| command: | |
| - curl | |
| - localhost:8080/health/live | |
| initialDelaySeconds: 5 | |
| periodSeconds: 4 | |
| timeoutSeconds: 1 | |
| readinessProbe: | |
| exec: | |
| command: | |
| - curl | |
| - localhost:8080/health/ready | |
| initialDelaySeconds: 6 | |
| periodSeconds: 5 | |
| timeoutSeconds: 1 | |
| securityContext: | |
| privileged: false | |
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: customer | |
| labels: | |
| app: customer | |
| spec: | |
| ports: | |
| - name: http | |
| port: 8080 | |
| selector: | |
| app: customer | |
| --- | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| labels: | |
| app: preference | |
| version: v1 | |
| name: preference | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: preference | |
| version: v1 | |
| template: | |
| metadata: | |
| labels: | |
| app: preference | |
| version: v1 | |
| annotations: | |
| sidecar.istio.io/inject: "true" | |
| spec: | |
| containers: | |
| - env: | |
| - name: JAVA_OPTIONS | |
| value: -Xms15m -Xmx15m -Xmn15m | |
| name: preference | |
| image: quay.io/redhattraining/ossm-preference:1.0 | |
| imagePullPolicy: Always | |
| ports: | |
| - containerPort: 8080 | |
| name: http | |
| protocol: TCP | |
| - containerPort: 8778 | |
| name: jolokia | |
| protocol: TCP | |
| - containerPort: 9779 | |
| name: prometheus | |
| protocol: TCP | |
| livenessProbe: | |
| exec: | |
| command: | |
| - curl | |
| - localhost:8080/health/live | |
| initialDelaySeconds: 5 | |
| periodSeconds: 4 | |
| timeoutSeconds: 1 | |
| readinessProbe: | |
| exec: | |
| command: | |
| - curl | |
| - localhost:8080/health/ready | |
| initialDelaySeconds: 6 | |
| periodSeconds: 5 | |
| timeoutSeconds: 1 | |
| securityContext: | |
| privileged: false | |
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: preference | |
| labels: | |
| app: preference | |
| spec: | |
| ports: | |
| - name: http | |
| port: 8080 | |
| selector: | |
| app: preference | |
| --- | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| labels: | |
| app: recommendation | |
| version: v1 | |
| name: recommendation | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: recommendation | |
| version: v1 | |
| template: | |
| metadata: | |
| labels: | |
| app: recommendation | |
| version: v1 | |
| annotations: | |
| sidecar.istio.io/inject: "true" | |
| spec: | |
| containers: | |
| - env: | |
| - name: JAVA_OPTIONS | |
| value: -Xms15m -Xmx15m -Xmn15m | |
| name: recommendation | |
| image: quay.io/redhattraining/ossm-recommendation:1.0 | |
| imagePullPolicy: Always | |
| ports: | |
| - containerPort: 8080 | |
| name: http | |
| protocol: TCP | |
| - containerPort: 8778 | |
| name: jolokia | |
| protocol: TCP | |
| - containerPort: 9779 | |
| name: prometheus | |
| protocol: TCP | |
| livenessProbe: | |
| exec: | |
| command: | |
| - curl | |
| - localhost:8080/health/live | |
| initialDelaySeconds: 5 | |
| periodSeconds: 4 | |
| timeoutSeconds: 1 | |
| readinessProbe: | |
| exec: | |
| command: | |
| - curl | |
| - localhost:8080/health/ready | |
| initialDelaySeconds: 6 | |
| periodSeconds: 5 | |
| timeoutSeconds: 1 | |
| securityContext: | |
| privileged: false | |
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: recommendation | |
| labels: | |
| app: recommendation | |
| spec: | |
| ports: | |
| - name: http | |
| port: 8080 | |
| selector: | |
| app: recommendation | |
| --- | |
| apiVersion: networking.istio.io/v1beta1 | |
| kind: Gateway | |
| metadata: | |
| name: customer-gateway | |
| spec: | |
| selector: | |
| istio: ingressgateway # use istio default controller | |
| servers: | |
| - port: | |
| number: 80 | |
| name: http | |
| protocol: HTTP | |
| hosts: | |
| - "*" | |
| --- | |
| apiVersion: networking.istio.io/v1beta1 | |
| kind: VirtualService | |
| metadata: | |
| name: customer-virtualservice | |
| spec: | |
| hosts: | |
| - "*" | |
| gateways: | |
| - customer-gateway | |
| http: | |
| - match: | |
| - uri: | |
| prefix: /mtls | |
| rewrite: | |
| uri: / | |
| route: | |
| - destination: | |
| host: customer | |
| port: | |
| number: 8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment