Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions manifests/bucketeer/charts/api/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "api.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "api.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "api.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "api.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "api.name" . }},release={{ template "api.fullname" . }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ metadata:
spec:
healthCheck:
requestPath: /health
type: HTTP2
timeoutSec: 40
connectionDraining:
drainingTimeoutSec: 60
Expand Down
2 changes: 2 additions & 0 deletions manifests/bucketeer/charts/api/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.gcpMultiCluster.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
Expand All @@ -23,3 +24,4 @@ spec:
- host: {{ .Values.ingress.host }}
http:
paths: {{- toYaml .Values.ingress.rulePaths | nindent 10 }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{{- if and .Values.gcpMultiCluster.enabled .Values.gcpMultiCluster.configCluster }}
apiVersion: networking.gke.io/v1
kind: MultiClusterIngress
metadata:
name: {{ .Values.gcpMultiCluster.ingress.name }}
namespace: {{ .Values.namespace }}
labels:
app: {{ template "api.name" . }}
chart: {{ template "api.chart" . }}
release: {{ template "api.fullname" . }}
heritage: {{ .Release.Service }}
annotations:
networking.gke.io/static-ip: {{ .Values.gcpMultiCluster.ingress.staticIPName }}
spec:
template:
spec:
backend:
serviceName: {{ .Values.gcpMultiCluster.service.name }}
servicePort: {{ .Values.service.externalPort }}
tls:
- secretName: {{ .Values.gcpMultiCluster.ingress.secretName }}
rules:
- host: {{ .Values.gcpMultiCluster.ingress.host }}
http:
paths: {{- toYaml .Values.gcpMultiCluster.ingress.rulePaths | nindent 14 }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{{- if and .Values.gcpMultiCluster.enabled .Values.gcpMultiCluster.configCluster }}
apiVersion: networking.gke.io/v1
kind: MultiClusterService
metadata:
name: {{ .Values.gcpMultiCluster.service.name }}
namespace: {{ .Values.namespace }}
labels:
app: {{ template "api.name" . }}
chart: {{ template "api.chart" . }}
release: {{ template "api.fullname" . }}
heritage: {{ .Release.Service }}
annotations:
cloud.google.com/backend-config: '{"ports": {"{{ .Values.service.externalPort }}":"{{ template "api.fullname" . }}"}}'
networking.gke.io/app-protocols: '{"service":"HTTP2"}'
cloud.google.com/neg: '{"ingress": true}'
spec:
template:
spec:
selector:
app: {{ template "api.name" . }}
release: {{ template "api.fullname" . }}
ports:
- name: service
port: {{ .Values.service.externalPort }}
targetPort: {{ .Values.envoy.port }}
protocol: TCP
- name: metrics
port: {{ .Values.env.metricsPort }}
protocol: TCP
- name: admin
port: {{ .Values.envoy.adminPort }}
protocol: TCP
{{- end }}
4 changes: 2 additions & 2 deletions manifests/bucketeer/charts/api/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ metadata:
envoy: "true"
metrics: "true"
spec:
type: NodePort
type: {{ .Values.service.type }}
ports:
- name: service
port: {{ .Values.service.externalPort }}
Expand All @@ -29,4 +29,4 @@ spec:
protocol: TCP
selector:
app: {{ template "api.name" . }}
release: {{ template "api.fullname" . }}
release: {{ template "api.fullname" . }}
16 changes: 16 additions & 0 deletions manifests/bucketeer/charts/api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ envoy:
maxRequests: 3500
maxConnections: 3500
service:
type: ClusterIP
externalPort: 9000
ingress:
name: api
Expand All @@ -86,3 +87,18 @@ health:
resources: {}
serviceAccount:
annotations: {}
gcpMultiCluster:
configCluster: false
enabled: false
service:
name: api-multi-cluster-service
ingress:
name: api-multi-cluster-ingress
host:
staticIPName:
secretName:
rulePaths:
- path: /
backend:
serviceName: api-multi-cluster-service
servicePort: 9000
5 changes: 2 additions & 3 deletions manifests/bucketeer/charts/web/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
1. Get the application URL by running these commands:
{{- if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "web.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
Expand All @@ -7,9 +6,9 @@
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "web.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "web.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
echo http://$SERVICE_IP:{{ .Values.service.httpPort }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "web.name" . }},release={{ template "web.fullname" . }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ metadata:
name: {{ template "web.fullname" . }}
namespace: {{ .Values.namespace }}
spec:
healthCheck:
requestPath: /health
type: HTTP2
timeoutSec: 300
connectionDraining:
drainingTimeoutSec: 60
Expand Down
4 changes: 3 additions & 1 deletion manifests/bucketeer/charts/web/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.gcpMultiCluster.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
Expand All @@ -22,4 +23,5 @@ spec:
rules:
- host: {{ .Values.ingress.host }}
http:
paths: {{- toYaml .Values.ingress.rulePaths | nindent 10 }}
paths: {{- toYaml .Values.ingress.rulePaths | nindent 10 }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{{- if and .Values.gcpMultiCluster.enabled .Values.gcpMultiCluster.configCluster }}
apiVersion: networking.gke.io/v1
kind: MultiClusterIngress
metadata:
name: {{ .Values.gcpMultiCluster.ingress.name }}
namespace: {{ .Values.namespace }}
labels:
app: {{ template "web.name" . }}
chart: {{ template "web.chart" . }}
release: {{ template "web.fullname" . }}
heritage: {{ .Release.Service }}
annotations:
networking.gke.io/static-ip: {{ .Values.gcpMultiCluster.ingress.staticIPName }}
spec:
template:
spec:
backend:
serviceName: {{ .Values.gcpMultiCluster.service.name }}
servicePort: {{ .Values.service.httpPort }}
tls:
- secretName: {{ .Values.gcpMultiCluster.ingress.secretName }}
rules:
- host: {{ .Values.gcpMultiCluster.ingress.host }}
http:
paths: {{- toYaml .Values.gcpMultiCluster.ingress.rulePaths | nindent 14 }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{{- if and .Values.gcpMultiCluster.enabled .Values.gcpMultiCluster.configCluster }}
apiVersion: networking.gke.io/v1
kind: MultiClusterService
metadata:
name: {{ .Values.gcpMultiCluster.service.name }}
namespace: {{ .Values.namespace }}
labels:
app: {{ template "web.name" . }}
chart: {{ template "web.chart" . }}
release: {{ template "web.fullname" . }}
heritage: {{ .Release.Service }}
annotations:
cloud.google.com/backend-config: '{"ports": {"{{ .Values.service.httpPort }}":"{{ template "web.fullname" . }}"}}'
networking.gke.io/app-protocols: '{"http-service":"HTTP2"}'
cloud.google.com/neg: '{"ingress": true}'
spec:
template:
spec:
selector:
app: {{ template "web.name" . }}
release: {{ template "web.fullname" . }}
ports:
- name: grpc-service
port: {{ .Values.service.grpcPort }}
targetPort: envoy-grpc
protocol: TCP
- name: http-service
port: {{ .Values.service.httpPort }}
targetPort: envoy-http
protocol: TCP
- name: metrics
port: {{ .Values.env.metricsPort }}
protocol: TCP
- name: admin
port: {{ .Values.envoy.adminPort }}
protocol: TCP
{{- end }}
2 changes: 1 addition & 1 deletion manifests/bucketeer/charts/web/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ spec:
protocol: TCP
selector:
app: {{ template "web.name" . }}
release: {{ template "web.fullname" . }}
release: {{ template "web.fullname" . }}
17 changes: 16 additions & 1 deletion manifests/bucketeer/charts/web/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ envoy:
adminPort: 8001
resources: {}
service:
type: NodePort
type: ClusterIP
grpcPort: 9000
httpPort: 9003
health:
Expand All @@ -144,3 +144,18 @@ ingress:
name: web
port:
number: 9003
gcpMultiCluster:
configCluster: false
enabled: false
service:
name: web-multi-cluster-service
ingress:
name: web-multi-cluster-ingress
host:
staticIPName:
secretName:
rulePaths:
- path: /
backend:
serviceName: web-multi-cluster-service
servicePort: 9003