k8s/roles/uyuni/files/uyuni/server-helm/templates/services.yaml
mrwho b0a8b35dd9 feat(infra): add uyuni role for configuration management
Added new ansible role `roles/uyuni/` to enable configuration and management of Uyuni satellite server infrastructure.
2026-07-19 14:41:22 +03:00

294 lines
7.9 KiB
YAML

apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/part-of: uyuni
name: cobbler
namespace: "{{ .Release.Namespace }}"
spec:
ports:
- name: cobbler
port: 25151
selector:
app.kubernetes.io/component: server
app.kubernetes.io/part-of: uyuni
type: ClusterIP
{{- if .Values.db.enable }}
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: db
app.kubernetes.io/part-of: uyuni
name: db
namespace: "{{ .Release.Namespace }}"
spec:
ports:
- name: pgsql
port: 5432
selector:
app.kubernetes.io/component: db
app.kubernetes.io/part-of: uyuni
type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: db
app.kubernetes.io/part-of: uyuni
name: reportdb
namespace: "{{ .Release.Namespace }}"
{{- if or .Values.services.annotations .Values.services.reportdb.annotations }}
annotations:
{{ toYaml ( mergeOverwrite (dict) (default (dict) .Values.services.annotations) (default (dict) .Values.services.reportdb.annotations) ) | indent 4 }}
{{- end }}
spec:
ports:
- name: pgsql
port: 5432
{{- if eq (default .Values.services.type .Values.services.reportdb.type) "NodePort" }}
nodePort: {{ .Values.services.reportdb.ports.pgsql }}
{{- end }}
selector:
app.kubernetes.io/component: db
app.kubernetes.io/part-of: uyuni
type: {{ .Values.services.reportdb.type | default .Values.services.type }}
{{- end }}
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/part-of: uyuni
name: salt
namespace: "{{ .Release.Namespace }}"
{{- if or .Values.services.annotations .Values.services.salt.annotations }}
annotations:
{{ toYaml ( mergeOverwrite (dict) (default (dict) .Values.services.annotations) (default (dict) .Values.services.salt.annotations) ) | indent 4 }}
{{- end }}
spec:
ports:
- name: publish
port: 4505
{{- if eq (default .Values.services.type .Values.services.salt.type) "NodePort" }}
nodePort: {{ .Values.services.salt.ports.publish }}
{{- end }}
- name: request
port: 4506
{{- if eq (default .Values.services.type .Values.services.salt.type) "NodePort" }}
nodePort: {{ .Values.services.salt.ports.request }}
{{- end }}
selector:
app.kubernetes.io/component: server
app.kubernetes.io/part-of: uyuni
type: {{ .Values.services.salt.type | default .Values.services.type }}
---
{{- if .Values.exposeJavaDebug | default false }}
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/part-of: uyuni
name: search
namespace: "{{ .Release.Namespace }}"
{{- if or .Values.services.annotations .Values.services.search.annotations }}
annotations:
{{ toYaml ( mergeOverwrite (dict) (default (dict) .Values.services.annotations) (default (dict) .Values.services.search.annotations) ) | indent 4 }}
{{- end }}
spec:
ports:
- name: debug
port: 8002
{{- if eq (default .Values.services.type .Values.services.search.type) "NodePort" }}
nodePort: {{ .Values.services.search.ports.debug }}
{{- end }}
selector:
app.kubernetes.io/component: server
app.kubernetes.io/part-of: uyuni
type: {{ .Values.services.search.type | default .Values.services.type }}
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/part-of: uyuni
name: taskomatic
namespace: "{{ .Release.Namespace }}"
{{- if or .Values.services.annotations .Values.services.taskomatic.annotations }}
annotations:
{{ toYaml ( mergeOverwrite (dict) (default (dict) .Values.services.annotations) (default (dict) .Values.services.taskomatic.annotations) ) | indent 4 }}
{{- end }}
spec:
ports:
- name: debug
port: 8001
{{- if eq (default .Values.services.type .Values.services.taskomatic.type) "NodePort" }}
nodePort: {{ .Values.services.taskomatic.ports.debug }}
{{- end }}
selector:
app.kubernetes.io/component: server
app.kubernetes.io/part-of: uyuni
type: {{ .Values.services.taskomatic.type | default .Values.services.type }}
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/part-of: uyuni
name: tomcat
namespace: "{{ .Release.Namespace }}"
{{- if or .Values.services.annotations .Values.services.tomcat.annotations }}
annotations:
{{ toYaml ( mergeOverwrite (dict) (default (dict) .Values.services.annotations) (default (dict) .Values.services.tomcat.annotations) ) | indent 4 }}
{{- end }}
spec:
ports:
- name: debug
port: 8003
{{- if eq (default .Values.services.type .Values.services.tomcat.type) "NodePort" }}
nodePort: {{ .Values.services.tomcat.ports.debug }}
{{- end }}
selector:
app.kubernetes.io/component: server
app.kubernetes.io/part-of: uyuni
type: {{ .Values.services.tomcat.type | default .Values.services.type }}
---
{{- end }}
{{- if ne .Values.enableMonitoring false }}
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/part-of: uyuni
name: taskomatic-internal
namespace: "{{ .Release.Namespace }}"
spec:
ports:
- name: jmx
port: 5557
- name: mtrx
port: 9800
selector:
app.kubernetes.io/component: server
app.kubernetes.io/part-of: uyuni
type: ClusterIP
---
{{- end }}
{{- if and .Values.tftp.enable (not .Values.tftp.hostNetwork) }}
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: tftp
app.kubernetes.io/part-of: uyuni
name: tftp
namespace: "{{ .Release.Namespace }}"
{{- if or .Values.services.annotations .Values.services.tftp.annotations }}
annotations:
{{ toYaml ( mergeOverwrite (dict) (default (dict) .Values.services.annotations) (default (dict) .Values.services.tftp.annotations) ) | indent 4 }}
{{- end }}
spec:
ports:
- name: tftp
port: 69
protocol: UDP
targetPort: 69
selector:
app.kubernetes.io/component: tftp
app.kubernetes.io/part-of: uyuni
# ClusterIP or NodePort wouldn't work for TFTP if not using the host network
type: LoadBalancer
# Ensures all packets from a single client go to the same pod
sessionAffinity: ClientIP
# Preserves the client's source IP and avoids extra hops between nodes
externalTrafficPolicy: Local
---
{{- end }}
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/part-of: uyuni
name: tomcat-internal
namespace: "{{ .Release.Namespace }}"
spec:
ports:
- name: node-exporter
port: 9100
{{- if ne .Values.enableMonitoring false }}
- name: jmx
port: 5556
- name: pgsql-exporter
port: 9187
{{- end }}
selector:
app.kubernetes.io/component: server
app.kubernetes.io/part-of: uyuni
type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/part-of: uyuni
name: web
namespace: "{{ .Release.Namespace }}"
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 80
selector:
app.kubernetes.io/component: server
app.kubernetes.io/part-of: uyuni
type: ClusterIP
{{- if default .Values.hubAPI.enable false }}
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: hub-xmlrpc
app.kubernetes.io/part-of: uyuni
name: hub-xmlrpc
namespace: "{{ .Release.Namespace }}"
spec:
ports:
- name: hub
port: 2830
selector:
app.kubernetes.io/component: hub-xmlrpc
app.kubernetes.io/part-of: uyuni
type: ClusterIP
{{- end }}
{{- if default .Values.saline.enable false }}
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: saline
app.kubernetes.io/part-of: uyuni
name: saline
namespace: "{{ .Release.Namespace }}"
spec:
ports:
- name: saline
port: 8216
selector:
app.kubernetes.io/component: saline
app.kubernetes.io/part-of: uyuni
type: ClusterIP
{{- end }}