Skip to content

Commit

Permalink
Fix OTS chart to use correct host port (#15)
Browse files Browse the repository at this point in the history
* Fix OTS chart to use correct host port

* Fixed OTS typos and missing comments for params
  • Loading branch information
jdstone authored Sep 1, 2021
1 parent 2f4b7dd commit 670ce59
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 43 deletions.
2 changes: 1 addition & 1 deletion charts/onetimesecret/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: onetimesecret
version: 0.12.1
version: 0.12.2
description: A Helm chart for One-Time Secret server
type: application
keywords:
Expand Down
72 changes: 36 additions & 36 deletions charts/onetimesecret/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,42 +51,42 @@ The command removes all the Kubernetes components associated with the chart and

### Common parameters

| Name | Type | Description | Default |
| ------------------- | ------ | ------------------------------------------------------------------------- | ------- |
| `kubeVersion` | string | Override Kubernetes version | `nil` |
| `nameOverride` | string | Partially override names.fullname | `nil` |
| `fullnameOverride` | string | Fully override names.fullname | `nil` |
| `commonLabels` | object | Labels to add to all deployed objects | `{}` |
| `commonAnnotations` | object | Annotations to add to all deployed objects | `{}` |
| `networkPort` | int | Deployment container, Deployment livenessProbe, Ingress, and Service port | `3000` |
| Name | Type | Description | Default |
| ------------------ | ------ | ------------------------------------------------------------------------- | ------- |
| `kubeVersion` | string | Override Kubernetes version | `nil` |
| `nameOverride` | string | Partially override names.fullname | `nil` |
| `fullnameOverride` | string | Fully override names.fullname | `nil` |
| `commonLabels` | object | Labels to add to all deployed objects | `{}` |
| `networkPort` | int | Deployment container, Deployment livenessProbe, Ingress, and Service port | `3000` |


### One-Time Secret configuration parameters

| Name | Type | Description | Default |
| ---------------------------------------- | ------- | ----------------------------------------------------------------------------------- | --------------------------- |
| `configuration.host` | string | OTS host (the domain you will access OTS at) | `"localhost"` |
| `configuration.ssl` | boolean | Enable SSL (HTTPS) support | `false` |
| `configuration.baseRedisUrl` | string | Base Redis URL (see values.yaml for more info) | `""` |
| `configuration.colonels` | string | OTS account created with this email is automatically considered admin of the system | `""` |
| `configuration.secret` | string | Used to encrypt OTS secrets - don't forget this, save it somewhere safe | `"CHANGEME"` |
| `configuration.emailer.sendgridEnabled` | boolean | Use SendGrid to allow OTS the ability to send emails | `false` |
| `configuration.emailer.smtpEnabled` | boolean | Use SMTP to allow OTS the ability to send emails | `false` |
| `configuration.emailer.from` | string | SendGrid/SMTP email sender "from" email address | `""` |
| `configuration.emailer.sendgridAccount` | string | SendGrid account login | `"CHANGEME"` |
| `configuration.emailer.sendgridPassword` | string | SendGrid account password | `"CHANGEME"` |
| `configuration.emailer.sendgridFromName` | string | SendGrid email sender "From" name | `"CHANGEME"` |
| `configuration.emailer.sendgridBcc` | string | SendGrid email BCC field | `nil` |
| `configuration.emailer.smtpHost` | string | SMTP hostname | `"localhost"` |
| `configuration.emailer.smtpPort` | int | SMTP port | `587` |
| `configuration.emailer.smtpTls` | boolean | Enable/Disable TLS for SMTP | `false` |
| `configuration.emailer.smtpUser` | string | SMTP username | `nil` |
| `configuration.emailer.smtpPass` | string | SMTP password | `nil` |
| `configuration.emailer.smtpAuth` | string | SMTP authentication type. Allowed values: `plain` or `login` | `nil` |
| `configuration.incoming.enabled` | boolean | Intended for use by IT support teams who need someone to send them sensitive info | `false` |
| `configuration.incoming.email` | string | Where the secret link is sent | `"[email protected]"` |
| `configuration.incoming.passphrase` | string | Used to protect the "secret" | `"CHANGEME"` |
| `configuration.incoming.regex` | string | Used to ensure the ticket number is valid | `'\A[a-zA-Z0-9]{6}\z'` |
| Name | Type | Description | Default |
| ---------------------------------------- | ------- | ----------------------------------------------------------------------------------- | ------------------------ |
| `configuration.host` | string | OTS host (the domain you will access OTS at) | `"localhost"` |
| `configuration.hostPort` | int | OTS host port (the HTTP port used to access OTS) | `nil` |
| `configuration.ssl` | boolean | Enable SSL (HTTPS) support | `false` |
| `configuration.baseRedisUrl` | string | Base Redis URL (see values.yaml for more info) | `""` |
| `configuration.colonels` | string | OTS account created with this email is automatically considered admin of the system | `""` |
| `configuration.secret` | string | Used to encrypt OTS secrets - don't forget this, save it somewhere safe | `"CHANGEME"` |
| `configuration.emailer.sendgridEnabled` | boolean | Use SendGrid to allow OTS the ability to send emails | `false` |
| `configuration.emailer.smtpEnabled` | boolean | Use SMTP to allow OTS the ability to send emails | `false` |
| `configuration.emailer.from` | string | SendGrid/SMTP email sender "from" email address | `""` |
| `configuration.emailer.sendgridAccount` | string | SendGrid account login | `"CHANGEME"` |
| `configuration.emailer.sendgridPassword` | string | SendGrid account password | `"CHANGEME"` |
| `configuration.emailer.sendgridFromName` | string | SendGrid email sender "From" name | `"CHANGEME"` |
| `configuration.emailer.sendgridBcc` | string | SendGrid email BCC field | `nil` |
| `configuration.emailer.smtpHost` | string | SMTP hostname | `"localhost"` |
| `configuration.emailer.smtpPort` | int | SMTP port | `587` |
| `configuration.emailer.smtpTls` | boolean | Enable/Disable TLS for SMTP | `false` |
| `configuration.emailer.smtpUser` | string | SMTP username | `nil` |
| `configuration.emailer.smtpPass` | string | SMTP password | `nil` |
| `configuration.emailer.smtpAuth` | string | SMTP authentication type. Allowed values: `plain` or `login` | `nil` |
| `configuration.incoming.enabled` | boolean | Intended for use by IT support teams who need someone to send them sensitive info | `false` |
| `configuration.incoming.email` | string | Where the secret link is sent | `"[email protected]"` |
| `configuration.incoming.passphrase` | string | Used to protect the "secret" | `"CHANGEME"` |
| `configuration.incoming.regex` | string | Used to ensure the ticket number is valid | `'\A[a-zA-Z0-9]{6}\z'` |


### Deployment parameters
Expand Down Expand Up @@ -116,10 +116,10 @@ The command removes all the Kubernetes components associated with the chart and

### Service parameters

| Name | Type | Description | Default |
| ---------------| ------- | ------------------------------------------- | ------------ |
| `service.port` | int | OTS Service port (overrides `networkPort`) | `nil` |
| `service.type` | string | OTS Service Type | `"NodePort"` |
| Name | Type | Description | Default |
| ---------------| ------ | ------------------------------------------ | ------------ |
| `service.port` | int | OTS Service port (overrides `networkPort`) | `nil` |
| `service.type` | string | OTS Service Type | `"NodePort"` |


### Ingress parameters
Expand Down
8 changes: 6 additions & 2 deletions charts/onetimesecret/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ metadata:
data:
config: |
:site:
:host: {{ print .Values.configuration.host ":" .Values.networkPort | squote }}
:domain: {{ required "'configuration.host' is required!" .Values.configuration.host }}
{{- if .Values.configuration.hostPort }}
:host: {{ print .Values.configuration.host ":" .Values.configuration.hostPort | squote }}
{{- else }}
:host: {{ .Values.configuration.host | squote }}
{{- end }}
:domain: {{ required "'configuration.host' is required!" .Values.configuration.host | squote }}
:ssl: <%= {{ .Values.configuration.ssl | squote }} == 'true' %>
:secret: <%= ENV['ONETIMESECRET_SECRET'] || 'CHANGEME' %>
:redis:
Expand Down
12 changes: 8 additions & 4 deletions charts/onetimesecret/values.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
## @section Common parameters

## @param kubeVersion Override Kubernetes version
## @param {string} kubeVersion - Override Kubernetes version
##
kubeVersion:
## @param nameOverride String to partially override names.fullname
## @param {string} nameOverride - Partially override `names.fullname`
##
nameOverride:
## @param fullnameOverride String to fully override names.fullname
## @param {string} fullnameOverride - Fully override `names.fullname`
##
fullnameOverride:
## @param commonLabels Labels to add to all deployed objects
## @param {object} commonLabels - Labels to add to all deployed objects
##
commonLabels: {}

Expand All @@ -20,6 +20,10 @@ configuration:
## @param {string} configuration.host - Host/domain for accessing the website
##
host: "localhost"
## @param {int} configuration.hostPort - Host/domain port for accessing the website
## Set a port if using something other than port 80
##
hostPort:
## @param {boolean} configuration.ssl - Enable/disable SSL support
##
ssl: false
Expand Down

0 comments on commit 670ce59

Please sign in to comment.