Browse Source

update to helm charts for grpc config

features/migration-dotnet3
eiximenis 5 years ago
parent
commit
f441fcf018
12 changed files with 32 additions and 86 deletions
  1. +3
    -0
      k8s/helm/basket-api/templates/deployment.yaml
  2. +4
    -0
      k8s/helm/basket-api/templates/service.yaml
  3. +5
    -0
      k8s/helm/basket-api/values.yaml
  4. BIN
      k8s/helm/catalog-api/envoycfg/_catalog.proto-descriptor.pb
  5. +0
    -56
      k8s/helm/catalog-api/envoycfg/_envoy.yaml
  6. +2
    -2
      k8s/helm/catalog-api/templates/deployment.yaml
  7. +0
    -16
      k8s/helm/catalog-api/templates/envoy-cm.yaml
  8. +0
    -4
      k8s/helm/catalog-api/templates/service.yaml
  9. +6
    -8
      k8s/helm/catalog-api/values.yaml
  10. +3
    -0
      k8s/helm/ordering-api/templates/deployment.yaml
  11. +4
    -0
      k8s/helm/ordering-api/templates/service.yaml
  12. +5
    -0
      k8s/helm/ordering-api/values.yaml

+ 3
- 0
k8s/helm/basket-api/templates/deployment.yaml View File

@ -75,6 +75,9 @@ spec:
- name: http
containerPort: 80
protocol: TCP
- name: grpc
containerPort: 81
protocol: TCP
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}


+ 4
- 0
k8s/helm/basket-api/templates/service.yaml View File

@ -14,6 +14,10 @@ spec:
targetPort: http
protocol: TCP
name: http
- port: {{ .Values.service.grpcPort }}
targetPort: grpc
protocol: TCP
name: grpc
selector:
app: {{ template "basket-api.name" . }}
release: {{ .Release.Name }}

+ 5
- 0
k8s/helm/basket-api/values.yaml View File

@ -10,6 +10,7 @@ image:
service:
type: ClusterIP
port: 80
grpcPort: 81
resources: {}
@ -41,6 +42,10 @@ env:
values:
- name: OrchestratorType
value: 'K8S'
- name: PORT
value: "80"
- name: GRPC_PORT
value: "81"
probes:
liveness:
path: /liveness


BIN
k8s/helm/catalog-api/envoycfg/_catalog.proto-descriptor.pb View File


+ 0
- 56
k8s/helm/catalog-api/envoycfg/_envoy.yaml View File

@ -1,56 +0,0 @@
admin:
access_log_path: /tmp/admin_access.log
address:
socket_address: { address: 0.0.0.0, port_value: 9901 }
static_resources:
listeners:
- name: listener1
address:
socket_address: { address: 0.0.0.0, port_value: 51051 }
filter_chains:
- filters:
- name: envoy.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
stat_prefix: grpc_json
codec_type: AUTO
route_config:
name: local_route
virtual_hosts:
- name: local_service
domains: ["*"]
routes:
- match: { prefix: "/" }
route: { cluster: grpc, timeout: { seconds: 60 } }
http_filters:
- name: envoy.grpc_json_transcoder
config:
proto_descriptor: "/etc/envoy/catalog.proto-descriptor.pb"
services: ["CatalogApi.Catalog"]
print_options:
add_whitespace: true
always_print_primitive_fields: true
always_print_enums_as_ints: false
preserve_proto_field_names: false
- name: envoy.router
clusters:
- name: grpc
connect_timeout: 1.25s
type: logical_dns
lb_policy: round_robin
dns_lookup_family: V4_ONLY
http2_protocol_options: {}
load_assignment:
cluster_name: grpc
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
# WARNING: "docker.for.mac.localhost" has been deprecated from Docker v18.03.0.
# If you're running an older version of Docker, please use "docker.for.mac.localhost" instead.
# Reference: https://docs.docker.com/docker-for-mac/release-notes/#docker-community-edition-18030-ce-mac59-2018-03-26
address: localhost
port_value: 5001

+ 2
- 2
k8s/helm/catalog-api/templates/deployment.yaml View File

@ -73,10 +73,10 @@ spec:
{{- end }}
ports:
- name: http
containerPort: 5000
containerPort: 80
protocol: TCP
- name: grpc
containerPort: 5001
containerPort: 81
protocol: TCP
resources:
{{ toYaml .Values.resources | indent 12 }}


+ 0
- 16
k8s/helm/catalog-api/templates/envoy-cm.yaml View File

@ -1,16 +0,0 @@
{{- $name := include "catalog-api.fullname" . -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: "envoy-{{ $name }}"
labels:
app: {{ template "catalog-api.name" . }}
chart: {{ template "catalog-api.chart" .}}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
{{ (.Files.Glob "envoycfg/*.yaml").AsConfig | indent 2 }}
binaryData:
_catalog.proto-descriptor.pb: |-
{{ .Files.Get "envoycfg/_catalog.proto-descriptor.pb" | b64enc -}}

+ 0
- 4
k8s/helm/catalog-api/templates/service.yaml View File

@ -18,10 +18,6 @@ spec:
targetPort: grpc
protocol: TCP
name: grpc
- port: {{ .Values.service.envoy }}
targetPort: envoy
protocol: TCP
name: envoy
selector:
app: {{ template "catalog-api.name" . }}
release: {{ .Release.Name }}

+ 6
- 8
k8s/helm/catalog-api/values.yaml View File

@ -9,10 +9,8 @@ image:
service:
type: ClusterIP
port: 5000
grpc: 5001
envoy: 80
port: 80
grpcPort: 81
resources: {}
@ -47,19 +45,19 @@ env:
- name: OrchestratorType
value: 'K8S'
- name: PORT
value: "5000"
value: "80"
- name: GRPC_PORT
value: "5001"
value: "81"
probes:
liveness:
path: /liveness
initialDelaySeconds: 10
periodSeconds: 15
port: 5000
port: 80
readiness:
path: /hc
timeoutSeconds: 5
initialDelaySeconds: 90
periodSeconds: 60
port: 5000
port: 800

+ 3
- 0
k8s/helm/ordering-api/templates/deployment.yaml View File

@ -75,6 +75,9 @@ spec:
- name: http
containerPort: 80
protocol: TCP
- name: grpc
containerPort: 81
protocol: TCP
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}


+ 4
- 0
k8s/helm/ordering-api/templates/service.yaml View File

@ -14,6 +14,10 @@ spec:
targetPort: http
protocol: TCP
name: http
- port: {{ .Values.service.grpcPort }}}
targetPort: grpc
protocol: TCP
name: grpc
selector:
app: {{ template "ordering-api.name" . }}
release: {{ .Release.Name }}

+ 5
- 0
k8s/helm/ordering-api/values.yaml View File

@ -10,6 +10,7 @@ image:
service:
type: ClusterIP
port: 80
grpcPort: 81
ingress:
enabled: false
@ -50,6 +51,10 @@ env:
value: Development
- name: OrchestratorType
value: 'K8S'
- name: PORT
value: "80"
- name: GRPC_PORT
value: "81"
probes:
liveness:
path: /liveness


Loading…
Cancel
Save