Skip to content

Commit

Permalink
This PR will provide the support of using latest ambassador edge-stack (
Browse files Browse the repository at this point in the history
#2410)

changes:
• Updated all services to use the latest Ambassador Edge Stack routing rules.

fixes #2359

Signed-off-by: saikumarbommakanti <[email protected]>
  • Loading branch information
saikumarbommakanti authored Nov 6, 2023
1 parent bc735f2 commit 1ed094b
Show file tree
Hide file tree
Showing 54 changed files with 104 additions and 8,080 deletions.
56 changes: 50 additions & 6 deletions platforms/hyperledger-indy/charts/indy-node/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ kind: Service
metadata:
name: "{{ $.Values.metadata.name }}"
namespace: "{{ $.Values.metadata.namespace }}"
{{ if $.Values.ambassador.annotations }}
annotations:
getambassador.io/config: |
{{ $.Values.ambassador.annotations | nindent 6 }}
{{ end }}
spec:
type: {{ $.Values.service.type }}
ports:
Expand All @@ -30,4 +25,53 @@ spec:
nodePort: {{ $.Values.service.ports.clientTargetPort }}
{{ end }}
selector:
app: "{{ $.Values.metadata.name }}"
app: "{{ $.Values.metadata.name }}"

{{- if eq $.Values.proxy.provider "ambassador" }}
---
apiVersion: getambassador.io/v3alpha1
kind: Listener
metadata:
name: "{{ .Values.node.name }}-node-listener"
namespace: {{ .Values.metadata.namespace }}
spec:
port: {{ .Values.node.ambassadorPort }}
protocol: TCP
securityModel: XFP
hostBinding:
namespace:
from: SELF
---
apiVersion: getambassador.io/v3alpha1
kind: TCPMapping
metadata:
name: "{{ .Values.node.name }}-node-mapping"
namespace: {{ .Values.metadata.namespace }}
spec:
port: {{ .Values.node.ambassadorPort }}
service: "{{ .Values.node.name }}.{{ .Values.metadata.namespace }}:{{ .Values.node.targetPort }}"

---
apiVersion: getambassador.io/v3alpha1
kind: Listener
metadata:
name: "{{ .Values.node.name }}-client-listener"
namespace: {{ .Values.metadata.namespace }}
spec:
port: {{ .Values.client.ambassadorPort }}
protocol: TCP
securityModel: XFP
hostBinding:
namespace:
from: SELF
---
apiVersion: getambassador.io/v3alpha1
kind: TCPMapping
metadata:
name: "{{ .Values.node.name }}-client-mapping"
namespace: {{ .Values.metadata.namespace }}
spec:
port: {{ .Values.client.ambassadorPort }}
service: "{{ .Values.client.name }}.{{ .Values.metadata.namespace }}:{{ .Values.client.targetPort }}"
{{- end }}

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ spec:
metadata:
name: {{ component_name }}
namespace: {{ component_ns }}
proxy:
provider: {{ network.env.proxy }}
network:
name: {{ network.name }}
organization:
Expand Down Expand Up @@ -80,21 +82,7 @@ spec:
# Directory to store node info.
NODE_INFO_DIR = '/var/lib/indy/data'
ambassador:
{% if organizationItem.cloud_provider != 'minikube' and network.env.proxy == 'ambassador' %}
annotations: |-
---
apiVersion: ambassador/v2
kind: TCPMapping
name: {{ component_name|e }}-node-mapping
port: {{ stewardItem.node.ambassador }}
service: {{ component_name|e }}.{{ component_ns }}:{{ stewardItem.node.targetPort }}
---
apiVersion: ambassador/v2
kind: TCPMapping
name: {{ component_name|e }}-client-mapping
port: {{ stewardItem.client.ambassador }}
service: {{ component_name|e }}.{{ component_ns }}:{{ stewardItem.client.targetPort }}
{% else %}
{% if organizationItem.cloud_provider == 'minikube' and network.env.proxy != 'ambassador' %}
disabled: true
{% endif %}
vault:
Expand All @@ -111,3 +99,4 @@ spec:
keys:
storagesize: 3Gi
storageClassName: {{ sc_name }}

26 changes: 0 additions & 26 deletions platforms/shared/charts/ambassador/Chart.yaml

This file was deleted.

Loading

0 comments on commit 1ed094b

Please sign in to comment.