Documentation ¶
Index ¶
- Constants
- func ValidatePluginConfig(config PluginConfig) error
- type CMPServerInitConstants
- type CmdError
- type Command
- type Discover
- type Dynamic
- type Find
- type GenerateManifestStream
- type MatchRepositoryStream
- type Parameters
- type ParametersAnnouncementStream
- type PluginConfig
- type PluginConfigSpec
- type Service
- func (s *Service) CheckPluginConfiguration(ctx context.Context, _ *empty.Empty) (*apiclient.CheckPluginConfigurationResponse, error)
- func (s *Service) GenerateManifest(stream apiclient.ConfigManagementPluginService_GenerateManifestServer) error
- func (s *Service) GetParametersAnnouncement(stream apiclient.ConfigManagementPluginService_GetParametersAnnouncementServer) error
- func (s *Service) Init(workDir string) error
- func (s *Service) MatchRepository(stream apiclient.ConfigManagementPluginService_MatchRepositoryServer) error
- type Stream
Constants ¶
const (
ConfigManagementPluginKind string = "ConfigManagementPlugin"
)
Variables ¶
This section is empty.
Functions ¶
func ValidatePluginConfig ¶
func ValidatePluginConfig(config PluginConfig) error
Types ¶
type CMPServerInitConstants ¶
type CMPServerInitConstants struct {
PluginConfig PluginConfig
}
type Command ¶
type Command struct { Command []string `json:"command,omitempty"` Args []string `json:"args,omitempty"` }
Command holds binary path and arguments list
type Dynamic ¶ added in v2.6.0
type Dynamic struct {
Command
}
Dynamic hold the dynamic announcements for CMP's
type GenerateManifestStream ¶ added in v2.6.0
type GenerateManifestStream interface { Stream SendAndClose(response *apiclient.ManifestResponse) error }
type MatchRepositoryStream ¶ added in v2.6.0
type MatchRepositoryStream interface { Stream SendAndClose(response *apiclient.RepositoryResponse) error }
type Parameters ¶ added in v2.6.0
type Parameters struct { Static []*apiclient.ParameterAnnouncement `yaml:"static"` Dynamic Command `yaml:"dynamic"` }
Parameters holds static and dynamic configurations
type ParametersAnnouncementStream ¶ added in v2.6.0
type ParametersAnnouncementStream interface { Stream SendAndClose(response *apiclient.ParametersAnnouncementResponse) error }
ParametersAnnouncementStream defines an interface able to send/receive a stream of parameter announcements.
type PluginConfig ¶
type PluginConfig struct { metav1.TypeMeta `json:",inline"` Metadata metav1.ObjectMeta `json:"metadata"` Spec PluginConfigSpec `json:"spec"` }
func ReadPluginConfig ¶
func ReadPluginConfig(filePath string) (*PluginConfig, error)
func (*PluginConfig) Address ¶
func (cfg *PluginConfig) Address() string
type PluginConfigSpec ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements ConfigManagementPluginService interface
func NewService ¶
func NewService(initConstants CMPServerInitConstants) *Service
NewService returns a new instance of the ConfigManagementPluginService
func (*Service) CheckPluginConfiguration ¶ added in v2.13.0
func (*Service) GenerateManifest ¶
func (s *Service) GenerateManifest(stream apiclient.ConfigManagementPluginService_GenerateManifestServer) error
GenerateManifest runs generate command from plugin config file and returns generated manifest files
func (*Service) GetParametersAnnouncement ¶ added in v2.6.0
func (s *Service) GetParametersAnnouncement(stream apiclient.ConfigManagementPluginService_GetParametersAnnouncementServer) error
GetParametersAnnouncement gets parameter announcements for a given Application and repo contents.
func (*Service) MatchRepository ¶
func (s *Service) MatchRepository(stream apiclient.ConfigManagementPluginService_MatchRepositoryServer) error
MatchRepository receives the application stream and checks whether its repository type is supported by the config management plugin server. The checks are implemented in the following order:
- If spec.Discover.FileName is provided it finds for a name match in Applications files
- If spec.Discover.Find.Glob is provided if finds for a glob match in Applications files
- Otherwise it runs the spec.Discover.Find.Command