From 16bc8da0a5372a5299239e17bf409b7d2b44be8d Mon Sep 17 00:00:00 2001 From: Phil Brookes Date: Fri, 15 Mar 2024 11:24:28 +0100 Subject: [PATCH] add owner ID to DNS Record spec --- api/v1alpha1/dnsrecord_types.go | 4 ++++ bundle/manifests/dns-operator.clusterserviceversion.yaml | 2 +- bundle/manifests/kuadrant.io_dnsrecords.yaml | 7 +++++++ config/crd/bases/kuadrant.io_dnsrecords.yaml | 7 +++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/api/v1alpha1/dnsrecord_types.go b/api/v1alpha1/dnsrecord_types.go index 76b2d142..27f917c8 100644 --- a/api/v1alpha1/dnsrecord_types.go +++ b/api/v1alpha1/dnsrecord_types.go @@ -27,6 +27,10 @@ import ( // DNSRecordSpec defines the desired state of DNSRecord type DNSRecordSpec struct { + // OwnerID is a unique string used to identify all endpoints created by this kuadrant + // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="OwnerID is immutable" + // +optional + OwnerID *string `json:"ownerID,omitempty"` // rootHost is the single root for all endpoints in a DNSRecord. //If rootHost is set, it is expected all defined endpoints are children of or equal to this rootHost // +optional diff --git a/bundle/manifests/dns-operator.clusterserviceversion.yaml b/bundle/manifests/dns-operator.clusterserviceversion.yaml index fa685547..8730f04f 100644 --- a/bundle/manifests/dns-operator.clusterserviceversion.yaml +++ b/bundle/manifests/dns-operator.clusterserviceversion.yaml @@ -56,7 +56,7 @@ metadata: capabilities: Basic Install categories: Integration & Delivery containerImage: quay.io/kuadrant/dns-operator:latest - createdAt: "2024-03-11T14:53:47Z" + createdAt: "2024-03-15T11:01:46Z" description: A Kubernetes Operator to manage the lifecycle of DNS resources operators.operatorframework.io/builder: operator-sdk-v1.33.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v4 diff --git a/bundle/manifests/kuadrant.io_dnsrecords.yaml b/bundle/manifests/kuadrant.io_dnsrecords.yaml index 658f1f9c..52b3e807 100644 --- a/bundle/manifests/kuadrant.io_dnsrecords.yaml +++ b/bundle/manifests/kuadrant.io_dnsrecords.yaml @@ -94,6 +94,13 @@ spec: required: - name type: object + ownerID: + description: OwnerID is a unique string used to identify all endpoints + created by this kuadrant + type: string + x-kubernetes-validations: + - message: OwnerID is immutable + rule: self == oldSelf rootHost: description: "rootHost is the single root for all endpoints in a DNSRecord. If rootHost is set, it is expected all defined endpoints are children diff --git a/config/crd/bases/kuadrant.io_dnsrecords.yaml b/config/crd/bases/kuadrant.io_dnsrecords.yaml index f9cd7e03..84a0a083 100644 --- a/config/crd/bases/kuadrant.io_dnsrecords.yaml +++ b/config/crd/bases/kuadrant.io_dnsrecords.yaml @@ -94,6 +94,13 @@ spec: required: - name type: object + ownerID: + description: OwnerID is a unique string used to identify all endpoints + created by this kuadrant + type: string + x-kubernetes-validations: + - message: OwnerID is immutable + rule: self == oldSelf rootHost: description: "rootHost is the single root for all endpoints in a DNSRecord. If rootHost is set, it is expected all defined endpoints are children