Documentation ¶
Index ¶
- Variables
- type ClusterConfig
- type ClusterTLSClientConfig
- type Driver
- func (d *Driver) CreateOrUpdateCluster(ctx context.Context, id *cd.ResourceIdentifier, cluster *cd.Cluster) error
- func (d *Driver) CreateOrUpdateHelmApplication(ctx context.Context, id *cd.ResourceIdentifier, app *cd.HelmApplication) error
- func (d *Driver) DeleteCluster(ctx context.Context, id *cd.ResourceIdentifier) error
- func (d *Driver) DeleteHelmApplication(ctx context.Context, id *cd.ResourceIdentifier, backgroundDelete bool) error
- func (d *Driver) GetClusterSecret(ctx context.Context, id *cd.ResourceIdentifier) (*corev1.Secret, error)
- func (d *Driver) GetHelmApplication(ctx context.Context, id *cd.ResourceIdentifier) (*argoprojv1.Application, error)
- func (d *Driver) Kind() cd.DriverKind
- func (d *Driver) ListHelmApplications(ctx context.Context, id *cd.ResourceIdentifier) (map[*cd.ResourceIdentifier]*cd.HelmApplication, error)
- type Options
Constants ¶
This section is empty.
Variables ¶
var ( // ErrItemLengthMismatch is returned when items are listed but the // wrong number are returned. Given we are dealing with unique applications // one or zero are expected. ErrItemLengthMismatch = errors.New("item count not as expected") )
Functions ¶
This section is empty.
Types ¶
type ClusterConfig ¶
type ClusterConfig struct {
TLSClientConfig ClusterTLSClientConfig `json:"tlsClientConfig"`
}
type ClusterTLSClientConfig ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver implements a CD driver for ArgoCD. Applications are fairly straight forward as they are implemented with custom resources. We use the application ID to generate a resource name, and labels to make them unique and add context, plus this thwarts the 63 character limit. There is no custom resource for clusters, so have to use the API.
func (*Driver) CreateOrUpdateCluster ¶
func (d *Driver) CreateOrUpdateCluster(ctx context.Context, id *cd.ResourceIdentifier, cluster *cd.Cluster) error
CreateOrUpdateCluster creates or updates a cluster idempotently.
func (*Driver) CreateOrUpdateHelmApplication ¶
func (d *Driver) CreateOrUpdateHelmApplication(ctx context.Context, id *cd.ResourceIdentifier, app *cd.HelmApplication) error
CreateOrUpdateHelmApplication creates or updates a helm application idempotently.
func (*Driver) DeleteCluster ¶
DeleteCluster deletes an existing cluster.
func (*Driver) DeleteHelmApplication ¶
func (d *Driver) DeleteHelmApplication(ctx context.Context, id *cd.ResourceIdentifier, backgroundDelete bool) error
DeleteHelmApplication deletes an existing helm application.
func (*Driver) GetClusterSecret ¶
func (d *Driver) GetClusterSecret(ctx context.Context, id *cd.ResourceIdentifier) (*corev1.Secret, error)
GetClusterSecret looks up the cluster secret via the ID, which is present for both create and delete interfaces.
func (*Driver) GetHelmApplication ¶
func (d *Driver) GetHelmApplication(ctx context.Context, id *cd.ResourceIdentifier) (*argoprojv1.Application, error)
GetHelmApplication retrieves an abstract helm application.
func (*Driver) ListHelmApplications ¶ added in v0.1.83
func (d *Driver) ListHelmApplications(ctx context.Context, id *cd.ResourceIdentifier) (map[*cd.ResourceIdentifier]*cd.HelmApplication, error)
ListHelmApplications gets all applications that match the resource identifier.
type Options ¶
type Options struct {
K8SAPITester util.K8SAPITester
}