Documentation ¶
Index ¶
- Constants
- Variables
- func AddObjectResultsToDiffer(results []ObjectResult, differ *diffutil.Differ, ...) error
- type AddObjectResultsToDifferOptions
- type ApplyOptions
- type ApplyResult
- type Client
- type DeleteOptions
- type DeleteResult
- type Object
- type ObjectAction
- type ObjectResult
- type ResourceInfo
- type SecretSetInfoStore
- func (s *SecretSetInfoStore) CreateSetInfo(ctx context.Context, name string, info *SetInfo) error
- func (s *SecretSetInfoStore) DeleteSetInfo(ctx context.Context, name string) error
- func (s *SecretSetInfoStore) GetSetInfo(ctx context.Context, name string) (*SetInfo, error)
- func (s *SecretSetInfoStore) ListSetInfos(ctx context.Context) ([]*SetInfo, error)
- func (s *SecretSetInfoStore) UpdateSetInfo(ctx context.Context, name string, info *SetInfo) error
- type SetInfo
- type SetInfoStore
Constants ¶
View Source
const ( DefaultSetInfoSecretPrefix = "configset.v1." DefaultSetInfoSecretDataKey = "data" DefaultSetInfoSecretFieldOwner = "configset/secret-store" DefaultSetInfoSecretLockAnnotationKey = "configset/lock-id" DefaultSetInfoSecretIsSetInfoLabelKey = "configset/is-set-info" )
View Source
const (
DefaultFieldOwner = "configset"
)
Variables ¶
View Source
var (
ErrFailedToOperateSomeResources = fmt.Errorf("failed to opearate some resources")
)
Functions ¶
func AddObjectResultsToDiffer ¶
func AddObjectResultsToDiffer(results []ObjectResult, differ *diffutil.Differ, opt AddObjectResultsToDifferOptions) error
Types ¶
type ApplyOptions ¶
type ApplyOptions struct { DryRun bool ForceConflicts bool PopulateLiveObjects bool LogObjectResultFunc func(ObjectResult) }
type ApplyResult ¶
type ApplyResult struct {
ObjectResults []ObjectResult
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Apply ¶
func (c *Client) Apply(ctx context.Context, name string, objs []Object, opt ApplyOptions) (ApplyResult, error)
func (*Client) Delete ¶
func (c *Client) Delete(ctx context.Context, name string, opt DeleteOptions) (DeleteResult, error)
func (*Client) Store ¶
func (c *Client) Store() SetInfoStore
type DeleteOptions ¶
type DeleteOptions struct { DryRun bool PopulateLiveObjects bool LogObjectResultFunc func(ObjectResult) }
type DeleteResult ¶
type DeleteResult struct {
ObjectResults []ObjectResult
}
type ObjectAction ¶
type ObjectAction string
const ( ObjectActionUpdate ObjectAction = "update" LogObjectActionDelete ObjectAction = "delete" )
type ObjectResult ¶
type ObjectResult struct { Action ObjectAction Error error Config Object Live Object Updated Object }
type ResourceInfo ¶
type SecretSetInfoStore ¶
type SecretSetInfoStore struct {
// contains filtered or unexported fields
}
func NewSecretSetInfoStore ¶
func NewSecretSetInfoStore(kubeClient crclient.Client, namespace string) (*SecretSetInfoStore, error)
func (*SecretSetInfoStore) CreateSetInfo ¶
func (*SecretSetInfoStore) DeleteSetInfo ¶
func (s *SecretSetInfoStore) DeleteSetInfo(ctx context.Context, name string) error
func (*SecretSetInfoStore) GetSetInfo ¶
func (*SecretSetInfoStore) ListSetInfos ¶
func (s *SecretSetInfoStore) ListSetInfos(ctx context.Context) ([]*SetInfo, error)
func (*SecretSetInfoStore) UpdateSetInfo ¶
type SetInfo ¶
type SetInfo struct { Name string `json:"name"` Resources []ResourceInfo `json:"resources"` UpdatedAt string `json:"updatedAt"` }
type SetInfoStore ¶
type SetInfoStore interface { GetSetInfo(ctx context.Context, name string) (*SetInfo, error) ListSetInfos(ctx context.Context) ([]*SetInfo, error) CreateSetInfo(ctx context.Context, name string, info *SetInfo) error UpdateSetInfo(ctx context.Context, name string, info *SetInfo) error DeleteSetInfo(ctx context.Context, name string) error }
Click to show internal directories.
Click to hide internal directories.