-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ANCHOR-708][PD] Add sep24-reference-ui helm charts (#1628)
### Description 1. Add sep24-reference-ui helm charts 2. Add reference server ingress 3. Fix interactive url jwt secrets mismatch 4. Update minikube scripts ### Testing - `./gradlew test` Test with demo wallet and transaction complete
- Loading branch information
Showing
13 changed files
with
270 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ .Values.ingress.name }} | ||
namespace: {{ .Values.namespace }} | ||
annotations: | ||
{{- $annotations := dict "nginx.ingress.kubernetes.io/custom-headers" (printf "%s/%s-configmap" .Values.namespace .Values.ingress.name) }} | ||
{{- if .Values.ingress.annotations }} | ||
{{- $annotations = merge $annotations .Values.ingress.annotations }} | ||
{{- end }} | ||
{{- range $key, $value := $annotations }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
labels: | ||
app.kubernetes.io/name: {{ .Values.fullName }}-ingress | ||
helm.sh/chart: {{ $.Chart.Name }}-{{ $.Chart.Version }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
spec: | ||
ingressClassName: {{ .Values.ingress.className }} | ||
{{- if .Values.ingress.tls }} | ||
tls: | ||
{{- if .Values.ingress.tls.host }} | ||
- hosts: | ||
- {{ .Values.ingress.tls.host }} | ||
{{- end }} | ||
{{- if .Values.ingress.tls.secretName }} | ||
secretName: {{ .Values.ingress.tls.secretName }} | ||
{{- end }} | ||
{{- end }} | ||
rules: | ||
- host: {{ .Values.ingress.host }} | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: {{ .Values.fullName }}-svc-{{ .Values.services.ref.name }} | ||
port: | ||
number: {{ .Values.services.ref.servicePort | default 8091 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: v1 | ||
appVersion: "1.0" | ||
description: Anchor Platform SEP-24 Reference UI Helm Chart | ||
maintainers: | ||
- name: Jiahui Hu | ||
email: [email protected] | ||
sources: | ||
- https://github.com/stellar/sep24-reference-ui | ||
name: sep24-reference-ui | ||
version: 0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{{- define "common.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{- define "common.fullname" -}} | ||
{{- if .Values.fullnameOverride -}} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- if contains $name .Release.Name -}} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- define "common.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{- define "common.addField" -}} | ||
{{- $key := index . 0 }} | ||
{{- $val := index . 1 }} | ||
{{- $tp := typeOf $val }} | ||
{{- if eq $tp "map[string]interface {}" }}{{ printf "%s:\n" $key }} | ||
{{- range $mapKey, $mapValue := $val }} | ||
{{- printf " %s: \"%v\"\n" $mapKey $mapValue }} | ||
{{- end }} | ||
{{- else }} | ||
{{- if toString $val }} | ||
{{- printf "%s: \"%v\"\n" $key $val -}} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- define "common.addMultiline" -}} | ||
{{- $key := index . 0 -}} | ||
{{- $value := index . 1 -}} | ||
{{ printf "%s: |" $key }} | ||
{{ printf "%s" $value | indent 4 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Values.fullName }}-svc-{{ .Values.services.ui.name }} | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
app.kubernetes.io/name: {{ .Values.fullName }}-{{ .Values.services.ui.name }} | ||
helm.sh/chart: {{ include "common.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
spec: | ||
replicas: {{ .Values.services.ui.deployment.replicas | default 1 }} | ||
selector: | ||
matchLabels: | ||
app: {{ .Values.fullName }}-svc-{{ .Values.services.ui.name }} | ||
template: | ||
metadata: | ||
{{- if .Values.services.ui.deployment.annotations }} | ||
annotations: | ||
{{- toYaml .Values.services.ui.deployment.annotations | nindent 8 }} | ||
{{- end }} | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
app: {{ .Values.fullName }}-svc-{{ .Values.services.ui.name }} | ||
spec: | ||
containers: | ||
- name: {{ .Values.container.name }} | ||
image: {{ .Values.container.image }} | ||
imagePullPolicy: {{ .Values.container.imagePullPolicy | default "Always" }} | ||
ports: | ||
- name: http | ||
containerPort: {{ .Values.services.ui.containerPort | default 3000 }} | ||
protocol: TCP | ||
env: | ||
- name: BUSINESS_SERVER_ENDPOINT | ||
valueFrom: | ||
configMapKeyRef: | ||
name: sep24-reference-ui-config | ||
key: BUSINESS_SERVER_ENDPOINT | ||
resources: | ||
requests: | ||
memory: {{ .Values.services.ui.deployment.resources.requests.memory }} | ||
cpu: {{ .Values.services.ui.deployment.resources.requests.cpu }} | ||
limits: | ||
memory: {{ .Values.services.ui.deployment.resources.limits.memory }} | ||
cpu: {{ .Values.services.ui.deployment.resources.limits.cpu }} | ||
volumeMounts: | ||
- name: config-volume | ||
mountPath: /config | ||
readOnly: true | ||
volumes: | ||
- name: config-volume | ||
configMap: | ||
name: sep24-reference-ui-config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ .Values.ingress.name }} | ||
namespace: {{ .Values.namespace }} | ||
annotations: | ||
{{- $annotations := dict "nginx.ingress.kubernetes.io/custom-headers" (printf "%s/%s-configmap" .Values.namespace .Values.ingress.name) }} | ||
{{- if .Values.ingress.annotations }} | ||
{{- $annotations = merge $annotations .Values.ingress.annotations }} | ||
{{- end }} | ||
{{- range $key, $value := $annotations }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
labels: | ||
app.kubernetes.io/name: {{ .Values.fullName }}-ingress | ||
helm.sh/chart: {{ $.Chart.Name }}-{{ $.Chart.Version }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
spec: | ||
ingressClassName: {{ .Values.ingress.className }} | ||
{{- if .Values.ingress.tls }} | ||
tls: | ||
{{- if .Values.ingress.tls.host }} | ||
- hosts: | ||
- {{ .Values.ingress.tls.host }} | ||
{{- end }} | ||
{{- if .Values.ingress.tls.secretName }} | ||
secretName: {{ .Values.ingress.tls.secretName }} | ||
{{- end }} | ||
{{- end }} | ||
rules: | ||
- host: {{ .Values.ingress.host }} | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: {{ .Values.fullName }}-svc-{{ .Values.services.ui.name }} | ||
port: | ||
number: {{ .Values.services.ui.servicePort | default 3000 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Values.fullName }}-svc-{{ .Values.services.ui.name }} | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
{{- if .Values.services.ui.lsabels }} | ||
{{- range $key, $value := .Values.services.ui.labels }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
{{- end }} | ||
app.kubernetes.io/name: {{ .Values.fullName }}-{{ .Values.services.ui.name }} | ||
helm.sh/chart: {{ $.Chart.Name }}-{{ $.Chart.Version }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
spec: | ||
type: {{ .Values.services.ui.type | default "ClusterIP"}} | ||
ports: | ||
- port: {{ .Values.services.ui.servicePort | default 3000 }} | ||
targetPort: {{ .Values.services.ui.containerPort | default 3000 }} | ||
protocol: TCP | ||
selector: | ||
app: {{ .Values.fullName }}-svc-{{ .Values.services.ui.name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
fullName: sep24-reference-ui | ||
namespace: default | ||
|
||
container: | ||
name: sep24-reference-ui | ||
image: stellar/sep24-reference-ui:latest | ||
imagePullPolicy: IfNotPresent | ||
|
||
config: | ||
businessServerEndpoint: "http://localhost:8091" | ||
|
||
services: | ||
ui: | ||
containerPort: 3000 | ||
servicePort: 3000 | ||
type: ClusterIP | ||
name: sep24-reference-ui | ||
deployment: | ||
replicas: 1 | ||
resources: | ||
requests: | ||
memory: 512Mi | ||
cpu: 500m | ||
limits: | ||
memory: 1Gi | ||
cpu: 1 | ||
ingress: | ||
name: ingress-sep24-reference-ui | ||
host: sep24-reference-ui.local | ||
className: nginx | ||
annotations: | ||
nginx.ingress.kubernetes.io/rewrite-target: / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters