forked from wireapp/reminders-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add Helm configuration #WPB-21554 #30
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 all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| Makefile | ||
| .gradle | ||
| .idea | ||
| build | ||
| .kotlin | ||
| .gitignore | ||
| LICENSE | ||
|
|
||
This file was deleted.
Oops, something went wrong.
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 @@ | ||
| # Database | ||
| DB_USER=remind-app-user | ||
| DB_PASSWORD=super-secret-wire-pwd | ||
| DB_URL=jdbc:postgresql://db:5432/remind-app | ||
| DB_NAME=remind-app | ||
|
|
||
| # Init | ||
| SDK_APP_ID=myAppUuid | ||
| SDK_APP_TOKEN=myApiToken | ||
| API_HOST_URL=https://staging-nginz-https.zinfra.io | ||
| CRYPTO_PASSWORD=myDummyPasswordmyDummyPassword01 | ||
|
|
||
| # SDK | ||
| WIRE_SDK_USER_ID=myUserUuid | ||
| [email protected] | ||
| WIRE_SDK_PASSWORD=mySecretPassword01! | ||
| WIRE_SDK_ENVIRONMENT=staging.zinfra.io |
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
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
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 |
|---|---|---|
| @@ -1,5 +1,10 @@ | ||
| <?xml version="1.0" ?> | ||
| <?xml version='1.0' encoding='UTF-8'?> | ||
| <SmellBaseline> | ||
| <ManuallySuppressedIssues></ManuallySuppressedIssues> | ||
| <CurrentIssues></CurrentIssues> | ||
| <ManuallySuppressedIssues/> | ||
| <CurrentIssues> | ||
| <ID>UseCheckOrError:MlsSdkClient.kt$MlsSdkClient$throw IllegalStateException("API_HOST_URL environment variable is required")</ID> | ||
| <ID>UseCheckOrError:MlsSdkClient.kt$MlsSdkClient$throw IllegalStateException("CRYPTO_PASSWORD environment variable is required")</ID> | ||
| <ID>UseCheckOrError:MlsSdkClient.kt$MlsSdkClient$throw IllegalStateException("SDK_APP_ID environment variable is required")</ID> | ||
| <ID>UseCheckOrError:MlsSdkClient.kt$MlsSdkClient$throw IllegalStateException("SDK_APP_TOKEN environment variable is required")</ID> | ||
| </CurrentIssues> | ||
| </SmellBaseline> |
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 |
|---|---|---|
| @@ -1,26 +1,30 @@ | ||
| version: '3' | ||
|
|
||
| services: | ||
| reminders_bot: | ||
| image: wirebots/reminders:latest | ||
| reminders_app: | ||
| platform: linux/amd64 # Allows using core-crypto on macOs | ||
| build: | ||
| context: ./ | ||
| dockerfile: Dockerfile | ||
| environment: | ||
| QUARKUS_DATASOURCE_URL: jdbc:postgresql://db/quarkus | ||
| QUARKUS_DATASOURCE_URL: jdbc:postgresql://db/${DB_NAME} | ||
| env_file: .env | ||
| volumes: | ||
| - reminders_app-storage:/deployments/storage | ||
| depends_on: | ||
| - db | ||
|
|
||
| db: | ||
| image: postgres:13 | ||
| environment: | ||
| - POSTGRES_USER=quarkus | ||
| - POSTGRES_PASSWORD=quarkus | ||
| - POSTGRES_DB=quarkus | ||
| - POSTGRES_USER=${DB_USER} | ||
| - POSTGRES_PASSWORD=${DB_PASSWORD} | ||
| - POSTGRES_DB=${DB_NAME} | ||
| ports: | ||
| - 5432:5432 | ||
| volumes: | ||
| - reminders_bot-db:/var/lib/postgresql/data/ | ||
| - reminders_app-db:/var/lib/postgresql/data/ | ||
|
|
||
| volumes: | ||
| reminders_bot-db: | ||
| reminders_app-storage: | ||
| reminders_app-db: |
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,9 @@ | ||
| apiVersion: v2 | ||
| name: remindapp | ||
| description: Wire Remind-App - A Helm chart for deploying the Wire Remind app | ||
| type: application | ||
| version: 0.1.0 | ||
| appVersion: "0.1.0" | ||
| home: https://github.com/wireapp/remind-app | ||
| maintainers: | ||
| - name: Wire Integrations Team |
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,85 @@ | ||
| Wire remind-app has been deployed successfully! | ||
|
|
||
| The Wire Remind App is now running and will respond to these commands in Wire: | ||
| - /remind to "what" "when" - Create a new reminder (one-time or recurring) | ||
| - /remind help - Show help information with command examples | ||
| - /remind list - List all active reminders in the conversation | ||
| - /remind delete <reminderId> - Delete a specific reminder by ID | ||
|
|
||
| AVAILABLE ENDPOINTS: | ||
| - GET /q/health/started - Server running | ||
|
|
||
| DEPLOYMENT INFORMATION: | ||
| {{- if .Values.persistence.enabled }} | ||
| - Persistent storage: {{ .Values.persistence.size }} ({{ .Values.persistence.storageClass | default "default" }} storage class) | ||
| {{- end }} | ||
| - Health checks: Startup, liveness, and readiness probes configured | ||
| - Resource limits: {{ .Values.resources.limits.cpu }} CPU, {{ .Values.resources.limits.memory }} memory | ||
| - Service: {{ .Values.service.type }} on port {{ .Values.service.port }} -> {{ .Values.service.targetPort }} | ||
|
|
||
| MONITORING & DEBUGGING: | ||
|
|
||
| 1. Check application status: | ||
| kubectl get pods -n {{ .Release.Namespace }} -l app.kubernetes.io/name={{ include "remindapp.name" . }} | ||
|
|
||
| 2. View application logs: | ||
| kubectl logs -f deployment/{{ include "remindapp.fullname" . }} -n {{ .Release.Namespace }} | ||
|
|
||
| 3. Access health endpoint: | ||
| {{- if contains "ClusterIP" .Values.service.type }} | ||
| kubectl port-forward -n {{ .Release.Namespace }} svc/{{ include "remindapp.fullname" . }} 8080:{{ .Values.service.port }} | ||
| # Then visit: http://localhost:8080/q/health/started | ||
| {{- else if contains "NodePort" .Values.service.type }} | ||
| export NODE_PORT=$(kubectl get -n {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "remindapp.fullname" . }}) | ||
| export NODE_IP=$(kubectl get nodes -n {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") | ||
| # Visit: http://$NODE_IP:$NODE_PORT/q/health/started | ||
| {{- else if contains "LoadBalancer" .Values.service.type }} | ||
| export SERVICE_IP=$(kubectl get svc -n {{ .Release.Namespace }} {{ include "remindapp.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") | ||
| # Visit: http://$SERVICE_IP:{{ .Values.service.port }}/q/health/started | ||
| {{- end }} | ||
|
|
||
| 4. Check configuration: | ||
| kubectl describe configmap/{{ include "remindapp.fullname" . }} -n {{ .Release.Namespace }} | ||
| {{- if .Values.secrets.secretName }} | ||
| kubectl describe secret/{{ .Values.secrets.secretName }} -n {{ .Release.Namespace }} | ||
| {{- end }} | ||
|
|
||
| CONFIGURATION: | ||
| {{- range .Values.env }} | ||
| {{- if eq .name "WIRE_SDK_USER_ID" }} | ||
| - Wire SDK User Id: {{ .value | default "Not configured" }} | ||
| {{- end }} | ||
| {{- if eq .name "WIRE_SDK_EMAIL" }} | ||
| - Wire SDK User Email: {{ .value | default "Not configured" }} | ||
| {{- end }} | ||
| {{- if eq .name "WIRE_SDK_ENVIRONMENT" }} | ||
| - Wire SDK Environment: {{ .value | default "Not configured" }} | ||
| {{- end }} | ||
| {{- if eq .name "DB_USER" }} | ||
| - Database user: {{ .value | default "Not configured" }} | ||
| {{- end }} | ||
| {{- if eq .name "DB_URL" }} | ||
| - Database Url: {{ .value | default "Not configured" }} | ||
| {{- end }} | ||
| {{- if eq .name "SDK_APP_ID" }} | ||
| - Wire SDK App Id: {{ .value | default "Not configured" }} | ||
| {{- end }} | ||
| {{- if eq .name "API_HOST_URL" }} | ||
| - Wire API Host Url: {{ .value | default "Not configured" }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- if .Values.secrets.secretName }} | ||
| - Secrets mounted at: {{ .Values.secrets.mountPath }} | ||
| {{- end }} | ||
|
|
||
| The app is ready to create and manage reminders in Wire conversations! | ||
|
|
||
| USAGE TIPS: | ||
| - Maximum 5 active reminders per conversation | ||
| - One-time reminder examples: | ||
| /remind to "Submit report" "tomorrow at 17:30" | ||
| /remind to "Reply to email" "in 10 minutes" | ||
| - Recurring reminder examples: | ||
| /remind to "Daily standup" "every day at 10:00" | ||
| /remind to "Weekly review" "every Monday at 17:00" | ||
| /remind to "Team meeting" "every Mon, Wed, Fri at 14:00" |
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,62 @@ | ||
| {{/* | ||
| Expand the name of the chart. | ||
| */}} | ||
| {{- define "remindapp.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 "remindapp.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 "remindapp.chart" -}} | ||
| {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Common labels | ||
| */}} | ||
| {{- define "remindapp.labels" -}} | ||
| helm.sh/chart: {{ include "remindapp.chart" . }} | ||
| {{ include "remindapp.selectorLabels" . }} | ||
| {{- if .Chart.AppVersion }} | ||
| app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
| {{- end }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Selector labels | ||
| */}} | ||
| {{- define "remindapp.selectorLabels" -}} | ||
| app.kubernetes.io/name: {{ include "remindapp.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create the name of the service account to use | ||
| */}} | ||
| {{- define "remindapp.serviceAccountName" -}} | ||
| {{- if .Values.serviceAccount.create }} | ||
| {{- default (include "remindapp.fullname" .) .Values.serviceAccount.name }} | ||
| {{- else }} | ||
| {{- default "default" .Values.serviceAccount.name }} | ||
| {{- end }} | ||
| {{- end }} |
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,6 @@ | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: {{ include "remindapp.fullname" . }}-config | ||
| labels: | ||
| {{- include "remindapp.labels" . | nindent 4 }} |
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.