Skip to content

Commit 8507545

Browse files
committed
fix secret copy target requirement
1 parent c50312e commit 8507545

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
@@ -657,8 +657,9 @@ spec:
657657
If target is nil or target.name is empty, the secret will be copied with the same name as the source secret.
658658
properties:
659659
source:
660-
description: LocalObjectReference is a reference to an object
661-
in the same namespace as the resource referencing it.
660+
description: |-
661+
Source references the source secret to copy.
662+
It has to be in the namespace the provider pod is running in.
662663
properties:
663664
name:
664665
default: ""
@@ -672,8 +673,9 @@ spec:
672673
type: object
673674
x-kubernetes-map-type: atomic
674675
target:
675-
description: LocalObjectReference is a reference to an object
676-
in the same namespace as the resource referencing it.
676+
description: |-
677+
Target is the name of the copied secret.
678+
If not set, the secret will be copied with the same name as the source secret.
677679
properties:
678680
name:
679681
default: ""
@@ -688,7 +690,6 @@ spec:
688690
x-kubernetes-map-type: atomic
689691
required:
690692
- source
691-
- target
692693
type: object
693694
type: array
694695
toTargetCluster:
@@ -701,8 +702,9 @@ spec:
701702
If target is nil or target.name is empty, the secret will be copied with the same name as the source secret.
702703
properties:
703704
source:
704-
description: LocalObjectReference is a reference to an object
705-
in the same namespace as the resource referencing it.
705+
description: |-
706+
Source references the source secret to copy.
707+
It has to be in the namespace the provider pod is running in.
706708
properties:
707709
name:
708710
default: ""
@@ -716,8 +718,9 @@ spec:
716718
type: object
717719
x-kubernetes-map-type: atomic
718720
target:
719-
description: LocalObjectReference is a reference to an object
720-
in the same namespace as the resource referencing it.
721+
description: |-
722+
Target is the name of the copied secret.
723+
If not set, the secret will be copied with the same name as the source secret.
721724
properties:
722725
name:
723726
default: ""
@@ -732,7 +735,6 @@ spec:
732735
x-kubernetes-map-type: atomic
733736
required:
734737
- source
735-
- target
736738
type: object
737739
type: array
738740
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)