api-docs

by Labs64

Helm chartv0.9.16App v5.35.1Verified publisher

Labs64.IO :: Swagger UI

About this chart

api-docs

Labs64.IO :: Swagger UI

Homepage: https://labs64.io

Maintainers

NameEmailUrl
Labs64[email protected]https://labs64.io

Source Code

Requirements

RepositoryNameVersion
file://../chart-libschart-libs0.8.12

Values

KeyTypeDefaultDescription
affinityobject{}
apiDefinitionsobject{}API definitions shown in the Swagger UI's selector, keyed by module and listed in key order after any swaggerUI.urls. Each: name, url (both rendered with tpl) and optional enabled (default true). A map, unlike swaggerUI.urls, so a later values layer can switch one entry off, for instance for a module that is not installed, without restating the whole list. @schema type: object additionalProperties: type: object properties: name: type: string url: type: string enabled: type: boolean required: [name, url] @schema
autoscalingobject{"enabled":false,"maxReplicas":3,"minReplicas":1,"targetCPUUtilizationPercentage":80}This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/
chart-libsobject{}Values passed to the chart-libs library dependency (present so the generated schema accepts the key Helm injects for the dependency) @schema type: object additionalProperties: true @schema
enabledbooltrue
envlist[{"name":"CONFIG_URL","value":"swagger-config.yaml"}]CONFIG_URL tells the swagger-ui image's configurator script (/docker-entrypoint.d/40-swagger-ui.sh) to fetch this path client-side (browser-side, not container-side) for its full config (dom_id/urls/validatorUrl), instead of using its built-in petstore.swagger.io demo. Deliberately relative (no leading slash): the page is only reachable behind the gateway's /swagger-ui prefix, which the HTTPRoute strips before forwarding — a root-absolute "/swagger-config.yaml" would miss that route entirely (404 at the gateway, never reaching this container). Must stay in sync with the volumeMount path above.
envFromlist[]
externalSecrets.enabledboolfalse
externalSecrets.secretKeystring""Key/path of this module's secret in the external backend; every key becomes an env var. Defaults to the release fullname.
externalSecrets.storeNamestring"local-kubernetes-store"
extraConfigChecksumslist["configmap-swagger-config"]Templates (under templates/, without .yaml) whose rendered content is hashed into a pod annotation, so a change rolls the pods. The Swagger config is mounted with subPath, which never receives live updates: without this a changed URL list would wait for the next unrelated restart.
fullnameOverridestring""
gatewayobject{"enabled":true,"parentRefs":[{"name":"labs64io-gateway","namespace":"tools"}],"routes":[{"path":"/swagger-ui","stripPrefix":true},{"path":"/","pathType":"Exact","redirectTo":"/swagger-ui/"}]}Gateway API HTTPRoute for swagger-ui (public docs aggregator; module API routes are owned by the module charts). No auth — faithful to prior behavior.
gateway.enabledbooltrueEnable the swagger-ui HTTPRoute
gateway.parentRefslist[{"name":"labs64io-gateway","namespace":"tools"}]Gateway(s) this HTTPRoute attaches to
gateway.routeslist[{"path":"/swagger-ui","stripPrefix":true},{"path":"/","pathType":"Exact","redirectTo":"/swagger-ui/"}]Routes. Each: path, optional pathType (default PathPrefix), service{name,port}; stripPrefix strips the matched prefix; redirectTo issues a 302 to a fixed path. @schema type: array items: type: object additionalProperties: true @schema
globalobject{"domain":"localhost"}Global values shared across Labs64.IO charts @schema type: object additionalProperties: true @schema
global.domainstring"localhost"Base domain; swagger-ui is exposed as gateway.
imageobject{"digest":"","pullPolicy":"IfNotPresent","repository":"swaggerapi/swagger-ui","tag":""}This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/
image.digeststring""Pin the image by digest (sha256:<64 hex>). Takes precedence over tag — the release pipeline sets it so a deployment cannot follow a moved tag.
image.pullPolicystring"IfNotPresent"This sets the pull policy for images.
image.tagstring""Overrides the image tag whose default is the chart appVersion.
imagePullSecretslist[]This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
initContainersstring`"- name: stage-writable-paths\n image: {{ include "chart-libs.image" (dict "imageRoot" .Values.image "context" $)quote }}\n imagePullPolicy: {{ .Values.image.pullPolicy }}\n command:\n - sh\n - -c\n - cp -a /usr/share/nginx/html/. /stage/html/ && cp -a /etc/nginx/conf.d/. /stage/conf.d/ && cp -a /etc/nginx/templates/. /stage/templates/\n securityContext:\n {{- toYaml .Values.securityContext
livenessProbeobject{"failureThreshold":3,"httpGet":{"path":"/","port":8080},"initialDelaySeconds":30,"periodSeconds":10,"timeoutSeconds":2}This is to setup the liveness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
nameOverridestring""This is to override the chart name.
networkPolicyobject{"enabled":false,"extraIngress":[],"extraIngressFrom":[],"gatewayNamespace":"tools","ingressControllerLabels":{},"ingressFrom":null,"ingressPorts":[],"observabilityNamespace":"monitoring"}NetworkPolicy: allow ingress from Traefik and same-namespace pods only (rendered by chart-libs.networkpolicy)
networkPolicy.extraIngresslist[]Additional raw ingress rules
networkPolicy.extraIngressFromlist[]Deployment-owned callers appended to ingressFrom without restating it (the umbrella chart adds its own helm test pod here). @schema type: array items: type: string @schema
networkPolicy.gatewayNamespacestring"tools"Namespace where Traefik runs
networkPolicy.ingressControllerLabelsobject{}Ingress controller pod-selector labels; defaults to the internal Traefik standard (app.kubernetes.io/name: traefik) when empty @schema type: object additionalProperties: true @schema
networkPolicy.ingressFromstringnilIn-namespace workloads (app.kubernetes.io/name) allowed to call the ports, besides the ingress controller and this chart's own pods (helm test). [] admits no other caller; null (the default) keeps the namespace-wide rule. @schema type: [array, "null"] items: type: string @schema
networkPolicy.ingressPortslist[]TCP ports open to the ingress controller and the in-namespace callers in ingressFrom. Empty: every port. Set in overrides/api-docs/values.local.yaml: on AWS this chart's policy is not enabled, and a chart that narrows its ingress in its defaults must be excluded from the deployment repository's fallback rules (kubernetes/network-policies/labs64io.yaml).
networkPolicy.observabilityNamespacestring"monitoring"Namespace the observability/OTel collector runs in
nodeSelectorobject{}
podAnnotationsobject{}This is for setting Kubernetes Annotations to a Pod. For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
podDisruptionBudget.enabledboolfalse
podDisruptionBudget.minAvailableint1
podLabelsobject{}This is for setting Kubernetes Labels to a Pod. For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
podSecurityContextobject{}
rbac.createboolfalse
rbac.ruleslist[]
readinessProbeobject{"failureThreshold":3,"httpGet":{"path":"/","port":8080},"initialDelaySeconds":10,"periodSeconds":5,"timeoutSeconds":2}This is to setup the readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
replicaCountint1This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/
resources.limits.cpustring"100m"
resources.limits.memorystring"64Mi"
resources.requests.cpustring"20m"
resources.requests.memorystring"32Mi"
secretsobject{"data":{}}Secret data to be used as environment variables (delivered via envFrom)
securityContext.allowPrivilegeEscalationboolfalse
securityContext.capabilities.drop[0]string"ALL"
securityContext.readOnlyRootFilesystembooltrue
securityContext.runAsGroupint1064
securityContext.runAsNonRootbooltrue
securityContext.runAsUserint1064
securityContext.seccompProfile.typestring"RuntimeDefault"
serviceobject{"port":8080,"type":"ClusterIP"}This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/
service.portint8080This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports
service.typestring"ClusterIP"This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
serviceAccountobject{"annotations":{},"automount":false,"create":true,"name":""}This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/
serviceAccount.annotationsobject{}Annotations to add to the service account (e.g. eks.amazonaws.com/role-arn for IRSA) @schema type: object additionalProperties: true @schema
serviceAccount.automountboolfalseAutomatically mount a ServiceAccount's API credentials? swagger-ui is a static site and never calls the Kubernetes API.
serviceAccount.createbooltrueSpecifies whether a service account should be created
serviceAccount.namestring""The name of the service account to use. If not set and create is true, a name is generated using the fullname template
swaggerUI.dom_idstring"#swagger-ui"The ID of a DOM element inside which SwaggerUI will put its user interface.
swaggerUI.urlslist[]An array of API definition objects used by Topbar plugin. When used and Topbar plugin is enabled, the url parameter will not be parsed. Names and URLs must be unique among all items in this array, since they’re used as identifiers.
swaggerUI.validatorUrlstring"https://validator.swagger.io/validator"By default, Swagger UI attempts to validate specs against swagger.io’s online validator. You can use this parameter to set a different validator URL, for example for locally deployed validators. Setting it to either none, 127.0.0.1 or localhost will disable validation.
tolerationslist[]
topologySpreadConstraintslist[]Constrain how replicas spread across nodes/zones (e.g. maxSkew/topologyKey/whenUnsatisfiable). labelSelector defaults to this chart's own selector labels when a constraint omits one.
volumeMountslist[{"mountPath":"/usr/share/nginx/html","name":"html"},{"mountPath":"/usr/share/nginx/html/swagger-config.yaml","name":"swagger-config","readOnly":true,"subPath":"swagger-config.yaml"},{"mountPath":"/etc/nginx/conf.d","name":"nginx-conf"},{"mountPath":"/etc/nginx/templates","name":"nginx-templates"},{"mountPath":"/var/cache/nginx","name":"nginx-cache"},{"mountPath":"/run","name":"run"},{"mountPath":"/tmp","name":"tmp"}]Additional volumeMounts on the output Deployment definition.
volumeslist[{"configMap":{"name":"{{ include \"chart-libs.fullname\" . }}-swagger-config"},"name":"swagger-config"},{"emptyDir":{},"name":"html"},{"emptyDir":{},"name":"nginx-conf"},{"emptyDir":{},"name":"nginx-templates"},{"emptyDir":{},"name":"nginx-cache"},{"emptyDir":{},"name":"run"},{"emptyDir":{},"name":"tmp"}]Additional volumes on the output Deployment definition. Mounts the swagger-config ConfigMap (rendered from swaggerUI below) into the image's webroot so CONFIG_URL (see env below) can serve it — without this, the container falls back to its baked-in petstore.swagger.io demo config and the ConfigMap is never actually consumed.

Deploy api-docs with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has api-docs 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 chartapi-docs is pinned at v0.9.16 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