k8srad

by YOTRON

Helm chartv1.0.7App 1.0.7Apache-2.0

K8SRAD simplifies the access to a S3Buckets with a provider independent web based frontend which allows the visualizing and the management of the content of S3 buckets.

About this chart

Kubernetes-Ready RAD (K8SRAD)

Rapid Application Development is a software development principle to use pre-given and frequently needed components of a software application to accelerate the software development process massively. These components are for example functions for user authentication and authorization, user management (self-registration of a user, deactivating an account) but also application designs. With the usage of pre-given component, a lot of development tasks are omitted what rapidly accelerates the software development.

YOTRON put this development principles one step ahead and uses a Kubernetes-ready Rapid Application Development framework. The Kubernetes deployment is integrated part of the software development, means the software we provide for you is Kubernetes-Ready out-of-the-box.

This is the default application, which is the starting point of the RAD development. Please see the description.

Content

This HELM package contains th following applications:

namedescription
K8SRADA web application to visualize and to manage the content of S3Bucket independently from Acceess- or Secret-Keys.
NGINXAn optional Reverse Proxy as a Kubernetes sidecar to K8SRAD for security and TLS termination (https)
PostgreSQLAn optional metadata database. Not needed for testing and can be provided externally.

URLs

The project contains code, build packages, container ... . Below an overview:

TypeProviderURL
Kubernetes-Ready RADyotron.dehttps://www.yotron.de/blog/kuberentesreadyrad/
Containerhub.docker.comhttps://hub.docker.com/r/yotronpublic/k8srad
Python Package (PyPi)pypi.orghttps://pypi.org/project/k8srad/
HELM packageartifacthub.io / helm.yotron.dehttps://artifacthub.io/packages/helm/yotron-helm-charts/k8srad

Prerequisites

  • HELM 3

Dependencies

The following dependencies are included in that package.

namedescription
k8s-secretsAn application free package to simplify the deployment of secrets to Kubernetes.
PostgreSQL by BitnamiA optional package if you want to deploy a PostgreSQL additionally.

Installation

Fast installation

You can install a fully functional K8SRAD for testing and demonstration without the need of a configuration.

helm repo add yotron-apps http://helm.yotron.de/
helm install k8srad yotron-apps/k8srad

K8SRAD is now reachable with a NodePort service under http://:31005

Integration as a Chart dependency

To integrate K8SRAD into you project Chart, please add the HELM package to your own HELM project:

dependencies:
  - name: k8srad
    version: <the version you want>
    repository: http://helm.yotron.de/

HELM Configuration

K8SRAD Customization Parameter

NameDefaultExampleDescriptionConfig Parameter (docu)
customize.titleK8SRAD by YOTRONTitle of your project.K8SRAD_APP_NAME
customize.iconhttps://www.yotron.de/img/yotron_logo.svgIcon to be used in the Header. Can be any URL to an png, svg, ... .K8SRAD_APP_ICON

Log and Server Parameter

The server settings like hostnamesor listenerPort can be used independently if you want to use the Ingress Controller or the ReverseProxy as the application web endpoint.

NameDefaultExampleDescriptionConfig Parameter (docu)
logLevelinfoLogLevel for the Logging. Can be: fatal, error, warning, info, debugK8SRAD_LOG_LEVEL
hostnames[]["k8srad.k8s.yotron.de"]Mandatory for Ingress and Reverse Proxy: List of hosts the K8SRAD Web server is listening on.
listenerIPs["192.168.56.249"]IPs K8SRAD shall listen on. Must be set to allow external Access to the app directly.

General K8S Parameter

NameDefaultExampleDescription
k8s.identifierk8sradIdentifier for the Kubernetes Resources
k8s.annotations{}yotron.de/created_by: k8sradDictionary of annotations added too all Kubernetes resources in the deployment.
k8s.service.annotations{}metallb.universe.tf/loadBalancerIPs: 192.168.56.249Dictionary of annotations added to the Kubernetes service of K8SRAD.
k8s.service.typeNodePortType of the Kubernetes Service. Could be ClusterIP, NodePort, LoadBalancer, ...
k8s.service.nodePort31005NodePort the K8SRAD Service is reachable as a Kubernetes NodePort service.

K8SRAD Image, database and Performance Parameter

NameDefaultExampleDescriptionConfig Parameter (docu)
app.secretKeychangeMySecretA key which used to sign session cookies for protection against cookie data tampering. In production please change it.K8SRAD_SECRET_KEY
app.server.replicas1Parallelization of K8SRAD-Pods. Increase the to allow High Availability or a higher performance if needed-
app.server.threadsPerReplica4Thread per K8SRAD Pod allowed to run.
app.server.imageyotronpublic/k8sradDocker Image URl of K8SRAD.
app.server.imagePullPolicyIfNotPresentIs set to IfNotPresent to pull the Docker image only if needed.
app.server.taglatestSet the tag of the Docker Image you want to deploy.
app.server.database.typesqliteSet the type of databse to store the K8SRAD metadata. Must be sqlite or postgres.K8SRAD_DB_TYPE
app.server.database.pgInternaltrueSet to false if you want to use a external PostgreSQL. Set to true to use the PostgreSQL deployed by this HELM package.
app.server.database.pgDbHostpostgres.mydb.netOnly when pgInternal: false: The host of the external PostgreSQLK8SRAD_PG_DB_HOST
app.server.database.pgDbPort5432Only when pgInternal: false: The listener port of the external PostgreSQLK8SRAD_PG_DB_PORT
app.server.database.pdDbNamek8sradOnly when pgInternal: false: The database name of the external PostgreSQLK8SRAD_PG_DB_NAME
app.server.database.pgDbUserNamek8sradOnly when pgInternal: false: The user name to authenticate against the external PostgreSQLK8SRAD_PG_DB_USER_NAME
app.server.database.pgDbUserPwk8sradOnly when pgInternal: false: The password to authenticate against the external PostgreSQLK8SRAD_PG_DB_USER_PW
app.configsMap with additional configurations for Flask Appbuilder.

| For performance tuning please read our remarks in Github

Authentication general

nameDefaultExampleDescriptionConfig Parameter (docu)
auth.typedatabaseldapParameter to define the authentication method. It can be an authentication via LDAP or via the default database with name and password.K8SRAD_AUTH_TYPE
auth.userRegistrationfalseParameter to define if a user can self registrate to K8SRAD. With LDAP it must be set to True.AUTH_USER_REGISTRATION
auth.userRegistrationRoleS3UserDefault role a user, when registered or authenticated via LDAP firstly.AUTH_USER_REGISTRATION_ROLE
auth.rolesMappingMapping a LDAP group onto a K8SRAD role S3User or Admin.AUTH_ROLES_MAPPING
auth.sessionLifeTime600Seconds of inactivity after which a user must re-login.PERMANENT_SESSION_LIFETIME

Authentication LDAP

| name | Default | Example | Description | Config Parameter (docu) | |----------------------------|---------|---------------------

Deploy k8srad with OpenTenant

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