Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(CYPRESS) Remove godelegator #253

Merged
merged 2 commits into from
Mar 29, 2024
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
23 changes: 0 additions & 23 deletions delegator/.helmignore

This file was deleted.

7 changes: 2 additions & 5 deletions delegator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apiVersion: v2
name: orakl-delegator
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
Expand All @@ -11,14 +10,12 @@ description: A Helm chart for Kubernetes
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.5

version: 0.0.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v0.0.1.20231211.0735.867d885"
appVersion: "v0.0.1.20240326.0927.a8a6135"
2 changes: 0 additions & 2 deletions delegator/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions delegator/index.yaml

This file was deleted.

1 change: 0 additions & 1 deletion delegator/templates/NOTES.txt

This file was deleted.

71 changes: 0 additions & 71 deletions delegator/templates/_helpers.tpl

This file was deleted.

66 changes: 24 additions & 42 deletions delegator/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: delegator
name: {{ .Values.deployment.name }}
labels:
{{- include "orakl-delegator.labels.delegator" . | nindent 4 }}
app: {{ .Values.deployment.name }}
app.kubernetes.io/name: {{ .Values.deployment.name }}
app.kubernetes.io/instance: {{ .Values.deployment.name }}
spec:
replicas: {{ .Values.delegator.replicas }}
selector:
matchLabels:
{{- include "orakl-delegator.selectorLabels.delegator" . | nindent 6 }}
app: {{ .Values.deployment.name }}
app.kubernetes.io/name: {{ .Values.deployment.name }}
app.kubernetes.io/instance: {{ .Values.deployment.name }}
template:
metadata:
{{- with .Values.global.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "orakl-delegator.selectorLabels.delegator" . | nindent 8 }}
app: {{ .Values.deployment.name }}
app.kubernetes.io/name: {{ .Values.deployment.name }}
app.kubernetes.io/instance: {{ .Values.deployment.name }}
spec:
{{- with .Values.global.image.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ .Values.delegator.serviceAccount.name }}
serviceAccountName: {{ .Values.deployment.name }}-{{ .Values.delegator.serviceAccount.name }}
securityContext:
{{- toYaml .Values.delegator.podSecurityContext | nindent 8 }}
{{- if .Values.global.affinity.enabled }}
{{- if .Values.global.affinity.enabled }}
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
Expand All @@ -36,58 +42,34 @@ spec:
operator: In
values:
- {{ .Values.global.affinity.value }}
{{- end }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.delegator.containerSecurityContext | nindent 12 }}
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.global.image.pullPolicy }}
{{- if .Values.global.secretManager.enabled }}
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: orakl-delegator-secrets
key: DATABASE_URL
- name: APP_PORT
valueFrom:
secretKeyRef:
name: orakl-delegator-secrets
key: APP_PORT
- name: PROVIDER_URL
value: "{{ .Values.global.config.PROVIDER_URL }}"
valueFrom:
secretKeyRef:
name: orakl-delegator-secrets
key: PROVIDER_URL
{{ else }}
env:
- name: DATABASE_URL
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: delegator-secrets
key: DATABASE_URL
- name: PROVIDER_URL
valueFrom:
secretKeyRef:
name: delegator-secrets
key: PROVIDER_URL
- name: USE_GOOGLE_SECRET_MANAGER
value: "true"
- name: GOOGLE_SECRET_PATH
value: "projects/1003113141257/secrets/orakl-cypress-fee-payer/versions/latest"
- name: APP_PORT
value: "5050"
{{ end }}

command: ["yarn"]
args: ["start:prod"]
value: "{{ .Values.service.port }}"
ports:
- name: http
containerPort: 5050
containerPort: {{ .Values.service.port }}
protocol: TCP
{{- if .Values.global.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: {{ .Values.global.livenessProbe.path }}
port: 5050
port: {{ .Values.service.port }}
initialDelaySeconds: {{ .Values.global.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.global.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.global.livenessProbe.timeoutSeconds }}
Expand All @@ -98,13 +80,13 @@ spec:
readinessProbe:
httpGet:
path: {{ .Values.global.readinessProbe.path }}
port: 5050
port: {{ .Values.service.port }}
initialDelaySeconds: {{ .Values.global.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.global.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.global.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.global.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.global.readinessProbe.failureThreshold }}
{{- end }}
failureThreshold: {{ .Values.global.readinessProbe.failureThreshold }}
{{- end }}
resources:
{{- toYaml .Values.delegator.resources | nindent 12 }}

Expand Down
11 changes: 3 additions & 8 deletions delegator/templates/sa.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
{{- if .Values.delegator.serviceAccount.create -}}
{{- if .Values.global.secretManager -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.delegator.serviceAccount.name }}
labels:
{{- include "orakl-delegator.labels.delegator" . | nindent 4 }}
{{- with .Values.delegator.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ .Values.deployment.name }}-{{ .Values.delegator.serviceAccount.name }}
labels: {{ .Values.deployment.name }}
{{- end }}
14 changes: 8 additions & 6 deletions delegator/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: orakl-delegator
name: {{ .Values.deployment.name }}
spec:
# type: ClusterIP
ports:
- port: 5050
targetPort: http
protocol: TCP
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
type: LoadBalancer
loadBalancerIP: 34.126.65.247
{{- if .Values.service.loadBalancerIP}}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
selector:
{{- include "orakl-delegator.selectorLabels.delegator" . | nindent 4 }}
app: {{ .Values.deployment.name }}
15 changes: 0 additions & 15 deletions delegator/templates/tests/test-connection.yaml

This file was deleted.

32 changes: 12 additions & 20 deletions delegator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
## Klaytn Orakl Listener Configuration
## created by Bisonai

global:
name: delegator
namespace: orakl
image:
repository: public.ecr.aws/bisonai/orakl-delegator #repository url
pullPolicy: IfNotPresent
tag: "v0.0.1.20231211.0735.867d885"
tag: "v0.0.1.20240326.0927.a8a6135"
imagePullPolicy: IfNotPresent
# -- If defined, uses a Secret to pull an image from a private Docker registry or repository
imagePullSecrets: []

secretManager:
enabled: false
enabled: true
secretId:
versionId:

affinity:
enabled: false
key: kubernetes.io/hostname
value:

podAnnotations:

livenessProbe:
enabled: true
path: /api/v1/
Expand All @@ -30,7 +25,6 @@ global:
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 5

readinessProbe:
enabled: true
path: /api/v1/
Expand All @@ -39,32 +33,30 @@ global:
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 5

delegator:
enabled: true
replicas: 1
serviceAccount:
# -- Create a service account for the application controller
create: true
# -- Service account name
name: orakl-delegator
# -- Annotations applied to created service account
name: sa
annotations: {}
# -- Automount API credentials for the Service Account
automountServiceAccountToken: true

podSecurityContext: {}

containerSecurityContext: {}

resources:
limits:
cpu: 500m
memory: 1Gi
requests:
cpu: 500m
memory: 1Gi

nodeSelector: {}
tolerations: []
dotenv: {}
deployment:
name: orakl-delegator
replicas: 1
service:
port: 5050
# Optional: For fix external IP address
loadBalancerIP:
Loading