Skip to content

Commit

Permalink
feat: adds dedicated charts for console api, web and provider proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrishajev committed Feb 13, 2025
1 parent 49e8e8e commit 67a436a
Show file tree
Hide file tree
Showing 24 changed files with 310 additions and 46 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
key.pem
.idea
2 changes: 1 addition & 1 deletion charts/console-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ version: 0.1.0
# 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: "2.56.0"
appVersion: "2.62.1"
35 changes: 16 additions & 19 deletions charts/console-api/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.appName }}{{ if .Values.chain }}-{{ .Values.chain }}{{ end }}
namespace: {{ .Values.namespace }}
name: {{ .Chart.Name }}-{{ .Values.chain }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ .Values.appName }}{{ if .Values.chain }}-{{ .Values.chain }}{{ end }}
app: {{ .Chart.Name }}-{{ .Values.chain }}
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Values.appName }}{{ if .Values.chain }}-{{ .Values.chain }}{{ end }}
app: {{ .Chart.Name }}-{{ .Values.chain }}
template:
metadata:
labels:
app: {{ .Values.appName }}{{ if .Values.chain }}-{{ .Values.chain }}{{ end }}
app: {{ .Chart.Name }}-{{ .Values.chain }}
spec:
containers:
- name: {{ .Values.appName }}{{ if .Values.chain }}-{{ .Values.chain }}{{ end }}
image: {{ .Values.image }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
{{- if .Values.command }}
- name: {{ .Chart.Name }}-{{ .Values.chain }}
image: ghcr.io/akash-network/console-api:{{ .Chart.AppVersion }}
imagePullPolicy: "Always"
command:
{{- toYaml .Values.command | nindent 12 }}
{{- end }}
- node
- dist/server.js
ports:
- containerPort: 3000
name: api-port
Expand All @@ -31,16 +30,14 @@ spec:
- name: PORT
value: "3000"
resources:
requests:
cpu: "1"
memory: "2Gi"
ephemeral-storage: "2Gi"
limits:
cpu: "1"
memory: "2Gi"
ephemeral-storage: "2Gi"
{{- if and .Values.doppler (and .Values.doppler.project .Values.doppler.config) }}
memory: "1Gi"
requests:
cpu: "0.5"
ephemeral-storage: "1Gi"
memory: "512Mi"
envFrom:
- secretRef:
name: {{ .Values.appName }}{{ if .Values.chain }}-{{ .Values.chain }}{{ end }}-secret
{{- end }}
name: {{ .Chart.Name }}-{{ .Values.chain }}-secret
12 changes: 5 additions & 7 deletions charts/console-api/templates/doppler-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
{{- if and .Values.doppler (and .Values.doppler.project .Values.doppler.config) }}
apiVersion: secrets.doppler.com/v1alpha1
kind: DopplerSecret
metadata:
name: {{ .Values.appName }}{{ if .Values.chain }}-{{ .Values.chain }}{{ end }}-dopplersecret
name: {{ .Chart.Name }}-{{ .Values.chain }}-dopplersecret
namespace: doppler-operator-system
spec:
config: {{ .Values.dopplerConfig }}
config: {{ .Release.Namespace }}-{{ .Values.chain }}
managedSecret:
name: {{ .Values.appName }}{{ if .Values.chain }}-{{ .Values.chain }}{{ end }}-secret
namespace: {{ .Values.namespace }}
name: {{ .Chart.Name }}-{{ .Values.chain }}-secret
namespace: {{ .Release.Namespace }}
type: Opaque
project: {{ .Values.doppler.project }}
project: {{ .Chart.Name }}
tokenSecret:
name: console-token-secret
verifyTLS: true
{{- end }}
8 changes: 4 additions & 4 deletions charts/console-api/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Values.appName }}{{ if .Values.chain }}-{{ .Values.chain }}{{ end }}-ingress
namespace: {{ .Values.namespace }}
name: {{ .Chart.Name }}-{{ .Values.chain }}-ingress
namespace: {{ .Release.Namespace }}
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 100m
nginx.ingress.kubernetes.io/proxy-connect-timeout: "140"
Expand All @@ -17,12 +17,12 @@ spec:
paths:
- backend:
service:
name: {{ .Values.appName }}{{ if .Values.chain }}-{{ .Values.chain }}{{ end }}-service
name: {{ .Chart.Name }}-{{ .Values.chain }}-service
port:
name: api-port
path: /
pathType: Prefix
tls:
- hosts:
- {{ .Values.hostName }}
secretName: {{ .Values.appName }}-{{ .Values.namespace }}-akash-network-tls
secretName: {{ .Chart.Name }}-{{ .Values.namespace }}-akash-network-tls
6 changes: 3 additions & 3 deletions charts/console-api/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.appName }}{{ if .Values.chain }}-{{ .Values.chain }}{{ end }}-service
namespace: {{ .Values.namespace }}
name: {{ .Chart.Name }}-{{ .Values.chain }}-service
namespace: {{ .Release.Namespace }}
spec:
selector:
app: {{ .Values.appName }}{{ if .Values.chain }}-{{ .Values.chain }}{{ end }}
app: {{ .Chart.Name }}-{{ .Values.chain }}
ports:
- protocol: TCP
port: 3000
Expand Down
1 change: 1 addition & 0 deletions charts/console-api/values-mainnet.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
chain: mainnet
hostName: console-api-mainnet-staging.akash.network
12 changes: 0 additions & 12 deletions charts/console-api/values-sample.yaml

