Skip to content

Commit e76331a

Browse files
committed
feat: add kindPath and apiVersionPath
1 parent ef146f0 commit e76331a

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

chart/values.schema.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3086,17 +3086,25 @@
30863086
"type": "string",
30873087
"description": "APIVersion is the apiVersion of the referenced object."
30883088
},
3089+
"apiVersionPath": {
3090+
"type": "string",
3091+
"description": "APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion."
3092+
},
30893093
"kind": {
30903094
"type": "string",
30913095
"description": "Kind is the kind of the referenced object."
30923096
},
3097+
"kindPath": {
3098+
"type": "string",
3099+
"description": "KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind."
3100+
},
30933101
"namePath": {
30943102
"type": "string",
3095-
"description": "NamePath is the optional path to the reference name within the object. If omitted namePath equals to the\ntranslate patch path."
3103+
"description": "NamePath is the optional relative path to the reference name within the object."
30963104
},
30973105
"namespacePath": {
30983106
"type": "string",
3099-
"description": "NamespacePath is the optional path to the reference namespace within the object. If omitted namespacePath equals to the\nmetadata.namespace path of the object."
3107+
"description": "NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the\nmetadata.namespace path of the object."
31003108
}
31013109
},
31023110
"additionalProperties": false,

config/config.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,14 +468,19 @@ type TranslatePatchReference struct {
468468
// APIVersion is the apiVersion of the referenced object.
469469
APIVersion string `json:"apiVersion,omitempty" jsonschema:"required"`
470470

471+
// APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
472+
APIVersionPath string `json:"apiVersionPath,omitempty"`
473+
471474
// Kind is the kind of the referenced object.
472475
Kind string `json:"kind,omitempty" jsonschema:"required"`
473476

474-
// NamePath is the optional path to the reference name within the object. If omitted namePath equals to the
475-
// translate patch path.
477+
// KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
478+
KindPath string `json:"kindPath,omitempty"`
479+
480+
// NamePath is the optional relative path to the reference name within the object.
476481
NamePath string `json:"namePath,omitempty"`
477482

478-
// NamespacePath is the optional path to the reference namespace within the object. If omitted namespacePath equals to the
483+
// NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
479484
// metadata.namespace path of the object.
480485
NamespacePath string `json:"namespacePath,omitempty"`
481486
}

0 commit comments

Comments
 (0)