@@ -0,0 +1,158 @@
1+# Octopod
2+
3+### This is beta version of a chart!
4+
5+[Octopod](https://octopod.site/) is a fully open-source self-hosted solution for managing multiple deployments in a Kubernetes cluster with a user-friendly web interface. Managing deployments does not require any technical expertise.
6+
7+## TL;DR
8+TBD (install chart from typeable's chart repository)
9+
10+## Introduction
11+
12+This chart bootstraps an Octopod deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
13+
14+## Prerequisites
15+
16+- Kubernetes 1.12+
17+- Helm 3.1.0
18+- PV support (for postgresql persistense)
19+- nginx-ingress controller
20+
21+## Installing the Chart
22+This chart will not create or delete any namespaces for you.
23+You'll need to create 2 namespaces before installing:
24+First in which octopod will be installed
25+```console
26+$ kubectl create namespace octopod
27+```
28+Second in which Octopod will deploy all it's deployments (configured in octopod.deploymentNamespace)
29+```console
30+$ kubectl create namespace octopod-deployments
31+```
32+Also you need to generate certificates for octo client<->octopod server communication.
33+
34+Generate certificates
35+```bash
36+mkdir certs
37+cd certs && \
38+openssl req -x509 -newkey rsa:4096 -keyout server_key.pem -out server_cert.pem -nodes -subj "/CN=localhost/O=Server" && \
39+openssl req -newkey rsa:4096 -keyout client_key.pem -out client_csr.pem -nodes -subj "/CN=Client" && \
40+openssl x509 -req -in client_csr.pem -CA server_cert.pem -CAkey server_key.pem -out client_cert.pem -set_serial 01 -days 3650
41+
42+```
43+Create configmap from generated certificates
44+```console
45+kubectl create configmap octopod-certs -n octopod --from-file=./certs
46+```
47+Name for configmap is cofigured in octopod.certsConfigMapName
48+To install the chart with the release name `my-release` from current directory execute:
49+
50+```console
51+$ helm dependency build
52+$ helm -n octopod install my-release .
53+```
54+
55+The command deploys Octopod on the Kubernetes cluster in the default configuration inside octopod namespace. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
56+
57+## Uninstalling the Chart
58+
59+To uninstall/delete the `my-release` deployment:
60+
61+```console
62+$ helm -n octopod delete my-release
63+```
64+
65+The command removes all the Kubernetes components but PVC's associated with the postgres chart and deletes the release.
66+
67+## Parameters
68+
69+The following tables lists the configurable parameters of the Octopod chart and their default values.
70+
71+| Key | Type | Default | Description |
72+|-----|------|---------|-------------|
73+| affinity | object | `{}` | Octopod deployment affinity |
74+| controlScripts.image.pullPolicy | string | `"IfNotPresent"` | control scripts image pull policy |
75+| controlScripts.image.repository | string | `"typeable/octopod-helm-example"` | Control scripts image repository (you probably want to use your own control scripts) |
76+| controlScripts.image.tag | float | `1.1` | Control scitpts image tag |
77+| fullnameOverride | string | `""` | Override chart full name |
78+| image.pullPolicy | string | `"IfNotPresent"` | Octopod image pull policy |
79+| image.repository | string | `"typeable/octopod"` | Octopod image repository |
80+| image.tag | string | `""` | Octopod image tag (default values is taken from chart metadata) |
81+| imagePullSecrets | list | `[]` | Pull secrets if you want to use private registry |
82+| ingress.app.annotations | object | `{}` | Additional ingress annotations for app service |
83+| ingress.app.host | string | `"octopod-app.example.com"` | Hostname for app service |
84+| ingress.enabled | bool | `true` | Create ingress objects or not |
85+| ingress.ingressClass | string | `"nginx"` | Ingress class |
86+| ingress.powerApp.annotations | object | `{}` | Additional ingress annotations for power-app service |
87+| ingress.powerApp.host | string | `"octopod-powerapp.example.com"` | Hostname for power-app |
88+| ingress.tls.clusterIssuer | string | `"letsencrypt"` | Name of cluster issuer you want to use |
89+| ingress.tls.enabled | bool | `true` | Use https for all services |
90+| ingress.ui.annotations | object | `{}` | Additional ingress annotations for ui service |
91+| ingress.ui.host | string | `"octopod.example.com"` | Hostname for main UI |
92+| ingress.ws.annotations | object | `{}` | Additional ingress annotations for ws service |
93+| ingress.ws.host | string | `"octopod-ws.example.com"` | Hostname for websockets ingress |
94+| nameOverride | string | `""` | Name ovveride (default is Release.Name) |
95+| nodeSelector | object | `{}` | Node selector if you want octopod to use specific nodes onn your cluster |
96+| octopod.archiveRetention | int | `1209600` | |
97+| octopod.baseDomain | string | `""` | Domain that will be used as a ase for Octopod deploymets |
98+| octopod.certsConfigMapName | string | `"octopod-certs"` | Config map with self-signed certificates |
99+| octopod.deploymentNamespace | string | `"octopod-deployment"` | Name of a namespace which will be used for all Octopod deployments (you need to create it yourself) |
100+| octopod.migrations.enabled | bool | `true` | Enable or not automatic DB schema migrations |
101+| octopod.projectName | string | `"Octopod"` | Project name |
102+| octopod.statusUpdateTimeout | int | `600` | Time to wait before deployment is marked as failed |
103+| podAnnotations | object | `{}` | Additional pod annotations |
104+| podSecurityContext | object | `{}` | Additional security context |
105+| postgresql.enabled | bool | `true` | Use bitnami postgres chart |
106+| postgresql.postgresqlDatabase | string | `"octopod"` | Database name for octopod |
107+| postgresql.postgresqlUsername | string | `"octopod"` | Octopod DB username |
108+| rbac.create | bool | `true` | Creates ClusterRoles and Bindings for Octopod service account |
109+| replicaCount | int | `1` | Number of Octopod replicas |
110+| resources.limits.cpu | string | `"200m"` | CPU limits |
111+| resources.limits.memory | string | `"512Mi"` | Memory limits |
112+| resources.requests.cpu | string | `"200m"` | CPU requests |
113+| resources.requests.memory | string | `"256Mi"` | Memory requests |
114+| securityContext.runAsGroup | int | `1000` | Use non-root GID |
115+| securityContext.runAsUser | int | `1000` | Use non-root UID |
116+| service.ports.app | int | `4000` | App service port |
117+| service.ports.powerApp | int | `4443` | Power app service port |
118+| service.ports.ui | int | `80` | UI service port |
119+| service.ports.ws | int | `4020` | WebSockets service port |
120+| service.type | string | `"ClusterIP"` | Octopod service type |
121+| serviceAccount.annotations | object | `{}` | Additional anotations for Octopod's SA |
122+| serviceAccount.create | bool | `true` | Create ServiceAccount |
123+| serviceAccount.name | string | `""` | ServiceAccount name override |
124+| sqitch.image.pullPolicy | string | `"IfNotPresent"` | squitch image pull policy |
125+| sqitch.image.repository | string | `"typeable/sqitch"` | squitch image repository |
126+| sqitch.image.tag | string | `"v2.0.0"` | squitch image tag |
127+| tolerations | list | `[]` | Octpod deploymet tolerations |
128+
129+
130+Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
131+
132+```console
133+$ helm -n octopod install my-release \
134+ --set controlScripts.image.repository=registry.example.com/control,controlScripts.image.tag=0.0.1 \
135+ .
136+```
137+
138+The above command sets control scripts image to your custom repository
139+
140+Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
141+
142+```console
143+$ helm install my-release -f values.yaml .
144+```
145+
146+> **Tip**: You can use the default [values.yaml](values.yaml)
147+
148+## Configuration and installation details
149+
150+If you want to have authentication for Octopod UI you can use project like [Oauth2-Proxy](https://github.com/oauth2-proxy/oauth2-proxy) or directly use your oauth provider.
151+After that you can add following annotations to UI ingress (considering that your oauth provider installed on oath.example.com):
152+```yaml
153+ingress:
154+ ui:
155+ annotations:
156+ nginx.ingress.kubernetes.io/auth-url: "https://oauth.example.com/oauth2/auth"
157+ nginx.ingress.kubernetes.io/auth-signin: "https://oauth.example.com/oauth2/start?rd=/redirect/$http_host$request_uri"
158+```