This file was deleted.

1 change: 1 addition & 0 deletions charts/console-api/values-sandbox.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
chain: sandbox
hostName: console-api-sandbox-staging.akash.network
Empty file removed charts/console-api/values.yaml
Empty file.
23 changes: 23 additions & 0 deletions charts/console-web/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
22 changes: 22 additions & 0 deletions charts/console-web/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v2
name: console-web
description: Akash Console-Web Helm Chart

# 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
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# 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.0
# 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: "2.44.0"
8 changes: 8 additions & 0 deletions charts/console-web/secret.sample.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: console-token-secret
namespace: doppler-operator-system
type: Opaque
stringData:
serviceToken: <YOUR_SECRET>
40 changes: 40 additions & 0 deletions charts/console-web/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Chart.Name }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ .Chart.Name }}
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Chart.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: ghcr.io/akash-network/deploy-web:{{ .Chart.AppVersion }}{{ if eq .Release.Namespace "staging" }}-beta{{ end }}
imagePullPolicy: "Always"
ports:
- containerPort: 3000
name: api-port
protocol: TCP
env:
- name: PORT
value: "3000"
resources:
limits:
cpu: "1"
ephemeral-storage: "2Gi"
memory: "1Gi"
requests:
cpu: "0.5"
ephemeral-storage: "1Gi"
memory: "512Mi"
envFrom:
- secretRef:
name: {{ .Chart.Name }}-secret
15 changes: 15 additions & 0 deletions charts/console-web/templates/doppler-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: secrets.doppler.com/v1alpha1
kind: DopplerSecret
metadata:
name: {{ .Chart.Name }}-dopplersecret
namespace: doppler-operator-system
spec:
config: {{ .Release.Namespace }}
managedSecret:
name: {{ .Chart.Name }}-secret
namespace: {{ .Release.Namespace }}
type: Opaque
project: {{ .Chart.Name }}
tokenSecret:
name: console-token-secret
verifyTLS: true
28 changes: 28 additions & 0 deletions charts/console-web/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Chart.Name }}-ingress
namespace: {{ .Release.Namespace }}
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 100m
nginx.ingress.kubernetes.io/proxy-connect-timeout: "140"
nginx.ingress.kubernetes.io/proxy-read-timeout: "140"
nginx.ingress.kubernetes.io/proxy-send-timeout: "140"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
ingressClassName: nginx
rules:
- host: {{ .Values.hostName }}
http:
paths:
- backend:
service:
name: {{ .Chart.Name }}-service
port:
name: api-port
path: /
pathType: Prefix
tls:
- hosts:
- {{ .Values.hostName }}
secretName: {{ .Chart.Name }}-{{ .Release.Namespace }}-akash-network-tls
14 changes: 14 additions & 0 deletions charts/console-web/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Chart.Name }}-service
namespace: {{ .Release.Namespace }}
spec:
selector:
app: {{ .Chart.Name }}
ports:
- protocol: TCP
port: 3000
targetPort: api-port
name: api-port
type: ClusterIP
2 changes: 2 additions & 0 deletions charts/console-web/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
namespace: staging
hostName: console-beta.akash.network
23 changes: 23 additions & 0 deletions charts/provider-proxy/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
22 changes: 22 additions & 0 deletions charts/provider-proxy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v2
name: provider-proxy
description: Akash Provider Proxy Helm Chart

# 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
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# 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.0
# 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: "1.4.3"
Loading

0 comments on commit 67a436a

Please sign in to comment.