Skip to content

Commit

Permalink
deployment: fixing helm charts
Browse files Browse the repository at this point in the history
  • Loading branch information
Witold Konior committed Jul 21, 2019
1 parent b222a2b commit b0ac4c3
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 9 deletions.
3 changes: 3 additions & 0 deletions deployment/cqserver/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,11 @@ spec:
initialDelaySeconds: 10
ports:
- containerPort: {{ .Values.CollectorPort }}
name: collector
- containerPort: {{ .Values.QueryPort}}
name: query
- containerPort: {{ .Values.HealthCheckPort}}
name: healthcheck
imagePullPolicy: {{ .Values.ImagePullPolicy }}
volumeMounts:
- name: cqserver-config
Expand Down
17 changes: 12 additions & 5 deletions deployment/cqserver/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ metadata:
component: "{{ .Release.Name }}"
annotations:
helm.sh/created: {{ .Release.Time.Seconds | quote }}
# Memo for stream timeout configuration: https://github.com/kubernetes/ingress-nginx/tree/master/docs/examples/grpc#notes-on-using-responserequest-streams
kubernetes.io/ingress.class: {{ .Values.IngressClass }}
kubernetes.io/ingress.allow-http: "false"
ingress.kubernetes.io/service-upstream: "false"
nginx.org/proxy-pass-headers: "Cache-Control"
nginx.ingress.kubernetes.io/backend-protocol: "GRPC"
# We get unencrypted traffic inside cluster, to use TLS also internally we need to enable
# annotation below + provide TLS configuration into our service accordingly.
# nginx.ingress.kubernetes.io/backend-protocol: "GRPCS"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
tls:
- hosts:
Expand All @@ -22,7 +25,11 @@ spec:
- host: "{{ .Values.FQDN }}"
http:
paths:
- path: {{ if .Values.PathPrefix }}{{ .Values.PathPrefix }}{{ end }}{{ .Values.BasePath }}
- path: /query.QueryService
backend:
serviceName: "{{ .Release.Name }}"
servicePort: {{ .Values.ServerPort }}
servicePort: {{ .Values.QueryPort }}
- path: /collector.CollectorService
backend:
serviceName: "{{ .Release.Name }}"
servicePort: {{ .Values.CollectorPort }}
14 changes: 11 additions & 3 deletions deployment/cqserver/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ spec:
selector:
app: "{{ .Release.Name }}"
ports:
- name: http
- name: collector
protocol: TCP
port: {{.Values.ServerPort}}
targetPort: {{.Values.ServerPort}}
port: {{.Values.CollectorPort}}
targetPort: {{.Values.CollectorPort}}
- name: query
protocol: TCP
port: {{.Values.QueryPort}}
targetPort: {{.Values.QueryPort}}
- name: healthcheck
protocol: TCP
port: {{.Values.HealthCheckPort}}
targetPort: {{.Values.HealthCheckPort}}
5 changes: 4 additions & 1 deletion deployment/cqserver/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Name: "cqserver"
RepoName: "cqserver"
ImageTag: "v0.0.1"
Registry: "jozuenoon/cqserver"
Registry: "jozuenoon"
Servers: 2
HealthCheckPort: 5000
CollectorPort: 8000
Expand All @@ -13,4 +13,7 @@ ImagePullPolicy: "Always"
IngressClass: "nginx"
FQDN: "example.com"

# Pod disruption budget
MinAvailable: 1

ETCDEndpoints: ["http://etcd-0:2379", "http://etcd-1:2379", "http://etcd-2:2379"]
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ services:
volumes:
- etcd:/etcd_data


volumes:
etcd:

0 comments on commit b0ac4c3

Please sign in to comment.