| {{- if .Values.admin.enabled -}} |
| # Now we only support NodePort mode |
| apiVersion: v1 |
| kind: Service |
| metadata: |
| namespace: {{ .Release.Namespace }} |
| name: {{ template "common.names.fullname" . }}-admin |
| labels: |
| "app.kubernetes.io/name": '{{ template "common.names.name" . }}-admin' |
| "app.kubernetes.io/managed-by": "{{ .Release.Service }}" |
| "app.kubernetes.io/component": "shenyu-admin" |
| "app.kubernetes.io/instance": "{{ .Release.Name }}" |
| spec: |
| selector: |
| "app.kubernetes.io/component": "shenyu-admin" |
| "app.kubernetes.io/instance": "{{ .Release.Name }}" |
| type: NodePort |
| ports: |
| - protocol: TCP |
| port: {{ .Values.admin.service.port }} |
| targetPort: {{ .Values.admin.service.targetPod }} |
| nodePort: {{ .Values.admin.service.nodePort }} |
| {{- end -}} |