diff --git a/plexporter/templates/NOTES.txt b/plexporter/templates/NOTES.txt index 7bca3b2..9ad1a49 100644 --- a/plexporter/templates/NOTES.txt +++ b/plexporter/templates/NOTES.txt @@ -6,16 +6,16 @@ {{- 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 "sonarr.fullname" . }}) + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "plexporter.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 --namespace {{ .Release.Namespace }} svc -w {{ include "sonarr.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "sonarr.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "plexporter.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "plexporter.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") 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 "sonarr.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "plexporter.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 --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 {{- end }} diff --git a/plexporter/templates/_helpers.tpl b/plexporter/templates/_helpers.tpl index bc3d1c7..fd74f0c 100644 --- a/plexporter/templates/_helpers.tpl +++ b/plexporter/templates/_helpers.tpl @@ -2,7 +2,7 @@ {{/* Expand the name of the chart. */}} -{{- define "sonarr.name" -}} +{{- define "plexporter.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} @@ -11,7 +11,7 @@ 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 "sonarr.fullname" -}} +{{- define "plexporter.fullname" -}} {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- else -}} @@ -27,16 +27,16 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "sonarr.chart" -}} +{{- define "plexporter.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* Common labels */}} -{{- define "sonarr.labels" -}} -helm.sh/chart: {{ include "sonarr.chart" . }} -{{ include "sonarr.selectorLabels" . }} +{{- define "plexporter.labels" -}} +helm.sh/chart: {{ include "plexporter.chart" . }} +{{ include "plexporter.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -46,17 +46,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Selector labels */}} -{{- define "sonarr.selectorLabels" -}} -app.kubernetes.io/name: {{ include "sonarr.name" . }} +{{- define "plexporter.selectorLabels" -}} +app.kubernetes.io/name: {{ include "plexporterr.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} {{/* Create the name of the service account to use */}} -{{- define "sonarr.serviceAccountName" -}} +{{- define "plexporter.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} - {{ default (include "sonarr.fullname" .) .Values.serviceAccount.name }} + {{ default (include "plexporter.fullname" .) .Values.serviceAccount.name }} {{- else -}} {{ default "default" .Values.serviceAccount.name }} {{- end -}} diff --git a/plexporter/templates/serviceaccount.yaml b/plexporter/templates/serviceaccount.yaml index 1b095bd..5ad07e9 100644 --- a/plexporter/templates/serviceaccount.yaml +++ b/plexporter/templates/serviceaccount.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "sonarr.serviceAccountName" . }} + name: {{ include "plexporter.serviceAccountName" . }} labels: -{{ include "sonarr.labels" . | nindent 4 }} +{{ include "plexporter.labels" . | nindent 4 }} {{- end -}} diff --git a/plexporter/templates/tests/test-connection.yaml b/plexporter/templates/tests/test-connection.yaml index 3f81478..8bbb60c 100644 --- a/plexporter/templates/tests/test-connection.yaml +++ b/plexporter/templates/tests/test-connection.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Pod metadata: - name: "{{ include "sonarr.fullname" . }}-test-connection" + name: "{{ include "plexporter.fullname" . }}-test-connection" labels: -{{ include "sonarr.labels" . | nindent 4 }} +{{ include "plexporter.labels" . | nindent 4 }} annotations: "helm.sh/hook": test-success spec: @@ -11,5 +11,5 @@ spec: - name: wget image: busybox command: ['wget'] - args: ['{{ include "sonarr.fullname" . }}:{{ .Values.service.port }}'] + args: ['{{ include "plexporter.fullname" . }}:{{ .Values.service.port }}'] restartPolicy: Never diff --git a/plexporter/values.yaml b/plexporter/values.yaml index edce75c..6655248 100644 --- a/plexporter/values.yaml +++ b/plexporter/values.yaml @@ -1,4 +1,4 @@ -# Default values for sonarr. +# Default values for plexporter. # This is a YAML-formatted file. # Declare variables to be passed into your templates.