main

by Fancy Whale

Helm chartv0.16.1App 1.16.0

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

NameEmailUrl
Guilherme (Gui) Carraro Martins[email protected]https://fncy.ca/

Source Code

Values

KeyTypeDefaultDescription
affinityobject{}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
annotationsobject{}The annotations to be set on the workload metadata.
argslist[]This overrides the 'args' portion of the container template
autoscalingobject{"enabled":false,"maxReplicas":10,"minReplicas":1,"targetCPUUtilizationPercentage":80,"targetMemoryUtilizationPercentage":null}Horizontal Pod Autoscaler configuration
autoscaling.enabledboolfalseWhether to enable horizontal pod autoscaler
autoscaling.maxReplicasint10Maximum number of replicas
autoscaling.minReplicasint1Minimum number of replicas
autoscaling.targetCPUUtilizationPercentageint80Target CPU utilization percentage for scaling
autoscaling.targetMemoryUtilizationPercentagestringnilTarget memory utilization percentage for scaling (optional)
clusterissuerstring"letsencrypt"Sets the annotation on the ingress controller for cert-manager cluster issuer
commandlist[]This overrides the 'command' portion of the container template
containerslist[]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
cronjobobject{"enabled":true,"restartPolicy":"Never","schedule":"0 0 13 * 5"}Cronjob specific settings
cronjob.enabledbooltrueWhether the cronjob is deployed or not
cronjob.restartPolicystring"Never"The restart policy for the CronJob
cronjob.schedulestring"0 0 13 * 5"CronTab schedule for the cronjob to run
deployment.enabledbooltrueWhether the deployment is enabled or not.
deployment.replicasint1Number of replicas for the deployment
domainstring"fancywhale.ca"The domain sufix for the fqdn to be generated.
endpointobject{"enabled":false,"ip":null,"port":80,"protocol":"TCP"}External endpoint settings
endpoint.enabledboolfalseWhether the endpoint is enabled or not
endpoint.ipstringnilIP address of the endpoint
endpoint.portint80Port of the endpoint
endpoint.protocolstring"TCP"Protocol of the endpoint
entrypointlist[]This overrides the 'entrypoint' portion of the container template
envobject{}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
envFromConfigMaplist[]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
envFromSecretlist[]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.annotationsobject{}Annoations for the httproutes resources
httpRoutes.enabledboolfalseWhether 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.gatewayNamestring""Name of the gateway to use on the HTTP routes
httpRoutes.gatewayNamespacestring""Namespace of the gateway to use on the HTTP routes
httpRoutes.httpsSectionstring"https"Section from the gateway that implements the https section you want to use
httpRoutes.redirectHttpobject{"enabled":true,"httpSection":"http","redirectTo":443}Configuration of how to redirect from a schema to another (usually http to https)
httpRoutes.redirectHttp.enabledbooltrueWhether or not to enable redirect rule
httpRoutes.redirectHttp.httpSectionstring"http"Section of the gateway that implements the schema to redirect from
httpRoutes.redirectHttp.redirectToint443Port to redirect to
httpRoutes.ruleslist[{"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.pullPolicystring"Always"Pull Policy for the image pull, can only be: IfNotPresent, Always, or Never
image.pullSecretslist[]Pull Secrets to pull the image
image.repostring"gcarrarom/landing"Image repository
image.tagstring"0.0.0"Image Tag
ingress.annotationsobject{}Annotations to be added to the ingress resource.
ingress.authAnnotationsobject{}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.classNamestring"nginx"Class name only sets the ingressClassName directive. Older Ingress Annotations are not supported.
ingress.enabledbooltrueWhether to deploy an ingress resource or not NOTE: Using both httpRoutes and ingress simultaneously is not recommended as it may cause routing conflicts
ingress.noauthPathslist[]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.pathslist["/"]Ingress paths
ingress.tlsobject{"existingSecret":false,"reflector":{"enabled":false,"originalSecretName":"fancywhale/star-fancywhale-ca"},"secretName":null}TLS configuration for the ingress
ingress.tls.existingSecretboolfalseWhether or not to use TLS secret that already exists. Uses the .ingress.tls.secretName for it
ingress.tls.reflectorobject{"enabled":false,"originalSecretName":"fancywhale/star-fancywhale-ca"}Reflector configuration for the TLS secret
ingress.tls.reflector.enabledboolfalseWhether or not to create a TLS secret mirrored from somewhere else
ingress.tls.reflector.originalSecretNamestring"fancywhale/star-fancywhale-ca"Name of the secret to be used for mirroring to ingress.tls.secretName
ingress.tls.secretNamestringnilName of the secret to be used as the TLS secret for the ingress
livenessProbeobject{"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.commandlist[]command for the probe if using type=exec
livenessProbe.failureThresholdint1After a probe fails failureThreshold times in a row, Kubernetes considers that the overall check has failed
livenessProbe.initialDelaySecondsint3Delay to start testing the liveness
livenessProbe.pathstring"/"Path to request an http GET request for the liveness check
livenessProbe.periodSecondsint10How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.
livenessProbe.portint80port to request an http GET request for the liveness check
livenessProbe.successThresholdint1Minimum consecutive successes for the probe to be considered successful after having failed
livenessProbe.typestring"httpGet"Type of probe to run. can be exec or httpGet
namestringnilName to be used on the resources created. This overwrites the default behaviour. Please check _helper.tpl file on the templates folder for more information
nodeSelectorobject{"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.enabledboolfalseWhether to use node-selector or not
nodeSelector.gcpboolfalseGCP specific node selector
nodeSelector.labelsobject{}Deploy to the nodes with these lables only. Example: labels.disk: ssd
portint80Port the app runs at
readinessProbeobject{"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.commandlist[]command for the probe if using type=exec
readinessProbe.failureThresholdint1After a probe fails failureThreshold times in a row, Kubernetes considers that the overall check has failed
readinessProbe.initialDelaySecondsint3Delay to start testing the readiness
readinessProbe.pathstring"/"Path to request an http GET request for the readiness check
readinessProbe.periodSecondsint10How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.
readinessProbe.portint80port 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartmain is pinned at v0.16.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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