Skip to content

Commit

Permalink
Merge pull request #4 from dpgonaws/main
Browse files Browse the repository at this point in the history
SunbirdRC2.0 helm charts
  • Loading branch information
srprasanna authored Jul 24, 2024
2 parents f2488bd + fcc2d5d commit 5d9001c
Show file tree
Hide file tree
Showing 349 changed files with 13,636 additions and 2 deletions.
23 changes: 23 additions & 0 deletions helm/sunbird-c-charts/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
24 changes: 24 additions & 0 deletions helm/sunbird-c-charts/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: sunbird-c-charts
description: A Helm chart for Sunbird RC

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.0.13"
23 changes: 23 additions & 0 deletions helm/sunbird-c-charts/charts/config/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
24 changes: 24 additions & 0 deletions helm/sunbird-c-charts/charts/config/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: config
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v0.0.14"
104 changes: 104 additions & 0 deletions helm/sunbird-c-charts/charts/config/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-config
namespace: {{ .Release.Namespace }}
data:
DB_ADDR: {{.Values.global.database.host | quote}}
DB_DATABASE: {{.Values.global.keycloak.database | quote}}
DB_PORT: {{.Values.global.database.port | quote}}
DB_USER: {{.Values.global.database.user | quote}}
DB_VENDOR: {{.Values.global.database.vendor | quote}}
KEYCLOAK_USER: {{.Values.global.keycloak.admin.username | quote}}
PROXY_ADDRESS_FORWARDING: {{.Values.global.keycloak.proxy_forwarding | quote}}
connectionInfo_uri: jdbc:postgresql://{{.Values.global.database.host}}:{{.Values.global.database.port}}/{{.Values.global.registry.database}}
connectionInfo_username: {{.Values.global.database.user | quote}}
elastic_search_connection_url: {{.Values.global.elastic_search.url | quote}}
elastic_search_auth_enabled: {{.Values.global.elastic_search.auth_enabled | quote}}
elastic_search_username: {{.Values.global.elastic_search.username | quote}}
search_providerName: {{.Values.global.registry.search_provider | quote}}
sunbird_sso_realm: {{.Values.global.registry.sso.realm | quote}}
sunbird_sso_url: http://{{ .Release.Name }}-keycloak-service:8080/auth
sunbird_sso_admin_client_id: {{.Values.global.registry.sso.admin_client_id | quote}}
sunbird_sso_client_id: {{.Values.global.registry.sso.client_id | quote}}
idgen_health_check_url: http://{{ .Release.Name }}-id-gen-service:8088/health
idgen_generate_url: http://{{ .Release.Name }}-id-gen-service:8088/id/_generate
idgen_id_format_url: http://{{ .Release.Name }}-id-gen-service:8088/id/_format/add
encryption_health_check_url: http://{{ .Release.Name }}-encryption-service:8013/health
encryption_uri: http://{{ .Release.Name }}-encryption-service:8013/crypto/v1/_encrypt
encryption_batch_uri: http://{{ .Release.Name }}-encryption-service:8013/crypto/v1/_encrypt
claims_url: http://{{ .Release.Name }}-claim-ms:8082
sign_url: http://{{ .Release.Name }}-certificate-signer:8079/sign
verify_url: http://{{ .Release.Name }}-certificate-signer:8079/verify
sign_health_check_url: http://{{ .Release.Name }}-certificate-signer:8079/health
signature_enabled: {{.Values.global.registry.signature_enabled | quote}}
pdf_url: http://{{ .Release.Name }}-certificate-api:8078/api/v1/certificatePDF
certificate_health_check_url: http://{{ .Release.Name }}-certificate-api:8078/health
template_base_url: http://{{ .Release.Name }}-registry:8081/api/v1/templates/ #Looks for certificate templates for pdf copy of the signed certificate
sunbird_keycloak_user_set_password: {{.Values.global.registry.keycloak_user_set_password | quote}}
filestorage_connection_url: {{.Values.global.minio.url | quote}}
filestorage_access_key: {{.Values.global.minio.access_key | quote}}
filestorage_bucket_key: {{.Values.global.minio.bucket_key | quote}}
registry_base_apis_enable: {{.Values.global.registry.base_apis_enabled | quote}}
logging.level.root: {{.Values.global.registry.log_level | quote}}
enable_external_templates: {{.Values.global.registry.enable_external_templates | quote}}
async_enabled: {{.Values.global.registry.enable_async | quote}}
authentication_enabled: {{.Values.global.registry.enable_authentication | quote}}
kafka_bootstrap_address: {{.Values.global.kafka.url | quote}}
webhook_enabled: {{.Values.global.registry.enable_webhook | quote}}
webhook_url: {{.Values.global.registry.webhook_url | quote}}
redis_host: {{.Values.global.redis.host | quote}}
redis_port: {{.Values.global.redis.port | quote}}
manager_type: {{.Values.global.registry.manager_type | quote}}
sunbirdrc_url: http://{{ .Release.Name }}-registry:8081
opa_allow_key_name: {{.Values.global.registry.opa_allow_key_name | quote}}
opa_enabled: {{.Values.global.registry.opa_enabled | quote}}
swagger_enabled: {{.Values.global.registry.swagger_enabled| quote}}
swagger_title: {{.Values.global.registry.swagger_title| quote}}
claims_enabled: {{.Values.global.registry.claims_enabled | quote}}
certificate_enabled: {{.Values.global.registry.certificate_enabled | quote}}
encryption_enabled: {{.Values.global.registry.encryption_enabled | quote}}
idgen_enabled: {{.Values.global.registry.idgen_enabled | quote}}
spring.datasource.url: jdbc:postgresql://{{.Values.global.database.host}}:{{.Values.global.database.port}}/{{.Values.global.registry.database}}
spring.flyway.url: jdbc:postgresql://{{.Values.global.database.host}}:{{.Values.global.database.port}}/{{.Values.global.registry.database}}
spring.flyway.baseline-on-migrate: {{.Values.global.registry.migrationEnabled | quote}}
autocreate.new.seq: {{.Values.global.registry.autoCreateNewSeq | quote}}
idformat.from.mdms: {{.Values.global.registry.idformatFromMdms | quote}}
#egov.mdms.provider: {{.Values.global.registry.mdmsProvider | quote}}
#encryption_port: {{.Values.global.registry.encryption_port }}
server.servlet.context-path: {{.Values.global.registry.context_path | quote}}
management.endpoints.web.base-path: {{.Values.global.registry.context_path | quote}}
spring.datasource.username: {{.Values.global.database.user | quote}}
IDENTITY_BASE_URL: http://{{ .Release.Name }}-identity-service:3332
SCHEMA_BASE_URL: http://{{ .Release.Name }}-credential-schema-service:3333
CREDENTIAL_SERVICE_BASE_URL: http://{{ .Release.Name }}-credentials-service:3000
OAUTH2_RESOURCES_0_URI: http://{{ .Release.Name }}-keycloak-service:8080/auth/realms/sunbird-rc
JWKS_URI: {{.Values.global.sunbird.jwks_uri | quote}}
ENABLE_AUTH: {{.Values.global.sunbird.enable_auth | quote}}
VAULT_ADDR: {{.Values.global.vault.address | quote}}
VAULT_BASE_URL: {{.Values.global.vault.base_url | quote}}
VAULT_ROOT_PATH: {{.Values.global.vault.root_path | quote}}
VAULT_TIMEOUT: {{.Values.global.vault.vault_timeout | quote}}
VAULT_PROXY: {{.Values.global.vault.vault_proxy | quote}}
#VAULT_TOKEN: {{ .Values.global.vault.vault_token | quote}}
SIGNING_ALGORITHM: {{.Values.global.sunbird.signing_algo | quote}}
did_enabled: {{.Values.global.registry.did_enabled | quote}}
did_health_check_url: http://{{ .Release.Name }}-identity-service:3332/health
did_generate_url: http://{{ .Release.Name }}-identity-service:3332/did/generate
did_resolve_url: http://{{ .Release.Name }}-identity-service:3332/did/resolve/{id}
signature_provider: {{.Values.global.registry.signature_provider | quote}}
signature_v2_credential_did_method: {{.Values.global.registry.credential_did_method | quote}}
signature_v2_issuer_did_method: {{.Values.global.registry.issuer_did_method | quote}}
signature_v2_schema_author: {{.Values.global.registry.schema_author | quote}}
signature_v2_schema_author_did_method: {{.Values.global.registry.schema_author_did_method | quote}}
signature_v2_health_check_url: http://{{ .Release.Name }}-credentials-service:3000/health
signature_v2_issue_url: http://{{ .Release.Name }}-credentials-service:3000/credentials/issue
signature_v2_get_url: http://{{ .Release.Name }}-credentials-service:3000/credentials/{id}
signature_v2_delete_url: http://{{ .Release.Name }}-credentials-service:3000/credentials/{id}
signature_v2_verify_url: http://{{ .Release.Name }}-credentials-service:3000/credentials/{id}/verify
signature_v2_revocation_list_url: http://{{ .Release.Name }}-credentials-service:3000/credentials/revocation-list?issuerId={issuerDid}&page={page}&limit={limit}
signature_v2_schema_health_check_url: http://{{ .Release.Name }}-credential-schema-service:3333/health
signature_v2_schema_create_url: http://{{ .Release.Name }}-credential-schema-service:3333/credential-schema
signature_v2_schema_update_url: http://{{ .Release.Name }}-credential-schema-service:3333/credential-schema/{id}/{version}
signature_v2_schema_get_by_id_and_version_url: http://{{ .Release.Name }}-credential-schema-service:3333/credential-schema/{id}/{version}
signature_v2_schema_search_by_tags_url: http://{{ .Release.Name }}-credential-schema-service:3333/credential-schema?tags={tags}
1 change: 1 addition & 0 deletions helm/sunbird-c-charts/charts/config/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

23 changes: 23 additions & 0 deletions helm/sunbird-c-charts/charts/credential-schema-service/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
24 changes: 24 additions & 0 deletions helm/sunbird-c-charts/charts/credential-schema-service/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: credential-schema-service
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v0.0.14"
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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 "credential-schema-service.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 "credential-schema-service.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "credential-schema-service.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 "credential-schema-service.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 }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "credential-schema-service.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 "credential-schema-service.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 "credential-schema-service.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "credential-schema-service.labels" -}}
helm.sh/chart: {{ include "credential-schema-service.chart" . }}
{{ include "credential-schema-service.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "credential-schema-service.selectorLabels" -}}
app.kubernetes.io/name: {{ include "credential-schema-service.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "credential-schema-service.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "credential-schema-service.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
Loading

0 comments on commit 5d9001c

Please sign in to comment.