New namespaced CRD KumaStatusPage (uptime.renner.uno/v1alpha1) and a reconciler that owns the Kuma status page completely: config, domain names and the full group/monitor list. Sections select KumaMonitors in any namespace by label; monitors are ordered by displayName, then namespace/name, a monitor goes to the first matching section only, and monitors without a Kuma ID are left out and counted in status. The reconciler adopts an existing page with the slug, writes only when the managed content differs (no write per resync), reuses Kuma group IDs by position so saves do not churn them, reverts UI edits on resync, deletes the page on resource deletion, and reports Ready=False/Conflict for a younger resource claiming the same slug. Every KumaMonitor change to labels, displayName, monitor ID or deletion enqueues all pages. kumaclient gains a StatusPages interface (Breml + Fake). The socket API returns no group list, so groups are read from Kuma's public GET /api/status-page/<slug>, as the bootstrap did. Fields kuma-sync does not manage (logo, custom CSS, analytics, RSS title, auto refresh interval) are written back unchanged. autoRefreshInterval is not in the spec: go-uptime-kuma-client v0.6.2 (latest) never sends it on save. The Ansible bootstrap no longer creates or edits status pages; the existing page is left in place for kuma-sync to adopt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
413 lines
11 KiB
Go
413 lines
11 KiB
Go
//go:build !ignore_autogenerated
|
|
|
|
// Code generated by controller-gen. DO NOT EDIT.
|
|
|
|
package v1alpha1
|
|
|
|
import (
|
|
"k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
)
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *DNSCondition) DeepCopyInto(out *DNSCondition) {
|
|
*out = *in
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSCondition.
|
|
func (in *DNSCondition) DeepCopy() *DNSCondition {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(DNSCondition)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *DNSSpec) DeepCopyInto(out *DNSSpec) {
|
|
*out = *in
|
|
if in.Conditions != nil {
|
|
in, out := &in.Conditions, &out.Conditions
|
|
*out = make([]DNSCondition, len(*in))
|
|
copy(*out, *in)
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSSpec.
|
|
func (in *DNSSpec) DeepCopy() *DNSSpec {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(DNSSpec)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *HTTPSpec) DeepCopyInto(out *HTTPSpec) {
|
|
*out = *in
|
|
if in.AcceptedStatusCodes != nil {
|
|
in, out := &in.AcceptedStatusCodes, &out.AcceptedStatusCodes
|
|
*out = make([]string, len(*in))
|
|
copy(*out, *in)
|
|
}
|
|
if in.Headers != nil {
|
|
in, out := &in.Headers, &out.Headers
|
|
*out = make(map[string]string, len(*in))
|
|
for key, val := range *in {
|
|
(*out)[key] = val
|
|
}
|
|
}
|
|
if in.MaxRedirects != nil {
|
|
in, out := &in.MaxRedirects, &out.MaxRedirects
|
|
*out = new(int32)
|
|
**out = **in
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPSpec.
|
|
func (in *HTTPSpec) DeepCopy() *HTTPSpec {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(HTTPSpec)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *JSONQuerySpec) DeepCopyInto(out *JSONQuerySpec) {
|
|
*out = *in
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONQuerySpec.
|
|
func (in *JSONQuerySpec) DeepCopy() *JSONQuerySpec {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(JSONQuerySpec)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *KeywordSpec) DeepCopyInto(out *KeywordSpec) {
|
|
*out = *in
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeywordSpec.
|
|
func (in *KeywordSpec) DeepCopy() *KeywordSpec {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(KeywordSpec)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *KumaMonitor) DeepCopyInto(out *KumaMonitor) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
in.Spec.DeepCopyInto(&out.Spec)
|
|
in.Status.DeepCopyInto(&out.Status)
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KumaMonitor.
|
|
func (in *KumaMonitor) DeepCopy() *KumaMonitor {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(KumaMonitor)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *KumaMonitor) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *KumaMonitorList) DeepCopyInto(out *KumaMonitorList) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
if in.Items != nil {
|
|
in, out := &in.Items, &out.Items
|
|
*out = make([]KumaMonitor, len(*in))
|
|
for i := range *in {
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KumaMonitorList.
|
|
func (in *KumaMonitorList) DeepCopy() *KumaMonitorList {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(KumaMonitorList)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *KumaMonitorList) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *KumaMonitorSpec) DeepCopyInto(out *KumaMonitorSpec) {
|
|
*out = *in
|
|
if in.ParentRef != nil {
|
|
in, out := &in.ParentRef, &out.ParentRef
|
|
*out = new(LocalRef)
|
|
**out = **in
|
|
}
|
|
if in.Timeout != nil {
|
|
in, out := &in.Timeout, &out.Timeout
|
|
*out = new(int32)
|
|
**out = **in
|
|
}
|
|
if in.HTTP != nil {
|
|
in, out := &in.HTTP, &out.HTTP
|
|
*out = new(HTTPSpec)
|
|
(*in).DeepCopyInto(*out)
|
|
}
|
|
if in.Keyword != nil {
|
|
in, out := &in.Keyword, &out.Keyword
|
|
*out = new(KeywordSpec)
|
|
**out = **in
|
|
}
|
|
if in.JSONQuery != nil {
|
|
in, out := &in.JSONQuery, &out.JSONQuery
|
|
*out = new(JSONQuerySpec)
|
|
**out = **in
|
|
}
|
|
if in.DNS != nil {
|
|
in, out := &in.DNS, &out.DNS
|
|
*out = new(DNSSpec)
|
|
(*in).DeepCopyInto(*out)
|
|
}
|
|
if in.Port != nil {
|
|
in, out := &in.Port, &out.Port
|
|
*out = new(PortSpec)
|
|
**out = **in
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KumaMonitorSpec.
|
|
func (in *KumaMonitorSpec) DeepCopy() *KumaMonitorSpec {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(KumaMonitorSpec)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *KumaMonitorStatus) DeepCopyInto(out *KumaMonitorStatus) {
|
|
*out = *in
|
|
if in.Conditions != nil {
|
|
in, out := &in.Conditions, &out.Conditions
|
|
*out = make([]v1.Condition, len(*in))
|
|
for i := range *in {
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KumaMonitorStatus.
|
|
func (in *KumaMonitorStatus) DeepCopy() *KumaMonitorStatus {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(KumaMonitorStatus)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *KumaStatusPage) DeepCopyInto(out *KumaStatusPage) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
in.Spec.DeepCopyInto(&out.Spec)
|
|
in.Status.DeepCopyInto(&out.Status)
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KumaStatusPage.
|
|
func (in *KumaStatusPage) DeepCopy() *KumaStatusPage {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(KumaStatusPage)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *KumaStatusPage) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *KumaStatusPageList) DeepCopyInto(out *KumaStatusPageList) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
if in.Items != nil {
|
|
in, out := &in.Items, &out.Items
|
|
*out = make([]KumaStatusPage, len(*in))
|
|
for i := range *in {
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KumaStatusPageList.
|
|
func (in *KumaStatusPageList) DeepCopy() *KumaStatusPageList {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(KumaStatusPageList)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *KumaStatusPageList) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *KumaStatusPageSpec) DeepCopyInto(out *KumaStatusPageSpec) {
|
|
*out = *in
|
|
if in.DomainNames != nil {
|
|
in, out := &in.DomainNames, &out.DomainNames
|
|
*out = make([]string, len(*in))
|
|
copy(*out, *in)
|
|
}
|
|
if in.Sections != nil {
|
|
in, out := &in.Sections, &out.Sections
|
|
*out = make([]StatusPageSection, len(*in))
|
|
for i := range *in {
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KumaStatusPageSpec.
|
|
func (in *KumaStatusPageSpec) DeepCopy() *KumaStatusPageSpec {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(KumaStatusPageSpec)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *KumaStatusPageStatus) DeepCopyInto(out *KumaStatusPageStatus) {
|
|
*out = *in
|
|
if in.Sections != nil {
|
|
in, out := &in.Sections, &out.Sections
|
|
*out = make([]SectionStatus, len(*in))
|
|
copy(*out, *in)
|
|
}
|
|
if in.Conditions != nil {
|
|
in, out := &in.Conditions, &out.Conditions
|
|
*out = make([]v1.Condition, len(*in))
|
|
for i := range *in {
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KumaStatusPageStatus.
|
|
func (in *KumaStatusPageStatus) DeepCopy() *KumaStatusPageStatus {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(KumaStatusPageStatus)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *LocalRef) DeepCopyInto(out *LocalRef) {
|
|
*out = *in
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalRef.
|
|
func (in *LocalRef) DeepCopy() *LocalRef {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(LocalRef)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *PortSpec) DeepCopyInto(out *PortSpec) {
|
|
*out = *in
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortSpec.
|
|
func (in *PortSpec) DeepCopy() *PortSpec {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(PortSpec)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *SectionStatus) DeepCopyInto(out *SectionStatus) {
|
|
*out = *in
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SectionStatus.
|
|
func (in *SectionStatus) DeepCopy() *SectionStatus {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(SectionStatus)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *StatusPageSection) DeepCopyInto(out *StatusPageSection) {
|
|
*out = *in
|
|
in.Selector.DeepCopyInto(&out.Selector)
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusPageSection.
|
|
func (in *StatusPageSection) DeepCopy() *StatusPageSection {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(StatusPageSection)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|