mirror of
https://gitee.com/devstar/devstar-devcontainer-operator
synced 2025-04-21 09:42:22 +00:00
25 lines
568 B
YAML
25 lines
568 B
YAML
![]() |
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: {{.ObjectMeta.Name}}-svc
|
||
|
namespace: {{.ObjectMeta.Namespace}}
|
||
|
spec:
|
||
|
selector:
|
||
|
app: {{.ObjectMeta.Name}}
|
||
|
devstar-resource-type: devstar-devcontainer
|
||
|
sessionAffinity: None
|
||
|
type: NodePort
|
||
|
externalTrafficPolicy: Cluster
|
||
|
internalTrafficPolicy: Cluster
|
||
|
ipFamilyPolicy: SingleStack
|
||
|
ipFamilies:
|
||
|
- IPv4
|
||
|
ports:
|
||
|
- name: ssh-port
|
||
|
protocol: TCP
|
||
|
port: 22
|
||
|
targetPort: {{.Spec.StatefulSet.ContainerPort}}
|
||
|
{{ if .Spec.Service.NodePort}}
|
||
|
nodePort: {{.Spec.Service.NodePort}}
|
||
|
{{ end }}
|