diff --git a/charts/dashmachine/Chart.yaml b/charts/dashmachine/Chart.yaml index 80487e4e..7f223a7a 100644 --- a/charts/dashmachine/Chart.yaml +++ b/charts/dashmachine/Chart.yaml @@ -4,9 +4,13 @@ description: DashMachine is another web application bookmark dashboard, with fun icon: https://github.com/rmountjoy92/DashMachine/raw/master/dashmachine/static/images/logo/logo.png home: https://github.com/rmountjoy92/DashMachine name: dashmachine -version: 1.0.0 +version: 2.0.0 sources: - https://github.com/rmountjoy92/DashMachine maintainers: - name: carpenike email: ryan@ryanholt.net +dependencies: + - name: common + version: 1.6.1 + repository: https://k8s-at-home.com/charts/ diff --git a/charts/dashmachine/OWNERS b/charts/dashmachine/OWNERS new file mode 100644 index 00000000..8840672c --- /dev/null +++ b/charts/dashmachine/OWNERS @@ -0,0 +1,4 @@ +approvers: +- carpenike +reviewers: +- carpenike diff --git a/charts/dashmachine/README.md b/charts/dashmachine/README.md index a545f71d..dc80737a 100644 --- a/charts/dashmachine/README.md +++ b/charts/dashmachine/README.md @@ -1,31 +1,69 @@ -dashmachine -=========== -DashMachine is another web application bookmark dashboard, with fun features. +# Dashmachine -## Chart Values +This is a helm chart for [DashMachine](https://github.com/rmountjoy92/DashMachine). -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| affinity | object | `{}` | | -| deploymentAnnotations | object | `{}` | | -| fullnameOverride | string | `""` | | -| image.pullPolicy | string | `"IfNotPresent"` | | -| image.repository | string | `"rmountjoy/dashmachine"` | | -| image.tag | string | `"latest"` | | -| ingress.annotations | object | `{}` | | -| ingress.enabled | bool | `false` | | -| ingress.hosts[0] | string | `"chart-example.local"` | | -| ingress.paths[0] | string | `"/"` | | -| ingress.tls | list | `[]` | | -| nameOverride | string | `""` | | -| nodeSelector | object | `{}` | | -| persistence.accessModes[0] | string | `"ReadWriteOnce"` | | -| persistence.enabled | bool | `false` | | -| persistence.size | string | `"1Gi"` | | -| persistence.storageClassName | string | `""` | | -| podAnnotations | object | `{}` | | -| replicaCount | int | `1` | | -| resources | object | `{}` | | -| service.port | int | `5000` | | -| service.type | string | `"ClusterIP"` | | -| tolerations | list | `[]` | | +**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/k8s-at-home/charts/issues/new/choose)** + +## TL;DR; + +```shell +$ helm repo add k8s-at-home https://k8s-at-home.com/charts/ +$ helm install k8s-at-home/dashmachine +``` + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```console +helm install --name my-release k8s-at-home/dashmachine +``` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```console +helm delete my-release --purge +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Configuration +Read through the charts [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/dashmachine/values.yaml) +file. It has several commented out suggested values. +Additionally you can take a look at the common library [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/common/values.yaml) for more (advanced) configuration options. + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, +```console +helm install dashmachine \ + --set env.TZ="America/New_York" \ + k8s-at-home/dashmachine +``` +Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the +chart. For example, +```console +helm install dashmachine k8s-at-home/dashmachine --values values.yaml +``` + +```yaml +image: + tag: ... +``` + +--- +**NOTE** + +If you get +```console +Error: rendered manifests contain a resource that already exists. Unable to continue with install: existing resource conflict: ...` +``` +it may be because you uninstalled the chart with `skipuninstall` enabled, you need to manually delete the pvc or use `existingClaim`. + +--- + +## Upgrading an existing Release to a new major version + +A major chart version change (like 4.0.1 -> 5.0.0) indicates that there is an incompatible breaking change potentially needing manual actions. + +Refer to the library values.yaml for more configuration options. diff --git a/charts/dashmachine/ci/ct-values.yaml b/charts/dashmachine/ci/ct-values.yaml new file mode 100644 index 00000000..f6ccc628 --- /dev/null +++ b/charts/dashmachine/ci/ct-values.yaml @@ -0,0 +1,2 @@ +ingress: + enabled: true diff --git a/charts/dashmachine/templates/NOTES.txt b/charts/dashmachine/templates/NOTES.txt deleted file mode 100644 index 930ab721..00000000 --- a/charts/dashmachine/templates/NOTES.txt +++ /dev/null @@ -1,21 +0,0 @@ -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range $.Values.ingress.paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host }}{{ . }} - {{- end }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "dashmachine.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get svc -w {{ include "dashmachine.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "dashmachine.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "dashmachine.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl port-forward $POD_NAME 8080:80 -{{- end }} diff --git a/charts/dashmachine/templates/_helpers.tpl b/charts/dashmachine/templates/_helpers.tpl deleted file mode 100644 index a4c49ef0..00000000 --- a/charts/dashmachine/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "dashmachine.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "dashmachine.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "dashmachine.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/charts/dashmachine/templates/common.yaml b/charts/dashmachine/templates/common.yaml new file mode 100644 index 00000000..a6613c2c --- /dev/null +++ b/charts/dashmachine/templates/common.yaml @@ -0,0 +1 @@ +{{ include "common.all" . }} diff --git a/charts/dashmachine/templates/deployment.yaml b/charts/dashmachine/templates/deployment.yaml deleted file mode 100644 index d04cee7d..00000000 --- a/charts/dashmachine/templates/deployment.yaml +++ /dev/null @@ -1,78 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "dashmachine.fullname" . }} - {{- if .Values.deploymentAnnotations }} - annotations: - {{- range $key, $value := .Values.deploymentAnnotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} - labels: - app.kubernetes.io/name: {{ include "dashmachine.name" . }} - helm.sh/chart: {{ include "dashmachine.chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/managed-by: {{ .Release.Service }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app.kubernetes.io/name: {{ include "dashmachine.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - template: - metadata: - labels: - app.kubernetes.io/name: {{ include "dashmachine.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - {{- if .Values.podAnnotations }} - annotations: - {{- range $key, $value := .Values.podAnnotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} - spec: - {{- if .Values.dnsConfig }} - dnsConfig: - {{- toYaml .Values.dnsConfig | nindent 8 }} - {{- end }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http - containerPort: 5000 - protocol: TCP - # livenessProbe: - # httpGet: - # path: /notifications - # port: http - # readinessProbe: - # httpGet: - # path: /notifications - # port: http - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumeMounts: - - name: config - mountPath: /dashmachine/dashmachine/user_data - volumes: - - name: config - {{- if .Values.persistence.enabled }} - persistentVolumeClaim: - claimName: {{ template "dashmachine.fullname" . }} - {{- else }} - emptyDir: {} - {{- end }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/charts/dashmachine/templates/ingress.yaml b/charts/dashmachine/templates/ingress.yaml deleted file mode 100644 index 34ea0936..00000000 --- a/charts/dashmachine/templates/ingress.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "dashmachine.fullname" . -}} -{{- $ingressPaths := .Values.ingress.paths -}} -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - app.kubernetes.io/name: {{ include "dashmachine.name" . }} - helm.sh/chart: {{ include "dashmachine.chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/managed-by: {{ .Release.Service }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: -{{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} -{{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ . | quote }} - http: - paths: - {{- range $ingressPaths }} - - path: {{ . }} - backend: - serviceName: {{ $fullName }} - servicePort: http - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/dashmachine/templates/pvc.yaml b/charts/dashmachine/templates/pvc.yaml deleted file mode 100644 index 278841f0..00000000 --- a/charts/dashmachine/templates/pvc.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "dashmachine.fullname" . }} - labels: - app.kubernetes.io/name: {{ include "dashmachine.name" . }} - helm.sh/chart: {{ include "dashmachine.chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/managed-by: {{ .Release.Service }} - {{- with .Values.persistence.annotations }} - annotations: -{{ toYaml . | indent 4 }} - {{- end }} -spec: - accessModes: - {{- range .Values.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.persistence.size | quote }} - storageClassName: {{ .Values.persistence.storageClass }} -{{- end -}} diff --git a/charts/dashmachine/templates/service.yaml b/charts/dashmachine/templates/service.yaml deleted file mode 100644 index 0cd152a0..00000000 --- a/charts/dashmachine/templates/service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "dashmachine.fullname" . }} - labels: - app.kubernetes.io/name: {{ include "dashmachine.name" . }} - helm.sh/chart: {{ include "dashmachine.chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/managed-by: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - app.kubernetes.io/name: {{ include "dashmachine.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/charts/dashmachine/templates/tests/test-connection.yaml b/charts/dashmachine/templates/tests/test-connection.yaml deleted file mode 100644 index 5174419a..00000000 --- a/charts/dashmachine/templates/tests/test-connection.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "dashmachine.fullname" . }}-test-connection" - labels: - app.kubernetes.io/name: {{ include "dashmachine.name" . }} - helm.sh/chart: {{ include "dashmachine.chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/managed-by: {{ .Release.Service }} - annotations: - "helm.sh/hook": test-success -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "dashmachine.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/charts/dashmachine/values.yaml b/charts/dashmachine/values.yaml index 58f59d9d..68eb1eac 100644 --- a/charts/dashmachine/values.yaml +++ b/charts/dashmachine/values.yaml @@ -1,65 +1,22 @@ # Default values for dashmachine. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 image: repository: rmountjoy/dashmachine tag: v0.5-4 pullPolicy: IfNotPresent -nameOverride: "" -fullnameOverride: "" +strategy: + type: Recreate service: - type: ClusterIP - port: 5000 + port: + port: 5000 -ingress: - enabled: false - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - paths: ["/"] - hosts: - - chart-example.local - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} +env: {} + # TZ: UTC persistence: - enabled: false - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - storageClass: "" - accessModes: - - ReadWriteOnce - size: 1Gi - -podAnnotations: {} - -deploymentAnnotations: {} + config: + enabled: false + emptyDir: false + mountPath: /dashmachine/dashmachine/user_data