Documentation ¶
Index ¶
- Constants
- Variables
- func CheckInvalidGenerators(applicationSetInfo *argoappsetv1.ApplicationSet)
- func CombineStringMaps(a map[string]string, b map[string]string) (map[string]string, error)
- func CombineStringMapsAllowDuplicates(a map[string]string, b map[string]string) (map[string]string, error)
- func CreateOrUpdate(ctx context.Context, c client.Client, obj client.Object, ...) (controllerutil.OperationResult, error)
- func ListClusters(ctx context.Context, clientset kubernetes.Interface, namespace string) (*appv1.ClusterList, error)
- func NormalizeBitbucketBasePath(basePath string) string
- func ValidateDestination(ctx context.Context, dest *appv1.ApplicationDestination, ...) error
- type CreateOnlyPolicy
- type CreateUpdatePolicy
- type Policy
- type Render
- type Renderer
- type SyncPolicy
- type WebhookHandler
Constants ¶
const ( ArgoCDSecretTypeLabel = "argocd.argoproj.io/secret-type" ArgoCDSecretTypeCluster = "cluster" )
Variables ¶
var Policies = map[string]Policy{ "sync": &SyncPolicy{}, "create-only": &CreateOnlyPolicy{}, "create-update": &CreateUpdatePolicy{}, }
Policies is a registry of available policies.
Functions ¶
func CheckInvalidGenerators ¶
func CheckInvalidGenerators(applicationSetInfo *argoappsetv1.ApplicationSet)
Log a warning if there are unrecognized generators
func CombineStringMaps ¶
func CombineStringMapsAllowDuplicates ¶
func CombineStringMapsAllowDuplicates(a map[string]string, b map[string]string) (map[string]string, error)
CombineStringMapsAllowDuplicates merges two maps. Where there are duplicates, take the latter map's value.
func CreateOrUpdate ¶
func CreateOrUpdate(ctx context.Context, c client.Client, obj client.Object, f controllerutil.MutateFn) (controllerutil.OperationResult, error)
CreateOrUpdate overrides "sigs.k8s.io/controller-runtime" function in sigs.k8s.io/controller-runtime/pkg/controller/controllerutil/controllerutil.go to add equality for argov1alpha1.ApplicationDestination argov1alpha1.ApplicationDestination has a private variable, so the default implementation fails to compare it.
CreateOrUpdate creates or updates the given object in the Kubernetes cluster. The object's desired state must be reconciled with the existing state inside the passed in callback MutateFn.
The MutateFn is called regardless of creating or updating an object.
It returns the executed operation and an error.
func ListClusters ¶
func ListClusters(ctx context.Context, clientset kubernetes.Interface, namespace string) (*appv1.ClusterList, error)
func ValidateDestination ¶
func ValidateDestination(ctx context.Context, dest *appv1.ApplicationDestination, clientset kubernetes.Interface, namespace string) error
ValidateDestination checks: if we used destination name we infer the server url if we used both name and server then we return an invalid spec error
Types ¶
type CreateOnlyPolicy ¶
type CreateOnlyPolicy struct{}
func (*CreateOnlyPolicy) Delete ¶
func (p *CreateOnlyPolicy) Delete() bool
func (*CreateOnlyPolicy) Update ¶
func (p *CreateOnlyPolicy) Update() bool
type CreateUpdatePolicy ¶
type CreateUpdatePolicy struct{}
func (*CreateUpdatePolicy) Delete ¶
func (p *CreateUpdatePolicy) Delete() bool
func (*CreateUpdatePolicy) Update ¶
func (p *CreateUpdatePolicy) Update() bool
type Render ¶
type Render struct { }
func (*Render) RenderTemplateParams ¶
func (r *Render) RenderTemplateParams(tmpl *argoappsv1.Application, syncPolicy *argoappsetv1.ApplicationSetSyncPolicy, params map[string]string) (*argoappsv1.Application, error)
type Renderer ¶
type Renderer interface {
RenderTemplateParams(tmpl *argoappsv1.Application, syncPolicy *argoappsetv1.ApplicationSetSyncPolicy, params map[string]string) (*argoappsv1.Application, error)
}
type SyncPolicy ¶
type SyncPolicy struct{}
func (*SyncPolicy) Delete ¶
func (p *SyncPolicy) Delete() bool
func (*SyncPolicy) Update ¶
func (p *SyncPolicy) Update() bool
type WebhookHandler ¶
type WebhookHandler struct {
// contains filtered or unexported fields
}
func NewWebhookHandler ¶
func NewWebhookHandler(namespace string, argocdSettingsMgr *argosettings.SettingsManager, client client.Client) (*WebhookHandler, error)
func (*WebhookHandler) HandleEvent ¶
func (h *WebhookHandler) HandleEvent(payload interface{})
func (*WebhookHandler) Handler ¶
func (h *WebhookHandler) Handler(w http.ResponseWriter, r *http.Request)