Documentation ¶
Index ¶
- Constants
- func IsChartNotFound(err error) bool
- func LoadChartFromURI(opts *CheckOptions) (*chart.Chart, string, error)
- type AnnotationHolder
- type ChartCache
- type ChartCacheItem
- type ChartNotFoundErr
- type Check
- type CheckFunc
- type CheckID
- type CheckOptions
- type DefaultRegistry
- type OpenShiftSemVerErr
- type OpenShiftVersionErr
- type Registry
- type Result
- func CanBeInstalledWithoutClusterAdminPrivileges(opts *CheckOptions) (Result, error)
- func CanBeInstalledWithoutManualPreRequisites(opts *CheckOptions) (Result, error)
- func ChartTesting(opts *CheckOptions) (Result, error)
- func ContainsTest(opts *CheckOptions) (Result, error)
- func ContainsValues(opts *CheckOptions) (Result, error)
- func ContainsValuesSchema(opts *CheckOptions) (Result, error)
- func HasKubeVersion(opts *CheckOptions) (Result, error)
- func HasKubeVersion_V1_1(opts *CheckOptions) (Result, error)
- func HasReadme(opts *CheckOptions) (Result, error)
- func HelmLint(opts *CheckOptions) (Result, error)
- func ImagesAreCertified(opts *CheckOptions) (Result, error)
- func ImagesAreCertified_V1_1(opts *CheckOptions) (Result, error)
- func IsCommercialChart(opts *CheckOptions) (Result, error)
- func IsCommunityChart(opts *CheckOptions) (Result, error)
- func IsHelmV3(opts *CheckOptions) (Result, error)
- func KeywordsAreOpenshiftCategories(opts *CheckOptions) (Result, error)
- func NewResult(outcome bool, reason string) Result
- func NewSkippedResult(reason string) Result
- func NotContainCRDs(opts *CheckOptions) (Result, error)
- func NotContainCSIObjects(opts *CheckOptions) (Result, error)
- func NotContainsInfraPluginsAndDrivers(opts *CheckOptions) (Result, error)
- func RequiredAnnotationsPresent(opts *CheckOptions) (Result, error)
- func SignatureIsValid(opts *CheckOptions) (Result, error)
- type Versioner
Constants ¶
View Source
const ( APIVersion2 = "v2" ReadmeExist = "Chart has a README" ReadmeDoesNotExist = "Chart does not have a README" NotHelm3Reason = "API version is not V2, used in Helm 3" Helm3Reason = "API version is V2, used in Helm 3" TestTemplatePrefix = "templates/tests/" ChartTestFilesExist = "Chart test files exist" ChartTestFilesDoesNotExist = "Chart test files do not exist" KuberVersionSpecified = "Kubernetes version specified" KuberVersionNotSpecified = "Kubernetes version is not specified" KuberVersionProcessingError = "Error converting kubeVersion to an OCP range" ValuesSchemaFileExist = "Values schema file exist" ValuesSchemaFileDoesNotExist = "Values schema file does not exist" ValuesFileExist = "Values file exist" ValuesFileDoesNotExist = "Values file does not exist" ChartContainCRDs = "Chart contains CRDs" ChartDoesNotContainCRDs = "Chart does not contain CRDs" HelmLintSuccessful = "Helm lint successful" HelmLintHasFailedPrefix = "Helm lint has failed: " CSIObjectsExist = "CSI objects exist" CSIObjectsDoesNotExist = "CSI objects do not exist" NoImagesToCertify = "No images to certify" ImageCertifyFailed = "Failed to certify images" ImageCertified = "Image is Red Hat certified" ImageNotCertified = "Image is not Red Hat certified" ChartTestingSuccess = "Chart tests have passed" MetadataFailure = "Empty metadata in chart" RequiredAnnotationsSuccess = "All required annotations present" RequiredAnnotationsFailure = "Missing required annotations" ChartSigned = "Chart is signed" ChartNotSigned = "Chart is not signed" SignatureIsNotPresentSuccess = "Signature verification not required" SignatureIsValidSuccess = "Signature verification passed" SignatureFailure = "Signature verification failed" SignatureNoKey = "Signature verification skipped, a public key was not specified" ImageCertifySkipped = "Image certification skipped" RedHatRegistry = "registry.redhat.io/" )
View Source
const (
ReleaseConfigString string = "release"
)
Variables ¶
This section is empty.
Functions ¶
func IsChartNotFound ¶
func LoadChartFromURI ¶
func LoadChartFromURI(opts *CheckOptions) (*chart.Chart, string, error)
LoadChartFromURI attempts to retrieve a chart from the given uri string. It accepts "http", "https", "file" schemes, and defaults to "file" if there isn't one.
Types ¶
type AnnotationHolder ¶
type ChartCache ¶
type ChartCacheItem ¶
type ChartNotFoundErr ¶
type ChartNotFoundErr string
func (ChartNotFoundErr) Error ¶
func (c ChartNotFoundErr) Error() string
type CheckFunc ¶
type CheckFunc func(options *CheckOptions) (Result, error)
type CheckOptions ¶
type CheckOptions struct { // URI is the location of the chart to be checked. URI string // ViperConfig is the configuration collected by Viper. ViperConfig *viper.Viper // Values contains the values informed by the user through command line options. Values map[string]interface{} // HelmEnvSettings contains the Helm related environment settings. HelmEnvSettings *helmcli.EnvSettings // AnnotationHolder provides and API to set the OpenShift Version AnnotationHolder AnnotationHolder // client timeout Timeout time.Duration // keyring - public gpg for signed chart PublicKeys []string // helm install timeout HelmInstallTimeout time.Duration // skip helm cleanup SkipCleanup bool }
CheckOptions contains options collected from the environment a check can consult to modify its behavior.
type DefaultRegistry ¶
func (*DefaultRegistry) AllChecks ¶
func (r *DefaultRegistry) AllChecks() DefaultRegistry
type OpenShiftSemVerErr ¶
type OpenShiftSemVerErr string
func (OpenShiftSemVerErr) Error ¶
func (e OpenShiftSemVerErr) Error() string
type OpenShiftVersionErr ¶
type OpenShiftVersionErr string
func (OpenShiftVersionErr) Error ¶
func (e OpenShiftVersionErr) Error() string
type Registry ¶
type Registry interface { Get(id CheckID) (Check, bool) Add(name apiChecks.CheckName, version string, checkFunc CheckFunc) Registry AllChecks() DefaultRegistry }
func NewRegistry ¶
func NewRegistry() Registry
type Result ¶
type Result struct { // Ok indicates whether the result was successful or not. Ok bool // Skipped indicates is test was skipped Skipped bool // Reason for the result value. This is a message indicating // the reason for the value of Ok became true or false. Reason string }
func CanBeInstalledWithoutClusterAdminPrivileges ¶
func CanBeInstalledWithoutClusterAdminPrivileges(opts *CheckOptions) (Result, error)
func CanBeInstalledWithoutManualPreRequisites ¶
func CanBeInstalledWithoutManualPreRequisites(opts *CheckOptions) (Result, error)
func ChartTesting ¶
func ChartTesting(opts *CheckOptions) (Result, error)
ChartTesting partially integrates the chart-testing project in my-chart-verifier.
Unfortunately it wasn't easy as initially expect to integrate chart-testing as a lib in the project, including the main orchestration logic. The ChartTesting function is the interpretation the main logic chart-testing carries, and other functions used in this context were also ported from my-chart-verifier.
func ContainsTest ¶
func ContainsTest(opts *CheckOptions) (Result, error)
func ContainsValues ¶
func ContainsValues(opts *CheckOptions) (Result, error)
func ContainsValuesSchema ¶
func ContainsValuesSchema(opts *CheckOptions) (Result, error)
func HasKubeVersion ¶
func HasKubeVersion(opts *CheckOptions) (Result, error)
func HasKubeVersion_V1_1 ¶
func HasKubeVersion_V1_1(opts *CheckOptions) (Result, error)
func HasReadme ¶
func HasReadme(opts *CheckOptions) (Result, error)
func HelmLint ¶
func HelmLint(opts *CheckOptions) (Result, error)
func ImagesAreCertified ¶
func ImagesAreCertified(opts *CheckOptions) (Result, error)
func ImagesAreCertified_V1_1 ¶
func ImagesAreCertified_V1_1(opts *CheckOptions) (Result, error)
func IsCommercialChart ¶
func IsCommercialChart(opts *CheckOptions) (Result, error)
func IsCommunityChart ¶
func IsCommunityChart(opts *CheckOptions) (Result, error)
func IsHelmV3 ¶
func IsHelmV3(opts *CheckOptions) (Result, error)
func KeywordsAreOpenshiftCategories ¶
func KeywordsAreOpenshiftCategories(opts *CheckOptions) (Result, error)
func NewSkippedResult ¶
func NotContainCRDs ¶
func NotContainCRDs(opts *CheckOptions) (Result, error)
func NotContainCSIObjects ¶
func NotContainCSIObjects(opts *CheckOptions) (Result, error)
func NotContainsInfraPluginsAndDrivers ¶
func NotContainsInfraPluginsAndDrivers(opts *CheckOptions) (Result, error)
func RequiredAnnotationsPresent ¶
func RequiredAnnotationsPresent(opts *CheckOptions) (Result, error)
func SignatureIsValid ¶
func SignatureIsValid(opts *CheckOptions) (Result, error)
func (*Result) SetSkipped ¶
Click to show internal directories.
Click to hide internal directories.