Skip to content

Commit 5f665f5

Browse files
committed
fix secret copy target requirement
1 parent 1b4b010 commit 5f665f5

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

api/crds/manifests/dns.openmcp.cloud_dnsserviceconfigs.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -667,8 +667,9 @@ spec:
667667
If target is nil or target.name is empty, the secret will be copied with the same name as the source secret.
668668
properties:
669669
source:
670-
description: LocalObjectReference is a reference to an object
671-
in the same namespace as the resource referencing it.
670+
description: |-
671+
Source references the source secret to copy.
672+
It has to be in the namespace the provider pod is running in.
672673
properties:
673674
name:
674675
default: ""
@@ -682,8 +683,9 @@ spec:
682683
type: object
683684
x-kubernetes-map-type: atomic
684685
target:
685-
description: LocalObjectReference is a reference to an object
686-
in the same namespace as the resource referencing it.
686+
description: |-
687+
Target is the name of the copied secret.
688+
If not set, the secret will be copied with the same name as the source secret.
687689
properties:
688690
name:
689691
default: ""
@@ -698,7 +700,6 @@ spec:
698700
x-kubernetes-map-type: atomic
699701
required:
700702
- source
701-
- target
702703
type: object
703704
type: array
704705
toTargetCluster:
@@ -711,8 +712,9 @@ spec:
711712
If target is nil or target.name is empty, the secret will be copied with the same name as the source secret.
712713
properties:
713714
source:
714-
description: LocalObjectReference is a reference to an object
715-
in the same namespace as the resource referencing it.
715+
description: |-
716+
Source references the source secret to copy.
717+
It has to be in the namespace the provider pod is running in.
716718
properties:
717719
name:
718720
default: ""
@@ -726,8 +728,9 @@ spec:
726728
type: object
727729
x-kubernetes-map-type: atomic
728730
target:
729-
description: LocalObjectReference is a reference to an object
730-
in the same namespace as the resource referencing it.
731+
description: |-
732+
Target is the name of the copied secret.
733+
If not set, the secret will be copied with the same name as the source secret.
731734
properties:
732735
name:
733736
default: ""
@@ -742,7 +745,6 @@ spec:
742745
x-kubernetes-map-type: atomic
743746
required:
744747
- source
745-
- target
746748
type: object
747749
type: array
748750
type: object

api/dns/v1alpha1/config_types.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,12 @@ type ExternalDNSSource struct {
6363
// SecretCopy defines the name of the secret to copy and the name of the copied secret.
6464
// If target is nil or target.name is empty, the secret will be copied with the same name as the source secret.
6565
type SecretCopy struct {
66-
Source commonapi.LocalObjectReference `json:"source"`
66+
// Source references the source secret to copy.
67+
// It has to be in the namespace the provider pod is running in.
68+
Source commonapi.LocalObjectReference `json:"source"`
69+
// Target is the name of the copied secret.
70+
// If not set, the secret will be copied with the same name as the source secret.
71+
// +optional
6772
Target *commonapi.LocalObjectReference `json:"target"`
6873
}
6974

0 commit comments

Comments
 (0)