Skip to content
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

Helm #59

Open
wants to merge 66 commits into
base: main
Choose a base branch
from
Open

Helm #59

Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
8d375c3
Auto updated submodule references
actions-user Dec 22, 2021
bce4611
calendso README + Chart
yousrabahrouni Dec 22, 2021
75b35f7
Auto updated submodule references
actions-user Dec 23, 2021
74bb29c
Auto updated submodule references
actions-user Dec 28, 2021
3cfffb7
Auto updated submodule references
actions-user Dec 29, 2021
04b9f2d
Auto updated submodule references
actions-user Dec 30, 2021
77f974c
Auto updated submodule references
actions-user Dec 31, 2021
563e74e
Merge branch 'main' of https://github.com/calendso/docker
finaldzn Jan 3, 2022
61b3315
Merge branch 'calendso:main' into main
finaldzn Jan 3, 2022
ecd94a6
Merge branch 'main' into helm
finaldzn Jan 3, 2022
97599d4
move readme of calendso chart into calendso folder
finaldzn Jan 3, 2022
a98a7a7
Auto updated submodule references
actions-user Jan 4, 2022
83f9b21
Auto updated submodule references
actions-user Jan 5, 2022
e28deef
Auto updated submodule references
actions-user Jan 7, 2022
1cbb704
Auto updated submodule references
actions-user Jan 8, 2022
13b9d2d
Auto updated submodule references
actions-user Jan 9, 2022
cd2e862
Auto updated submodule references
actions-user Jan 11, 2022
b28bc0a
Auto updated submodule references
actions-user Jan 12, 2022
36d8396
Auto updated submodule references
actions-user Jan 13, 2022
365c85d
Auto updated submodule references
actions-user Jan 14, 2022
f568432
Auto updated submodule references
actions-user Jan 15, 2022
fde500a
Auto updated submodule references
actions-user Jan 16, 2022
a11dc99
Auto updated submodule references
actions-user Jan 18, 2022
21eb5d7
Auto updated submodule references
actions-user Jan 19, 2022
6c3a0e0
Auto updated submodule references
actions-user Jan 20, 2022
adcab16
Auto updated submodule references
actions-user Jan 21, 2022
832f2f7
Auto updated submodule references
actions-user Jan 22, 2022
78aeda2
Merge branch 'helm' of https://github.com/medconnectmd/docker into helm
finaldzn Jan 24, 2022
3c83161
updated readme and deployment.yaml
finaldzn Jan 24, 2022
8b529dd
Merge branch 'main' of https://github.com/calendso/docker into helm
finaldzn Jan 24, 2022
f2a44b7
Merge branch 'calendso:main' into main
finaldzn Jan 24, 2022
7486e65
fix typo
finaldzn Jan 24, 2022
b83f68e
changed typoe
finaldzn Jan 24, 2022
8cba1c2
Auto updated submodule references
actions-user Jan 25, 2022
934c348
Auto updated submodule references
actions-user Jan 26, 2022
6ab9938
Auto updated submodule references
actions-user Jan 27, 2022
69d344f
Auto updated submodule references
actions-user Jan 28, 2022
0c36da2
Auto updated submodule references
actions-user Jan 29, 2022
b5b0370
Auto updated submodule references
actions-user Jan 30, 2022
3881299
Auto updated submodule references
actions-user Feb 1, 2022
84150e3
Auto updated submodule references
actions-user Feb 2, 2022
87892c4
Auto updated submodule references
actions-user Feb 3, 2022
8cb78a7
Auto updated submodule references
actions-user Feb 4, 2022
153d98e
Auto updated submodule references
actions-user Feb 5, 2022
bf38ce5
Auto updated submodule references
actions-user Feb 7, 2022
6d53b5c
Auto updated submodule references
actions-user Feb 8, 2022
6bedaa0
Auto updated submodule references
actions-user Feb 9, 2022
dbc1976
Auto updated submodule references
actions-user Feb 10, 2022
fe5c611
Auto updated submodule references
actions-user Feb 11, 2022
9c4c63a
Auto updated submodule references
actions-user Feb 12, 2022
75cf79f
Auto updated submodule references
actions-user Feb 14, 2022
7f3e33a
Auto updated submodule references
actions-user Feb 15, 2022
c3c6dbe
Merge branch 'main' of https://github.com/calcom/docker into calcom-main
finaldzn Feb 15, 2022
ab7ebdf
Merge branch 'calcom-main' into helm
finaldzn Feb 15, 2022
29dcd32
Auto updated submodule references
actions-user Feb 16, 2022
ec94bba
Auto updated submodule references
actions-user Feb 17, 2022
8c55c2f
Auto updated submodule references
actions-user Feb 18, 2022
9253d68
Auto updated submodule references
actions-user Feb 19, 2022
211f55c
Auto updated submodule references
actions-user Feb 20, 2022
a486afa
Auto updated submodule references
actions-user Feb 21, 2022
4f71a04
Auto updated submodule references
actions-user Feb 22, 2022
8001eeb
Auto updated submodule references
actions-user Feb 23, 2022
2a187e6
update calendso
Jul 25, 2022
da76ac2
Merge remote-tracking branch 'origin/main' into helm
Jul 25, 2022
51edd02
Merge remote-tracking branch 'upstream/main'
Jul 25, 2022
7dbe617
Merge remote-tracking branch 'origin/main' into helm
Jul 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,10 @@
<a href="https://github.com/calendso/calendso-docker/issues">Community Support</a>
</div>

