Skip to content
This repository has been archived by the owner on Feb 17, 2025. It is now read-only.

Commit

Permalink
Merge pull request #2 from seyyedmojtabarezvani/fix/delete-ingress-ad…
Browse files Browse the repository at this point in the history
…d-nodeport-number-if-exists

Delete Ingress file from template and ingress configs from values, also add listeningNodePort to values
  • Loading branch information
Parham Alvani authored Jun 19, 2024
2 parents 2cda967 + 1cdaf68 commit 69c03d4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 80 deletions.
2 changes: 1 addition & 1 deletion charts/janus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ maintainers:

type: application

version: 0.1.0
version: 0.1.1

appVersion: "latest"
8 changes: 1 addition & 7 deletions charts/janus/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
{{- if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "janus.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
Expand Down
61 changes: 0 additions & 61 deletions charts/janus/templates/ingress.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions charts/janus/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ spec:
targetPort: tcp-8188
port: 8188
protocol: TCP
{{- if and (eq .Values.service.type "NodePort") .Values.service.listeningWSNodePort }}
nodePort: {{ .Values.service.listeningWSNodePort }}
{{- end }}

- name: tcp-8088
targetPort: tcp-8088
port: 8088
protocol: TCP
{{- if and (eq .Values.service.type "NodePort") .Values.service.listeningHTTPNodePort }}
nodePort: {{ .Values.service.listeningHTTPNodePort }}
{{- end }}

- name: tcp-8089
targetPort: tcp-8089
Expand Down
13 changes: 2 additions & 11 deletions charts/janus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,8 @@ securityContext:

service:
type: ClusterIP
port: 80

ingress:
enabled: false
router: private
hosts:
- host: chart-example.local
paths:
- path: /
pathType: Prefix
tls: []
listeningWSNodePort: 31777
listeningHTTPNodePort: 31778

resources:
limits:
Expand Down

0 comments on commit 69c03d4

Please sign in to comment.