From 6e26fc581aca1079ba8b61566df308514a6551b8 Mon Sep 17 00:00:00 2001 From: NishaSharma14 Date: Fri, 4 Aug 2023 15:04:06 +0200 Subject: [PATCH] fix: [nmrkit]-update namespace and repo --- .../templates/tests/test-connection.yaml | 15 --------------- charts/{nmr-predict => nmrkit}/.helmignore | 0 charts/{nmr-predict => nmrkit}/Chart.yaml | 6 +++--- .../{nmr-predict => nmrkit}/templates/NOTES.txt | 8 ++++---- .../templates/_helpers.tpl | 0 .../templates/deployment.yaml | 10 +++++----- charts/{nmr-predict => nmrkit}/templates/hpa.yaml | 6 +++--- .../templates/ingress.yaml | 4 ++-- .../templates/service.yaml | 6 +++--- .../templates/serviceaccount.yaml | 4 ++-- .../nmrkit/templates/tests/test-connection.yaml | 15 +++++++++++++++ charts/{nmr-predict => nmrkit}/values.yaml | 5 ++--- 12 files changed, 39 insertions(+), 40 deletions(-) delete mode 100644 charts/nmr-predict/templates/tests/test-connection.yaml rename charts/{nmr-predict => nmrkit}/.helmignore (100%) rename charts/{nmr-predict => nmrkit}/Chart.yaml (93%) rename charts/{nmr-predict => nmrkit}/templates/NOTES.txt (76%) rename charts/{nmr-predict => nmrkit}/templates/_helpers.tpl (100%) rename charts/{nmr-predict => nmrkit}/templates/deployment.yaml (83%) rename charts/{nmr-predict => nmrkit}/templates/hpa.yaml (83%) rename charts/{nmr-predict => nmrkit}/templates/ingress.yaml (94%) rename charts/{nmr-predict => nmrkit}/templates/service.yaml (58%) rename charts/{nmr-predict => nmrkit}/templates/serviceaccount.yaml (66%) create mode 100644 charts/nmrkit/templates/tests/test-connection.yaml rename charts/{nmr-predict => nmrkit}/values.yaml (94%) diff --git a/charts/nmr-predict/templates/tests/test-connection.yaml b/charts/nmr-predict/templates/tests/test-connection.yaml deleted file mode 100644 index 575a023..0000000 --- a/charts/nmr-predict/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "nmr-predict.fullname" . }}-test-connection" - labels: - {{- include "nmr-predict.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "nmr-predict.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/charts/nmr-predict/.helmignore b/charts/nmrkit/.helmignore similarity index 100% rename from charts/nmr-predict/.helmignore rename to charts/nmrkit/.helmignore diff --git a/charts/nmr-predict/Chart.yaml b/charts/nmrkit/Chart.yaml similarity index 93% rename from charts/nmr-predict/Chart.yaml rename to charts/nmrkit/Chart.yaml index b580c2e..3423d49 100644 --- a/charts/nmr-predict/Chart.yaml +++ b/charts/nmrkit/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -name: nmr-predict -description: A Helm chart for nmr-predict service. +name: nmrkit +description: A Helm chart for nmrkit service. maintainers: - name: Nisha Sharma email: nisha.sharma@uni-jena.de @@ -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/nmr-predict/templates/NOTES.txt b/charts/nmrkit/templates/NOTES.txt similarity index 76% rename from charts/nmr-predict/templates/NOTES.txt rename to charts/nmrkit/templates/NOTES.txt index fca1f37..5d01c49 100644 --- a/charts/nmr-predict/templates/NOTES.txt +++ b/charts/nmrkit/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 "nmr-predict.fullname" . }}) + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "nmrkit.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 "nmr-predict.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "nmr-predict.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 "nmrkit.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "nmrkit.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 "nmr-predict.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 "nmrkit.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/nmr-predict/templates/_helpers.tpl b/charts/nmrkit/templates/_helpers.tpl similarity index 100% rename from charts/nmr-predict/templates/_helpers.tpl rename to charts/nmrkit/templates/_helpers.tpl diff --git a/charts/nmr-predict/templates/deployment.yaml b/charts/nmrkit/templates/deployment.yaml similarity index 83% rename from charts/nmr-predict/templates/deployment.yaml rename to charts/nmrkit/templates/deployment.yaml index 9464caa..d018e4c 100644 --- a/charts/nmr-predict/templates/deployment.yaml +++ b/charts/nmrkit/templates/deployment.yaml @@ -1,16 +1,16 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "nmr-predict.fullname" . }} + name: {{ include "nmrkit.fullname" . }} labels: - {{- include "nmr-predict.labels" . | nindent 4 }} + {{- include "nmrkit.labels" . | nindent 4 }} spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} selector: matchLabels: - {{- include "nmr-predict.selectorLabels" . | nindent 6 }} + {{- include "nmrkit.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} @@ -18,13 +18,13 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "nmr-predict.selectorLabels" . | nindent 8 }} + {{- include "nmrkit.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} - serviceAccountName: {{ include "nmr-predict.serviceAccountName" . }} + serviceAccountName: {{ include "nmrkit.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: diff --git a/charts/nmr-predict/templates/hpa.yaml b/charts/nmrkit/templates/hpa.yaml similarity index 83% rename from charts/nmr-predict/templates/hpa.yaml rename to charts/nmrkit/templates/hpa.yaml index 74fc2d9..fe89cbc 100644 --- a/charts/nmr-predict/templates/hpa.yaml +++ b/charts/nmrkit/templates/hpa.yaml @@ -2,14 +2,14 @@ apiVersion: autoscaling/v2beta1 kind: HorizontalPodAutoscaler metadata: - name: {{ include "nmr-predict.fullname" . }} + name: {{ include "nmrkit.fullname" . }} labels: - {{- include "nmr-predict.labels" . | nindent 4 }} + {{- include "nmrkit.labels" . | nindent 4 }} spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment - name: {{ include "nmr-predict.fullname" . }} + name: {{ include "nmrkit.fullname" . }} minReplicas: {{ .Values.autoscaling.minReplicas }} maxReplicas: {{ .Values.autoscaling.maxReplicas }} metrics: diff --git a/charts/nmr-predict/templates/ingress.yaml b/charts/nmrkit/templates/ingress.yaml similarity index 94% rename from charts/nmr-predict/templates/ingress.yaml rename to charts/nmrkit/templates/ingress.yaml index 0d71d25..d3a7391 100644 --- a/charts/nmr-predict/templates/ingress.yaml +++ b/charts/nmrkit/templates/ingress.yaml @@ -1,5 +1,5 @@ {{- if .Values.ingress.enabled -}} -{{- $fullName := include "nmr-predict.fullname" . -}} +{{- $fullName := include "nmrkit.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 "nmr-predict.labels" . | nindent 4 }} + {{- include "nmrkit.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/charts/nmr-predict/templates/service.yaml b/charts/nmrkit/templates/service.yaml similarity index 58% rename from charts/nmr-predict/templates/service.yaml rename to charts/nmrkit/templates/service.yaml index 815cb6b..9a042f6 100644 --- a/charts/nmr-predict/templates/service.yaml +++ b/charts/nmrkit/templates/service.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "nmr-predict.fullname" . }} + name: {{ include "nmrkit.fullname" . }} labels: - {{- include "nmr-predict.labels" . | nindent 4 }} + {{- include "nmrkit.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} ports: @@ -12,4 +12,4 @@ spec: protocol: TCP name: http selector: - {{- include "nmr-predict.selectorLabels" . | nindent 4 }} + {{- include "nmrkit.selectorLabels" . | nindent 4 }} diff --git a/charts/nmr-predict/templates/serviceaccount.yaml b/charts/nmrkit/templates/serviceaccount.yaml similarity index 66% rename from charts/nmr-predict/templates/serviceaccount.yaml rename to charts/nmrkit/templates/serviceaccount.yaml index 61a6c34..b3109ce 100644 --- a/charts/nmr-predict/templates/serviceaccount.yaml +++ b/charts/nmrkit/templates/serviceaccount.yaml @@ -2,9 +2,9 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "nmr-predict.serviceAccountName" . }} + name: {{ include "nmrkit.serviceAccountName" . }} labels: - {{- include "nmr-predict.labels" . | nindent 4 }} + {{- include "nmrkit.labels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/charts/nmrkit/templates/tests/test-connection.yaml b/charts/nmrkit/templates/tests/test-connection.yaml new file mode 100644 index 0000000..937f664 --- /dev/null +++ b/charts/nmrkit/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "nmrkit.fullname" . }}-test-connection" + labels: + {{- include "nmrkit.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "nmrkit.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/charts/nmr-predict/values.yaml b/charts/nmrkit/values.yaml similarity index 94% rename from charts/nmr-predict/values.yaml rename to charts/nmrkit/values.yaml index f7fb6eb..1a90b9d 100644 --- a/charts/nmr-predict/values.yaml +++ b/charts/nmrkit/values.yaml @@ -5,9 +5,8 @@ replicaCount: 1 image: - name: nmr-predict - repository: nmr-predict - repository: europe-west3-docker.pkg.dev/nmrxiv/nmrxiv-dev/nmr-predict + name: nmrkit + repository: nfdi4chem/nmrkit:dev-latest pullPolicy: Always # Overrides the image tag whose default is the chart appVersion. tag: latest