-
Notifications
You must be signed in to change notification settings - Fork 2
fix: add helm chart #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
1364aaa
fix: add charts
lotharking 9491cfe
ci: update
lotharking 6e63f51
ci: update
lotharking 9b2b56c
fix: update
lotharking 103b30f
refactor: improved Helm chart with conditional sidecar, configMap log…
gabrielmatau79 6f5e4b4
fix: add prettier ignore charts folder
gabrielmatau79 b33955f
fix: Fix continuous integration format
gabrielmatau79 d8d8a99
fix: remove namespace definition into values.yaml
gabrielmatau79 09d8aef
Update .github/workflows/continuous-integration.yml
gabrielmatau79 70eecb5
Update .github/workflows/continuous-integration.yml
gabrielmatau79 336c1f6
fix: Add fix suggested about package version and helper name.
gabrielmatau79 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,4 +4,5 @@ build | |
| .idea | ||
| coverage | ||
| CHANGELOG.md | ||
| routes | ||
| routes | ||
| charts | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| apiVersion: v2 | ||
| name: indy-vdr-proxy-chart | ||
| description: Helm chart for deploying indy-vdr-proxy | ||
| type: application | ||
| version: 0.0.4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,171 @@ | ||
| # indy-vdr-proxy-server-chart | ||
|
|
||
| ## 🛍️ Overview | ||
|
|
||
| This Helm chart deploys the `indy-vdr-proxy` application and its optional companion service `app-check-proxy`. It includes: | ||
|
|
||
| - **StatefulSet**: Main application container with optional app-check-proxy sidecar. | ||
| - **Service**: Exposes HTTP and optionally App Check endpoints. | ||
| - **Ingress**: Routes external traffic based on configuration. | ||
| - **ConfigMap**: Defines runtime configurations such as `app.config.json` and (optionally) `ENDPOINT_URLS`. | ||
|
|
||
| --- | ||
|
|
||
| ## 📁 Chart Structure | ||
|
|
||
| ``` | ||
| indy-vdr-proxy-server-chart/ | ||
| ├── Chart.yaml | ||
| ├── values.yaml | ||
| └── templates/ | ||
| ├── _helpers.tpl | ||
| ├── deployment.yaml | ||
| ``` | ||
|
|
||
| - `Chart.yaml`: Chart metadata. | ||
| - `values.yaml`: Centralized configuration file (all logic controlled from here). | ||
| - `templates/`: All Kubernetes manifests, conditionally rendered using Helm logic. | ||
|
|
||
| --- | ||
|
|
||
| ## 🚀 Installation | ||
|
|
||
| ### 1. Lint the Chart | ||
|
|
||
| ```bash | ||
| helm lint ./deployments/indy-vdr-proxy-server | ||
| ``` | ||
|
|
||
| ### 2. Render Templates (preview output) | ||
|
|
||
| ```bash | ||
| helm template indy-vdr ./deployments/indy-vdr-proxy-server --namespace <your-namespace> | ||
| ``` | ||
|
|
||
| ### 3. Dry-Run Installation | ||
|
|
||
| ```bash | ||
| helm install --dry-run --debug indy-vdr ./deployments/indy-vdr-proxy-server --namespace <your-namespace> | ||
| ``` | ||
|
|
||
| ### 4. Install the Chart | ||
|
|
||
| ```bash | ||
| helm install indy-vdr ./deployments/indy-vdr-proxy-server --namespace <your-namespace> | ||
| ``` | ||
|
|
||
| > If the namespace doesn't exist, create it manually or configure `createNamespace` in your Helm pipeline logic. | ||
| --- | ||
|
|
||
| ## ⚙️ Configuration | ||
|
|
||
| All configuration is centralized in `values.yaml`. | ||
|
|
||
| ### 🌐 Global | ||
|
|
||
| ```yaml | ||
| global: | ||
| domain: dev.2060.io | ||
| ``` | ||
| ### 📦 Application | ||
| ```yaml | ||
| app: | ||
| name: indy-vdr-proxy | ||
| ``` | ||
| ### 🏗️ StatefulSet | ||
| - Fully configurable image, resources, replicas. | ||
| - Includes support for optional `app-check-proxy` sidecar. | ||
|
|
||
| ```yaml | ||
| statefulset: | ||
| replicas: 1 | ||
| containerName: indy-vdr-proxy-container | ||
| image: | ||
| repository: io2060/indy-vdr-proxy | ||
| tag: dev | ||
| pullPolicy: Always | ||
| env: | ||
| INDY_VDR_PROXY_PORT: "3000" | ||
| INDY_VDR_PROXY_CONFIG_PATH: "/config/vdr-proxy/app.config.json" | ||
| ``` | ||
|
|
||
| ### ✅ App Check Proxy (optional sidecar) | ||
|
|
||
| ```yaml | ||
| appCheckProxy: | ||
| enabled: true | ||
| name: app-check-proxy-container | ||
| image: | ||
| repository: io2060/app-check-proxy | ||
gabrielmatau79 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| tag: dev | ||
| pullPolicy: Always | ||
| env: | ||
| APP_PORT: "3100" | ||
| FIREBASE_CFG_FILE: "/config/app-check-proxy/firebase-cfg.json" | ||
| ``` | ||
|
|
||
| If disabled, the following are skipped: | ||
|
|
||
| - Sidecar container | ||
| - App Check port in service and ingress | ||
| - `ENDPOINT_URLS` from ConfigMap | ||
|
|
||
| ### 🧹 ConfigMap | ||
|
|
||
| Includes two key files: | ||
|
|
||
| - `app.config.json` (always rendered) | ||
| - `ENDPOINT_URLS` (only rendered if `appCheckProxy.enabled: true`) | ||
|
|
||
| Uses `tpl` to support inline template logic from `values.yaml`. | ||
|
|
||
| ```yaml | ||
| configMap: | ||
| appConfigJson: | | ||
| { | ||
| "some": "config" | ||
| } | ||
| endpointUrls: | | ||
| { | ||
| "verana:gov": "https://verana.gov/endpoint" | ||
| } | ||
| ``` | ||
|
|
||
| ### 🌐 Ingress | ||
|
|
||
| ```yaml | ||
| ingress: | ||
| enabled: true | ||
| name: indy-vdr-proxy | ||
| className: nginx | ||
| host: "indyvdrproxy.ca.{{ .Values.global.domain }}" | ||
| tlsSecretName: "indyvdrproxy.ca.{{ .Values.global.domain }}-cert" | ||
| annotations: | ||
| cert-manager.io/cluster-issuer: letsencrypt-prod | ||
| ``` | ||
|
|
||
| > The ingress backend port is dynamically selected depending on whether `appCheckProxy` is enabled. | ||
|
|
||
| ### 📡 Service | ||
|
|
||
| Exposes two ports if `appCheckProxy.enabled: true`, otherwise only HTTP. | ||
|
|
||
| ```yaml | ||
| service: | ||
| ports: | ||
| http: 3000 | ||
| appCheck: 3100 | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 🔄 Uninstalling | ||
|
|
||
| ```bash | ||
| helm uninstall indy-vdr --namespace <your-namespace> | ||
| ``` | ||
gabrielmatau79 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| {{- define "indy-vdr-proxy.name" -}} | ||
| {{- .Chart.Name -}} | ||
| {{- end -}} | ||
|
|
||
| {{- define "indy-vdr-proxy.fullname" -}} | ||
| {{- printf "%s" .Chart.Name | trunc 63 | trimSuffix "-" -}} | ||
| {{- end -}} | ||
|
|
||
| {{- define "indy-vdr-proxy.labels" -}} | ||
| helm.sh/chart: {{ include "indy-vdr-proxy.name" . }}-{{ .Chart.Version | replace "+" "_" }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| {{- end -}} | ||
|
|
||
| {{- define "indy-vdr-proxy.selectorLabels" -}} | ||
| app.kubernetes.io/name: {{ include "indy-vdr-proxy.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| {{- end -}} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.