From b01ec6a09aa6ca623a23ccc09c31e07c8381d57e Mon Sep 17 00:00:00 2001 From: Joao Gilberto Magalhaes Date: Sun, 28 Aug 2022 01:18:23 -0500 Subject: [PATCH] Renaming HELM Package --- deploy/kubernetes/easyhaproxy.yml | 56 +++++++++---------- helm/easyhaproxy/Chart.yaml | 2 +- helm/easyhaproxy/templates/_helpers.tpl | 20 +++---- helm/easyhaproxy/templates/clusterrole.yaml | 4 +- .../templates/clusterrolebinding.yaml | 8 +-- helm/easyhaproxy/templates/deployment.yaml | 10 ++-- .../easyhaproxy/templates/serviceaccount.yaml | 4 +- helm/easyhaproxy/values.yaml | 2 +- 8 files changed, 53 insertions(+), 53 deletions(-) diff --git a/deploy/kubernetes/easyhaproxy.yml b/deploy/kubernetes/easyhaproxy.yml index 64f9630..f44626d 100644 --- a/deploy/kubernetes/easyhaproxy.yml +++ b/deploy/kubernetes/easyhaproxy.yml @@ -1,27 +1,27 @@ --- -# Source: easyhaproxy-ingress/templates/serviceaccount.yaml +# Source: easyhaproxy/templates/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount metadata: - name: byjg-easyhaproxy-ingress + name: ingress-easyhaproxy namespace: easyhaproxy labels: - helm.sh/chart: easyhaproxy-ingress-0.1.0 - app.kubernetes.io/name: easyhaproxy-ingress - app.kubernetes.io/instance: byjg + helm.sh/chart: easyhaproxy-0.1.0 + app.kubernetes.io/name: easyhaproxy + app.kubernetes.io/instance: ingress app.kubernetes.io/version: "test" app.kubernetes.io/managed-by: Helm --- -# Source: easyhaproxy-ingress/templates/clusterrole.yaml +# Source: easyhaproxy/templates/clusterrole.yaml kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: - name: byjg-easyhaproxy-ingress + name: ingress-easyhaproxy namespace: easyhaproxy labels: - helm.sh/chart: easyhaproxy-ingress-0.1.0 - app.kubernetes.io/name: easyhaproxy-ingress - app.kubernetes.io/instance: byjg + helm.sh/chart: easyhaproxy-0.1.0 + app.kubernetes.io/name: easyhaproxy + app.kubernetes.io/instance: ingress app.kubernetes.io/version: "test" app.kubernetes.io/managed-by: Helm rules: @@ -78,49 +78,49 @@ rules: # - list # - watch --- -# Source: easyhaproxy-ingress/templates/clusterrolebinding.yaml +# Source: easyhaproxy/templates/clusterrolebinding.yaml kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: - name: byjg-easyhaproxy-ingress + name: ingress-easyhaproxy namespace: easyhaproxy labels: - helm.sh/chart: easyhaproxy-ingress-0.1.0 - app.kubernetes.io/name: easyhaproxy-ingress - app.kubernetes.io/instance: byjg + helm.sh/chart: easyhaproxy-0.1.0 + app.kubernetes.io/name: easyhaproxy + app.kubernetes.io/instance: ingress app.kubernetes.io/version: "test" app.kubernetes.io/managed-by: Helm roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: byjg-easyhaproxy-ingress + name: ingress-easyhaproxy subjects: - kind: ServiceAccount - name: byjg-easyhaproxy-ingress + name: ingress-easyhaproxy namespace: easyhaproxy --- -# Source: easyhaproxy-ingress/templates/deployment.yaml +# Source: easyhaproxy/templates/deployment.yaml apiVersion: apps/v1 kind: DaemonSet metadata: - name: byjg-easyhaproxy-ingress + name: ingress-easyhaproxy namespace: easyhaproxy labels: - helm.sh/chart: easyhaproxy-ingress-0.1.0 - app.kubernetes.io/name: easyhaproxy-ingress - app.kubernetes.io/instance: byjg + helm.sh/chart: easyhaproxy-0.1.0 + app.kubernetes.io/name: easyhaproxy + app.kubernetes.io/instance: ingress app.kubernetes.io/version: "test" app.kubernetes.io/managed-by: Helm spec: selector: matchLabels: - app.kubernetes.io/name: easyhaproxy-ingress - app.kubernetes.io/instance: byjg + app.kubernetes.io/name: easyhaproxy + app.kubernetes.io/instance: ingress template: metadata: labels: - app.kubernetes.io/name: easyhaproxy-ingress - app.kubernetes.io/instance: byjg + app.kubernetes.io/name: easyhaproxy + app.kubernetes.io/instance: ingress spec: affinity: nodeAffinity: @@ -131,11 +131,11 @@ spec: operator: In values: - master - serviceAccountName: byjg-easyhaproxy-ingress + serviceAccountName: ingress-easyhaproxy securityContext: {} containers: - - name: easyhaproxy-ingress + - name: easyhaproxy securityContext: {} image: "byjg/easy-haproxy:test" diff --git a/helm/easyhaproxy/Chart.yaml b/helm/easyhaproxy/Chart.yaml index fbfb95c..7bc7817 100644 --- a/helm/easyhaproxy/Chart.yaml +++ b/helm/easyhaproxy/Chart.yaml @@ -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. diff --git a/helm/easyhaproxy/templates/_helpers.tpl b/helm/easyhaproxy/templates/_helpers.tpl index 3e9c496..d84556c 100644 --- a/helm/easyhaproxy/templates/_helpers.tpl +++ b/helm/easyhaproxy/templates/_helpers.tpl @@ -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 }} diff --git a/helm/easyhaproxy/templates/clusterrole.yaml b/helm/easyhaproxy/templates/clusterrole.yaml index 77aaa1f..04ac23e 100644 --- a/helm/easyhaproxy/templates/clusterrole.yaml +++ b/helm/easyhaproxy/templates/clusterrole.yaml @@ -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 }} diff --git a/helm/easyhaproxy/templates/clusterrolebinding.yaml b/helm/easyhaproxy/templates/clusterrolebinding.yaml index c806403..d936de9 100644 --- a/helm/easyhaproxy/templates/clusterrolebinding.yaml +++ b/helm/easyhaproxy/templates/clusterrolebinding.yaml @@ -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 }} diff --git a/helm/easyhaproxy/templates/deployment.yaml b/helm/easyhaproxy/templates/deployment.yaml index 3ef6c3a..df86012 100644 --- a/helm/easyhaproxy/templates/deployment.yaml +++ b/helm/easyhaproxy/templates/deployment.yaml @@ -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: diff --git a/helm/easyhaproxy/templates/serviceaccount.yaml b/helm/easyhaproxy/templates/serviceaccount.yaml index 9d1310e..5182461 100644 --- a/helm/easyhaproxy/templates/serviceaccount.yaml +++ b/helm/easyhaproxy/templates/serviceaccount.yaml @@ -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 }} diff --git a/helm/easyhaproxy/values.yaml b/helm/easyhaproxy/values.yaml index 213937f..2bf5a1e 100644 --- a/helm/easyhaproxy/values.yaml +++ b/helm/easyhaproxy/values.yaml @@ -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.