Skip to content

feat: add dnsServiceIPs field to network settings #206

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

Merged
merged 1 commit into from
May 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions api/v1alpha1/kamajicontrolplane_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ type NetworkComponent struct {
// Configure additional Subject Address Names for the kube-apiserver certificate,
// useful if the TenantControlPlane is going to be exposed behind a FQDN with NAT.
CertSANs []string `json:"certSANs,omitempty"` //nolint:tagliatelle
// DNSServiceIPs contains the DNS Service IPs.
// If the CoreDNS addon is specified, its DNSServiceIPs will be used instead.
// When set to an empty slice, Kamaji will automatically inflect it from the Service CIDR.
DNSServiceIPs []string `json:"dnsServiceIPs,omitempty"`
}

// AddonsSpec defines the enabled addons and their features.
Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions config/control-plane-components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6370,6 +6370,14 @@ spec:
items:
type: string
type: array
dnsServiceIPs:
description: |-
DNSServiceIPs contains the DNS Service IPs.
If the CoreDNS addon is specified, its DNSServiceIPs will be used instead.
When set to an empty slice, Kamaji will automatically inflect it from the Service CIDR.
items:
type: string
type: array
ingress:
description: |-
When specified, the KamajiControlPlane will be reachable using an Ingress object
Expand Down Expand Up @@ -13050,6 +13058,14 @@ spec:
items:
type: string
type: array
dnsServiceIPs:
description: |-
DNSServiceIPs contains the DNS Service IPs.
If the CoreDNS addon is specified, its DNSServiceIPs will be used instead.
When set to an empty slice, Kamaji will automatically inflect it from the Service CIDR.
items:
type: string
type: array
ingress:
description: |-
When specified, the KamajiControlPlane will be reachable using an Ingress object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6652,6 +6652,14 @@ spec:
items:
type: string
type: array
dnsServiceIPs:
description: |-
DNSServiceIPs contains the DNS Service IPs.
If the CoreDNS addon is specified, its DNSServiceIPs will be used instead.
When set to an empty slice, Kamaji will automatically inflect it from the Service CIDR.
items:
type: string
type: array
ingress:
description: |-
When specified, the KamajiControlPlane will be reachable using an Ingress object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6731,6 +6731,14 @@ spec:
items:
type: string
type: array
dnsServiceIPs:
description: |-
DNSServiceIPs contains the DNS Service IPs.
If the CoreDNS addon is specified, its DNSServiceIPs will be used instead.
When set to an empty slice, Kamaji will automatically inflect it from the Service CIDR.
items:
type: string
type: array
ingress:
description: |-
When specified, the KamajiControlPlane will be reachable using an Ingress object
Expand Down
2 changes: 2 additions & 0 deletions controllers/kamajicontrolplane_controller_tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ func (r *KamajiControlPlaneReconciler) createOrUpdateTenantControlPlane(ctx cont
} else {
tcp.Spec.Kubernetes.Version = kcp.Spec.Version
}
// Set before CoreDNS addon to allow override.
tcp.Spec.NetworkProfile.DNSServiceIPs = kcp.Spec.Network.DNSServiceIPs
// Kamaji addons and CoreDNS overrides
tcp.Spec.Addons = kcp.Spec.Addons.AddonsSpec
if kcp.Spec.Addons.CoreDNS != nil {
Expand Down