k8srad
by YOTRON
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:
| name | description |
|---|---|
| K8SRAD | A web application to visualize and to manage the content of S3Bucket independently from Acceess- or Secret-Keys. |
| NGINX | An optional Reverse Proxy as a Kubernetes sidecar to K8SRAD for security and TLS termination (https) |
| PostgreSQL | An optional metadata database. Not needed for testing and can be provided externally. |
URLs
The project contains code, build packages, container ... . Below an overview:
| Type | Provider | URL |
|---|---|---|
| Kubernetes-Ready RAD | yotron.de | https://www.yotron.de/blog/kuberentesreadyrad/ |
| Container | hub.docker.com | https://hub.docker.com/r/yotronpublic/k8srad |
| Python Package (PyPi) | pypi.org | https://pypi.org/project/k8srad/ |
| HELM package | artifacthub.io / helm.yotron.de | https://artifacthub.io/packages/helm/yotron-helm-charts/k8srad |
Prerequisites
- HELM 3
Dependencies
The following dependencies are included in that package.
| name | description |
|---|---|
| k8s-secrets | An application free package to simplify the deployment of secrets to Kubernetes. |
| PostgreSQL by Bitnami | A 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
| Name | Default | Example | Description | Config Parameter (docu) |
|---|---|---|---|---|
| customize.title | K8SRAD by YOTRON | Title of your project. | K8SRAD_APP_NAME | |
| customize.icon | https://www.yotron.de/img/yotron_logo.svg | Icon 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.
| Name | Default | Example | Description | Config Parameter (docu) |
|---|---|---|---|---|
| logLevel | info | LogLevel for the Logging. Can be: fatal, error, warning, info, debug | K8SRAD_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
| Name | Default | Example | Description |
|---|---|---|---|
| k8s.identifier | k8srad | Identifier for the Kubernetes Resources | |
| k8s.annotations | {} | yotron.de/created_by: k8srad | Dictionary of annotations added too all Kubernetes resources in the deployment. |
| k8s.service.annotations | {} | metallb.universe.tf/loadBalancerIPs: 192.168.56.249 | Dictionary of annotations added to the Kubernetes service of K8SRAD. |
| k8s.service.type | NodePort | Type of the Kubernetes Service. Could be ClusterIP, NodePort, LoadBalancer, ... | |
| k8s.service.nodePort | 31005 | NodePort the K8SRAD Service is reachable as a Kubernetes NodePort service. |
K8SRAD Image, database and Performance Parameter
| Name | Default | Example | Description | Config Parameter (docu) |
|---|---|---|---|---|
| app.secretKey | changeMySecret | A key which used to sign session cookies for protection against cookie data tampering. In production please change it. | K8SRAD_SECRET_KEY | |
| app.server.replicas | 1 | Parallelization of K8SRAD-Pods. Increase the to allow High Availability or a higher performance if needed- | ||
| app.server.threadsPerReplica | 4 | Thread per K8SRAD Pod allowed to run. | ||
| app.server.image | yotronpublic/k8srad | Docker Image URl of K8SRAD. | ||
| app.server.imagePullPolicy | IfNotPresent | Is set to IfNotPresent to pull the Docker image only if needed. | ||
| app.server.tag | latest | Set the tag of the Docker Image you want to deploy. | ||
| app.server.database.type | sqlite | Set the type of databse to store the K8SRAD metadata. Must be sqlite or postgres. | K8SRAD_DB_TYPE | |
| app.server.database.pgInternal | true | Set 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.pgDbHost | postgres.mydb.net | Only when pgInternal: false: The host of the external PostgreSQL | K8SRAD_PG_DB_HOST | |
| app.server.database.pgDbPort | 5432 | Only when pgInternal: false: The listener port of the external PostgreSQL | K8SRAD_PG_DB_PORT | |
| app.server.database.pdDbName | k8srad | Only when pgInternal: false: The database name of the external PostgreSQL | K8SRAD_PG_DB_NAME | |
| app.server.database.pgDbUserName | k8srad | Only when pgInternal: false: The user name to authenticate against the external PostgreSQL | K8SRAD_PG_DB_USER_NAME | |
| app.server.database.pgDbUserPw | k8srad | Only when pgInternal: false: The password to authenticate against the external PostgreSQL | K8SRAD_PG_DB_USER_PW | |
| app.configs | Map with additional configurations for Flask Appbuilder. |
| For performance tuning please read our remarks in Github
Authentication general
| name | Default | Example | Description | Config Parameter (docu) |
|---|---|---|---|---|
| auth.type | database | ldap | Parameter 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.userRegistration | false | Parameter to define if a user can self registrate to K8SRAD. With LDAP it must be set to True. | AUTH_USER_REGISTRATION | |
| auth.userRegistrationRole | S3User | Default role a user, when registered or authenticated via LDAP firstly. | AUTH_USER_REGISTRATION_ROLE | |
| auth.rolesMapping | Mapping a LDAP group onto a K8SRAD role S3User or Admin. | AUTH_ROLES_MAPPING | ||
| auth.sessionLifeTime | 600 | Seconds 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartk8srad is pinned at v1.0.7 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