Skip to content

Commit

Permalink
feat: add kindPath and apiVersionPath
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianKramm committed Aug 21, 2024
1 parent ef146f0 commit e76331a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
12 changes: 10 additions & 2 deletions chart/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3086,17 +3086,25 @@
"type": "string",
"description": "APIVersion is the apiVersion of the referenced object."
},
"apiVersionPath": {
"type": "string",
"description": "APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion."
},
"kind": {
"type": "string",
"description": "Kind is the kind of the referenced object."
},
"kindPath": {
"type": "string",
"description": "KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind."
},
"namePath": {
"type": "string",
"description": "NamePath is the optional path to the reference name within the object. If omitted namePath equals to the\ntranslate patch path."
"description": "NamePath is the optional relative path to the reference name within the object."
},
"namespacePath": {
"type": "string",
"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."
"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."
}
},
"additionalProperties": false,
Expand Down
11 changes: 8 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,14 +468,19 @@ type TranslatePatchReference struct {
// APIVersion is the apiVersion of the referenced object.
APIVersion string `json:"apiVersion,omitempty" jsonschema:"required"`

// APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
APIVersionPath string `json:"apiVersionPath,omitempty"`

// Kind is the kind of the referenced object.
Kind string `json:"kind,omitempty" jsonschema:"required"`

// NamePath is the optional path to the reference name within the object. If omitted namePath equals to the
// translate patch path.
// KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
KindPath string `json:"kindPath,omitempty"`

// NamePath is the optional relative path to the reference name within the object.
NamePath string `json:"namePath,omitempty"`

// NamespacePath is the optional path to the reference namespace within the object. If omitted namespacePath equals to the
// NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
// metadata.namespace path of the object.
NamespacePath string `json:"namespacePath,omitempty"`
}
Expand Down

0 comments on commit e76331a

Please sign in to comment.