From f6e85a0dc9ba9322b2896e06f3e70d6dd4b5e737 Mon Sep 17 00:00:00 2001 From: Shimpa1 Date: Mon, 3 Feb 2025 09:20:20 +0000 Subject: [PATCH] new simplified version --- charts/console-api/.helmignore | 23 +++++++++++ charts/console-api/Chart.yaml | 24 +++++++++++ charts/console-api/templates/deployment.yaml | 41 +++++++++++++++++++ .../console-api/templates/doppler-secret.yaml | 16 ++++++++ charts/console-api/templates/ingress.yaml | 28 +++++++++++++ charts/console-api/templates/service.yaml | 14 +++++++ charts/console-api/values-mainnet.yaml | 1 + charts/console-api/values-sandbox.yaml | 1 + charts/console-api/values.yaml | 3 ++ 9 files changed, 151 insertions(+) create mode 100644 charts/console-api/.helmignore create mode 100644 charts/console-api/Chart.yaml create mode 100644 charts/console-api/templates/deployment.yaml create mode 100644 charts/console-api/templates/doppler-secret.yaml create mode 100644 charts/console-api/templates/ingress.yaml create mode 100644 charts/console-api/templates/service.yaml create mode 100644 charts/console-api/values-mainnet.yaml create mode 100644 charts/console-api/values-sandbox.yaml create mode 100644 charts/console-api/values.yaml diff --git a/charts/console-api/.helmignore b/charts/console-api/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/charts/console-api/.helmignore @@ -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/ diff --git a/charts/console-api/Chart.yaml b/charts/console-api/Chart.yaml new file mode 100644 index 00000000..87dbc1e1 --- /dev/null +++ b/charts/console-api/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: console-api +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 +# 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.53.0" diff --git a/charts/console-api/templates/deployment.yaml b/charts/console-api/templates/deployment.yaml new file mode 100644 index 00000000..a3309f44 --- /dev/null +++ b/charts/console-api/templates/deployment.yaml @@ -0,0 +1,41 @@ +apiVersion: apps/v1 +kind: Deployment + metadata: + name: {{ .Values.appName }}-mainnet + namespace: {{ .Values.namespace }} + labels: + app: {{ .Values.appName }}-{{ .Values.chain }} +spec: + replicas: 1 + selector: + matchLabels: + app: {{ .Values.appName }}-{{ .Values.chain }} + template: + metadata: + labels: + app: {{ .Values.appName }}-{{ .Values.chain }} + spec: + containers: + - name: {{ .Values.appName }}-{{ .Values.chain }} + image: ghcr.io/akash-network/console-api:2.53.0 + imagePullPolicy: "Always" + command: ["node", "dist/server.js"] + ports: + - containerPort: 3000 + name: api-port + protocol: TCP + env: + - name: PORT + value: "3000" + resources: + requests: + cpu: "1" + memory: "2Gi" + ephemeral-storage: "2Gi" + limits: + cpu: "1" + memory: "2Gi" + ephemeral-storage: "2Gi" + envFrom: + - secretRef: + name: {{ .Values.appName }}-{{ .Values.chain }}-secret diff --git a/charts/console-api/templates/doppler-secret.yaml b/charts/console-api/templates/doppler-secret.yaml new file mode 100644 index 00000000..7909aebc --- /dev/null +++ b/charts/console-api/templates/doppler-secret.yaml @@ -0,0 +1,16 @@ +apiVersion: secrets.doppler.com/v1alpha1 +kind: DopplerSecret +metadata: + name: {{ .Values.appName }}-{{ .Values.chain }}-dopplersecret + namespace: doppler-operator-system +spec: + config: staging-mainnet + managedSecret: + name: {{ .Values.appName }}-{{ .Values.chain }}-secret + namespace: {{ .Values.namespace }} + type: Opaque + project: {{ .Values.appName }} + tokenSecret: + name: console-token-secret + verifyTLS: true + diff --git a/charts/console-api/templates/ingress.yaml b/charts/console-api/templates/ingress.yaml new file mode 100644 index 00000000..1ba69de0 --- /dev/null +++ b/charts/console-api/templates/ingress.yaml @@ -0,0 +1,28 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ .Values.appName }}-{{ .Values.chain}}-ingress + namespace: {{ .Values.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.appName }}-{{ .Values.namespace }}-next.akash.network + http: + paths: + - backend: + service: + name: {{ .Values.appName }}-{{ .Values.chain }}-service + port: + name: api-port + path: / + pathType: Prefix + tls: + - hosts: + - {{ .Values.appName }}-{{ .Values.namespace }}-next.akash.network + secretName: {{ .Values.appName }}-{{ .Values.namespace }}-akash-network-tls diff --git a/charts/console-api/templates/service.yaml b/charts/console-api/templates/service.yaml new file mode 100644 index 00000000..2e00dcaa --- /dev/null +++ b/charts/console-api/templates/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.appName }}-{{ .Values.chain }}-service + namespace: {{ .Values.namespace }} +spec: + selector: + app: {{ .Values.appName }}-{{ .Values.chain }} + ports: + - protocol: TCP + port: 3000 + targetPort: api-port + name: api-port + type: ClusterIP diff --git a/charts/console-api/values-mainnet.yaml b/charts/console-api/values-mainnet.yaml new file mode 100644 index 00000000..0b894757 --- /dev/null +++ b/charts/console-api/values-mainnet.yaml @@ -0,0 +1 @@ +chain: mainnet diff --git a/charts/console-api/values-sandbox.yaml b/charts/console-api/values-sandbox.yaml new file mode 100644 index 00000000..0cbafe17 --- /dev/null +++ b/charts/console-api/values-sandbox.yaml @@ -0,0 +1 @@ +chain: sandbox diff --git a/charts/console-api/values.yaml b/charts/console-api/values.yaml new file mode 100644 index 00000000..581421dc --- /dev/null +++ b/charts/console-api/values.yaml @@ -0,0 +1,3 @@ +namespace: staging +appName: console-api +