Skip to content

Commit

Permalink
Updated the chart name
Browse files Browse the repository at this point in the history
  • Loading branch information
jebjohns committed Jan 21, 2023
1 parent eb4ec34 commit 996c3ae
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 36 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: quaility-trace
name: quality-trace
description: A Helm chart for Quaility Trace

# A chart can be either an 'application' or a 'library' chart.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 "quaility-trace.fullname" . }})
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "quality-trace.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 "quaility-trace.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "quaility-trace.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 "quality-trace.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "quality-trace.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 "quaility-trace.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 "quality-trace.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "quaility-trace.name" -}}
{{- define "quality-trace.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

Expand All @@ -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 "quaility-trace.fullname" -}}
{{- define "quality-trace.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -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 "quaility-trace.chart" -}}
{{- define "quality-trace.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "quaility-trace.labels" -}}
helm.sh/chart: {{ include "quaility-trace.chart" . }}
{{ include "quaility-trace.selectorLabels" . }}
{{- define "quality-trace.labels" -}}
helm.sh/chart: {{ include "quality-trace.chart" . }}
{{ include "quality-trace.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -45,17 +45,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "quaility-trace.selectorLabels" -}}
app.kubernetes.io/name: {{ include "quaility-trace.name" . }}
{{- define "quality-trace.selectorLabels" -}}
app.kubernetes.io/name: {{ include "quality-trace.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "quaility-trace.serviceAccountName" -}}
{{- define "quality-trace.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "quaility-trace.fullname" .) .Values.serviceAccount.name }}
{{- default (include "quality-trace.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "quaility-trace.fullname" . }}
name: {{ include "quality-trace.fullname" . }}
labels:
{{- include "quaility-trace.labels" . | nindent 4 }}
{{- include "quality-trace.labels" . | nindent 4 }}
data:
clickhouseConnUrl: {{ .Values.clickhouse.url }}?username={{ .Values.clickhouse.username }}&password={{ .Values.clickhouse.password }}
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "quaility-trace.fullname" . }}
name: {{ include "quality-trace.fullname" . }}
labels:
{{- include "quaility-trace.labels" . | nindent 4 }}
{{- include "quality-trace.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "quaility-trace.selectorLabels" . | nindent 6 }}
{{- include "quality-trace.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "quaility-trace.selectorLabels" . | nindent 8 }}
{{- include "quality-trace.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "quaility-trace.serviceAccountName" . }}
serviceAccountName: {{ include "quality-trace.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
Expand All @@ -38,14 +38,14 @@ spec:
containerPort: 8080
protocol: TCP
volumeMounts:
- name: {{ include "quaility-trace.fullname" . }}-config
- name: {{ include "quality-trace.fullname" . }}-config
mountPath: "/config.yaml"
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: {{ include "quaility-trace.fullname" . }}-config
- name: {{ include "quality-trace.fullname" . }}-config
configMap:
name: {{ include "quaility-trace.fullname" . }}
name: {{ include "quality-trace.fullname" . }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "quaility-trace.fullname" . }}
name: {{ include "quality-trace.fullname" . }}
labels:
{{- include "quaility-trace.labels" . | nindent 4 }}
{{- include "quality-trace.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "quaility-trace.fullname" . }}
name: {{ include "quality-trace.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "quaility-trace.fullname" . -}}
{{- $fullName := include "quality-trace.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
Expand All @@ -17,7 +17,7 @@ kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "quaility-trace.labels" . | nindent 4 }}
{{- include "quality-trace.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "quaility-trace.fullname" . }}
name: {{ include "quality-trace.fullname" . }}
labels:
{{- include "quaility-trace.labels" . | nindent 4 }}
{{- include "quality-trace.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
Expand All @@ -12,4 +12,4 @@ spec:
protocol: TCP
name: http
selector:
{{- include "quaility-trace.selectorLabels" . | nindent 4 }}
{{- include "quality-trace.selectorLabels" . | nindent 4 }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "quaility-trace.serviceAccountName" . }}
name: {{ include "quality-trace.serviceAccountName" . }}
labels:
{{- include "quaility-trace.labels" . | nindent 4 }}
{{- include "quality-trace.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Default values for quaility-trace.
# Default values for quality-trace.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

Expand Down

0 comments on commit 996c3ae

Please sign in to comment.