Documentation ¶
Index ¶
- type ArtifactLinks
- type ContentManifest
- type FreshnessGrade
- type Image
- type Links
- type ParsedData
- type ReleaseController
- func (r *ReleaseController) CreateRelease(name, namespace, snapshot, releasePlan string) (*releaseApi.Release, error)
- func (r *ReleaseController) CreateReleasePipelineRoleBindingForServiceAccount(namespace string, serviceAccount *corev1.ServiceAccount) (*rbac.RoleBinding, error)
- func (r *ReleaseController) CreateReleasePlan(name, namespace, application, targetNamespace, autoReleaseLabel string, ...) (*releaseApi.ReleasePlan, error)
- func (r *ReleaseController) CreateReleasePlanAdmission(name, namespace, environment, origin, policy, serviceAccountName string, ...) (*releaseApi.ReleasePlanAdmission, error)
- func (r *ReleaseController) DeleteReleasePlan(name, namespace string, failOnNotFound bool) error
- func (r *ReleaseController) DeleteReleasePlanAdmission(name, namespace string, failOnNotFound bool) error
- func (r *ReleaseController) GetFirstReleaseInNamespace(namespace string) (*releaseApi.Release, error)
- func (r *ReleaseController) GetPipelineRunInNamespace(namespace, releaseName, releaseNamespace string) (*pipeline.PipelineRun, error)
- func (r *ReleaseController) GetPyxisImageByImageID(pyxisStageImagesApiEndpoint, imageID string, ...) ([]byte, error)
- func (r *ReleaseController) GetPyxisImageIDsFromCreatePyxisImageTaskLogs(logs map[string]string) ([]string, error)
- func (r *ReleaseController) GetRelease(releaseName, snapshotName, namespace string) (*releaseApi.Release, error)
- func (r *ReleaseController) GetReleaseConditionStatusMessages(name, namespace string) (messages []string, err error)
- func (r *ReleaseController) GetReleasePlan(name, namespace string) (*releaseApi.ReleasePlan, error)
- func (r *ReleaseController) GetReleasePlanAdmission(name, namespace string) (*releaseApi.ReleasePlanAdmission, error)
- func (r *ReleaseController) GetReleases(namespace string) (*releaseApi.ReleaseList, error)
- func (r *ReleaseController) StoreRelease(release *releaseApi.Release) error
- func (r *ReleaseController) WaitForReleasePipelineToBeFinished(release *releaseApi.Release, managedNamespace string) error
- func (r *ReleaseController) WaitForReleasePipelineToGetStarted(release *releaseApi.Release, managedNamespace string) (*pipeline.PipelineRun, error)
- type RequestLinks
- type RpmManifestLinks
- type TestResultsLinks
- type VulnerabilitiesLinks
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactLinks ¶
type ArtifactLinks struct {
Href string `json:"href"`
}
Defines a struct ArtifactLinks with a single field Href for storing a link related to an artifact.
type ContentManifest ¶
type ContentManifest struct {
ID string `json:"_id"`
}
ContentManifest id of content manifest
type FreshnessGrade ¶
type FreshnessGrade struct { CreationDate string `json:"creation_date"` Grade string `json:"grade"` StartDate string `json:"start_date"` }
Defines a struct FreshnessGrade with fields for creation date, grade, and start date.
type Image ¶
type Image struct { ID string `json:"_id"` Links Links `json:"_links"` Architecture string `json:"architecture"` Certified bool `json:"certified"` ContentManifest ContentManifest `json:"content_manifest"` CreatedBy string `json:"created_by"` CreatedOnBehalfOf interface{} `json:"created_on_behalf_of"` CreationDate string `json:"creation_date"` DockerImageDigest string `json:"docker_image_digest"` FreshnessGrades []FreshnessGrade `json:"freshness_grades"` ImageID string `json:"image_id"` LastUpdateDate string `json:"last_update_date"` LastUpdatedBy string `json:"last_updated_by"` ObjectType string `json:"object_type"` ParsedData ParsedData `json:"parsed_data"` }
Defines a struct Image with various fields representing image properties and metadata. It includes fields for ID, links, architecture, certification status, content manifest, content manifest components, creator information, creation date, Docker image digest, freshness grades, image ID, last update date, last updated by, object type, and parsed data.
type Links ¶
type Links struct { Artifacts ArtifactLinks `json:"artifacts"` Requests RequestLinks `json:"requests"` RpmManifest RpmManifestLinks `json:"rpm_manifest"` TestResults TestResultsLinks `json:"test_results"` Vulnerabilities VulnerabilitiesLinks `json:"vulnerabilities"` }
Defines a struct Links with fields for various types of links including artifacts, requests, RPM manifests, test results, and vulnerabilities. Each field is represented by a corresponding struct type.
type ParsedData ¶
type ParsedData struct { Architecture string `json:"architecture"` DockerVersion string `json:"docker_version"` EnvVariables []string `json:"env_variables"` }
ParsedData general details of env
type ReleaseController ¶
type ReleaseController struct { // Generates a kubernetes client to interact with clusters. *kubeCl.CustomClient }
Factory to initialize the comunication against different API like github or kubernetes.
func NewSuiteController ¶
func NewSuiteController(kube *kubeCl.CustomClient) (*ReleaseController, error)
Initializes all the clients and return interface to operate with release controller.
func (*ReleaseController) CreateRelease ¶
func (r *ReleaseController) CreateRelease(name, namespace, snapshot, releasePlan string) (*releaseApi.Release, error)
CreateRelease creates a new Release using the given parameters.
func (*ReleaseController) CreateReleasePipelineRoleBindingForServiceAccount ¶
func (r *ReleaseController) CreateReleasePipelineRoleBindingForServiceAccount(namespace string, serviceAccount *corev1.ServiceAccount) (*rbac.RoleBinding, error)
CreateReleasePipelineRoleBindingForServiceAccount creates a RoleBinding for the passed serviceAccount to enable retrieving the necessary CRs from the passed namespace.
func (*ReleaseController) CreateReleasePlan ¶
func (r *ReleaseController) CreateReleasePlan(name, namespace, application, targetNamespace, autoReleaseLabel string, data *runtime.RawExtension, tenantPipeline *tektonutils.ParameterizedPipeline, finalPipeline *tektonutils.ParameterizedPipeline) (*releaseApi.ReleasePlan, error)
CreateReleasePlan creates a new ReleasePlan using the given parameters.
func (*ReleaseController) CreateReleasePlanAdmission ¶
func (r *ReleaseController) CreateReleasePlanAdmission(name, namespace, environment, origin, policy, serviceAccountName string, applications []string, autoRelease bool, pipelineRef *tektonutils.PipelineRef, data *runtime.RawExtension) (*releaseApi.ReleasePlanAdmission, error)
CreateReleasePlanAdmission creates a new ReleasePlanAdmission using the given parameters.
func (*ReleaseController) DeleteReleasePlan ¶
func (r *ReleaseController) DeleteReleasePlan(name, namespace string, failOnNotFound bool) error
DeleteReleasePlan deletes a given ReleasePlan name in given namespace.
func (*ReleaseController) DeleteReleasePlanAdmission ¶
func (r *ReleaseController) DeleteReleasePlanAdmission(name, namespace string, failOnNotFound bool) error
DeleteReleasePlanAdmission deletes the ReleasePlanAdmission resource with the given name from the given namespace. Optionally, it can avoid returning an error if the resource did not exist: specify 'false', if it's likely the ReleasePlanAdmission has already been deleted (for example, because the Namespace was deleted)
func (*ReleaseController) GetFirstReleaseInNamespace ¶
func (r *ReleaseController) GetFirstReleaseInNamespace(namespace string) (*releaseApi.Release, error)
GetFirstReleaseInNamespace returns the first Release from list of releases in the given namespace.
func (*ReleaseController) GetPipelineRunInNamespace ¶
func (r *ReleaseController) GetPipelineRunInNamespace(namespace, releaseName, releaseNamespace string) (*pipeline.PipelineRun, error)
GetPipelineRunInNamespace returns the Release PipelineRun referencing the given release.
func (*ReleaseController) GetPyxisImageByImageID ¶
func (r *ReleaseController) GetPyxisImageByImageID(pyxisStageImagesApiEndpoint, imageID string, pyxisCertDecoded, pyxisKeyDecoded []byte) ([]byte, error)
GetPyxisImageByImageID makes a GET request to stage Pyxis to get an image and returns it.
func (*ReleaseController) GetPyxisImageIDsFromCreatePyxisImageTaskLogs ¶
func (r *ReleaseController) GetPyxisImageIDsFromCreatePyxisImageTaskLogs(logs map[string]string) ([]string, error)
GetPyxisImageIDsFromCreatePyxisImageTaskLogs takes a slice of task logs (as this is what TektonController.GetTaskRunLogs returns) and parses them for the imageIDs, returning them as a slice.
func (*ReleaseController) GetRelease ¶
func (r *ReleaseController) GetRelease(releaseName, snapshotName, namespace string) (*releaseApi.Release, error)
GetRelease returns the release with in the given namespace. It can find a Release CR based on provided name or a name of an associated Snapshot
func (*ReleaseController) GetReleaseConditionStatusMessages ¶
func (r *ReleaseController) GetReleaseConditionStatusMessages(name, namespace string) (messages []string, err error)
Get the message from the status of a release. Useful for debugging purposes.
func (*ReleaseController) GetReleasePlan ¶
func (r *ReleaseController) GetReleasePlan(name, namespace string) (*releaseApi.ReleasePlan, error)
GetReleasePlan returns the ReleasePlan with the given name in the given namespace.
func (*ReleaseController) GetReleasePlanAdmission ¶
func (r *ReleaseController) GetReleasePlanAdmission(name, namespace string) (*releaseApi.ReleasePlanAdmission, error)
GetReleasePlanAdmission returns the ReleasePlanAdmission with the given name in the given namespace.
func (*ReleaseController) GetReleases ¶
func (r *ReleaseController) GetReleases(namespace string) (*releaseApi.ReleaseList, error)
GetReleases returns the list of Release CR in the given namespace.
func (*ReleaseController) StoreRelease ¶
func (r *ReleaseController) StoreRelease(release *releaseApi.Release) error
StoreRelease stores a given Release as an artifact.
func (*ReleaseController) WaitForReleasePipelineToBeFinished ¶
func (r *ReleaseController) WaitForReleasePipelineToBeFinished(release *releaseApi.Release, managedNamespace string) error
WaitForReleasePipelineToBeFinished wait for given release pipeline to finish. It exposes the error message from the failed task to the end user when the pipelineRun failed.
func (*ReleaseController) WaitForReleasePipelineToGetStarted ¶
func (r *ReleaseController) WaitForReleasePipelineToGetStarted(release *releaseApi.Release, managedNamespace string) (*pipeline.PipelineRun, error)
WaitForReleasePipelineToGetStarted wait for given release pipeline to get started. In case of failure, this function retries till it gets timed out.
type RequestLinks ¶
type RequestLinks struct {
Href string `json:"href"`
}
Defines a struct RequestLinks with a single field Href for storing a link related to a request.
type RpmManifestLinks ¶
type RpmManifestLinks struct {
Href string `json:"href"`
}
Defines a struct RpmManifestLinks with a single field Href for storing a link to an RPM manifest.
type TestResultsLinks ¶
type TestResultsLinks struct {
Href string `json:"href"`
}
Defines a struct TestResultsLinks with a single field Href for storing a link to test results.
type VulnerabilitiesLinks ¶
type VulnerabilitiesLinks struct {
Href string `json:"href"`
}
Defines a struct VulnerabilitiesLinks with a single field Href for storing a link.