Merge "Fix ingress_disable_gui handling for region_api"

This commit is contained in:
Zuul
2025-10-20 15:52:08 +00:00
committed by Gerrit Code Review
6 changed files with 48 additions and 3 deletions

View File

@@ -200,7 +200,7 @@
- "^images/.*" - "^images/.*"
vars: vars:
publish: true publish: true
distro: ubuntu_jammy distro: ubuntu_noble
tags: tags:
dynamic: dynamic:
branch: true branch: true

View File

@@ -35,6 +35,27 @@ spec:
http: http:
paths: paths:
{{- if .Values.conf.maas.ingress_disable_gui }} {{- if .Values.conf.maas.ingress_disable_gui }}
- path: /MAAS/version
pathType: Exact
backend:
service:
name: {{ tuple "maas_region" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
port:
name: region-api
- path: /MAAS
pathType: Exact
backend:
service:
name: {{ tuple "maas_region" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
port:
name: region-api
- path: /MAAS/
pathType: Exact
backend:
service:
name: {{ tuple "maas_region" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
port:
name: region-api
- path: /MAAS/api - path: /MAAS/api
pathType: Prefix pathType: Prefix
backend: backend:
@@ -63,6 +84,13 @@ spec:
name: {{ tuple "maas_region" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} name: {{ tuple "maas_region" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
port: port:
name: region-api name: region-api
- path: /MAAS/ws
pathType: Prefix
backend:
service:
name: {{ tuple "maas_region" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
port:
name: region-api
{{- else if (and .Values.conf.maas.ingress_disable_gui .Values.conf.maas.tls.enabled) }} {{- else if (and .Values.conf.maas.ingress_disable_gui .Values.conf.maas.tls.enabled) }}
- path: /MAAS/api - path: /MAAS/api
pathType: Prefix pathType: Prefix

View File

@@ -439,6 +439,7 @@ pod:
add: add:
- "DAC_READ_SEARCH" - "DAC_READ_SEARCH"
- "NET_ADMIN" - "NET_ADMIN"
- "NET_BIND_SERVICE"
- "SYS_ADMIN" - "SYS_ADMIN"
- "SYS_PTRACE" - "SYS_PTRACE"
- "SYS_RESOURCE" - "SYS_RESOURCE"
@@ -455,6 +456,7 @@ pod:
add: add:
- "SYS_ADMIN" - "SYS_ADMIN"
- "NET_ADMIN" - "NET_ADMIN"
- "NET_BIND_SERVICE"
- "SYS_PTRACE" - "SYS_PTRACE"
- "SYS_TIME" - "SYS_TIME"
- "SYS_RESOURCE" - "SYS_RESOURCE"

View File

@@ -34,6 +34,7 @@ RUN apt-get -qq update \
sudo \ sudo \
systemd \ systemd \
ca-certificates \ ca-certificates \
chrony \
# Don't start any optional services except for the few we need. # Don't start any optional services except for the few we need.
# (specifically, don't start avahi-daemon, isc-dhcp-server, or libvirtd) # (specifically, don't start avahi-daemon, isc-dhcp-server, or libvirtd)
&& find /etc/systemd/system \ && find /etc/systemd/system \

View File

@@ -33,6 +33,7 @@ RUN apt-get -qq update \
cron \ cron \
ca-certificates \ ca-certificates \
bind9-dnsutils \ bind9-dnsutils \
chrony \
# Don't start any optional services except for the few we need. # Don't start any optional services except for the few we need.
# (specifically, don't start avahi-daemon) # (specifically, don't start avahi-daemon)
&& find /etc/systemd/system \ && find /etc/systemd/system \

View File

@@ -1,3 +1,16 @@
[Service] [Service]
ExecStartPre=-mkdir -p /var/log/chrony # Run chrony as the package user on Noble
ExecStartPre=-chown root /var/run/chrony User=_chrony
Group=avahi
# Let systemd create writable runtime dir for that user
RuntimeDirectory=chrony
RuntimeDirectoryMode=0777
RuntimeDirectoryPreserve=yes
# Defensive: ensure dir exists with correct owner (no-op if already created)
ExecStartPre=-/usr/bin/install -d -o _chrony -g avahi -m 0777 /run/chrony
# Caps needed inside container (matches your pod securityContext)
CapabilityBoundingSet=CAP_SYS_TIME CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_SYS_TIME CAP_NET_BIND_SERVICE