kitcaddy

by KvalitetsIT

Helm chartv1.5.12App 1.5.12Verified publisher

A Helm chart for deplaying a web-service with kitcaddy

About this chart

KitCaddy Helm Chart

Caddy 2 packages with security modules
This chart deploys a web-service together with a KitCaddy on a Kubernetes cluster.

Installing

First add KvalitetsIT Helm repo to Helm

$ helm repo add KvalitetsIT https://raw.githubusercontent.com/KvalitetsIT/helm-repo/master/
$ helm repo update

Create values.yaml file with the parameters specified
See Configuration

Run Helm command:

$ helm install web-service KvalitetsIT/kitcaddy -f myValues.yaml --version 1.0.3

Example of a value file see: kitcaddyExampleValues.yaml

Configuration

The following table lists the configurable parameters of the KitCaddy and the web-service.

ParameterDescriptionExample
fullnameOverrideName of the service
namespaceNamespace to deploy into
image.repositoryName of the web-service image
imgae.tagWeb-service image tag
podAnnotationsAnnotations for the pod fx prometheusprometheus.io/path: actuator/prometheus prometheus.io/scrape: "true"
deploymentStrategyEnables to set deployment strategyRecreate
affinityAffinity for pod assignment.
podAffinityPresetPod affinity preset. Ignored if affinity is set. Allowed values: ``, soft or hard""
podAntiAffinityPresetPod anti-affinity preset. Ignored if affinity is set. Allowed values: ``,soft or hard Default softsoft
nodeAffinityPreset.typeNode affinity preset type. Ignored if affinity is set. Allowed values: soft or hard""
nodeAffinityPreset.keyNode label key to match Ignored if affinity is set.""
nodeAffinityPreset.valuesNode label values to match. Ignored if affinity is set.
extraConfigMapSpecify ConfigMaps.
netpol.enabledEnables default netpol only allowing traffick to kitcaddy ports. Default true.
serviceAccount.automountSets automountServiceAccountToken. Default false.
KitCaddy
kitcaddy.secretName
kitcaddy.extraVolumeMountsExtra volume mounts. Due to limitations of Helm, two mounts cannot refer to the same volume. This chart allows to ovecome this by adding _<number> to the end of the name. Thus, myEmptyDir_1 and myEmptyDir_2 (and myEmptyDir) will refer to the same volume, with name myEmptyDir.
kitcaddy.extraVolumesExtra volumes
kitcaddy.logLevelSet default log level. Default values 'INFO'DEBUG
kitcaddy.admin.disabledSet admin disabled. Default values 'true'true
kitcaddy.apps.tls.certificates.loadfilesArray of certificates to load from files
kitcaddy.apps.tls.certificates.loadfiles.certificatePath to certificate file/certificates/server.cert
kitcaddy.apps.tls.certificates.loadfiles.keyPath to certificate key file/certificates/server.key
kitcaddy.apps.tls.certificates.loadfiles.formatFormat of the certificatepem
kitcaddy.apps.tls.certificates.loadfiles.tagsArray of tags
kitcaddy.serversDictionary with servers
kitcaddy.servers.nameName of the server
kitcaddy.servers.listenPortPort for incoming traffic80
kitcaddy.servers.strictSniHost.valueValue for Strict SNI host. true or falsefalse
kitcaddy.servers.tlsConnectionPolicies.clientAuthentication.requireValue for client authentication. true or falsetrue
kitcaddy.servers.automaticHttps.disableRedirectsValue for disable HTTPS redirects. true or falsetrue
kitcaddy.servers.routesDictionary with routes for the server
kitcaddy.servers.routes.pathsArray of path for KitCaddy to listen on
kitcaddy.servers.routes.prometheus.pathPrometheus path on KitCaddy. If not set Prometheus is disabled/metrics
KitCaddy - WSP
kitcaddy.servers.routes.wspSet values under this to enable WSP
kitcaddy.servers.routes.wsp.mongoHostURL of the MongoDBmongodb.mongo
kitcaddy.servers.routes.wsp.mongoDbDatabase in Mongo to be used by the WSPweb-service-wsp
kitcaddy.servers.routes.wsp.audienceRestrictionurn:web-service:domain:dk
kitcaddy.servers.routes.wsp.sessiondataHeadernameHeader name for session data. If not set variable not in configsessiondataheader
kitcaddy.servers.routes.wsp.hokHold on keytrue
kitcaddy.servers.routes.wsp.trustsArray of path to trusted certificates- /trust/sts.cer
kitcaddy.servers.routes.wsp.sslClientCertHeaderNamesArray of SSL client cert header names. If not set variable not in config- surviving-bogus-header- forwarded-from-nginx
KitCaddy - WSC
kitcaddy.servers.routes.wscSet values under this to enable WSC
kitcaddy.servers.routes.wsc.mongoHostURL of the MongoDBmongodb.mongo
kitcaddy.servers.routes.wsc.mongoDbDatabase in Mongo to be used by th WSPweb-service-wsc
kitcaddy.servers.routes.wsc.stsUrlURL to the STS server
kitcaddy.servers.routes.wsc.clientCertFilePath to the client certificate file
kitcaddy.servers.routes.wsc.clientKeyFilePath to the client certificate key file
kitcaddy.servers.routes.wsc.trustCertFilesArray of path to trusted certificates- /trust/sts.cer
kitcaddy.servers.routes.wsc.serviceEndpointPath to the service endpoint
kitcaddy.servers.routes.wsc.serviceAudience
kitcaddy.servers.routes.wsc.sessionDataUrl
KitCaddy - SAML
kitcaddy.servers.routes.samlSet values under this to enable SAML
kitcaddy.servers.routes.saml.mongoHostURL of the MongoDBmongodb.mongo
kitcaddy.servers.routes.saml.mongoDbDatabase in Mongo to be used by the SAMLweb-service-saml
kitcaddy.servers.routes.saml.sessionHeaderNameHeader name for session datasessiondataheader
kitcaddy.servers.routes.saml.sessiondataHeadernameHeader name for session datasessiondataheader
kitcaddy.servers.routes.saml.sessionExpiryHoursExpiry time for the session in hours1
kitcaddy.servers.routes.saml.audienceRestrictionurn:web-service:domain:dk
kitcaddy.servers.routes.saml.idpMetadataUrlIDP metadata URLhttps://login.domain.dk/auth
kitcaddy.servers.routes.saml.entityIdEntity IDurn:m:domain:dk
kitcaddy.servers.routes.saml.signAuthnReqIs sign requiredtrue
kitcaddy.servers.routes.saml.signCertFilePath to certificate file for sign/certificate/tls.crt
kitcaddy.servers.routes.saml.signKeyFilePath to certificate key file for sign/certificate/tls.key
kitcaddy.servers.routes.saml.externalUrlhttps://domain.dk
kitcaddy.servers.routes.saml.metadataPathPath to metadata/host/saml/metadata
kitcaddy.servers.routes.saml.logoutPathLog out path/host/saml/logout
kitcaddy.servers.routes.saml.sloPath/host/saml/slo
kitcaddy.servers.routes.saml.ssoPath/host/saml/sso
kitcaddy.servers.routes.saml.logoutLandingPageLanding page after logouthttps://domain.dk/
kitcaddy.servers.routes.saml.cookieDomainCookie domaindomain.dk
kitcaddy.servers.routes.saml.cookiePathCookie path/
kitcaddy.servers.routes.saml.roleAttributeNameName of the attribute key we are looking for in the XML with the role valuenameOfAttribute
kitcaddy.servers.routes.saml.allowedRolesArray with role user needs to have in order to login. If role is not present, the user cannot login.["role1", "role2", "role3 role4"] this example is equivalent to (role1 OR role2 OR (role3 AND role4))
KitCaddy - Upstream
kitcaddy.servers.routes.upstreamSet values under this to config upstream
kitcaddy.servers.routes.upstream.hostUpstream hostlocalhost
kitcaddy.servers.routes.upstream.portUpstream port8080
kitcaddy.servers.routes.upstream.clientTlsSet values under this to enable client TLS
kitcaddy.servers.routes.upstream.clientTls.insecureSkipVerifySkip verity client TLS if insecurefalse
kitcaddy.servers.routes.upstream.clientTls.clientCertificateFilePath to client certificate file/certificate/client.crt
kitcaddy.servers.routes.upstream.clientTls.clientCertificateKeyFilePath to client certificate key file/certificate/client.key
Deployment
deployment.containerPortPort on web-service8080
deployment.configMapMountPathSet value if config map needs to mount on deployment/config
deplyment.extraVolumeMountsExtra volume mounts. Due to limitations of Helm, two mounts cannot refer to the same volume. This chart allows to ovecome this by adding _<number> to the end of the name. Thus, myEmptyDir_1 and myEmptyDir_2 (and myEmptyDir) will refer to the same volume, with name myEmptyDir.
deplyment.securityContextSecurityContext for deplyment container.
deplyment.securityContext.readOnlyRootFilesystemSecurityContext readOnlyRootFilesystem for deplyment container. Default true
`deplyment.securityContext.allowPrivile

Deploy kitcaddy with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has kitcaddy 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 chartkitcaddy is pinned at v1.5.12 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