1
0
Fork 0

Renaming HELM Package

This commit is contained in:
Joao Gilberto Magalhaes 2022-08-28 01:18:23 -05:00
parent fa49e16454
commit b01ec6a09a
8 changed files with 53 additions and 53 deletions

View file

@ -1,5 +1,5 @@
apiVersion: v2
name: easyhaproxy-ingress
name: easyhaproxy
description: "EasyHAProxy - A service discovery backed on HAProxy"
# A chart can be either an 'application' or a 'library' chart.

View file

@ -1,7 +1,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "easyhaproxy-ingress.name" -}}
{{- define "easyhaproxy.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 "easyhaproxy-ingress.fullname" -}}
{{- define "easyhaproxy.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 "easyhaproxy-ingress.chart" -}}
{{- define "easyhaproxy.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "easyhaproxy-ingress.labels" -}}
helm.sh/chart: {{ include "easyhaproxy-ingress.chart" . }}
{{ include "easyhaproxy-ingress.selectorLabels" . }}
{{- define "easyhaproxy.labels" -}}
helm.sh/chart: {{ include "easyhaproxy.chart" . }}
{{ include "easyhaproxy.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 "easyhaproxy-ingress.selectorLabels" -}}
app.kubernetes.io/name: {{ include "easyhaproxy-ingress.name" . }}
{{- define "easyhaproxy.selectorLabels" -}}
app.kubernetes.io/name: {{ include "easyhaproxy.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "easyhaproxy-ingress.serviceAccountName" -}}
{{- define "easyhaproxy.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "easyhaproxy-ingress.fullname" .) .Values.serviceAccount.name }}
{{- default (include "easyhaproxy.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}

View file

@ -3,10 +3,10 @@
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ include "easyhaproxy-ingress.fullname" . }}
name: {{ include "easyhaproxy.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "easyhaproxy-ingress.labels" . | nindent 4 }}
{{- include "easyhaproxy.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}

View file

@ -3,10 +3,10 @@
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ include "easyhaproxy-ingress.fullname" . }}
name: {{ include "easyhaproxy.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "easyhaproxy-ingress.labels" . | nindent 4 }}
{{- include "easyhaproxy.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
@ -14,9 +14,9 @@ metadata:
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "easyhaproxy-ingress.fullname" . }}
name: {{ include "easyhaproxy.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ include "easyhaproxy-ingress.serviceAccountName" . }}
name: {{ include "easyhaproxy.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}

View file

@ -2,18 +2,18 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "easyhaproxy-ingress.fullname" . }}
name: {{ include "easyhaproxy.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "easyhaproxy-ingress.labels" . | nindent 4 }}
{{- include "easyhaproxy.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "easyhaproxy-ingress.selectorLabels" . | nindent 6 }}
{{- include "easyhaproxy.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "easyhaproxy-ingress.selectorLabels" . | nindent 8 }}
{{- include "easyhaproxy.selectorLabels" . | nindent 8 }}
spec:
affinity:
nodeAffinity:
@ -24,7 +24,7 @@ spec:
operator: In
values:
{{- toYaml .Values.masterNode.values | nindent 18 }}
serviceAccountName: {{ include "easyhaproxy-ingress.serviceAccountName" . }}
serviceAccountName: {{ include "easyhaproxy.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:

View file

@ -2,10 +2,10 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "easyhaproxy-ingress.serviceAccountName" . }}
name: {{ include "easyhaproxy.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "easyhaproxy-ingress.labels" . | nindent 4 }}
{{- include "easyhaproxy.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}

View file

@ -1,4 +1,4 @@
# Default values for easyhaproxy-ingress.
# Default values for easyhaproxy.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.