Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added paramPrefix to the codebase #18048 #18406

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions assets/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -7176,6 +7176,9 @@
"$ref": "#/definitions/v1alpha1GitFileGeneratorItem"
}
},
"paramPrefix": {
"type": "string"
},
"pathParamPrefix": {
"type": "string"
},
Expand Down
1 change: 1 addition & 0 deletions docs/operator-manual/applicationset/Generators-Matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ By combining both generators parameters, to produce every possible combination,
Any set of generators may be used, with the combined values of those generators inserted into the `template` parameters, as usual.

**Note**: If both child generators are Git generators, one or both of them must use the `pathParamPrefix` option to avoid conflicts when merging the child generators’ items.
`paramPrefix` option to protect other variables from overwriting each other.

## Example: Git Directory generator + Cluster generator

Expand Down
6 changes: 6 additions & 0 deletions manifests/core-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6242,6 +6242,8 @@ spec:
- path
type: object
type: array
paramPrefix:
type: string
pathParamPrefix:
type: string
repoURL:
Expand Down Expand Up @@ -8602,6 +8604,8 @@ spec:
- path
type: object
type: array
paramPrefix:
type: string
pathParamPrefix:
type: string
repoURL:
Expand Down Expand Up @@ -13662,6 +13666,8 @@ spec:
- path
type: object
type: array
paramPrefix:
type: string
pathParamPrefix:
type: string
repoURL:
Expand Down
6 changes: 6 additions & 0 deletions manifests/crds/applicationset-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,8 @@ spec:
- path
type: object
type: array
paramPrefix:
type: string
pathParamPrefix:
type: string
repoURL:
Expand Down Expand Up @@ -3605,6 +3607,8 @@ spec:
- path
type: object
type: array
paramPrefix:
type: string
pathParamPrefix:
type: string
repoURL:
Expand Down Expand Up @@ -8665,6 +8669,8 @@ spec:
- path
type: object
type: array
paramPrefix:
type: string
pathParamPrefix:
type: string
repoURL:
Expand Down
6 changes: 6 additions & 0 deletions manifests/ha/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6242,6 +6242,8 @@ spec:
- path
type: object
type: array
paramPrefix:
type: string
pathParamPrefix:
type: string
repoURL:
Expand Down Expand Up @@ -8602,6 +8604,8 @@ spec:
- path
type: object
type: array
paramPrefix:
type: string
pathParamPrefix:
type: string
repoURL:
Expand Down Expand Up @@ -13662,6 +13666,8 @@ spec:
- path
type: object
type: array
paramPrefix:
type: string
pathParamPrefix:
type: string
repoURL:
Expand Down
6 changes: 6 additions & 0 deletions manifests/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6242,6 +6242,8 @@ spec:
- path
type: object
type: array
paramPrefix:
type: string
pathParamPrefix:
type: string
repoURL:
Expand Down Expand Up @@ -8602,6 +8604,8 @@ spec:
- path
type: object
type: array
paramPrefix:
type: string
pathParamPrefix:
type: string
repoURL:
Expand Down Expand Up @@ -13662,6 +13666,8 @@ spec:
- path
type: object
type: array
paramPrefix:
type: string
pathParamPrefix:
type: string
repoURL:
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/application/v1alpha1/applicationset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,9 @@ type GitGenerator struct {
RequeueAfterSeconds *int64 `json:"requeueAfterSeconds,omitempty" protobuf:"bytes,5,name=requeueAfterSeconds"`
Template ApplicationSetTemplate `json:"template,omitempty" protobuf:"bytes,6,name=template"`
PathParamPrefix string `json:"pathParamPrefix,omitempty" protobuf:"bytes,7,name=pathParamPrefix"`

ParamPrefix string `json:"paramPrefix,omitempty" protobuf:"bytes,8,name=paramPrefix"`
// Values contains key/value pairs which are passed directly as parameters to the template
Values map[string]string `json:"values,omitempty" protobuf:"bytes,8,name=values"`
Values map[string]string `json:"values,omitempty" protobuf:"bytes,9,name=values"`
}

type GitDirectoryGeneratorItem struct {
Expand Down
Loading
Loading