Skip to content

Commit

Permalink
feat: parameterized config management plugins (argoproj#9135) (argopr…
Browse files Browse the repository at this point in the history
…oj#9216)

* feat: parameterized CMPs

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* values types for parameters

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* Add types for CMP announcement

Signed-off-by: zachaller <zachaller@hotmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* Reorg

Signed-off-by: zachaller <zachaller@hotmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* finish type

Signed-off-by: zachaller <zachaller@hotmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* First pass at working GetParametersAnnouncement

Signed-off-by: zachaller <zachaller@hotmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* Typos

Signed-off-by: zachaller <zachaller@hotmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* Make all fields optional

Signed-off-by: zachaller <zachaller@hotmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* Make sure response makes it to repo server

Signed-off-by: zachaller <zachaller@hotmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* Refactor for testing

Signed-off-by: zachaller <zachaller@hotmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* lint

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* send build env to param announcement gen

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* test parameter announcement

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* tests

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* environ tests

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* Rename workdir to app dir

Signed-off-by: zachaller <zachaller@hotmail.com>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* handle empty command, start ui work (argoproj#11)

* Add types for CMP announcement

Signed-off-by: zachaller <zachaller@hotmail.com>

* Reorg

Signed-off-by: zachaller <zachaller@hotmail.com>

* finish type

Signed-off-by: zachaller <zachaller@hotmail.com>

* First pass at working GetParametersAnnouncement

Signed-off-by: zachaller <zachaller@hotmail.com>

* Typos

Signed-off-by: zachaller <zachaller@hotmail.com>

* Make all fields optional

Signed-off-by: zachaller <zachaller@hotmail.com>

* Make sure response makes it to repo server

Signed-off-by: zachaller <zachaller@hotmail.com>

* Refactor for testing

Signed-off-by: zachaller <zachaller@hotmail.com>

* values types for parameters

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* lint

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* send build env to param announcement gen

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* test parameter announcement

* tests

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* environ tests

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* Rename workdir to app dir

Signed-off-by: zachaller <zachaller@hotmail.com>

* handle empty command, start ui work

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix order

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix map merging, make params read-only

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

Co-authored-by: zachaller <zachaller@hotmail.com>

* Add helm PoC example plugin

Signed-off-by: zachaller <zachaller@hotmail.com>

* example as kustomize overlay

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* Parameterized cmps docs (argoproj#12)

* use printf instead of echo

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* docs

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* test for temp dir cleanup

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* handle empty params

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* handle empty values

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* consolidate types

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix tests

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* docs

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* docs

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* remove duplicate info

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* add warning about param announcements vs param values

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* tests (argoproj#13)

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* tests

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix types

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix test

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix codegen

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix codegen

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* revert test hack

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* docs correction

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix indentation

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix spacing

Signed-off-by: CI <michael@crenshaw.dev>

* move util function to util file and add test

Signed-off-by: CI <michael@crenshaw.dev>

* wrap error

Signed-off-by: CI <michael@crenshaw.dev>

* correct version number

Signed-off-by: CI <michael@crenshaw.dev>

* document necessity of collectionType param

Signed-off-by: CI <michael@crenshaw.dev>

* remove part of error message that's not useful (dir name is now randomized)

Signed-off-by: CI <michael@crenshaw.dev>

* fix things so that they are not broken

Signed-off-by: CI <michael@crenshaw.dev>

* don't close file before caller gets a chance to use it

Signed-off-by: CI <michael@crenshaw.dev>

* codegen

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix test

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* comments

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix test

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* DON'T PANIC

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
Signed-off-by: zachaller <zachaller@hotmail.com>
Signed-off-by: CI <michael@crenshaw.dev>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: zachaller <zachaller@hotmail.com>
Signed-off-by: schakrad <chakradari.sindhu@gmail.com>
  • Loading branch information
2 people authored and schakrad committed Mar 14, 2023
1 parent 362abff commit 960e4cf
Show file tree
Hide file tree
Showing 39 changed files with 6,166 additions and 951 deletions.
95 changes: 95 additions & 0 deletions assets/swagger.json
Expand Up @@ -4508,6 +4508,65 @@
}
}
},
"repositoryParameterAnnouncement": {
"type": "object",
"properties": {
"array": {
"description": "array is the default value of the parameter if the parameter is an array.",
"type": "array",
"items": {
"type": "string"
}
},
"collectionType": {
"description": "collectionType is the type of value this parameter holds - either a single value (a string) or a collection\n(array or map). If collectionType is set, only the field with that type will be used. If collectionType is not\nset, `string` is the default. If collectionType is set to an invalid value, a validation error is thrown.",
"type": "string"
},
"itemType": {
"description": "itemType determines the primitive data type represented by the parameter. Parameters are always encoded as\nstrings, but this field lets them be interpreted as other primitive types.",
"type": "string"
},
"map": {
"description": "map is the default value of the parameter if the parameter is a map.",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"name": {
"description": "name is the name identifying a parameter.",
"type": "string"
},
"required": {
"description": "required defines if this given parameter is mandatory.",
"type": "boolean"
},
"string": {
"description": "string is the default value of the parameter if the parameter is a string.",
"type": "string"
},
"title": {
"description": "title is a human-readable text of the parameter name.",
"type": "string"
},
"tooltip": {
"description": "tooltip is a human-readable description of the parameter.",
"type": "string"
}
}
},
"repositoryPluginAppSpec": {
"type": "object",
"title": "PluginAppSpec contains details about a plugin-type Application",
"properties": {
"parametersAnnouncement": {
"type": "array",
"items": {
"$ref": "#/definitions/repositoryParameterAnnouncement"
}
}
}
},
"repositoryRefs": {
"type": "object",
"title": "A subset of the repository's named refs",
Expand Down Expand Up @@ -4554,6 +4613,9 @@
"kustomize": {
"$ref": "#/definitions/repositoryKustomizeAppSpec"
},
"plugin": {
"$ref": "#/definitions/repositoryPluginAppSpec"
},
"type": {
"type": "string"
}
Expand Down Expand Up @@ -5775,6 +5837,39 @@
},
"name": {
"type": "string"
},
"parameters": {
"type": "array",
"items": {
"$ref": "#/definitions/v1alpha1ApplicationSourcePluginParameter"
}
}
}
},
"v1alpha1ApplicationSourcePluginParameter": {
"type": "object",
"properties": {
"array": {
"description": "Array is the value of an array type parameter.",
"type": "array",
"items": {
"type": "string"
}
},
"map": {
"description": "Map is the value of a map type parameter.",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"name": {
"description": "Name is the name identifying a parameter.",
"type": "string"
},
"string": {
"description": "String_ is the value of a string type parameter.",
"type": "string"
}
}
},
Expand Down

0 comments on commit 960e4cf

Please sign in to comment.