-
Notifications
You must be signed in to change notification settings - Fork 21
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
console-api Helm chart #311
Open
shimpa1
wants to merge
9
commits into
main
Choose a base branch
from
console-api
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,042
−0
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
816ebe0
console-api Helm chart
shimpa1 14baf3e
a different approach
shimpa1 53338fd
Delete charts/console-api/sandbox-test.yaml
shimpa1 98b5441
Update README.md
shimpa1 9dd734d
fixed command in deployment.yaml
shimpa1 f8d5731
fixes
shimpa1 cb1866c
Merge branch 'console-api' of https://github.com/akash-network/helm-c…
shimpa1 a90cd23
Update charts/console-api/Chart.yaml
shimpa1 7f85431
Update charts/console-api/templates/doppler-secret.yaml
shimpa1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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/ |
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,24 @@ | ||
apiVersion: v2 | ||
name: console-app | ||
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" |
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,7 @@ | ||
## Deploy using | ||
|
||
# For mainnet | ||
helm install console-api-mainnet . -f values.yaml -f values-mainnet.yaml | ||
|
||
# For sandbox | ||
helm install console-api-sandbox . -f values.yaml -f values-sandbox.yaml |
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,63 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "console-api.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
*/}} | ||
{{- define "console-api.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- printf "%s-%s-%s" .Release.Name $name .Values.environment | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "console-api.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "console-api.labels" -}} | ||
helm.sh/chart: {{ include "console-api.chart" . }} | ||
{{ include "console-api.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
app.kubernetes.io/part-of: console-api | ||
app.kubernetes.io/environment: {{ .Values.environment }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "console-api.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "console-api.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of doppler secret | ||
*/}} | ||
{{- define "console-api.dopplerSecretName" -}} | ||
{{- printf "%s-secret" (include "console-api.fullname" .) }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the doppler config name based on environment | ||
*/}} | ||
{{- define "console-api.dopplerConfig" -}} | ||
{{- printf "staging-%s" .Values.environment }} | ||
{{- 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,33 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "console-api.fullname" . }} | ||
namespace: {{ .Values.namespace | default "staging" }} | ||
labels: | ||
{{- include "console-api.labels" . | nindent 4 }} | ||
spec: | ||
replicas: {{ .Values.replicaCount | default 1 }} | ||
selector: | ||
matchLabels: | ||
{{- include "console-api.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "console-api.selectorLabels" . | nindent 8 }} | ||
spec: | ||
containers: | ||
- name: {{ include "console-api.name" . }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
ports: | ||
- containerPort: 3000 | ||
name: api-port | ||
protocol: TCP | ||
env: | ||
- name: PORT | ||
value: "3000" | ||
resources: | ||
{{- toYaml .Values.resources | nindent 12 }} | ||
envFrom: | ||
- secretRef: | ||
name: {{ include "console-api.dopplerSecretName" . }} |
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,17 @@ | ||
apiVersion: secrets.doppler.com/v1alpha1 | ||
kind: DopplerSecret | ||
metadata: | ||
name: {{ include "console-api.fullname" . }}-dopplersecret | ||
namespace: doppler-operator-system | ||
labels: | ||
{{- include "console-api.labels" . | nindent 4 }} | ||
spec: | ||
project: {{ .Values.doppler.project | default "console-api" }} | ||
config: {{ include "console-api.dopplerConfig" . }} | ||
managedSecret: | ||
name: {{ include "console-api.dopplerSecretName" . }} | ||
namespace: {{ .Values.namespace | default "staging" }} | ||
type: Opaque | ||
tokenSecret: | ||
name: {{ .Values.doppler.tokenSecret | default "console-token-secret" }} | ||
verifyTLS: {{ .Values.doppler.verifyTLS | default true }} |
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,30 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ include "console-api.fullname" . }}-ingress | ||
namespace: {{ .Values.namespace | default "staging" }} | ||
labels: | ||
{{- include "console-api.labels" . | nindent 4 }} | ||
{{- with .Values.ingress.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
ingressClassName: {{ .Values.ingress.className }} | ||
rules: | ||
- host: {{ .Values.ingress.host }} | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: {{ include "console-api.fullname" . }}-service | ||
port: | ||
name: api-port | ||
{{- if .Values.ingress.tls }} | ||
tls: | ||
- hosts: | ||
- {{ .Values.ingress.host }} | ||
secretName: {{ .Values.ingress.tls.secretName }} | ||
{{- 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,16 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "console-api.fullname" . }}-service | ||
namespace: {{ .Values.namespace | default "staging" }} | ||
labels: | ||
{{- include "console-api.labels" . | nindent 4 }} | ||
spec: | ||
type: {{ .Values.service.type | default "ClusterIP" }} | ||
selector: | ||
{{- include "console-api.selectorLabels" . | nindent 4 }} | ||
ports: | ||
- protocol: TCP | ||
port: {{ .Values.service.port | default 3000 }} | ||
targetPort: api-port | ||
name: api-port |
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,5 @@ | ||
environment: mainnet | ||
ingress: | ||
host: console-api-mainnet.akash.network | ||
tls: | ||
secretName: console-api-mainnet-akash-network-tls |
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,5 @@ | ||
environment: sandbox | ||
ingress: | ||
host: console-api-sandbox.akash.network | ||
tls: | ||
secretName: console-api-sandbox-akash-network-tls |
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,70 @@ | ||
# Default values for console-api chart | ||
|
||
# Chart name override configurations | ||
nameOverride: "" | ||
fullnameOverride: "" | ||
|
||
# Environment (mainnet or sandbox) | ||
environment: mainnet | ||
|
||
# Namespace for the application | ||
namespace: staging | ||
|
||
# Deployment configurations | ||
replicaCount: 1 | ||
|
||
# Image configurations | ||
image: | ||
repository: ghcr.io/akash-network/console-api | ||
tag: "2.53.0" | ||
pullPolicy: Always | ||
|
||
# Service configurations | ||
service: | ||
type: ClusterIP | ||
port: 3000 | ||
|
||
# Resource requirements | ||
resources: | ||
requests: | ||
cpu: "1" | ||
memory: "2Gi" | ||
ephemeral-storage: "2Gi" | ||
limits: | ||
cpu: "1" | ||
memory: "2Gi" | ||
ephemeral-storage: "2Gi" | ||
|
||
# Ingress configurations | ||
ingress: | ||
enabled: true | ||
className: nginx | ||
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" | ||
host: console-api-staging-next.akash.network | ||
tls: | ||
secretName: console-api-staging-akash-network-tls | ||
|
||
# Doppler secret configurations | ||
doppler: | ||
namespace: doppler-operator-system | ||
project: console-api | ||
tokenSecret: console-token-secret | ||
verifyTLS: true | ||
|
||
# Application specific configurations | ||
app: | ||
port: "3000" | ||
|
||
# Node selector configurations | ||
nodeSelector: {} | ||
|
||
# Tolerations configurations | ||
tolerations: [] | ||
|
||
# Affinity configurations | ||
affinity: {} |
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 @@ | ||
# 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/ |
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,24 @@ | ||
apiVersion: v2 | ||
name: provider-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: "1.16.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,33 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: provider-console-api | ||
namespace: staging | ||
labels: | ||
app: provider-console-api | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: provider-console-api | ||
template: | ||
metadata: | ||
labels: | ||
app: provider-console-api | ||
spec: | ||
containers: | ||
- name: provider-console-api | ||
image: arc10/provider-console-api:0.0.18 | ||
imagePullPolicy: "Always" | ||
resources: | ||
limits: | ||
cpu: "1" | ||
memory: "2Gi" | ||
ephemeral-storage: "2Gi" | ||
requests: | ||
cpu: "500m" | ||
memory: "512Mi" | ||
ephemeral-storage: "2Gi" | ||
envFrom: | ||
- secretRef: | ||
name: provider-console-api-secret |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think my prev commend might have been misleading. Apologies. I think we'll need to be able to override the command if needed.
Current use case:
we used doppler secrets via doppler cli inside the image, now it's syncing to k8s secrets. So we need to override image cmd to migrate from prev infra to k8s:
doppler run -- node server.js
->node server.js