fix rename names

master
Marius Ensrud 5 years ago
parent bbf6e68979
commit ff4e61bf90

@ -1,6 +1,6 @@
apiVersion: v2
name: rsyncd
description: RSYNCD backup server
name: omada-controller
description: omada-controller server
# A chart can be either an 'application' or a 'library' chart.
#

@ -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 "rsyncd.fullname" . }})
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "omada-controller.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 "rsyncd.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "rsyncd.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 "omada-controller.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "omada-controller.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 "rsyncd.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 "omada-controller.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 }}

@ -1,7 +1,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "rsyncd.name" -}}
{{- define "omada-controller.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
@ -10,7 +10,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 "rsyncd.fullname" -}}
{{- define "omada-controller.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
@ -26,16 +26,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 "rsyncd.chart" -}}
{{- define "omada-controller.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "rsyncd.labels" -}}
helm.sh/chart: {{ include "rsyncd.chart" . }}
{{ include "rsyncd.selectorLabels" . }}
{{- define "omada-controller.labels" -}}
helm.sh/chart: {{ include "omada-controller.chart" . }}
{{ include "omada-controller.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
@ -45,17 +45,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "rsyncd.selectorLabels" -}}
app.kubernetes.io/name: {{ include "rsyncd.name" . }}
{{- define "omada-controller.selectorLabels" -}}
app.kubernetes.io/name: {{ include "omada-controller.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "rsyncd.serviceAccountName" -}}
{{- define "omada-controller.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "rsyncd.fullname" .) .Values.serviceAccount.name }}
{{- default (include "omada-controller.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}

@ -2,14 +2,14 @@
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "rsyncd.fullname" . }}
name: {{ include "omada-controller.fullname" . }}
labels:
{{- include "rsyncd.labels" . | nindent 4 }}
{{- include "omada-controller.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "rsyncd.fullname" . }}
name: {{ include "omada-controller.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:

@ -1,5 +1,5 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "rsyncd.fullname" . -}}
{{- $fullName := include "omada-controller.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
@ -10,7 +10,7 @@ kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "rsyncd.labels" . | nindent 4 }}
{{- include "omada-controller.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}

@ -2,9 +2,9 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "rsyncd.serviceAccountName" . }}
name: {{ include "omada-controller.serviceAccountName" . }}
labels:
{{- include "rsyncd.labels" . | nindent 4 }}
{{- include "omada-controller.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}

Loading…
Cancel
Save