main
by Fancy Whale
Main Helm chart for FancyWhale's charts
About this chart
main
Main Helm chart for FancyWhale's charts
Runtime roles and graceful rollout
Use one release per independently scaled runtime (for example, web and bot) from the same image. Set name to a distinct value for each release, then configure command, args, env, port/containerPorts, probes, deployment.replicas, and deployment.strategy for that role. This produces separate Deployments and Services without coupling bot and web scaling or health checks. Shared Redis/HLS storage can be configured through env and volumes; ensure the backing storage access mode supports all replicas that mount it.
recreate: true retains the existing Recreate strategy and takes precedence. Otherwise, deployment.strategy.maxSurge and maxUnavailable configure RollingUpdate (defaults: 25% each). Configure startupProbe, readinessProbe, and livenessProbe independently using the existing type, path, port, timing, and threshold settings. lifecycle.preStop is passed to Kubernetes unchanged; pair it with terminationGracePeriodSeconds to allow draining/handoff before shutdown. Set podDisruptionBudget.enabled with exactly one of minAvailable or maxUnavailable for voluntary disruption protection. topologySpreadConstraints and the existing affinity value are passed to the Pod spec.
Example:
name: app-web
deployment:
replicas: 3
strategy:
maxSurge: 1
maxUnavailable: 0
port: 8080
containerPorts:
- name: health
containerPort: 8081
protocol: TCP
startupProbe: {enabled: true, type: httpGet, path: /health/startup, port: health, initialDelaySeconds: 0, periodSeconds: 5, timeoutSeconds: 2, failureThreshold: 30, successThreshold: 1}
readinessProbe: {enabled: true, type: httpGet, path: /health/ready, port: health, initialDelaySeconds: 0, periodSeconds: 5, timeoutSeconds: 2, failureThreshold: 3, successThreshold: 1}
livenessProbe: {enabled: true, type: httpGet, path: /health/live, port: health, initialDelaySeconds: 0, periodSeconds: 10, timeoutSeconds: 2, failureThreshold: 3, successThreshold: 1}
lifecycle:
preStop:
httpGet: {path: /drain, port: health}
terminationGracePeriodSeconds: 60
podDisruptionBudget:
enabled: true
minAvailable: 2
Validate/render with the chart's standard Helm workflow, for example: helm lint ./charts/main and helm template app-web ./charts/main -f values.yaml.
Maintainers
| Name | Url | |
|---|---|---|
| Guilherme (Gui) Carraro Martins | [email protected] | https://fncy.ca/ |
Source Code
Values
| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {} | Pod affinity and anti-affinity rules for scheduling Example: affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: labelSelector: matchExpressions: - key: app operator: In values: - myapp topologyKey: kubernetes.io/hostname |
| annotations | object | {} | The annotations to be set on the workload metadata. |
| args | list | [] | This overrides the 'args' portion of the container template |
| autoscaling | object | {"enabled":false,"maxReplicas":10,"minReplicas":1,"targetCPUUtilizationPercentage":80,"targetMemoryUtilizationPercentage":null} | Horizontal Pod Autoscaler configuration |
| autoscaling.enabled | bool | false | Whether to enable horizontal pod autoscaler |
| autoscaling.maxReplicas | int | 10 | Maximum number of replicas |
| autoscaling.minReplicas | int | 1 | Minimum number of replicas |
| autoscaling.targetCPUUtilizationPercentage | int | 80 | Target CPU utilization percentage for scaling |
| autoscaling.targetMemoryUtilizationPercentage | string | nil | Target memory utilization percentage for scaling (optional) |
| clusterissuer | string | "letsencrypt" | Sets the annotation on the ingress controller for cert-manager cluster issuer |
| command | list | [] | This overrides the 'command' portion of the container template |
| containers | list | [] | Here you can define more containers to run on the same pod - it should have similar settings than what the top level has. You can also define container-specific environment variables under each container. These merge with the global env/envFrom values (container-specific are added in addition to globals). Example: containers: - image: repo: example tag: latest env: CONTAINER_ONLY: value envFromSecret: - name: "CONTAINER_SECRET" secretName: super-secret key: password envFromConfigMap: - name: "CONTAINER_CONFIG" configMapName: fancy-konfig key: hostname |
| cronjob | object | {"enabled":true,"restartPolicy":"Never","schedule":"0 0 13 * 5"} | Cronjob specific settings |
| cronjob.enabled | bool | true | Whether the cronjob is deployed or not |
| cronjob.restartPolicy | string | "Never" | The restart policy for the CronJob |
| cronjob.schedule | string | "0 0 13 * 5" | CronTab schedule for the cronjob to run |
| deployment.enabled | bool | true | Whether the deployment is enabled or not. |
| deployment.replicas | int | 1 | Number of replicas for the deployment |
| domain | string | "fancywhale.ca" | The domain sufix for the fqdn to be generated. |
| endpoint | object | {"enabled":false,"ip":null,"port":80,"protocol":"TCP"} | External endpoint settings |
| endpoint.enabled | bool | false | Whether the endpoint is enabled or not |
| endpoint.ip | string | nil | IP address of the endpoint |
| endpoint.port | int | 80 | Port of the endpoint |
| endpoint.protocol | string | "TCP" | Protocol of the endpoint |
| entrypoint | list | [] | This overrides the 'entrypoint' portion of the container template |
| env | object | {} | Set environment variables for your app (global). Usage for string/number/bool values: ENVIRONMENT_VARIABLE: value Usage for field references: NODE_ID: fieldRef: fieldPath: metadata.name POD_IP: fieldRef: fieldPath: status.podIP POD_NAMESPACE: fieldRef: fieldPath: metadata.namespace Usage for resource references: CPU_REQUEST: resourceFieldRef: resource: requests.cpu MEMORY_LIMIT: resourceFieldRef: resource: limits.memory |
| envFromConfigMap | list | [] | Environment Variables from ConfigMaps, can be set like this: - name: "ENV_VAR" #name of the environment variable configMapName: fancy-konfig # Name of the kubernetes configMap key: hostname # key of the configmap to be used. configMapRef: false # Whether to use it as a configMap ref or not (uses all keys as environment variables) ## Example as configMapRef: - configMapRef: true configMapName: fancy-konfig ## Example as key ref - name: "ENV_VAR" configMapName: fancy-konfig key: hostname |
| envFromSecret | list | [] | Environment Variables from Secrets, can be set like this: - name: "ENV_VAR" #name of the environment variable secretName: super-secret # Name of the kubernetes secret key: password # key of the secret to be used. secretRef: false # Whether to use it as a secret ref or not (uses all keys as environment variables) ## Example as secretRef: - secretRef: true secretName: super-secret ## Example as key ref - name: "ENV_VAR" secretName: super-secret key: password |
| httpRoutes.annotations | object | {} | Annoations for the httproutes resources |
| httpRoutes.enabled | bool | false | Whether to deploy HTTP Routes for the Gateway API NOTE: Using both httpRoutes and ingress simultaneously is not recommended as it may cause routing conflicts |
| httpRoutes.gatewayName | string | "" | Name of the gateway to use on the HTTP routes |
| httpRoutes.gatewayNamespace | string | "" | Namespace of the gateway to use on the HTTP routes |
| httpRoutes.httpsSection | string | "https" | Section from the gateway that implements the https section you want to use |
| httpRoutes.redirectHttp | object | {"enabled":true,"httpSection":"http","redirectTo":443} | Configuration of how to redirect from a schema to another (usually http to https) |
| httpRoutes.redirectHttp.enabled | bool | true | Whether or not to enable redirect rule |
| httpRoutes.redirectHttp.httpSection | string | "http" | Section of the gateway that implements the schema to redirect from |
| httpRoutes.redirectHttp.redirectTo | int | 443 | Port to redirect to |
| httpRoutes.rules | list | [{"matches":[{"path":{"type":"PathPrefix","value":"/"}}]}] | Rules object to be used in the routes for the https route: |
| httpRoutes.rules[0].matches[0] | object | {"path":{"type":"PathPrefix","value":"/"}} | This match rule allows all requests from root (/) onwards to be passed along to this application. |
| image.pullPolicy | string | "Always" | Pull Policy for the image pull, can only be: IfNotPresent, Always, or Never |
| image.pullSecrets | list | [] | Pull Secrets to pull the image |
| image.repo | string | "gcarrarom/landing" | Image repository |
| image.tag | string | "0.0.0" | Image Tag |
| ingress.annotations | object | {} | Annotations to be added to the ingress resource. |
| ingress.authAnnotations | object | {} | Auth annotations should be the ones included for authentication only. Those will be ignored on the noauth ingress to be created That will allow for endpoints without authentication. |
| ingress.className | string | "nginx" | Class name only sets the ingressClassName directive. Older Ingress Annotations are not supported. |
| ingress.enabled | bool | true | Whether to deploy an ingress resource or not NOTE: Using both httpRoutes and ingress simultaneously is not recommended as it may cause routing conflicts |
| ingress.noauthPaths | list | [] | Paths where you don't want to use your external authentication This is usually useful to use on status/health pages and some APIs |
| ingress.paths | list | ["/"] | Ingress paths |
| ingress.tls | object | {"existingSecret":false,"reflector":{"enabled":false,"originalSecretName":"fancywhale/star-fancywhale-ca"},"secretName":null} | TLS configuration for the ingress |
| ingress.tls.existingSecret | bool | false | Whether or not to use TLS secret that already exists. Uses the .ingress.tls.secretName for it |
| ingress.tls.reflector | object | {"enabled":false,"originalSecretName":"fancywhale/star-fancywhale-ca"} | Reflector configuration for the TLS secret |
| ingress.tls.reflector.enabled | bool | false | Whether or not to create a TLS secret mirrored from somewhere else |
| ingress.tls.reflector.originalSecretName | string | "fancywhale/star-fancywhale-ca" | Name of the secret to be used for mirroring to ingress.tls.secretName |
| ingress.tls.secretName | string | nil | Name of the secret to be used as the TLS secret for the ingress |
| livenessProbe | object | {"command":[],"enabled":false,"failureThreshold":1,"initialDelaySeconds":3,"path":"/","periodSeconds":10,"port":80,"successThreshold":1,"type":"httpGet"} | Settings to test whether the pod is alive or not |
| livenessProbe.command | list | [] | command for the probe if using type=exec |
| livenessProbe.failureThreshold | int | 1 | After a probe fails failureThreshold times in a row, Kubernetes considers that the overall check has failed |
| livenessProbe.initialDelaySeconds | int | 3 | Delay to start testing the liveness |
| livenessProbe.path | string | "/" | Path to request an http GET request for the liveness check |
| livenessProbe.periodSeconds | int | 10 | How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. |
| livenessProbe.port | int | 80 | port to request an http GET request for the liveness check |
| livenessProbe.successThreshold | int | 1 | Minimum consecutive successes for the probe to be considered successful after having failed |
| livenessProbe.type | string | "httpGet" | Type of probe to run. can be exec or httpGet |
| name | string | nil | Name to be used on the resources created. This overwrites the default behaviour. Please check _helper.tpl file on the templates folder for more information |
| nodeSelector | object | {"enabled":false,"gcp":false,"labels":{}} | This is where you can define your node selector. If you need to use GCP's node selector, you can use: gcp: Where computer class could be: "Scale-Out", "Balanced" or "General-purpose" |
| nodeSelector.enabled | bool | false | Whether to use node-selector or not |
| nodeSelector.gcp | bool | false | GCP specific node selector |
| nodeSelector.labels | object | {} | Deploy to the nodes with these lables only. Example: labels.disk: ssd |
| port | int | 80 | Port the app runs at |
| readinessProbe | object | {"command":[],"enabled":false,"failureThreshold":1,"initialDelaySeconds":3,"path":"/","periodSeconds":10,"port":80,"successThreshold":1,"type":"httpGet"} | Settings to test whether the pod is ready to receive traffic or not |
| readinessProbe.command | list | [] | command for the probe if using type=exec |
| readinessProbe.failureThreshold | int | 1 | After a probe fails failureThreshold times in a row, Kubernetes considers that the overall check has failed |
| readinessProbe.initialDelaySeconds | int | 3 | Delay to start testing the readiness |
| readinessProbe.path | string | "/" | Path to request an http GET request for the readiness check |
| readinessProbe.periodSeconds | int | 10 | How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. |
| readinessProbe.port | int | 80 | port to r |
Deploy main with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has main on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartmain is pinned at v0.16.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply