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

(BAOBAB) Remove godelegator #254

Merged
merged 3 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.

53 changes: 20 additions & 33 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,34 +42,15 @@ 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
Expand All @@ -73,12 +60,12 @@ spec:
secretKeyRef:
name: delegator-secrets
key: PROVIDER_URL
- name: USE_GOOGLE_SECRET_MANAGER
value: "true"
- name: GOOGLE_SECRET_PATH
value: "projects/284574693973/secrets/orakl-baobab-fee-payer/versions/latest"
- name: APP_PORT
value: "5050"
{{ end }}

command: ["yarn"]
args: ["start:prod"]
ports:
- name: http
containerPort: 5050
Expand All @@ -103,8 +90,8 @@ spec:
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
14 changes: 6 additions & 8 deletions delegator/templates/sa.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{{- 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 }}
# TODO: This annotation should be sync with GCP SA email injected from GH actions
# annotations:
# iam.gke.io/gcp-service-account: <Here>
{{- end }}
4 changes: 2 additions & 2 deletions delegator/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: orakl-delegator
name: {{ .Values.deployment.name }}
spec:
# type: ClusterIP
ports:
Expand All @@ -11,4 +11,4 @@ spec:
type: LoadBalancer
loadBalancerIP: 34.87.152.175
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.

28 changes: 8 additions & 20 deletions delegator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
## Klaytn Orakl Listener Configuration
## Klaytn Orakl Go Delegator 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 @@ -33,7 +28,6 @@ global:
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 5

readinessProbe:
enabled: true
path: /api/v1/
Expand All @@ -42,32 +36,26 @@ global:
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 5

delegator:
enabled: true
replicas: 1
serviceAccount:
# -- Create a service account for the application controller
create: false
# -- Service account name
name: internal-app
# -- Annotations applied to created service account
create: true
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
21 changes: 0 additions & 21 deletions godelegator/Chart.yaml

This file was deleted.

Loading