diff --git a/charts/cheminformaticsMicroservice/.helmignore b/charts/cheminfo-microservice/.helmignore similarity index 100% rename from charts/cheminformaticsMicroservice/.helmignore rename to charts/cheminfo-microservice/.helmignore diff --git a/charts/cheminformaticsMicroservice/Chart.yaml b/charts/cheminfo-microservice/Chart.yaml similarity index 96% rename from charts/cheminformaticsMicroservice/Chart.yaml rename to charts/cheminfo-microservice/Chart.yaml index 7b28df3..b04f409 100644 --- a/charts/cheminformaticsMicroservice/Chart.yaml +++ b/charts/cheminfo-microservice/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -name: cheminformaticsMicroservice +name: cheminfo-microservice description: A Helm chart for cheminformatics microservice. maintainers: - name: Nisha Sharma @@ -18,7 +18,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.2 +version: 0.1.3 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/cheminformaticsMicroservice/templates/NOTES.txt b/charts/cheminfo-microservice/templates/NOTES.txt similarity index 74% rename from charts/cheminformaticsMicroservice/templates/NOTES.txt rename to charts/cheminfo-microservice/templates/NOTES.txt index f368eb1..d62f4ee 100644 --- a/charts/cheminformaticsMicroservice/templates/NOTES.txt +++ b/charts/cheminfo-microservice/templates/NOTES.txt @@ -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 "cheminformaticsMicroservice.fullname" . }}) + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "cheminfo-microservice.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 "cheminformaticsMicroservice.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "cheminformaticsMicroservice.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 "cheminfo-microservice.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "cheminfo-microservice.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 "cheminformaticsMicroservice.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 "cheminfo-microservice.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 diff --git a/charts/cheminformaticsMicroservice/templates/_helpers.tpl b/charts/cheminfo-microservice/templates/_helpers.tpl similarity index 68% rename from charts/cheminformaticsMicroservice/templates/_helpers.tpl rename to charts/cheminfo-microservice/templates/_helpers.tpl index 19dcbca..6a6dc1a 100644 --- a/charts/cheminformaticsMicroservice/templates/_helpers.tpl +++ b/charts/cheminfo-microservice/templates/_helpers.tpl @@ -1,7 +1,7 @@ {{/* Expand the name of the chart. */}} -{{- define "cheminformaticsMicroservice.name" -}} +{{- define "cheminfo-microservice.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 "cheminformaticsMicroservice.fullname" -}} +{{- define "cheminfo-microservice.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 "cheminformaticsMicroservice.chart" -}} +{{- define "cheminfo-microservice.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* Common labels */}} -{{- define "cheminformaticsMicroservice.labels" -}} -helm.sh/chart: {{ include "cheminformaticsMicroservice.chart" . }} -{{ include "cheminformaticsMicroservice.selectorLabels" . }} +{{- define "cheminfo-microservice.labels" -}} +helm.sh/chart: {{ include "cheminfo-microservice.chart" . }} +{{ include "cheminfo-microservice.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 "cheminformaticsMicroservice.selectorLabels" -}} -app.kubernetes.io/name: {{ include "cheminformaticsMicroservice.name" . }} +{{- define "cheminfo-microservice.selectorLabels" -}} +app.kubernetes.io/name: {{ include "cheminfo-microservice.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} {{/* Create the name of the service account to use */}} -{{- define "cheminformaticsMicroservice.serviceAccountName" -}} +{{- define "cheminfo-microservice.serviceAccountName" -}} {{- if .Values.serviceAccount.create }} -{{- default (include "cheminformaticsMicroservice.fullname" .) .Values.serviceAccount.name }} +{{- default (include "cheminfo-microservice.fullname" .) .Values.serviceAccount.name }} {{- else }} {{- default "default" .Values.serviceAccount.name }} {{- end }} diff --git a/charts/cheminformaticsMicroservice/templates/deployment.yaml b/charts/cheminfo-microservice/templates/deployment.yaml similarity index 80% rename from charts/cheminformaticsMicroservice/templates/deployment.yaml rename to charts/cheminfo-microservice/templates/deployment.yaml index f11c062..8ba6e88 100644 --- a/charts/cheminformaticsMicroservice/templates/deployment.yaml +++ b/charts/cheminfo-microservice/templates/deployment.yaml @@ -1,16 +1,16 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "cheminformaticsMicroservice.fullname" . }} + name: {{ include "cheminfo-microservice.fullname" . }} labels: - {{- include "cheminformaticsMicroservice.labels" . | nindent 4 }} + {{- include "cheminfo-microservice.labels" . | nindent 4 }} spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} selector: matchLabels: - {{- include "cheminformaticsMicroservice.selectorLabels" . | nindent 6 }} + {{- include "cheminfo-microservice.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} @@ -18,13 +18,13 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "cheminformaticsMicroservice.selectorLabels" . | nindent 8 }} + {{- include "cheminfo-microservice.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} - serviceAccountName: {{ include "cheminformaticsMicroservice.serviceAccountName" . }} + serviceAccountName: {{ include "cheminfo-microservice.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: diff --git a/charts/cheminformaticsMicroservice/templates/hpa.yaml b/charts/cheminfo-microservice/templates/hpa.yaml similarity index 79% rename from charts/cheminformaticsMicroservice/templates/hpa.yaml rename to charts/cheminfo-microservice/templates/hpa.yaml index 2053850..ba36350 100644 --- a/charts/cheminformaticsMicroservice/templates/hpa.yaml +++ b/charts/cheminfo-microservice/templates/hpa.yaml @@ -2,14 +2,14 @@ apiVersion: autoscaling/v2beta1 kind: HorizontalPodAutoscaler metadata: - name: {{ include "cheminformaticsMicroservice.fullname" . }} + name: {{ include "cheminfo-microservice.fullname" . }} labels: - {{- include "cheminformaticsMicroservice.labels" . | nindent 4 }} + {{- include "cheminfo-microservice.labels" . | nindent 4 }} spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment - name: {{ include "cheminformaticsMicroservice.fullname" . }} + name: {{ include "cheminfo-microservice.fullname" . }} minReplicas: {{ .Values.autoscaling.minReplicas }} maxReplicas: {{ .Values.autoscaling.maxReplicas }} metrics: diff --git a/charts/cheminformaticsMicroservice/templates/ingress.yaml b/charts/cheminfo-microservice/templates/ingress.yaml similarity index 93% rename from charts/cheminformaticsMicroservice/templates/ingress.yaml rename to charts/cheminfo-microservice/templates/ingress.yaml index b62b682..64659a4 100644 --- a/charts/cheminformaticsMicroservice/templates/ingress.yaml +++ b/charts/cheminfo-microservice/templates/ingress.yaml @@ -1,5 +1,5 @@ {{- if .Values.ingress.enabled -}} -{{- $fullName := include "cheminformaticsMicroservice.fullname" . -}} +{{- $fullName := include "cheminfo-microservice.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") }} @@ -17,7 +17,7 @@ kind: Ingress metadata: name: {{ $fullName }} labels: - {{- include "cheminformaticsMicroservice.labels" . | nindent 4 }} + {{- include "cheminfo-microservice.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/charts/cheminformaticsMicroservice/templates/service.yaml b/charts/cheminfo-microservice/templates/service.yaml similarity index 52% rename from charts/cheminformaticsMicroservice/templates/service.yaml rename to charts/cheminfo-microservice/templates/service.yaml index 2354f3e..5125933 100644 --- a/charts/cheminformaticsMicroservice/templates/service.yaml +++ b/charts/cheminfo-microservice/templates/service.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "cheminformaticsMicroservice.fullname" . }} + name: {{ include "cheminfo-microservice.fullname" . }} labels: - {{- include "cheminformaticsMicroservice.labels" . | nindent 4 }} + {{- include "cheminfo-microservice.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} ports: @@ -12,4 +12,4 @@ spec: protocol: TCP name: http selector: - {{- include "cheminformaticsMicroservice.selectorLabels" . | nindent 4 }} + {{- include "cheminfo-microservice.selectorLabels" . | nindent 4 }} diff --git a/charts/cheminformaticsMicroservice/templates/serviceaccount.yaml b/charts/cheminfo-microservice/templates/serviceaccount.yaml similarity index 60% rename from charts/cheminformaticsMicroservice/templates/serviceaccount.yaml rename to charts/cheminfo-microservice/templates/serviceaccount.yaml index a0151b2..f4249a6 100644 --- a/charts/cheminformaticsMicroservice/templates/serviceaccount.yaml +++ b/charts/cheminfo-microservice/templates/serviceaccount.yaml @@ -2,9 +2,9 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "cheminformaticsMicroservice.serviceAccountName" . }} + name: {{ include "cheminfo-microservice.serviceAccountName" . }} labels: - {{- include "cheminformaticsMicroservice.labels" . | nindent 4 }} + {{- include "cheminfo-microservice.labels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/charts/cheminfo-microservice/templates/tests/test-connection.yaml b/charts/cheminfo-microservice/templates/tests/test-connection.yaml new file mode 100644 index 0000000..e642321 --- /dev/null +++ b/charts/cheminfo-microservice/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "cheminfo-microservice.fullname" . }}-test-connection" + labels: + {{- include "cheminfo-microservice.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "cheminfo-microservice.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/charts/cheminformaticsMicroservice/values.yaml b/charts/cheminfo-microservice/values.yaml similarity index 97% rename from charts/cheminformaticsMicroservice/values.yaml rename to charts/cheminfo-microservice/values.yaml index 91270bb..7794a45 100644 --- a/charts/cheminformaticsMicroservice/values.yaml +++ b/charts/cheminfo-microservice/values.yaml @@ -1,4 +1,4 @@ -# Default values for cheminformaticsMicroservice. +# Default values for cheminfo-microservice. # This is a YAML-formatted file. # Declare variables to be passed into your templates. diff --git a/charts/cheminformaticsMicroservice/templates/tests/test-connection.yaml b/charts/cheminformaticsMicroservice/templates/tests/test-connection.yaml deleted file mode 100644 index a87396f..0000000 --- a/charts/cheminformaticsMicroservice/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "cheminformaticsMicroservice.fullname" . }}-test-connection" - labels: - {{- include "cheminformaticsMicroservice.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "cheminformaticsMicroservice.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never