Skip to content

Commit

Permalink
chore: renamed from cve-dict to vuls-dict
Browse files Browse the repository at this point in the history
  • Loading branch information
ashish1099 committed Jan 17, 2025
1 parent 47ab347 commit 9ce10d9
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: cve-dictionary
name: vuls-dictionary
description: A Helm chart for Kubernetes

# 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 "cve-dictionary.fullname" . }})
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "vuls-dictionary.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 its status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "cve-dictionary.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "cve-dictionary.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
You can watch its status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "vuls-dictionary.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "vuls-dictionary.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 "cve-dictionary.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 "vuls-dictionary.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 "cve-dictionary.name" -}}
{{- define "vuls-dictionary.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 "cve-dictionary.fullname" -}}
{{- define "vuls-dictionary.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 "cve-dictionary.chart" -}}
{{- define "vuls-dictionary.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "cve-dictionary.labels" -}}
helm.sh/chart: {{ include "cve-dictionary.chart" . }}
{{ include "cve-dictionary.selectorLabels" . }}
{{- define "vuls-dictionary.labels" -}}
helm.sh/chart: {{ include "vuls-dictionary.chart" . }}
{{ include "vuls-dictionary.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 "cve-dictionary.selectorLabels" -}}
app.kubernetes.io/name: {{ include "cve-dictionary.name" . }}
{{- define "vuls-dictionary.selectorLabels" -}}
app.kubernetes.io/name: {{ include "vuls-dictionary.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "cve-dictionary.serviceAccountName" -}}
{{- define "vuls-dictionary.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "cve-dictionary.fullname" .) .Values.serviceAccount.name }}
{{- default (include "vuls-dictionary.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "cve-dictionary.fullname" . }}
name: {{ include "vuls-dictionary.fullname" . }}
labels:
{{- include "cve-dictionary.labels" . | nindent 4 }}
{{- include "vuls-dictionary.labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "cve-dictionary.selectorLabels" . | nindent 6 }}
{{- include "vuls-dictionary.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "cve-dictionary.labels" . | nindent 8 }}
{{- include "vuls-dictionary.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand All @@ -25,7 +25,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "cve-dictionary.serviceAccountName" . }}
serviceAccountName: {{ include "vuls-dictionary.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "cve-dictionary.fullname" . }}
name: {{ include "vuls-dictionary.fullname" . }}
labels:
{{- include "cve-dictionary.labels" . | nindent 4 }}
{{- include "vuls-dictionary.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down Expand Up @@ -35,7 +35,7 @@ spec:
{{- end }}
backend:
service:
name: {{ include "cve-dictionary.fullname" $ }}
name: {{ include "vuls-dictionary.fullname" $ }}
port:
number: {{ $.Values.service.port }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "cve-dictionary.fullname" . }}
name: {{ include "vuls-dictionary.fullname" . }}
labels:
{{- include "cve-dictionary.labels" . | nindent 4 }}
{{- include "vuls-dictionary.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
Expand All @@ -12,4 +12,4 @@ spec:
protocol: TCP
name: http
selector:
{{- include "cve-dictionary.selectorLabels" . | nindent 4 }}
{{- include "vuls-dictionary.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 "cve-dictionary.serviceAccountName" . }}
name: {{ include "vuls-dictionary.serviceAccountName" . }}
labels:
{{- include "cve-dictionary.labels" . | nindent 4 }}
{{- include "vuls-dictionary.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down

0 comments on commit 9ce10d9

Please sign in to comment.