Skip to content

Commit

Permalink
Merge pull request #567 from Yannig/master
Browse files Browse the repository at this point in the history
  • Loading branch information
pascaliske committed Jun 13, 2024
2 parents c223a68 + 73eb047 commit bbc217d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# docs
.idea
.cache
docs/index.md
docs/index.yaml
Expand Down
4 changes: 2 additions & 2 deletions charts/redis/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "redis.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:6379 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
echo "Visit redis://127.0.0.1:6379 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 6379:$CONTAINER_PORT
{{- end }}
3 changes: 3 additions & 0 deletions charts/redis/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ spec:
nodePort: {{ $val.nodePort }}
{{- end }}
protocol: {{ default "TCP" $val.protocol | quote }}
{{- with $val.appProtocol }}
appProtocol: {{ . | quote }}
{{- end }}
{{- end }}
{{- end }}
selector:
Expand Down
4 changes: 3 additions & 1 deletion charts/redis/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ extraArgs: []
# - --loglevel warning

ports:
http:
redis:
# -- Enable the port inside the `Controller` and `Service` objects.
enabled: true
# -- The port used as internal port and cluster-wide port if `.service.type` == `ClusterIP`.
Expand All @@ -82,6 +82,8 @@ ports:
nodePort: null
# -- The protocol used for the service.
protocol: TCP
# -- The application protocol for this port. Used as hint for implementations to offer richer behavior.
appProtocol: redis

persistentVolumeClaim:
# -- Create a new persistent volume claim object.
Expand Down

0 comments on commit bbc217d

Please sign in to comment.