Documentation
¶
Index ¶
- Variables
- func ArgocdPlugin(plugin Executor) func(w http.ResponseWriter, req *http.Request)
- func GetDiff(live *unstructured.Unstructured, target *unstructured.Unstructured) (string, error)
- type ActionSpec
- type ApiExecutor
- type App
- type AppActionSpec
- type DiffAction
- type Executor
- type PluginSpec
- type SyncAction
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ArgocdPlugin ¶
func ArgocdPlugin(plugin Executor) func(w http.ResponseWriter, req *http.Request)
func GetDiff ¶ added in v0.0.7
func GetDiff(live *unstructured.Unstructured, target *unstructured.Unstructured) (string, error)
GetDiff gets a diff between two unstructured objects to stdout using an external diff utility
Types ¶
type ActionSpec ¶
type ActionSpec struct {
App *AppActionSpec `json:"app,omitempty"`
Timeout string `json:"timeout,omitempty"`
}
type ApiExecutor ¶
type ApiExecutor struct {
// contains filtered or unexported fields
}
func NewApiExecutor ¶
func NewApiExecutor(apiClient apiclient.Client) ApiExecutor
func (*ApiExecutor) Execute ¶
func (e *ApiExecutor) Execute(args executor.ExecuteTemplateArgs) executor.ExecuteTemplateReply
type App ¶
type App struct {
// Namespace is the namespace in which the app is installed. If empty, assume the same namespace as the Argo CD
// API server.
Namespace string `json:"namespace,omitempty"`
// Name is the name of the app (not prefixed with {namespace}/).
Name string `json:"name,omitempty"`
}
App specifies the app to be synced.
type AppActionSpec ¶
type AppActionSpec struct {
// A sync action
Sync *SyncAction `json:"sync,omitempty"`
Diff *DiffAction `json:"diff,omitempty"`
}
AppActionSpec describes all possible actions that can be taken by the plugin.
type DiffAction ¶ added in v0.0.7
type Executor ¶
type Executor interface {
// Execute runs commands based on the args provided from the workflow
Execute(args executor.ExecuteTemplateArgs) executor.ExecuteTemplateReply
}
Executor performs the tasks requested by the Workflow.
type PluginSpec ¶
type PluginSpec struct {
ArgoCD ActionSpec `json:"argocd,omitempty"`
}
PluginSpec represents the `plugin` block of an Argo Workflows template.
type SyncAction ¶
type SyncAction struct {
// Apps is a YAML array of objects representing the apps to be synced. For example, `[{name: my-app}, {name: my-app, namespace: app-ns}]`.
Apps string `json:"apps,omitempty"`
// Options is a YAML array of option=value pairs to configure the sync operation. https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/
Options string `json:"options,omitempty"`
}
SyncAction describes an action that triggers an argocd sync.
Click to show internal directories.
Click to hide internal directories.