release

package
v0.0.0-...-cc70305 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 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) (*releaseApi.ReleasePlan, error)

CreateReleasePlan creates a new ReleasePlan using the given parameters.

func (*ReleaseController) CreateReleasePlanAdmission

func (r *ReleaseController) CreateReleasePlanAdmission(name, namespace, environment, origin, policy, serviceAccount string, applications []string, autoRelease bool, pipelineRef *utils.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) 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) 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.

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 struct {
	Href string `json:"href"`
}

Defines a struct RpmManifestLinks with a single field Href for storing a link to an RPM manifest.

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 struct {
	Href string `json:"href"`
}

Defines a struct VulnerabilitiesLinks with a single field Href for storing a link.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL