Skip to content

Commit

Permalink
fix: [nmrkit]-update namespace and repo
Browse files Browse the repository at this point in the history
  • Loading branch information
NishaSharma14 committed Aug 4, 2023
1 parent 1764e5b commit 6e26fc5
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 40 deletions.
15 changes: 0 additions & 15 deletions charts/nmr-predict/templates/tests/test-connection.yaml

This file was deleted.

File renamed without changes.
6 changes: 3 additions & 3 deletions charts/nmr-predict/Chart.yaml → charts/nmrkit/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
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 "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
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
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 }}
annotations:
{{- 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:
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 "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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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") }}
Expand All @@ -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 }}
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -12,4 +12,4 @@ spec:
protocol: TCP
name: http
selector:
{{- include "nmr-predict.selectorLabels" . | nindent 4 }}
{{- include "nmrkit.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 "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 }}
Expand Down
15 changes: 15 additions & 0 deletions charts/nmrkit/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 2 additions & 3 deletions charts/nmr-predict/values.yaml → charts/nmrkit/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6e26fc5

Please sign in to comment.