diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4dbd19a..c75c7a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,7 +121,6 @@ jobs: needs: protos strategy: matrix: - go-version: [1.19.x, 1.20.x, 1.21.x] os: [ubuntu-latest] runs-on: ${{ matrix.os }} timeout-minutes: 15 @@ -141,7 +140,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: ${{ matrix.go-version }} + go-version: 1.21.x # Get commit message - name: Get commit message diff --git a/helm/algo-id/.helmignore b/helm/algo-id/.helmignore deleted file mode 100644 index 50af031..0000000 --- a/helm/algo-id/.helmignore +++ /dev/null @@ -1,22 +0,0 @@ -# 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 -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/helm/algo-id/Chart.yaml b/helm/algo-id/Chart.yaml deleted file mode 100644 index d1e505e..0000000 --- a/helm/algo-id/Chart.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v2 -name: algo-id -description: Network agent deployment for the "algo" DID method -type: application -version: 0.3.0 -appVersion: 0.4.0 -home: https://github.com/algorandfoundation/did-algo -icon: https://raw.githubusercontent.com/algorandfoundation/did-algo/main/helm/algo-id/icon.png -sources: - - https://github.com/algorandfoundation/did-algo -keywords: - - algorand - - did -maintainers: - - name: Ben Cessa - email: ben@aid.technology - url: https://github.com/bcessa diff --git a/helm/algo-id/README.md b/helm/algo-id/README.md deleted file mode 100644 index a16559f..0000000 --- a/helm/algo-id/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# algo-id - -This chart provides a functional deployment of the __"algo"__ DID Method specification. -The definitions, conventions and technical details included intend to provide a solid -base for further developments while maintaining compliance with the work, still in progress, -on the [W3C Credentials Community Group](https://w3c-ccg.github.io/did-spec/). diff --git a/helm/algo-id/icon.png b/helm/algo-id/icon.png deleted file mode 100644 index a619920..0000000 Binary files a/helm/algo-id/icon.png and /dev/null differ diff --git a/helm/algo-id/templates/NOTES.txt b/helm/algo-id/templates/NOTES.txt deleted file mode 100644 index 3a9d660..0000000 --- a/helm/algo-id/templates/NOTES.txt +++ /dev/null @@ -1,42 +0,0 @@ -{{- $fullName := include "cc.fullname" . -}} -{{- $svcPort := .Values.access.port -}} -{{- $namespace := .Release.Namespace -}} -- Cluster internal address: {{ printf "%s.%s:%.0f" $fullName $namespace $svcPort }} -- Public access enabled: {{ .Values.access.ingress.enabled }} -{{- if .Values.access.ingress.enabled }} -- Public URL: {{ .Values.access.ingress.host }} -- TLS termination at ingress: {{ .Values.access.ingress.tls }} -{{- if .Values.tlsSecretName }} -- TLS credentials used: {{ .Values.tlsSecretName }} -- TLS passthrough: {{ .Values.access.ingress.tlsPassthrough }} -{{- end }} -{{- if .Values.access.ingress.className }} -- Ingress class: {{ .Values.access.ingress.className }} -{{- end }} -{{- if .Values.access.ingress.annotations }} -- Additional ingress settings: - {{- with .Values.access.ingress.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} -{{- end }} -- HTTP access: - Enabled: {{ .Values.access.ingress.http.enabled }} - Secure backend: {{ .Values.access.ingress.http.secureBackend }} - Paths: - {{- with .Values.access.ingress.http.paths }} - {{- toYaml . | nindent 6 }} - {{- end }} -- gRPC access: - Enabled: {{ .Values.access.ingress.grpc.enabled }} - Secure backend: {{ .Values.access.ingress.grpc.secureBackend }} - Services: - {{- with .Values.access.ingress.grpc.services }} - {{- toYaml . | nindent 6 }} - {{- end }} -{{- if .Values.configuration }} -- Application settings: - {{- with .Values.configuration }} - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/helm/algo-id/templates/_helpers.tpl b/helm/algo-id/templates/_helpers.tpl deleted file mode 100644 index a1cd17d..0000000 --- a/helm/algo-id/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "cc.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). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "cc.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "cc.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "cc.labels" -}} -helm.sh/chart: {{ include "cc.chart" . }} -{{ include "cc.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "cc.selectorLabels" -}} -app.kubernetes.io/name: {{ include "cc.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "cc.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "cc.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/helm/algo-id/templates/configmap.yaml b/helm/algo-id/templates/configmap.yaml deleted file mode 100644 index 462689a..0000000 --- a/helm/algo-id/templates/configmap.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "cc.fullname" . }} - labels: - {{- include "cc.labels" . | nindent 4 }} -data: - config.yaml: |- - {{- toYaml .Values.configuration | nindent 4 }} diff --git a/helm/algo-id/templates/deployment.yaml b/helm/algo-id/templates/deployment.yaml deleted file mode 100644 index 663d193..0000000 --- a/helm/algo-id/templates/deployment.yaml +++ /dev/null @@ -1,156 +0,0 @@ -{{- $fullName := include "cc.fullname" . -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "cc.fullname" . }} - labels: - {{- include "cc.labels" . | nindent 4 }} - {{- with .Values.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.replicaCount }} - revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} - strategy: - type: Recreate - selector: - matchLabels: - {{- include "cc.selectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - labels: - {{- include "cc.selectorLabels" . | nindent 8 }} - spec: - {{- if .Values.image.pullSecrets }} - imagePullSecrets: - {{- range .Values.image.pullSecrets }} - - name: {{ . }} - {{- end }} - {{- end }} - serviceAccountName: {{ include "cc.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - volumes: - - name: config - configMap: - name: {{ include "cc.fullname" . }} - {{- if .Values.tlsSecretName }} - - name: tls - secret: - secretName: {{ .Values.tlsSecretName }} - {{- end }} - {{- if .Values.persistence.enabled }} - - name: storage - persistentVolumeClaim: - claimName: {{ printf "%s-storage" $fullName }} - {{- end }} - containers: - {{- if .Values.resolver.enabled }} - - name: resolver - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.resolver.image }}:{{ .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - volumeMounts: - - name: config - mountPath: /etc/algoid - {{- if .Values.tlsSecretName }} - - name: tls - mountPath: /etc/algoid/tls - readOnly: true - {{- end }} - args: - - "resolver" - - "--config" - - "/etc/algoid/config.yaml" - ports: - - name: resolver - protocol: TCP - containerPort: {{ .Values.configuration.resolver.port }} - env: - {{- toYaml .Values.env | nindent 12 }} - livenessProbe: - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - httpGet: - {{- if .Values.configuration.resolver.tls.enabled }} - scheme: HTTPS - {{- end }} - path: /1.0/ping - port: resolver - readinessProbe: - initialDelaySeconds: 20 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - httpGet: - {{- if .Values.configuration.resolver.tls.enabled }} - scheme: HTTPS - {{- end }} - path: /1.0/ready - port: resolver - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- end }} - - name: agent - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - volumeMounts: - - name: config - mountPath: /etc/algoid - {{- if .Values.tlsSecretName }} - - name: tls - mountPath: /etc/algoid/tls - readOnly: true - {{- end }} - {{- if .Values.persistence.enabled }} - - name: storage - mountPath: /etc/algoid/agent/data - {{- end }} - args: - - "agent" - - "--config" - - "/etc/algoid/config.yaml" - ports: - - name: rpc - protocol: TCP - containerPort: {{ .Values.access.port }} - env: - {{- toYaml .Values.env | nindent 12 }} - livenessProbe: - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - httpGet: - {{- if .Values.configuration.agent.tls.enabled }} - scheme: HTTPS - {{- end }} - path: /v1/ping - port: rpc - readinessProbe: - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - httpGet: - {{- if .Values.configuration.agent.tls.enabled }} - scheme: HTTPS - {{- end }} - path: /v1/ping - port: rpc - resources: - {{- toYaml .Values.resources | nindent 12 }} - nodeSelector: - {{- toYaml .Values.nodeSelector | nindent 8 }} - affinity: - {{- toYaml .Values.affinity | nindent 8 }} - tolerations: - {{- toYaml .Values.tolerations | nindent 8 }} diff --git a/helm/algo-id/templates/ingress.yaml b/helm/algo-id/templates/ingress.yaml deleted file mode 100644 index 7d9b5c8..0000000 --- a/helm/algo-id/templates/ingress.yaml +++ /dev/null @@ -1,169 +0,0 @@ -{{- if .Values.access.ingress.enabled -}} -{{- if .Values.access.ingress.tlsPassthrough -}} -{{- $fullName := include "cc.fullname" . -}} -{{- $svcPort := .Values.access.port -}} -{{- $resolverPort := .Values.configuration.resolver.port -}} -{{- if and .Values.access.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.access.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.access.ingress.annotations "kubernetes.io/ingress.class" .Values.access.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "cc.labels" . | nindent 4 }} - annotations: - nginx.ingress.kubernetes.io/backend-protocol: "https" - nginx.ingress.kubernetes.io/ssl-redirect: "true" - nginx.ingress.kubernetes.io/ssl-passthrough: "true" - {{- with .Values.access.ingress.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.access.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.access.ingress.className }} - {{- end }} - rules: - - host: {{ .Values.access.ingress.host }} - http: - paths: - {{- range .Values.access.ingress.http.paths }} - - path: {{ . }} - pathType: Prefix - backend: - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- end }} - {{- if .Values.resolver.enabled }} - {{- range .Values.resolver.paths }} - - path: {{ . }} - pathType: Prefix - backend: - service: - name: {{ $fullName }} - port: - number: {{ $resolverPort }} - {{- end }} - {{- end }} -{{- else -}} -{{- $fullName := include "cc.fullname" . -}} -{{- $svcPort := .Values.access.port -}} -{{- $resolverPort := .Values.configuration.resolver.port -}} -{{- $httpBackendProtocol := ternary "https" "http" .Values.access.ingress.http.secureBackend -}} -{{- if and .Values.access.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.access.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.access.ingress.annotations "kubernetes.io/ingress.class" .Values.access.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "cc.labels" . | nindent 4 }} - annotations: - nginx.ingress.kubernetes.io/backend-protocol: {{ $httpBackendProtocol }} - {{- if and .Values.tlsSecretName .Values.access.ingress.tls }} - nginx.ingress.kubernetes.io/ssl-redirect: "true" - {{- end }} - {{- with .Values.access.ingress.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.access.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.access.ingress.className }} - {{- end }} - {{- if and .Values.tlsSecretName .Values.access.ingress.tls }} - tls: - - hosts: - - {{ .Values.access.ingress.host }} - secretName: {{ .Values.tlsSecretName }} - {{- end }} - rules: - - host: {{ .Values.access.ingress.host }} - http: - paths: - {{- range .Values.access.ingress.http.paths }} - - path: {{ . }} - pathType: Prefix - backend: - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- end }} - {{- if .Values.resolver.enabled }} - {{- range .Values.resolver.paths }} - - path: {{ . }} - pathType: Prefix - backend: - service: - name: {{ $fullName }} - port: - number: {{ $resolverPort }} - {{- end }} - {{- end }} -{{- end }} ---- -{{ if and .Values.access.ingress.grpc.enabled (not (.Values.access.ingress.tlsPassthrough)) -}} -{{- $fullName := include "cc.fullname" . -}} -{{- $svcPort := .Values.access.port -}} -{{- $grpcBackendProtocol := ternary "grpcs" "grpc" .Values.access.ingress.grpc.secureBackend -}} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ printf "%s-%s" $fullName "grpc" }} - labels: - {{- include "cc.labels" . | nindent 4 }} - annotations: - nginx.ingress.kubernetes.io/backend-protocol: {{ $grpcBackendProtocol }} - {{- with .Values.access.ingress.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.access.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.access.ingress.className }} - {{- end }} - {{- if and .Values.tlsSecretName .Values.access.ingress.tls }} - tls: - - hosts: - - {{ .Values.access.ingress.host }} - secretName: {{ .Values.tlsSecretName }} - {{- end }} - rules: - - host: {{ .Values.access.ingress.host }} - http: - paths: - {{- range .Values.access.ingress.grpc.services }} - - path: /{{ . }} - pathType: Prefix - backend: - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- end }} -{{- end -}} -{{- end -}} diff --git a/helm/algo-id/templates/pvc.yaml b/helm/algo-id/templates/pvc.yaml deleted file mode 100644 index 5a9a119..0000000 --- a/helm/algo-id/templates/pvc.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} -{{- $fullName := include "cc.fullname" . -}} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ printf "%s-storage" $fullName }} - labels: - {{- include "cc.labels" . | nindent 4 }} - annotations: - {{- if .Values.persistence.keep }} - helm.sh/resource-policy: "keep" - {{- end }} - {{- with .Values.persistence.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - storageClassName: {{ .Values.persistence.storageClass }} - accessModes: - - {{ .Values.persistence.accessMode | quote }} - resources: - requests: - storage: {{ .Values.persistence.size | quote }} -{{- end -}} diff --git a/helm/algo-id/templates/service.yaml b/helm/algo-id/templates/service.yaml deleted file mode 100644 index 7690ee7..0000000 --- a/helm/algo-id/templates/service.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "cc.fullname" . }} - labels: - {{- include "cc.labels" . | nindent 4 }} -spec: - type: {{ .Values.access.serviceType }} - ports: - - port: {{ .Values.access.port }} - targetPort: rpc - protocol: TCP - name: rpc - {{- if .Values.resolver.enabled }} - - port: {{ .Values.configuration.resolver.port }} - targetPort: resolver - protocol: TCP - name: resolver - {{- end }} - selector: - {{- include "cc.selectorLabels" . | nindent 4 }} diff --git a/helm/algo-id/templates/serviceaccount.yaml b/helm/algo-id/templates/serviceaccount.yaml deleted file mode 100644 index 6c94e68..0000000 --- a/helm/algo-id/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "cc.serviceAccountName" . }} - labels: - {{- include "cc.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end -}} diff --git a/helm/algo-id/values.yaml b/helm/algo-id/values.yaml deleted file mode 100644 index daf9714..0000000 --- a/helm/algo-id/values.yaml +++ /dev/null @@ -1,190 +0,0 @@ -# Application-specific configuration options. Will be stored as a configmap -# and provided to the deployment as a configuration file. -# The file will be mounted by default at: /etc/algid/config.yaml -configuration: - agent: - pow: 8 - port: 9090 - http: true - proxy_protocol: true - env: dev - storage: - kind: ephemeral - method: - - algo - tls: - enabled: false - cert: /etc/algoid/tls/tls.crt - key: /etc/algoid/tls/tls.key - system_ca: true - custom_ca: [] - network: - algod: - address: "" - token: "" - indexer: - address: "" - token: "" - resolver: - env: dev - port: 9091 - proxy_protocol: true - tls: - enabled: false - cert: /etc/algoid/tls/tls.crt - key: /etc/algoid/tls/tls.key - system_ca: true - custom_ca: [] - client: - node: algo-did.aidtech.network:443 - insecure: false - timeout: 5 - pow: 16 - -# Service access settings. -access: - # Internal service type; used for "within cluster" communications. - serviceType: ClusterIP - # The port used within the cluster when communicating with the service. - port: 9090 - # An ingress is required to enable access to the service from outside the - # cluster, i.e., by internet users. - ingress: - # Enable/disable public access completely. - enabled: false - # Provide TLS termination at ingress level; using the `tlsSecretName` credentials. - tls: false - # The encrypted traffic will be passed "as-is" to the service pods. The drawback with - # this approach in that the ingress controller is not capable of modifying the encrypted - # headers to add the PROXY protocol data and the service won’t receive the real user IP. - tlsPassthrough: false - # Specify which ingress controller should be used. If omitted the default - # cluster value will be used. - className: "" - # Additional ingress configuration settings. - annotations: {} - # Hostname (usually a public domain) that will be used to access the - # service. - host: chart-example.local - # HTTP traffic settings. - http: - # Expect and handle incoming HTTP traffic. - enabled: true - # Whether the Pod itself is serving secure traffic (HTTPS) - secureBackend: false - # Path prefixes used to identity incoming HTTP(S) traffic to the service. - # For example: /api - paths: - - /v1 - # gRPC traffic settings: - grpc: - # Enable direct gRPC access to the service. - enabled: true - # Whether the Pod itself is serving secure traffic. - secureBackend: false - # List of gRPC services exposed by the server. Will be used - # to configure ingress paths. The service identifiers are of the - # form: `protobuf_package.service` - services: - - did.v1.AgentAPI - -# DID resolver settings. -resolver: - # include `resolver` container in deployment - enabled: false - # image repository - image: ghcr.io/algorandfoundation/algoid-resolver - # HTTP paths enabled - paths: - - /1.0 - -# Release naming rules. -nameOverride: "" -fullnameOverride: "" - -# If provided, these TLS credentials will be mounted as a volume -# on the deployment and (if enabled) used by the ingress for TLS termination. -# Credentials will be mounted by default at: `/etc/{{ .Chart.Name }}/tls` -tlsSecretName: "tls-secret-name-here" - -# Basic deployment settings. -replicaCount: 1 -revisionHistoryLimit: 3 -image: - repository: ghcr.io/algorandfoundation/algoid - pullPolicy: IfNotPresent - # Image registry credentials, provided as a simple list. - # https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - pullSecrets: [] - # - my-registry - -# Additional deployment annotations. -annotations: {} - -# linkerd.io/inject: enabled -# Custom environment variables for the container. -# https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/ -env: [] - # - name: DEMO_GREETING - # value: "Hello from the environment" - -# Health probes. -# https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ -livenessProbe: {} -readinessProbe: {} - -# Persistent storage. -# https://kubernetes.io/docs/concepts/storage/persistent-volumes/ -persistence: - enabled: false - # If set to true; the created volume won't be removed when the - # helm release is uninstalled. - keep: true - # Use an existing volume instead of creating a new one. - existingClaim: "" - storageClass: "default" - accessMode: "ReadWriteOnce" - size: "1Gi" - annotations: {} - -# Horizontal pod autoscaling. -# https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ -autoscaling: - enabled: false - maxReplicas: 3 - minReplicas: 1 - cpuUtilizationPercentage: 80 - memoryUtilizationPercentage: 80 - annotations: {} - -# Create a per-deployment service account. -# https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - # If not set and create is true, a name is generated based on the chart - # and release name. - name: "" - create: false - annotations: {} - -# Resource allocations/limits. -# https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ -resources: - requests: - cpu: 5m - memory: 32Mi - limits: - cpu: 100m - memory: 128Mi - -# Pod security settings. -# https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -podSecurityContext: {} -securityContext: {} - # readOnlyRootFilesystem: true - # runAsNonRoot: true - -# Pod allocation settings. -# https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/ -nodeSelector: {} -tolerations: [] -affinity: {} diff --git a/helm/algo-indexer/.helmignore b/helm/algo-indexer/.helmignore deleted file mode 100644 index 0e8a0eb..0000000 --- a/helm/algo-indexer/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# 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/helm/algo-indexer/Chart.yaml b/helm/algo-indexer/Chart.yaml deleted file mode 100644 index 75ec92b..0000000 --- a/helm/algo-indexer/Chart.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v2 -name: algo-indexer -description: A Helm chart for Kubernetes -type: application -version: 0.1.0 -appVersion: "2.6.1" -home: https://github.com/algorandfoundation/did-algo -icon: https://raw.githubusercontent.com/algorandfoundation/did-algo/main/helm/algo-indexer/icon.png -sources: - - https://github.com/algorandfoundation/did-algo -keywords: - - algorand - - indexer -maintainers: - - name: Ben Cessa - email: ben@aid.technology - url: https://github.com/bcessa diff --git a/helm/algo-indexer/README.md b/helm/algo-indexer/README.md deleted file mode 100644 index b28a474..0000000 --- a/helm/algo-indexer/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# algo-indexer - -The indexer enables searching the blockchain for transactions, assets, -accounts, and blocks with various criteria. It runs as an independent -process that must connect to a PostgreSQL compatible database that -contains the ledger data. The database is populated by the indexer -which connects to an Algorand node and processes all the ledger data. - -The Indexer primarily provides two services, loading a PostgreSQL database -with ledger data and supplying a REST API to search this ledger data. You -can set the Indexer to point at a database that was loaded by another instance -of the Indexer. - -More information: -[https://developer.algorand.org/docs/run-a-node/setup/indexer/](https://developer.algorand.org/docs/run-a-node/setup/indexer/) diff --git a/helm/algo-indexer/icon.png b/helm/algo-indexer/icon.png deleted file mode 100644 index a619920..0000000 Binary files a/helm/algo-indexer/icon.png and /dev/null differ diff --git a/helm/algo-indexer/templates/NOTES.txt b/helm/algo-indexer/templates/NOTES.txt deleted file mode 100644 index 846753a..0000000 --- a/helm/algo-indexer/templates/NOTES.txt +++ /dev/null @@ -1,22 +0,0 @@ -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} - {{- end }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "algo-indexer.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "algo-indexer.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "algo-indexer.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "algo-indexer.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT -{{- end }} diff --git a/helm/algo-indexer/templates/_helpers.tpl b/helm/algo-indexer/templates/_helpers.tpl deleted file mode 100644 index 803b4e4..0000000 --- a/helm/algo-indexer/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "algo-indexer.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). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "algo-indexer.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "algo-indexer.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "algo-indexer.labels" -}} -helm.sh/chart: {{ include "algo-indexer.chart" . }} -{{ include "algo-indexer.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "algo-indexer.selectorLabels" -}} -app.kubernetes.io/name: {{ include "algo-indexer.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "algo-indexer.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "algo-indexer.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/helm/algo-indexer/templates/deployment.yaml b/helm/algo-indexer/templates/deployment.yaml deleted file mode 100644 index ad97eea..0000000 --- a/helm/algo-indexer/templates/deployment.yaml +++ /dev/null @@ -1,86 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "algo-indexer.fullname" . }} - labels: - {{- include "algo-indexer.labels" . | nindent 4 }} -spec: - {{- if and (eq .Values.config.mode "reader") (not .Values.autoscaling.enabled) }} - replicas: {{ .Values.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "algo-indexer.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "algo-indexer.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.image.pullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "algo-indexer.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - command: - - "daemon" - args: - {{- if eq .Values.config.mode "reader" }} - - "--no-algod" - {{- end }} - ports: - - name: rpc - containerPort: 8980 - protocol: TCP - env: - - name: INDEXER_POSTGRES_CONNECTION_STRING - value: "host={{ .Values.config.postgres.host }} port={{ .Values.config.postgres.port }} user={{ .Values.config.postgres.user }} password={{ .Values.config.postgres.password }} dbname={{ .Values.config.postgres.dbname }}" - {{- if ne .Values.config.mode "reader" }} - - name: INDEXER_ALGOD_ADDRESS - value: {{ required "You must provide the algod address (config.algod.address)" .Values.config.algod.address }} - - name: INDEXER_ALGOD_TOKEN - value: {{ required "You must provide the algod access token (config.algod.token)" .Values.config.algod.token }} - {{- end }} - livenessProbe: - initialDelaySeconds: 120 - periodSeconds: 15 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 3 - httpGet: - path: /health - port: rpc - readinessProbe: - initialDelaySeconds: 180 - periodSeconds: 30 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 3 - httpGet: - path: /health - port: rpc - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/helm/algo-indexer/templates/hpa.yaml b/helm/algo-indexer/templates/hpa.yaml deleted file mode 100644 index 72b4b19..0000000 --- a/helm/algo-indexer/templates/hpa.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if and .Values.autoscaling.enabled (eq .Values.config.mode "reader") }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "algo-indexer.fullname" . }} - labels: - {{- include "algo-indexer.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "algo-indexer.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/helm/algo-indexer/templates/ingress.yaml b/helm/algo-indexer/templates/ingress.yaml deleted file mode 100644 index 3184edf..0000000 --- a/helm/algo-indexer/templates/ingress.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "algo-indexer.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "algo-indexer.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.ingress.className }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/helm/algo-indexer/templates/service.yaml b/helm/algo-indexer/templates/service.yaml deleted file mode 100644 index c3147ab..0000000 --- a/helm/algo-indexer/templates/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "algo-indexer.fullname" . }} - labels: - {{- include "algo-indexer.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: rpc - protocol: TCP - name: rpc - selector: - {{- include "algo-indexer.selectorLabels" . | nindent 4 }} diff --git a/helm/algo-indexer/templates/serviceaccount.yaml b/helm/algo-indexer/templates/serviceaccount.yaml deleted file mode 100644 index 15fe838..0000000 --- a/helm/algo-indexer/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "algo-indexer.serviceAccountName" . }} - labels: - {{- include "algo-indexer.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/helm/algo-indexer/templates/tests/test-connection.yaml b/helm/algo-indexer/templates/tests/test-connection.yaml deleted file mode 100644 index 21e951e..0000000 --- a/helm/algo-indexer/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "algo-indexer.fullname" . }}-test-connection" - labels: - {{- include "algo-indexer.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "algo-indexer.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/helm/algo-indexer/values.yaml b/helm/algo-indexer/values.yaml deleted file mode 100644 index 2d0c5cf..0000000 --- a/helm/algo-indexer/values.yaml +++ /dev/null @@ -1,95 +0,0 @@ -config: - # The Indexer primarily provides two services, loading a PostgreSQL database - # with ledger data (writer), supplying a REST API to search this ledger data - # (reader) or both (full). - # Valid mode values: writer, reader, full - mode: full - # Connection details to an algod node. Required when the indexer - # is run in either `writer` or `full` mode. - algod: - address: "algod:80" - token: "my-super-secret-access-token" - # PostgreSQL instance to read/write data from. - postgres: - host: "postgres" - port: 5432 - user: "algorand" - password: "algorand" - dbname: "ledger_data" - -# Autoscaling and replication are used to scale indexer instances -# when on deployed on `reader` mode. -replicaCount: 1 -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - targetMemoryUtilizationPercentage: 80 - -image: - repository: ghcr.io/bryk-io/algod-indexer - pullPolicy: IfNotPresent - pullSecrets: [] - # - name: ghcr-io - # Overrides the image tag whose default is the chart appVersion. - tag: "" - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: false - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "" - -podAnnotations: {} - -podSecurityContext: {} - # fsGroup: 2000 - -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - className: "" - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: - - path: / - pathType: ImplementationSpecific - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -resources: {} - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/helm/algo-node/.helmignore b/helm/algo-node/.helmignore deleted file mode 100644 index 0e8a0eb..0000000 --- a/helm/algo-node/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# 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/helm/algo-node/Chart.yaml b/helm/algo-node/Chart.yaml deleted file mode 100644 index ca270b7..0000000 --- a/helm/algo-node/Chart.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v2 -name: algo-node -description: Algorand Node -type: application -version: 0.1.0 -appVersion: "2.10.1" -home: https://github.com/algorandfoundation/did-algo -icon: https://raw.githubusercontent.com/algorandfoundation/did-algo/main/helm/algo-node/icon.png -sources: - - https://github.com/algorandfoundation/did-algo -keywords: - - algorand - - node -maintainers: - - name: Ben Cessa - email: ben@aid.technology - url: https://github.com/bcessa diff --git a/helm/algo-node/README.md b/helm/algo-node/README.md deleted file mode 100644 index 068288b..0000000 --- a/helm/algo-node/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# algo-node - -The Algorand network is comprised of two distinct types of nodes, relay -nodes, and non-relay nodes. Relay nodes are primarily used for communication -routing to a set of connected non-relay nodes. Relay nodes communicate with -other relay nodes and route blocks to all connected non-relay nodes. -Non-relay nodes only connect to relay nodes and can also participate in -consensus. Non-relay nodes may connect to several relay nodes but never -connect to another non-relay node. - -In addition to the two node types, nodes can be configured to be archival and -indexed. Archival nodes store the entire ledger and if the indexer is turned on, -the search range via the API REST endpoint is increased. - -This chart facilitate the process of deploying both node types. - -More information: -[https://developer.algorand.org/docs/run-a-node](https://developer.algorand.org/docs/run-a-node) diff --git a/helm/algo-node/icon.png b/helm/algo-node/icon.png deleted file mode 100644 index a619920..0000000 Binary files a/helm/algo-node/icon.png and /dev/null differ diff --git a/helm/algo-node/templates/NOTES.txt b/helm/algo-node/templates/NOTES.txt deleted file mode 100644 index 083ff77..0000000 --- a/helm/algo-node/templates/NOTES.txt +++ /dev/null @@ -1,29 +0,0 @@ -{{- $fullName := include "algo-node.fullname" . -}} -1. The release was installed as: -{{ $fullName }} - -2. The RPC token to access the node's API is stored as the secret: -{{ printf "%s-token" $fullName }} - -3. Get the node URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} - {{- end }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "algo-node.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "algo-node.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "algo-node.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "algo-node.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT -{{- end }} diff --git a/helm/algo-node/templates/_helpers.tpl b/helm/algo-node/templates/_helpers.tpl deleted file mode 100644 index 158f2f0..0000000 --- a/helm/algo-node/templates/_helpers.tpl +++ /dev/null @@ -1,70 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "algo-node.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). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "algo-node.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "algo-node.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "algo-node.labels" -}} -helm.sh/chart: {{ include "algo-node.chart" . }} -{{ include "algo-node.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "algo-node.selectorLabels" -}} -app.kubernetes.io/name: {{ include "algo-node.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "algo-node.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "algo-node.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} - -{{/* -Return the PVC used for node storage when persistance is enabled. -*/}} -{{- define "algo-node.storage" -}} -{{ $fullName := include "algo-node.fullname" . }} -{{- printf "%s-storage" $fullName }} -{{- end }} diff --git a/helm/algo-node/templates/deployment.yaml b/helm/algo-node/templates/deployment.yaml deleted file mode 100644 index 9574afc..0000000 --- a/helm/algo-node/templates/deployment.yaml +++ /dev/null @@ -1,113 +0,0 @@ -{{- $fullName := include "algo-node.fullname" . -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ $fullName }} - labels: - {{- include "algo-node.labels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "algo-node.selectorLabels" . | nindent 6 }} - strategy: - type: Recreate - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "algo-node.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "algo-node.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - volumes: - {{- if .Values.persistence.enabled }} - - name: storage - persistentVolumeClaim: - claimName: {{ include "algo-node.storage" . }} - {{- end }} - initContainers: - {{- if .Values.persistence.enabled }} - - name: node-data-permission-fix - image: busybox - command: ["/bin/chmod","-R","777", "/data"] - volumeMounts: - - name: storage - mountPath: /data - {{- end }} - containers: - - name: node - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.persistence.enabled }} - volumeMounts: - - name: storage - mountPath: /var/lib/algorand/data - {{- end }} - args: - {{- if eq .Values.config.mode "archival" }} - - "--archival" - {{- end }} - {{- if eq .Values.config.mode "indexed" }} - - "--indexed" - {{- end }} - {{- if .Values.config.relay }} - - "--relay" - {{- end }} - env: - - name: NETWORK - value: {{ .Values.config.network }} - - name: TOKEN - valueFrom: - secretKeyRef: - name: {{ printf "%s-token" $fullName }} - key: token - ports: - - name: rpc - containerPort: 8080 - protocol: TCP - livenessProbe: - initialDelaySeconds: 5 - periodSeconds: 10 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 3 - httpGet: - path: /health - port: rpc - readinessProbe: - initialDelaySeconds: 15 - periodSeconds: 30 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 3 - httpGet: - path: /health - port: rpc - securityContext: - allowPrivilegeEscalation: false - runAsNonRoot: true - readOnlyRootFilesystem: false - runAsUser: 105 # algorand user - runAsGroup: 106 # algorand gorup - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/helm/algo-node/templates/ingress.yaml b/helm/algo-node/templates/ingress.yaml deleted file mode 100644 index d3e5715..0000000 --- a/helm/algo-node/templates/ingress.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "algo-node.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "algo-node.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.ingress.className }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/helm/algo-node/templates/pvc.yaml b/helm/algo-node/templates/pvc.yaml deleted file mode 100644 index 72dac91..0000000 --- a/helm/algo-node/templates/pvc.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ include "algo-node.storage" . }} - labels: - {{- include "algo-node.labels" . | nindent 4 }} - annotations: - helm.sh/resource-policy: "keep" -spec: - storageClassName: {{ .Values.persistence.storageClass }} - accessModes: - - {{ .Values.persistence.accessMode | quote }} - resources: - requests: - storage: {{ .Values.persistence.size | quote }} ---- -{{- end -}} diff --git a/helm/algo-node/templates/secret.yaml b/helm/algo-node/templates/secret.yaml deleted file mode 100644 index 95be1e6..0000000 --- a/helm/algo-node/templates/secret.yaml +++ /dev/null @@ -1,10 +0,0 @@ -{{- $fullName := include "algo-node.fullname" . -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ printf "%s-token" $fullName }} - labels: - {{- include "algo-node.labels" . | nindent 4 }} -type: Opaque -data: - token: {{ .Values.config.token | default (randAlphaNum 64) | b64enc | quote }} diff --git a/helm/algo-node/templates/service.yaml b/helm/algo-node/templates/service.yaml deleted file mode 100644 index e9006b3..0000000 --- a/helm/algo-node/templates/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "algo-node.fullname" . }} - labels: - {{- include "algo-node.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: rpc - protocol: TCP - name: rpc - selector: - {{- include "algo-node.selectorLabels" . | nindent 4 }} diff --git a/helm/algo-node/templates/serviceaccount.yaml b/helm/algo-node/templates/serviceaccount.yaml deleted file mode 100644 index bb73457..0000000 --- a/helm/algo-node/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "algo-node.serviceAccountName" . }} - labels: - {{- include "algo-node.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/helm/algo-node/templates/tests/test-connection.yaml b/helm/algo-node/templates/tests/test-connection.yaml deleted file mode 100644 index 055b501..0000000 --- a/helm/algo-node/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "algo-node.fullname" . }}-test-connection" - labels: - {{- include "algo-node.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "algo-node.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/helm/algo-node/values.yaml b/helm/algo-node/values.yaml deleted file mode 100644 index 71c57e4..0000000 --- a/helm/algo-node/values.yaml +++ /dev/null @@ -1,91 +0,0 @@ -# App specific settings -config: - # Algorand network to use. The public networks are: - # mainnet, testnet and betanet. - network: testnet - # Set the node in archival mode. Valid values are: - # - archival - # - indexed - # On `archival` the node will store all ledger data. - # This is required when using the node for an indexer - # in `writer` mode. - mode: indexed - # Use the node as a relay. Relay nodes cannot participate in - # consensus rounds and simply forward messages to non-relay nodes. - relay: false - # API access token. If no value is provided a random token will be generated. - # This token is used to access the RPC and admin API. - token: "" - -# Docker image details. -image: - repository: algod - pullPolicy: IfNotPresent - # If not specified, the chart `appVersion` value will be used - tag: "" - -imagePullSecrets: [] -# - name: "my-pull-secret" - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - create: false - annotations: {} - name: "" - -# Enable persistence using Persistent Volume Claims -# ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ -persistence: - enabled: true - accessMode: ReadWriteOnce - # Indexed or relay nodes usually require just enough space to store - # the latest 1000 blocks in the networks. Archival nodes require enough - # space to store the whole ledger. - size: 2Gi - # If not define the default storage provision mechanism will be used. - storageClass: "" - # A manually managed Persistent Volume and Claim. If defined, PVC must - # be created manually before volume will be bound. - existingClaim: "" - -# System resources for the node instance. -resources: {} - # limits: - # cpu: 500m - # memory: 1024Mi - # requests: - # cpu: 100m - # memory: 128Mi - -podAnnotations: {} - -podSecurityContext: {} - # fsGroup: 2000 - -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - className: "my-load-balancer" - annotations: {} - # nginx.ingress.kubernetes.io/backend-protocol: "http" - # nginx.ingress.kubernetes.io/ssl-redirect: "true" - hosts: - - host: chart.local - paths: - - path: / - pathType: ImplementationSpecific - tls: [] - # - secretName: my-cert - # hosts: - # - chart.local - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/helm/postgres/.helmignore b/helm/postgres/.helmignore deleted file mode 100644 index 0e8a0eb..0000000 --- a/helm/postgres/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# 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/helm/postgres/Chart.yaml b/helm/postgres/Chart.yaml deleted file mode 100644 index 6af6deb..0000000 --- a/helm/postgres/Chart.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v2 -name: postgres -description: PostgreSQL, often simply "Postgres", is an object-relational database management system (ORDBMS) with an emphasis on extensibility and standards-compliance. -type: application -version: 0.1.0 -appVersion: "13.4" -home: https://github.com/algorandfoundation/did-algo -icon: https://raw.githubusercontent.com/algorandfoundation/did-algo/main/helm/postgres/icon.png -sources: - - https://github.com/algorandfoundation/did-algo -keywords: - - postgres - - postgresql - - ordbms -maintainers: - - name: Ben Cessa - email: ben@aid.technology - url: https://github.com/bcessa diff --git a/helm/postgres/README.md b/helm/postgres/README.md deleted file mode 100644 index 1c8195f..0000000 --- a/helm/postgres/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# PostgreSQL - -PostgreSQL, often simply "Postgres", is an object-relational database management -system (ORDBMS) with an emphasis on extensibility and standards-compliance. As a -database server, its primary function is to store data, securely and supporting -best practices, and retrieve it later, as requested by other software applications, -be it those on the same computer or those running on another computer across a -network (including the Internet). It can handle workloads ranging from small -single-machine applications to large Internet-facing applications with many -concurrent users. Recent versions also provide replication of the database itself -for security and scalability. - -PostgreSQL implements the majority of the SQL:2011 standard, is ACID-compliant -and transactional (including most DDL statements) avoiding locking issues using -multiversion concurrency control (MVCC), provides immunity to dirty reads and full -serializability; handles complex SQL queries using many indexing methods that are -not available in other databases; has updateable views and materialized views, -triggers, foreign keys; supports functions and stored procedures, and other -expandability, and has a large number of extensions written by third parties. In -addition to the possibility of working with the major proprietary and open source -databases, PostgreSQL supports migration from them, by its extensive standard SQL -support and available migration tools. And if proprietary extensions had been used, -by its extensibility that can emulate many through some built-in and third-party -open source compatibility extensions, such as for Oracle. - -More information: -[https://github.com/docker-library/docs/blob/master/postgres/README.md](https://github.com/docker-library/docs/blob/master/postgres/README.md) diff --git a/helm/postgres/icon.png b/helm/postgres/icon.png deleted file mode 100644 index fd0b5fd..0000000 Binary files a/helm/postgres/icon.png and /dev/null differ diff --git a/helm/postgres/templates/NOTES.txt b/helm/postgres/templates/NOTES.txt deleted file mode 100644 index 7b93315..0000000 --- a/helm/postgres/templates/NOTES.txt +++ /dev/null @@ -1,9 +0,0 @@ -{{- $fullName := include "postgres.fullname" . -}} -1. The release was installed as: -{{ $fullName }} - -2. The credentials to access the database are stored in the secret: -{{ printf "%s-credentials" $fullName }} - -3. You can access your database at: -{{ $fullName }}.{{ .Release.Namespace }}:{{ .Values.service.port }} diff --git a/helm/postgres/templates/_helpers.tpl b/helm/postgres/templates/_helpers.tpl deleted file mode 100644 index bdc242e..0000000 --- a/helm/postgres/templates/_helpers.tpl +++ /dev/null @@ -1,70 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "postgres.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). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "postgres.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "postgres.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "postgres.labels" -}} -helm.sh/chart: {{ include "postgres.chart" . }} -{{ include "postgres.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "postgres.selectorLabels" -}} -app.kubernetes.io/name: {{ include "postgres.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "postgres.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "postgres.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} - -{{/* -Return the PVC used for persistent database storage (when enabled). -*/}} -{{- define "postgres.storage" -}} -{{ $fullName := include "postgres.fullname" . }} -{{- printf "%s-storage" $fullName }} -{{- end }} diff --git a/helm/postgres/templates/deployment.yaml b/helm/postgres/templates/deployment.yaml deleted file mode 100644 index f8c792a..0000000 --- a/helm/postgres/templates/deployment.yaml +++ /dev/null @@ -1,96 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "postgres.fullname" . }} - labels: - {{- include "postgres.labels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "postgres.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "postgres.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.image.pullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "postgres.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - volumes: - {{- if .Values.persistence.enabled }} - - name: storage - persistentVolumeClaim: - claimName: {{ include "postgres.storage" . }} - {{- end }} - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.persistence.enabled }} - volumeMounts: - - name: storage - mountPath: /var/lib/postgresql - {{- end }} - env: - - name: POSTGRES_USER - value: {{ .Values.config.user }} - - name: POSTGRES_PASSWORD - value: {{ .Values.config.password }} - {{- if .Values.config.database }} - - name: POSTGRES_DB - value: {{ .Values.config.database }} - {{- end }} - {{- if .Values.config.initdb }} - - name: POSTGRES_INITDB_ARGS - value: {{ .Values.config.initdb }} - {{- end }} - ports: - - name: db - containerPort: 5432 - protocol: TCP - livenessProbe: - initialDelaySeconds: 5 - periodSeconds: 10 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 3 - exec: - command: - - /bin/sh - - -c - - exec pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER} - readinessProbe: - initialDelaySeconds: 15 - periodSeconds: 30 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 3 - exec: - command: - - /bin/sh - - -c - - exec pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER} - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/helm/postgres/templates/pvc.yaml b/helm/postgres/templates/pvc.yaml deleted file mode 100644 index 7e9a6b6..0000000 --- a/helm/postgres/templates/pvc.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ include "postgres.storage" . }} - labels: - {{- include "postgres.labels" . | nindent 4 }} - annotations: - helm.sh/resource-policy: "keep" -spec: - storageClassName: {{ .Values.persistence.storageClass }} - accessModes: - - {{ .Values.persistence.accessMode | quote }} - resources: - requests: - storage: {{ .Values.persistence.size | quote }} ---- -{{- end -}} diff --git a/helm/postgres/templates/secret.yaml b/helm/postgres/templates/secret.yaml deleted file mode 100644 index 6d0ae07..0000000 --- a/helm/postgres/templates/secret.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- $fullName := include "postgres.fullname" . -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ printf "%s-credentials" $fullName }} - labels: - {{- include "postgres.labels" . | nindent 4 }} -type: Opaque -data: - user: {{ .Values.config.user }} - password: {{ .Values.config.password | default (randAlphaNum 32) | b64enc | quote }} diff --git a/helm/postgres/templates/service.yaml b/helm/postgres/templates/service.yaml deleted file mode 100644 index d73f91e..0000000 --- a/helm/postgres/templates/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "postgres.fullname" . }} - labels: - {{- include "postgres.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: db - protocol: TCP - name: db - selector: - {{- include "postgres.selectorLabels" . | nindent 4 }} diff --git a/helm/postgres/templates/serviceaccount.yaml b/helm/postgres/templates/serviceaccount.yaml deleted file mode 100644 index 2a5e303..0000000 --- a/helm/postgres/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "postgres.serviceAccountName" . }} - labels: - {{- include "postgres.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/helm/postgres/values.yaml b/helm/postgres/values.yaml deleted file mode 100644 index a9e68a7..0000000 --- a/helm/postgres/values.yaml +++ /dev/null @@ -1,72 +0,0 @@ -# Database specific settings -config: - # Creates the specified user with superuser power. - user: postgres - # Superuser password. - password: postgres - # Default database that is created when the release is first started. - database: sample-db - # Space separated string of arguments as `postgres initdb` would expect them. - # This is useful for adding functionality like data page checksums. - initdb: "" - -image: - repository: postgres - pullPolicy: IfNotPresent - tag: "13.4-alpine" - pullSecrets: [] - # - name: "my-pull-secret" - -# Enable persistence using Persistent Volume Claims -# ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ -persistence: - enabled: true - accessMode: ReadWriteOnce - # Indexed or relay nodes usually require just enough space to store - # the latest 1000 blocks in the networks. Archival nodes require enough - # space to store the whole ledger. - size: 2Gi - # If not define the default storage provision mechanism will be used. - storageClass: "" - # A manually managed Persistent Volume and Claim. If defined, PVC must - # be created manually before volume will be bound. - existingClaim: "" - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - create: false - annotations: {} - name: "" - -podAnnotations: {} - -podSecurityContext: {} - # fsGroup: 2000 - -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -service: - type: ClusterIP - port: 5432 - -resources: {} - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/images/Makefile b/images/Makefile deleted file mode 100644 index 0a2bed3..0000000 --- a/images/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -.PHONY: * -.DEFAULT_GOAL:=help - -help: - @echo "Commands available" - @sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /' | sort - -## deployment-images: Build necessary images to deploy an Algorand node -deployment-images: - docker build --platform linux/amd64 -t ghcr.io/bryk-io/algod:stable -f algod/Dockerfile algod/. - docker build --platform linux/amd64 -t ghcr.io/bryk-io/algod:beta -f algod/Dockerfile --build-arg channel=beta algod/. - docker build --platform linux/amd64 -t ghcr.io/bryk-io/algod-indexer:2.15.1 -f algod-indexer/Dockerfile algod-indexer/. - docker build --platform linux/amd64 -t ghcr.io/bryk-io/ipfs:0.12.2 -f ipfs/Dockerfile ipfs/. - docker build --platform linux/amd64 -t ghcr.io/bryk-io/algoid-resolver:0.4.0 -f algoid-resolver/Dockerfile algoid-resolver/. diff --git a/images/algod-indexer/Dockerfile b/images/algod-indexer/Dockerfile deleted file mode 100644 index 28ca659..0000000 --- a/images/algod-indexer/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -FROM debian:stable-slim - -ENV DEBIAN_FRONTEND noninteractive - -ARG version=2.15.1 - -# Install base tools -RUN \ - apt update && \ - apt install -y ca-certificates wget - -# Install indexer tools -RUN \ - wget https://github.com/algorand/indexer/releases/download/${version}/algorand-indexer_${version}_amd64.deb && \ - dpkg -i algorand-indexer_${version}_amd64.deb && \ - rm algorand-indexer_${version}_amd64.deb - -# Use a non-privilidged user for security reasons -RUN \ - mkdir /opt/indexer && \ - groupadd -g 10353 indexer && \ - useradd -m -u 10353 -g indexer indexer && \ - chown -R indexer:indexer /opt && \ - ls -lha /opt -USER indexer - -# API port -EXPOSE 8980 - -# Default binary -ENTRYPOINT ["/usr/bin/algorand-indexer"] diff --git a/images/algod/Dockerfile b/images/algod/Dockerfile deleted file mode 100644 index 9aef562..0000000 --- a/images/algod/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -FROM debian:stable-slim - -ENV DEBIAN_FRONTEND noninteractive - -# To build for a different channel try passing: -# --build-arg channel=beta -ARG channel=stable - -# Install node tools -RUN \ - apt update && \ - apt install -y curl && \ - mkdir -p /var/lib/algorand/genesis && \ - curl https://raw.githubusercontent.com/algorand/go-algorand-doc/master/downloads/installers/update.sh -O && \ - chmod 544 update.sh && \ - ./update.sh -i -c ${channel} -p /var/lib/algorand/bin -g /var/lib/algorand/ -d /var/lib/algorand/data -n && \ - mv /var/lib/algorand/bin/genesisfiles/* /var/lib/algorand/genesis - -# Add executable to global path -ENV PATH="${PATH}:/var/lib/algorand/bin" - -# Base settings -COPY system.json /var/lib/algorand/system.json -COPY config.json /var/lib/algorand/config.json -COPY run.sh /var/lib/algorand/run.sh - -# Node storage -VOLUME /var/lib/algorand/data -ENV ALGORAND_DATA="/var/lib/algorand/data" - -# Entry path -WORKDIR /var/lib/algorand - -# RPC port -EXPOSE 8080 - -# Default binary -ENTRYPOINT ["/var/lib/algorand/run.sh"] diff --git a/images/algod/config.json b/images/algod/config.json deleted file mode 100644 index bae725f..0000000 --- a/images/algod/config.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "Version": 16, - "AccountUpdatesStatsInterval": 5000000000, - "AccountsRebuildSynchronousMode": 1, - "AnnounceParticipationKey": true, - "Archival": false, - "BaseLoggerDebugLevel": 4, - "BlockServiceCustomFallbackEndpoints": "", - "BroadcastConnectionsLimit": -1, - "CadaverSizeTarget": 1073741824, - "CatchpointFileHistoryLength": 365, - "CatchpointInterval": 10000, - "CatchpointTracking": 0, - "CatchupBlockDownloadRetryAttempts": 1000, - "CatchupBlockValidateMode": 0, - "CatchupFailurePeerRefreshRate": 10, - "CatchupGossipBlockFetchTimeoutSec": 4, - "CatchupHTTPBlockFetchTimeoutSec": 4, - "CatchupLedgerDownloadRetryAttempts": 50, - "CatchupParallelBlocks": 16, - "ConnectionsRateLimitingCount": 60, - "ConnectionsRateLimitingWindowSeconds": 1, - "DNSBootstrapID": ".algorand.network", - "DNSSecurityFlags": 1, - "DeadlockDetection": 1, - "DisableLocalhostConnectionRateLimit": true, - "DisableNetworking": false, - "DisableOutgoingConnectionThrottling": false, - "EnableAccountUpdatesStats": false, - "EnableAgreementReporting": false, - "EnableAgreementTimeMetrics": false, - "EnableAssembleStats": false, - "EnableBlockService": false, - "EnableBlockServiceFallbackToArchiver": true, - "EnableCatchupFromArchiveServers": false, - "EnableDeveloperAPI": false, - "EnableGossipBlockService": true, - "EnableIncomingMessageFilter": false, - "EnableLedgerService": false, - "EnableMetricReporting": false, - "EnableOutgoingNetworkMessageFiltering": true, - "EnablePingHandler": true, - "EnableProcessBlockStats": false, - "EnableProfiler": false, - "EnableRequestLogger": false, - "EnableTopAccountsReporting": false, - "EndpointAddress": ":0", - "FallbackDNSResolverAddress": "", - "ForceRelayMessages": false, - "GossipFanout": 4, - "IncomingConnectionsLimit": 10000, - "IncomingMessageFilterBucketCount": 5, - "IncomingMessageFilterBucketSize": 512, - "IsIndexerActive": false, - "LedgerSynchronousMode": 2, - "LogArchiveMaxAge": "", - "LogArchiveName": "node.archive.log", - "LogSizeLimit": 1073741824, - "MaxCatchpointDownloadDuration": 7200000000000, - "MaxConnectionsPerIP": 30, - "MinCatchpointFileDownloadBytesPerSecond": 20480, - "NetAddress": "", - "NetworkMessageTraceServer": "", - "NetworkProtocolVersion": "", - "NodeExporterListenAddress": ":9100", - "NodeExporterPath": "./node_exporter", - "OptimizeAccountsDatabaseOnStartup": false, - "OutgoingMessageFilterBucketCount": 3, - "OutgoingMessageFilterBucketSize": 128, - "ParticipationKeysRefreshInterval": 60000000000, - "PeerConnectionsUpdateInterval": 3600, - "PeerPingPeriodSeconds": 0, - "PriorityPeers": {}, - "PublicAddress": "", - "ReconnectTime": 60000000000, - "ReservedFDs": 256, - "RestReadTimeoutSeconds": 15, - "RestWriteTimeoutSeconds": 120, - "RunHosted": false, - "SuggestedFeeBlockHistory": 3, - "SuggestedFeeSlidingWindowSize": 50, - "TLSCertFile": "", - "TLSKeyFile": "", - "TelemetryToLog": true, - "TxPoolExponentialIncreaseFactor": 2, - "TxPoolSize": 15000, - "TxSyncIntervalSeconds": 60, - "TxSyncServeResponseSize": 1000000, - "TxSyncTimeoutSeconds": 30, - "UseXForwardedForAddressField": "", - "VerifiedTranscationsCacheSize": 30000 -} \ No newline at end of file diff --git a/images/algod/run.sh b/images/algod/run.sh deleted file mode 100755 index 86d4f32..0000000 --- a/images/algod/run.sh +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/bash - -# Automatically exit on error -set -e - -# Default values -INDEXER="no" -ARCHIVAL="no" -RELAY="no" - -# can be set via flags or ENV variable -NETWORK=${NETWORK:-'testnet'} -TOKEN=${TOKEN:-''} - -# Parse CLI flags -POSITIONAL=() -while [[ $# -gt 0 ]]; do - key="$1" - case $key in - -n|--network) - NETWORK="$2" - shift # past argument - shift # past value - ;; - -t|--token) - TOKEN="$2" - shift # past argument - shift # past value - ;; - -a|--archival) - ARCHIVAL=yes - shift # past argument - ;; - -i|--indexer) - INDEXER=yes - shift # past argument - ;; - -r|--relay) - RELAY=yes - shift # past argument - ;; - -h|--help) - echo "Start an Algorand node instance" - echo " -n | --network Network id (default testnet)" - echo " -t | --token API access token" - echo " -r | --relay Enable 'relay' mode" - echo " -a | --archival Enable 'archival' mode" - echo " -i | --indexer Enable 'indexer' mode" - exit 0 - ;; - *) # unknown option - POSITIONAL+=("$1") # save it in an array for later - shift # past argument - ;; - esac -done -set -- "${POSITIONAL[@]}" # restore positional parameters - -# Validate network -if [ ! -f /var/lib/algorand/genesis/${NETWORK}/genesis.json ]; then - echo "invalid network provided: ${NETWORK}" - exit 1 -fi - -# Install genesis file if not present -if [ ! -f ${ALGORAND_DATA}/genesis.json ]; then - cp /var/lib/algorand/genesis/${NETWORK}/genesis.json ${ALGORAND_DATA}/genesis.json -fi - -# Install config files if not present -if [ ! -f ${ALGORAND_DATA}/system.json ]; then - cp /var/lib/algorand/system.json ${ALGORAND_DATA}/system.json -fi -if [ ! -f ${ALGORAND_DATA}/config.json ]; then - cp /var/lib/algorand/config.json ${ALGORAND_DATA}/config.json -fi - -# API token -if [ -n ${TOKEN} ]; then - echo ${TOKEN} > ${ALGORAND_DATA}/algod.token - echo ${TOKEN} > ${ALGORAND_DATA}/algod.admin.token -fi - -# Enable archival mode -if [ ${ARCHIVAL} == "yes" ]; then - sed -i 's/"Archival": false/"Archival": true/g' ${ALGORAND_DATA}/config.json -fi - -# Enable indexer mode -if [ ${INDEXER} == "yes" ]; then - sed -i 's/"IsIndexerActive": false/"IsIndexerActive": true/g' ${ALGORAND_DATA}/config.json -fi - -# Enable relay mode -if [ ${RELAY} == "yes" ]; then - sed -i 's/"ForceRelayMessages": false/"ForceRelayMessages": true/g' ${ALGORAND_DATA}/config.json -fi - -# Special betanet DNS settings -# https://developer.algorand.org/docs/run-a-node/operations/switch_networks/#dns-configuration-for-betanet -if [ ${NETWORK} == "betanet" ]; then - sed -i 's/.algorand.network/.algodev.network/g' ${ALGORAND_DATA}/config.json -fi - -# Start node -echo "Connecting to network: ${NETWORK}" -echo "Archival mode: ${ARCHIVAL}" -echo "Indexer mode: ${INDEXER}" - -# Use 'exec' so that the 'algod' application becomes the container’s PID 1. This -# allows the application to receive any Unix signals sent to the container. -exec algod - \ No newline at end of file diff --git a/images/algod/system.json b/images/algod/system.json deleted file mode 100644 index ddb2561..0000000 --- a/images/algod/system.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "shared_server": false, - "systemd_managed": false -} \ No newline at end of file diff --git a/images/algoid-resolver/Dockerfile b/images/algoid-resolver/Dockerfile deleted file mode 100644 index 7fb9047..0000000 --- a/images/algoid-resolver/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM ghcr.io/algorandfoundation/algoid:0.4.0 - -EXPOSE 9091/tcp - -COPY run.sh /var/run/start.sh - -ENTRYPOINT ["/var/run/start.sh"] diff --git a/images/algoid-resolver/run.sh b/images/algoid-resolver/run.sh deleted file mode 100755 index 8d6bbbf..0000000 --- a/images/algoid-resolver/run.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# Automatically exit on error -set -e - -# Use 'exec' so that the 'algoid' application becomes the container’s -# PID 1. This allows the application to receive any Unix signals sent -#to the container. -exec algoid resolver diff --git a/images/ipfs/Dockerfile b/images/ipfs/Dockerfile deleted file mode 100644 index 86898c3..0000000 --- a/images/ipfs/Dockerfile +++ /dev/null @@ -1,50 +0,0 @@ -FROM debian:10 - -ENV DEBIAN_FRONTEND noninteractive - -ARG version=0.12.2 - -# Install node tools -RUN \ - apt update && \ - apt install -y \ - wget \ - libssl-dev \ - ca-certificates \ - fuse \ - unzip && \ - wget https://dist.ipfs.io/go-ipfs/v${version}/go-ipfs_v${version}_linux-amd64.tar.gz && \ - tar -xvzf go-ipfs_v${version}_linux-amd64.tar.gz && \ - ./go-ipfs/install.sh && \ - rm -rf go-ipfs* && \ - mkdir /var/lib/ipfs - -COPY run.sh /var/run/ipfs.sh - -# This is required to facilitate the process of loading the webui locally. -# Get the latest CID from: -# https://github.com/ipfs/go-ipfs/blob/master/core/corehttp/webui.go -# Download the latest published version: -# curl https://ipfs.io/api/v0/get/${CID} | tar -xf - -# Install locally: -# ipfs add -r --cid-version=1 build -COPY webui-v2.15.0.zip /root/webui.zip - -# Node storage -VOLUME /var/lib/ipfs -ENV IPFS_PATH="/var/lib/ipfs" - -# Entry path -WORKDIR /var/lib/ipfs - -# Swarm TCP, UDP and WebSockets (4002/ws) -EXPOSE 4001 4001/udp 4002 - -# Daemon API -EXPOSE 5001 - -# Web Gateway -EXPOSE 8080 - -# Default binary -ENTRYPOINT ["/var/run/ipfs.sh"] diff --git a/images/ipfs/run.sh b/images/ipfs/run.sh deleted file mode 100755 index 2133707..0000000 --- a/images/ipfs/run.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -# Automatically exit on error -set -e - -# Initialize repository -if [ ! -f /var/lib/ipfs/config ]; then - ipfs init --profile server -fi - -# Make sure API and Gateway are accessible outside the container. -ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001 -ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/8080 -ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]' -ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST"]' - - -# Use 'exec' so that the 'ipfs daemon' application becomes the container’s PID 1. -# This allows the application to receive any Unix signals sent to the container. -exec ipfs daemon --enable-gc diff --git a/images/ipfs/webui-v2.13.0.zip b/images/ipfs/webui-v2.13.0.zip deleted file mode 100644 index 9cdd31d..0000000 Binary files a/images/ipfs/webui-v2.13.0.zip and /dev/null differ diff --git a/images/ipfs/webui-v2.15.0.zip b/images/ipfs/webui-v2.15.0.zip deleted file mode 100644 index 25b02a2..0000000 Binary files a/images/ipfs/webui-v2.15.0.zip and /dev/null differ diff --git a/images/sample-compose.yml b/images/sample-compose.yml deleted file mode 100644 index 63592d2..0000000 --- a/images/sample-compose.yml +++ /dev/null @@ -1,50 +0,0 @@ -version: "3.1" -services: - # PostgreSQL database - db: - container_name: db - image: postgres:13-alpine - user: postgres - environment: - POSTGRES_USER: algorand - POSTGRES_PASSWORD: algorand - POSTGRES_DB: indexer_db - healthcheck: - test: ["CMD-SHELL", "pg_isready -d indexer_db -U algorand"] - interval: 5s - timeout: 5s - retries: 5 - # Algo node - algod: - container_name: node - image: ghcr.io/bryk-io/algod:stable - command: - - "-a" - - "-n" - - testnet - - "-t" - - "9e873e44b9c4d35e129393698f3cb880c3f421caf85adf1d5264610194739f03" - healthcheck: - test: ["CMD-SHELL", "curl http://localhost:8080/health"] - interval: 5s - timeout: 5s - retries: 5 - # Indexer - indexer: - container_name: indexer - image: ghcr.io/bryk-io/algod-indexer:2.15.1 - command: - - "daemon" - - "--data-dir" - - "/opt/indexer" - ports: - - "9090:8980" - environment: - INDEXER_ALGOD_ADDRESS: "algod:8080" - INDEXER_ALGOD_TOKEN: 9e873e44b9c4d35e129393698f3cb880c3f421caf85adf1d5264610194739f03 - INDEXER_POSTGRES_CONNECTION_STRING: "host=db port=5432 user=algorand password=algorand dbname=indexer_db sslmode=disable" - depends_on: - algod: - condition: service_healthy - db: - condition: service_healthy