-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
163 additions
and
0 deletions.
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,5 @@ | ||
apiVersion: v2 | ||
name: seda-data-proxy | ||
description: A Helm chart for Kubernetes to deploy the SEDA Data Proxy. | ||
version: 0.1.0 | ||
appVersion: "1.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,31 @@ | ||
{{/* | ||
Generate a full name for the resources, optionally including the release name. | ||
*/}} | ||
{{- define "seda-data-proxy.fullname" -}} | ||
{{- printf "%s-%s" .Release.Name .Chart.Name | trunc 63 | trimSuffix "-" -}} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "seda-data-proxy.labels" -}} | ||
app.kubernetes.io/name: {{ include "seda-data-proxy.name" . }} | ||
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "seda-data-proxy.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "seda-data-proxy.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Template for the name of the application | ||
*/}} | ||
{{- define "seda-data-proxy.name" -}} | ||
{{- .Chart.Name -}} | ||
{{- 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,15 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "seda-data-proxy.fullname" . }}-config | ||
data: | ||
config.json: | | ||
{ | ||
"routes": [ | ||
{ | ||
"path": "/*", | ||
"upstreamUrl": "https://swapi.dev/api/", | ||
"methods": ["GET"] | ||
} | ||
] | ||
} |
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,49 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "seda-data-proxy.fullname" . }} | ||
labels: | ||
{{- include "seda-data-proxy.labels" . | nindent 4 }} | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
{{- include "seda-data-proxy.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "seda-data-proxy.selectorLabels" . | nindent 8 }} | ||
spec: | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
ports: | ||
- containerPort: {{ .Values.service.port }} | ||
env: | ||
{{- range .Values.envVars }} | ||
- name: {{ .name }} | ||
value: {{ .value }} | ||
{{- end }} | ||
- name: SEDA_DATA_PROXY_PRIVATE_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ include "seda-data-proxy.fullname" . }}-secrets | ||
key: SEDA_DATA_PROXY_PRIVATE_KEY | ||
args: ["run", {{ .Values.sedaProxyFlags }} ] | ||
readinessProbe: | ||
httpGet: | ||
path: /status/health | ||
port: {{ .Values.service.port }} | ||
livenessProbe: | ||
httpGet: | ||
path: /status/health | ||
port: {{ .Values.service.port }} | ||
volumeMounts: | ||
- name: config-volume | ||
mountPath: /app/config.json | ||
subPath: config.json | ||
volumes: | ||
- name: config-volume | ||
configMap: | ||
name: {{ include "seda-data-proxy.fullname" . }}-config |
Empty file.
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,9 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ include "seda-data-proxy.fullname" . }}-secrets | ||
labels: | ||
{{- include "seda-data-proxy.labels" . | nindent 4 }} | ||
type: Opaque | ||
data: | ||
SEDA_DATA_PROXY_PRIVATE_KEY: {{ .Values.secret.sedaDataProxyPrivateKey | b64enc | quote }} |
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,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "seda-data-proxy.fullname" . }} | ||
labels: | ||
{{- include "seda-data-proxy.labels" . | nindent 4 }} | ||
spec: | ||
type: {{ .Values.service.type }} | ||
ports: | ||
- port: {{ .Values.service.port }} | ||
targetPort: {{ .Values.service.port }} | ||
selector: | ||
{{- include "seda-data-proxy.selectorLabels" . | nindent 4 }} |
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,18 @@ | ||
image: | ||
repository: ghcr.io/sedaprotocol/seda-data-proxy | ||
tag: "v0.0.2" | ||
pullPolicy: IfNotPresent | ||
|
||
service: | ||
type: ClusterIP | ||
port: 5384 | ||
|
||
replicaCount: 1 | ||
|
||
# export SEDA_PRIVATE_KEY=<KEY> | ||
# helm install my-release ./chart-name --set secret.sedaDataProxyPrivateKey=$SEDA_PRIVATE_KEY | ||
secret: | ||
sedaDataProxyPrivateKey: "" | ||
|
||
# Uncomment for testing (itdisables request verification) | ||
# sedaProxyFlags: "--disable-proof" |