-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplugin.yaml
84 lines (84 loc) · 4.64 KB
/
plugin.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
apiVersion: argoproj.io/v1alpha1
kind: ConfigManagementPlugin
metadata:
# The name of the plugin must be unique within a given Argo CD instance.
name: argocd-cloudtruth-plugin
spec:
version: v0.8.2
# The init command runs in the Application source directory at the beginning of each manifest generation. The init
# command can output anything. A non-zero status code will fail manifest generation.
init:
# Init always happens immediately before generate, but its output is not treated as manifests.
# This is a good place to, for example, download chart dependencies.
command: [sh]
args: [-c, 'echo "Initializing..."']
# The generate command runs in the Application source directory each time manifests are generated. Standard output
# must be ONLY valid YAML manifests. A non-zero exit code will fail manifest generation.
# Error output will be sent to the UI, so avoid printing sensitive information (such as secrets).
generate:
command: [sh]
args: [-c, 'argocd-cloudtruth-plugin 2> /tmp/argocd-cloudtruth-plugin.log']
# The discovery config is applied to a repository. If every configured discovery tool matches, then the plugin may be
# used to generate manifests for Applications using the repository. If the discovery config is omitted then the plugin
# will not match any application but can still be invoked explicitly by specifying the plugin name in the app spec.
# Only one of fileName, find.glob, or find.command should be specified. If multiple are specified then only the
# first (in that order) is evaluated.
discover:
# fileName is a glob pattern (https://pkg.go.dev/path/filepath#Glob) that is applied to the repository's root
# directory (not the Application source directory). If there is a match, this plugin may be used for the repository.
fileName: "./.argocd-cloudtruth-plugin"
# The parameters config describes what parameters the UI should display for an Application. It is up to the user to
# actually set parameters in the Application manifest (in spec.source.plugin.parameters). The announcements _only_
# inform the "Parameters" tab in the App Details page of the UI.
parameters:
# Static parameter announcements are sent to the UI for _all_ Applications handled by this plugin.
# Think of the `string`, `array`, and `map` values set here as "defaults". It is up to the plugin author to make
# sure that these default values actually reflect the plugin's behavior if the user doesn't explicitly set different
# values for those parameters.
static:
- name: cloudtruth-environment
title: CloudTruth Environment
tooltip: The cloudtruth environment to fetch data for
required: false
itemType: "string"
- name: cloudtruth-project
title: CloudTruth Project
tooltip: The cloudtruth project to fetch data for
required: false
itemType: "string"
- name: cloudtruth-tag
title: CloudTruth Tag
tooltip: The cloudtruth environment tag to fetch data for
required: false
itemType: "string"
- name: cloudtruth-reference-pattern
title: CloudTruth Reference Pattern
tooltip: The reference pattern (go fmt) to substitute with parameters
required: false
itemType: "string"
- name: cloudtruth-file-pattern
title: CloudTruth File Pattern
tooltip: The file pattern (glob) to perform substitutions on (defaults to *.y*ml). Multiple delimted with comma
required: false
itemType: "string"
- name: cloudtruth-log-level
title: CloudTruth Log Level
tooltip: Enables more detailed log output in the plugin that goes to /tmp/argocd-cloudtruth-plugin.log in the sidecar container in argocd-repo-server. 0=warn,1=info,2=debug,3=trace,4=apitrace
required: false
itemType: "string"
- name: cloudtruth-api-key
title: CloudTruth ApiKey
tooltip: The api key for communicating with cloudtruth
required: false
itemType: "string"
- name: cloudtruth-api-url
title: CloudTruth ApiUrl
tooltip: The cloudtruth api endpoint to communicate with
required: false
itemType: "string"
# # Dynamic parameter announcements are announcements specific to an Application handled by this plugin. For example,
# # the values for a Helm chart's values.yaml file could be sent as parameter announcements.
# dynamic:
# # The command is run in an Application's source directory. Standard output must be JSON matching the schema of the
# # static parameter announcements list.
# command: [echo, '[{"name": "example-param", "string": "default-string-value"}]']