Documentation ¶
Index ¶
- func BuildK8sConfig() (*rest.Config, error)
- func NewK8sClient() (*kubernetes.Clientset, error)
- type KeptnAPI
- func (k KeptnAPI) AddServiceResource(projectName string, stageName string, serviceName string, path string, ...) error
- func (k KeptnAPI) CreateJobConfig(projectName string, stageName string, serviceName string, jobConfigYaml []byte) error
- func (k KeptnAPI) CreateProject(projectName string, shipyardYAML []byte) error
- func (k KeptnAPI) CreateService(projectName string, serviceName string) error
- func (k KeptnAPI) DeleteProject(projectName string) error
- func (k KeptnAPI) GetEvents(keptnContext *string) ([]*models.KeptnContextExtendedCE, error)
- func (k KeptnAPI) SendEvent(keptnEvent *models.KeptnContextExtendedCE) (*models.EventContext, error)
- type KeptnConnectionDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildK8sConfig ¶
BuildK8sConfig builds the kubernetes configuration from default or the configuration file that is specified in the KUBECONFIG environment variable.
func NewK8sClient ¶
func NewK8sClient() (*kubernetes.Clientset, error)
NewK8sClient creates a K8s client from the KUBECONFIG environment variable
Types ¶
type KeptnAPI ¶
type KeptnAPI struct { APISet *api.APISet APIHandler api.APIV1Interface ProjectHandler api.ProjectsV1Interface ResourceHandler api.ResourcesV1Interface EventHandler api.EventsV1Interface }
KeptnAPI structure holds different api handlers for the keptn api such that they can be used more easily
func NewKeptnAPI ¶
func NewKeptnAPI(details KeptnConnectionDetails) (*KeptnAPI, error)
NewKeptnAPI creates a KeptnAPI structure from KeptnConnectionDetails
func (KeptnAPI) AddServiceResource ¶
func (k KeptnAPI) AddServiceResource(projectName string, stageName string, serviceName string, path string, data string) error
AddServiceResource uploads a resource to a specific service and stage
func (KeptnAPI) CreateJobConfig ¶
func (k KeptnAPI) CreateJobConfig(projectName string, stageName string, serviceName string, jobConfigYaml []byte) error
CreateJobConfig uploads the job configuration for the job-executor-service to a specific service and stage
func (KeptnAPI) CreateProject ¶
CreateProject creates a keptn project from the contents of a shipyard yaml file
func (KeptnAPI) CreateService ¶
CreateService creates a service in a given project
func (KeptnAPI) DeleteProject ¶
DeleteProject deletes a project by a given name
func (KeptnAPI) GetEvents ¶
func (k KeptnAPI) GetEvents(keptnContext *string) ([]*models.KeptnContextExtendedCE, error)
GetEvents returns a list of events for the given context from keptn
func (KeptnAPI) SendEvent ¶
func (k KeptnAPI) SendEvent(keptnEvent *models.KeptnContextExtendedCE) (*models.EventContext, error)
SendEvent sends an event to Keptn
type KeptnConnectionDetails ¶
KeptnConnectionDetails contains the endpoint and the API token for Keptn