-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The service supports custom annotations. #3
Labels
TransByAI
Translated by AI/GPT.
Comments
winlinvip
changed the title
service 支持自定义 annotations
The service supports custom annotations.
Mar 29, 2024
example: apiVersion: v1
kind: Service
metadata:
name: {{ include "srs.fullname" . }}
labels:
{{- include "srs.labels" . | nindent 4 }}
{{- with .Values.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if (or (eq .Values.service.type "ClusterIP" "") (empty .Values.service.type)) }}
type: {{ .Values.service.type }}
{{- if not (empty .Values.service.clusterIP) }}
clusterIP: {{ .Values.service.clusterIP }}
{{- end }}
{{- else if eq .Values.service.type "LoadBalancer" }}
type: {{ .Values.service.type }}
loadBalancerIP: {{ default "" .Values.service.loadBalancerIP }}
{{- else }}
type: {{ .Values.service.type }}
{{- end }} |
Ingress requires some modifications to function properly with the SRS player for WHEP playback. ingress.yaml: spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ .svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ .svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }} values-custom.yaml: ingress:
enabled: true
className: "nginx-common"
annotations: {}
hosts:
- host: nonprod-srs.example.cn
paths:
- path: /
pathType: ImplementationSpecific
svcPort: 8080
- path: /api
pathType: ImplementationSpecific
svcPort: 1985
- path: /rtc
pathType: ImplementationSpecific
svcPort: 1985
tls:
- hosts:
- nonprod-srs.example.cn
secretName: example-tls
|
I am just an operations staff member and not very clear about the software logic. The above is just a suggestion. Perhaps you have a better method to proxy the API and HTTP.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As the subject indicates.
TRANS_BY_GPT4
The text was updated successfully, but these errors were encountered: