From 42d4ea6ad1d6e93c366d3bf091b734032af2dea9 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.Dockerfile | 2 +- bundle/manifests/dns-operator.clusterserviceversion.yaml | 2 +- bundle/manifests/kuadrant.io_dnsrecords.yaml | 7 +++++++ config/crd/bases/kuadrant.io_dnsrecords.yaml | 7 +++++++ 5 files changed, 20 insertions(+), 2 deletions(-) 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.Dockerfile b/bundle.Dockerfile index f778d203..6669cf85 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -6,7 +6,7 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ LABEL operators.operatorframework.io.bundle.package.v1=dns-operator LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.33.0 +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.34.1 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4 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