Skip to content

Commit f8dea03

Browse files
committed
codegen
On-behalf-of: @SAP [email protected]
1 parent fa37359 commit f8dea03

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

deploy/crd/kcp.io/syncagent.kcp.io_publishedresources.yaml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,17 @@ spec:
239239
name:
240240
description: |-
241241
The name field allows to control the name the local objects created by the Sync Agent.
242-
If left empty, "$remoteNamespaceHash-$remoteNameHash" is assumed. This guarantees unique
243-
names as long as the cluster name ($remoteClusterName) is used for the local namespace
242+
If left empty, the default value is:
243+
244+
"{{ .Object.metadata.namespace | sha3short }}-{{ .Object.metadata.name | sha3short }}"
245+
246+
This guarantees unique names as long as the cluster name is used for the local namespace
244247
(the default unless configured otherwise).
245-
This is a string with placeholders. The following placeholders can be used:
248+
249+
This value is a Go template, see the documentation for the available variables and functions.
250+
251+
Alternatively (but deprecated), this value can be a simple string using one of the following
252+
placeholders:
246253
247254
- $remoteClusterName -- the kcp workspace's cluster name (e.g. "1084s8ceexsehjm2")
248255
- $remoteNamespace -- the original namespace used by the consumer inside the kcp
@@ -252,12 +259,19 @@ spec:
252259
- $remoteName -- the original name of the object inside the kcp workspace
253260
(rarely used to construct local namespace names)
254261
- $remoteNameHash -- first 20 hex characters of the SHA-1 hash of $remoteName
262+
263+
Authors are advised to use Go templates instead, as the custom variable syntax is deprecated
264+
and will be removed from a future release of the Sync Agent.
255265
type: string
256266
namespace:
257267
description: |-
258268
For namespaced resources, the this field allows to control where the local objects will
259-
be created. If left empty, "$remoteClusterName" is assumed.
260-
This is a string with placeholders. The following placeholders can be used:
269+
be created. If left empty, "{{ .ClusterName }}" is assumed.
270+
271+
This value is a Go template, see the documentation for the available variables and functions.
272+
273+
Alternatively (but deprecated), this value can be a simple string using one of the following
274+
placeholders:
261275
262276
- $remoteClusterName -- the kcp workspace's cluster name (e.g. "1084s8ceexsehjm2")
263277
- $remoteNamespace -- the original namespace used by the consumer inside the kcp
@@ -267,6 +281,9 @@ spec:
267281
- $remoteName -- the original name of the object inside the kcp workspace
268282
(rarely used to construct local namespace names)
269283
- $remoteNameHash -- first 20 hex characters of the SHA-1 hash of $remoteName
284+
285+
Authors are advised to use Go templates instead, as the custom variable syntax is deprecated
286+
and will be removed from a future release of the Sync Agent.
270287
type: string
271288
type: object
272289
projection:
@@ -438,8 +455,6 @@ spec:
438455
description: |-
439456
Reference points to a field inside the main object. This reference is
440457
evaluated on both source and destination sides to find the related object.
441-
442-
Deprecated: Use Go templates instead.
443458
properties:
444459
path:
445460
description: |-
@@ -555,8 +570,6 @@ spec:
555570
description: |-
556571
Reference points to a field inside the main object. This reference is
557572
evaluated on both source and destination sides to find the related object.
558-
559-
Deprecated: Use Go templates instead.
560573
properties:
561574
path:
562575
description: |-

0 commit comments

Comments
 (0)