# Docker

This image can be found on DockerHub at [https://hub.docker.com/repository/docker/calendso/calendso](https://hub.docker.com/repository/docker/calendso/calendso)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove this?

# calendso-docker

The Docker configuration for Calendso is an effort powered by people within the community. Calendso does not provide official support for Docker, but we will accept fixes and documentation. Use at your own risk.

## Important Notes

This Docker Image is managed by the Calendso Community. Support for this image can be found via the repository, located at [https://github.com/calendso/docker](https://github.com/calendso/docker)

Currently, this image is intended for local development/evaluation use only, as there are specific requirements for providing environmental variables at build-time in order to specify a non-localhost BASE_URL. (this is due to the nature of the static site compilation, which embeds the variable values). The ability to update these variables at runtime is in-progress and will be available in the future.

For Production, for the time being, please checkout the repository and build/push your own image privately.

## Requirements

Make sure you have `docker` & `docker-compose` installed on the server / system.
Expand Down Expand Up @@ -82,6 +72,13 @@ If you cloned the repository without using `--recursive`, then you can initializ

For more advanced usage, please refer to the git documentation: [https://git-scm.com/book/en/v2/Git-Tools-Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules)

## Helm and K8S

Please read the [helm chart readme](chart\calendso-chart\README.md) for more informations
finaldzn marked this conversation as resolved.
Show resolved Hide resolved


## Troubleshooting

* SSL edge termination: If running behind a load balancer which handles SSL certificates, you will need to add the environmental variable `NODE_TLS_REJECT_UNAUTHORIZED=0` to prevent requests from being rejected. Only do this if you know what you are doing and trust the services/load-balancers directing traffic to your service.


23 changes: 23 additions & 0 deletions chart/calendso-chart/.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/
6 changes: 6 additions & 0 deletions chart/calendso-chart/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 10.9.5
digest: sha256:a555b5ad8fb0f50610f8f2c1dc89debb1d542f23b920b096fcd4ee56597cb011
generated: "2021-11-15T16:31:07.4187218+01:00"
6 changes: 6 additions & 0 deletions chart/calendso-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v2
name: calendso
description: A Helm chart for Calendso
type: application
version: 0.1.0
appVersion: "latest"
132 changes: 132 additions & 0 deletions chart/calendso-chart/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
## Install calendso on kubernetes

1. Create a locally calendso image with tag

```bash
cd calendso-docker
docker build -t calendso:2.1 .
```

2. Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE

```bash
docker tag calendso:2.1 PathRepository/calendso:2.1
```

3. Pull calendso image from the repository

```bash
docker push PathRepository/calendso:2.1
```
=> Note: May you need to login before this step !

4. Configuration

The following table lists the configurable parameters of calendso-chart and their default values.

| Parameter | Description | Default |
| --------- | ----------- | ------- |
| `JWT_SECRET` | Reference to the secret to be used when pulling images | `[]` |
| `image.repository` | Image repository | `quay.io/jetstack/cert-manager-controller` |
| `image.tag` | Image tag | `v0.6.2` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `replicaCount` | Number of cert-manager replicas | `1` |
| `DATABASE_URL` | Reference to the url of the database | `[]` |
| `BASE_URL` | Reference to the url of calendso application after its installation | `[]` |
| `GOOGLE_API_CREDENTIALS` | Reference to Google API credentials. You can get this from https://console.cloud.google.com/apis/dashboard | `[]` |
| `MS_GRAPH_CLIENT_ID` | Reference to the application (client) ID from https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps | `[]` |
| `MS_GRAPH_CLIENT_SECRET` | Reference to the application (SecretClient) ID from https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps | `[]` |
| `ZOOM_CLIENT_ID` | Used for ZOOM integration, you can get this from https://marketplace.zoom.us/ | `[]` |
| `ZOOM_CLIENT_SECRET` | Used for ZOOM integration, you can get this from https://marketplace.zoom.us/ | `[]` |
| `NEXT_PUBLIC_TELEMETRY_KEY` | used to allow calendso to collect anonymous usage | `[]` |
| `DAILY_API_KEY` | Used for the Daily integration | `[]` |
| `EMAIL_FROM` | Configures the global From: header whilst sending emails. | `[]` |
| `CRON_API_KEY` | Reference to ApiKey for cronjobs | `[]` |
| `clusterResourceNamespace` | Override the namespace used to store DNS provider credentials etc. for ClusterIssuer resources | Same namespace as cert-manager pod
| `leaderElection.Namespace` | Override the namespace used to store the ConfigMap for leader election | Same namespace as cert-manager pod
| `extraArgs` | Optional flags for cert-manager | `[]` |
| `extraEnv` | Optional environment variables for cert-manager | `[]` |
| `rbac.create` | If `true`, create and use RBAC resources | `true` |
| `serviceAccount.create` | If `true`, create a new service account | `true` |
| `serviceAccount.name` | Service account to be used. If not set and `serviceAccount.create` is `true`, a name is generated using the fullname template | |
| `resources` | CPU/memory resource requests/limits | |
| `securityContext.enabled` | Enable security context | `false` |
| `securityContext.fsGroup` | Group ID for the container | `1001` |
| `securityContext.runAsUser` | User ID for the container | `1001` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `affinity` | Node affinity for pod assignment | `{}` |
| `tolerations` | Node tolerations for pod assignment | `[]` |
| `ingressShim.defaultIssuerName` | Optional default issuer to use for ingress resources | |
| `ingressShim.defaultIssuerKind` | Optional default issuer kind to use for ingress resources | |
| `ingressShim.defaultACMEChallengeType` | Optional default challenge type to use for ingresses using ACME issuers | |
| `ingressShim.defaultACMEDNS01ChallengeProvider` | Optional default DNS01 challenge provider to use for ingresses using ACME issuers with DNS01 | |
| `podAnnotations` | Annotations to add to the cert-manager pod | `{}` |
| `podDnsPolicy` | Optional cert-manager pod [DNS policy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pods-dns-policy) | |
| `podDnsConfig` | Optional cert-manager pod [DNS configurations](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pods-dns-config) | |
| `podLabels` | Labels to add to the cert-manager pod | `{}` |
| `priorityClassName`| Priority class name for cert-manager and webhook pods | `""` |
| `http_proxy` | Value of the `HTTP_PROXY` environment variable in the cert-manager pod | |
| `https_proxy` | Value of the `HTTPS_PROXY` environment variable in the cert-manager pod | |
| `no_proxy` | Value of the `NO_PROXY` environment variable in the cert-manager pod | |
| `webhook.enabled` | Toggles whether the validating webhook component should be installed | `true` |
| `webhook.replicaCount` | Number of cert-manager webhook replicas | `1` |
| `webhook.podAnnotations` | Annotations to add to the webhook pods | `{}` |
| `webhook.extraArgs` | Optional flags for cert-manager webhook component | `[]` |
| `webhook.resources` | CPU/memory resource requests/limits for the webhook pods | |
| `webhook.image.repository` | Webhook image repository | `quay.io/jetstack/cert-manager-webhook` |
| `webhook.image.tag` | Webhook image tag | `v0.6.2` |
| `webhook.image.pullPolicy` | Webhook image pull policy | `IfNotPresent` |
| `webhook.caSyncImage.repository` | CA sync image repository | `quay.io/munnerz/apiextensions-ca-helper` |
| `webhook.caSyncImage.tag` | CA sync image tag | `v0.1.0` |
| `webhook.caSyncImage.pullPolicy` | CA sync image pull policy | `IfNotPresent` |

All these Values built-in object provides access to the values passed into calendso-chart through the Values.yaml file.
Specify each parameter using the --set key=value[,key=value] argument to helm install or modify them in values.yaml as below.

* Put the repository of calendso image in values.yaml
```
image:
repository: #your calendso docker image repo
pullPolicy: IfNotPresent
tag: ""
```

for example here we used calendso:2.1 so the image will be like this

=> image:
repository: PathRepository/calendso
pullPolicy: IfNotPresent
tag: "2.1"

* Upgrading calendso helm chart

To install the chart from the Helm repository with the release name yourReleaseName
```bash
helm upgrade --install -n yourNamespace yourReleaseName path/Calendso-Chart
```
5. Access prisma studio

* Show pod's name
```bash
kubectl get pods -n yourNamespace
```
In two separate console:

* Start prisma studio
```bash
kubectl exec -n yourNamespace podsName -- npx prisma studio
```

* Forward port:5555
```bash
kubectl port-forward -n yourNamespace podsName 5555:5555
```
6. You can now access prisma studio from your computer

* Open a browser to http://127.0.0.1:5555 to look at or modify the database content.

* Click on the User model to add a new user record.

* Fill out the fields (remembering to encrypt your password with https://bcrypt-generator.com/) and click Save 1 Record to create your first user.

* Open a browser to a link in the variable Base_Url indicated in .env.example and login with your just created, first user.
40 changes: 40 additions & 0 deletions chart/calendso-chart/calendso-cert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: calendso-cert
spec:
# Secret names are always required.
secretName: calendso-cert
duration: 2160h # 90d
renewBefore: 360h # 15d
subject:
organizations:
-
# The use of the common name field has been deprecated since 2000 and is
# discouraged from being used.
commonName: cal.yourhost.com
isCA: false
privateKey:
algorithm: RSA
encoding: PKCS1
size: 2048
usages:
- server auth
- client auth
# At least one of a DNS Name, URI, or IP address is required.
dnsNames:
- cal.yourhost.com
# - www.example.com
# uris:
# - spiffe://cluster.local/ns/sandbox/sa/example
# ipAddresses:
# - 15.236.213.243
# Issuer references are always required.
issuerRef:
name: letsencrypt
# We can reference ClusterIssuers by changing the kind here.
# The default value is Issuer (i.e. a locally namespaced Issuer)
kind: ClusterIssuer
# This is optional since cert-manager will default to this value however
# if you are using an external issuer, change this to that issuer group.
group: cert-manager.io
22 changes: 22 additions & 0 deletions chart/calendso-chart/templates/NOTES.txt
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 "calendso-chart.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 "calendso-chart.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "calendso-chart.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 "calendso-chart.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 }}
62 changes: 62 additions & 0 deletions chart/calendso-chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "calendso-chart.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 "calendso-chart.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 "calendso-chart.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

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

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

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