4 changed files with 101 additions and 15 deletions
@ -0,0 +1,39 @@ |
|||||
|
{{- if .Values.ingress.enabled -}} |
||||
|
apiVersion: networking.k8s.io/v1beta1 |
||||
|
kind: Ingress |
||||
|
metadata: |
||||
|
name: {{ template "helm-guestbook.fullname" . }} |
||||
|
{{- with .Values.ingress.annotations }} |
||||
|
annotations: |
||||
|
{{- toYaml . | nindent 4 }} |
||||
|
{{- end }} |
||||
|
spec: |
||||
|
rules: |
||||
|
# host rule to only reach the desired pods (aka canary/preview) |
||||
|
- host: guestbook-desired.argoproj.io |
||||
|
http: |
||||
|
paths: |
||||
|
- backend: |
||||
|
serviceName: guestbook-canary-service |
||||
|
servicePort: {{ .Values.service.port }} |
||||
|
path: /* |
||||
|
# host rule to only reach the stable pods |
||||
|
- host: guestbook-stable.argoproj.io |
||||
|
http: |
||||
|
paths: |
||||
|
- backend: |
||||
|
serviceName: {{ template "helm-guestbook.fullname" . }} |
||||
|
servicePort: {{ .Values.service.port }} |
||||
|
path: /* |
||||
|
# default rule which omits host, and will split traffic between desired vs. stable |
||||
|
- http: |
||||
|
paths: |
||||
|
- path: /* |
||||
|
backend: |
||||
|
# serviceName must match either: canary.trafficRouting.alb.rootService (if specified), |
||||
|
# or canary.stableService (if rootService is omitted) |
||||
|
serviceName: root-service |
||||
|
# servicePort must be the value: use-annotation |
||||
|
# This instructs AWS Load Balancer Controller to look to annotations on how to direct traffic |
||||
|
servicePort: use-annotation |
||||
|
{{- end }} |
@ -0,0 +1,20 @@ |
|||||
|
apiVersion: v1 |
||||
|
kind: Service |
||||
|
metadata: |
||||
|
name: guestbook-root-service |
||||
|
namespace: {{ template "helm-guestbook.fullname" . }} |
||||
|
labels: |
||||
|
app: {{ template "helm-guestbook.name" . }} |
||||
|
chart: {{ template "helm-guestbook.chart" . }} |
||||
|
release: {{ .Release.Name }} |
||||
|
heritage: {{ .Release.Service }} |
||||
|
spec: |
||||
|
type: {{ .Values.service.type }} |
||||
|
ports: |
||||
|
- port: {{ .Values.service.port }} |
||||
|
targetPort: http |
||||
|
protocol: TCP |
||||
|
name: http |
||||
|
selector: |
||||
|
app: {{ template "helm-guestbook.name" . }} |
||||
|
release: {{ .Release.Name }} |
Loading…
Reference in new issue