Documentation ¶
Index ¶
- func FilterNamespace(namespace string, includeExpr []*regexp.Regexp, excludeExpr []*regexp.Regexp) bool
- type ArgoCDAppFilter
- type ArgoCDApplication
- type Client
- func (c *Client) ListArgoApplications(ctx context.Context, namespace string, filters ...ArgoCDAppFilter) ([]*ArgoCDApplication, error)
- func (c *Client) ListDeployments(ctx context.Context, request ListRequest) (*v1.DeploymentList, error)
- func (c *Client) ListSecrets(ctx context.Context, namespace string) (*v1.SecretList, error)
- type DestinationNamespaceFilterOptions
- type FiltersOptions
- type KubernetesClient
- type KubernetesClientMock
- func (m *KubernetesClientMock) ListArgoApplications(ctx context.Context, namespace string, filters ...ArgoCDAppFilter) ([]*ArgoCDApplication, error)
- func (m *KubernetesClientMock) ListDeployments(ctx context.Context, request ListRequest) (*appsv1.DeploymentList, error)
- func (m *KubernetesClientMock) ListSecrets(ctx context.Context, namespace string) (*v1.SecretList, error)
- type ListRequest
- type NamespaceFilterOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArgoCDAppFilter ¶
type ArgoCDAppFilter func(*ArgoCDApplication) bool
func NewDestinationNamespaceFilter ¶
func NewDestinationNamespaceFilter(opts FiltersOptions) (ArgoCDAppFilter, error)
type ArgoCDApplication ¶
type ArgoCDApplication struct { Name string `json:"name"` DestinationNamespace string `json:"destination-namespace"` Project string `json:"project"` Server string `json:"server"` RepoURL string `json:"repoURL"` ChartFilePath string `json:"path"` Chart string `json:"chart"` CurrentVersion string `json:"version"` RepoBackendType versions.RepoBackendType `json:"repobackendtype"` // Git or Helm GitRevision string // master / dev / ... }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ListArgoApplications ¶
func (c *Client) ListArgoApplications(ctx context.Context, namespace string, filters ...ArgoCDAppFilter) ([]*ArgoCDApplication, error)
ListArgoApplications Retrieve helm-based argocd Applications from a kubernetes cluster's namespace'
func (*Client) ListDeployments ¶
func (c *Client) ListDeployments(ctx context.Context, request ListRequest) (*v1.DeploymentList, error)
func (*Client) ListSecrets ¶
type DestinationNamespaceFilterOptions ¶
type DestinationNamespaceFilterOptions struct {
NamespaceFilterOptions `yaml:",inline"`
}
type FiltersOptions ¶
type FiltersOptions struct { // Destination namespace of Argocd Applications DestinationNamespaceFilterOptions `yaml:"destination-namespace"` }
type KubernetesClient ¶
type KubernetesClient interface { ListArgoApplications(ctx context.Context, namespace string, filters ...ArgoCDAppFilter) ([]*ArgoCDApplication, error) ListSecrets(ctx context.Context, namespace string) (*v1.SecretList, error) ListDeployments(ctx context.Context, request ListRequest) (*appsv1.DeploymentList, error) }
type KubernetesClientMock ¶
func (*KubernetesClientMock) ListArgoApplications ¶
func (m *KubernetesClientMock) ListArgoApplications(ctx context.Context, namespace string, filters ...ArgoCDAppFilter) ([]*ArgoCDApplication, error)
func (*KubernetesClientMock) ListDeployments ¶
func (m *KubernetesClientMock) ListDeployments(ctx context.Context, request ListRequest) (*appsv1.DeploymentList, error)
func (*KubernetesClientMock) ListSecrets ¶
func (m *KubernetesClientMock) ListSecrets(ctx context.Context, namespace string) (*v1.SecretList, error)
type ListRequest ¶
type NamespaceFilterOptions ¶
Click to show internal directories.
Click to hide internal directories.