manager

package
v1.5.0 Latest Latest
Warning

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

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

Documentation

Overview

Copyright © 2020 Red Hat Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2020 Red Hat Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2020 Red Hat Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2019 Red Hat Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2019 Red Hat Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2020 Red Hat Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	MoreThanOneObjErr = errors.New("more than one object returned from the filter")
	NullValErr        = errors.New("no value was returned from the filter")
)
View Source
var AggregatorCmd = &cobra.Command{
	Use:   "aggregator",
	Short: "Aggregate configMaps complianceRemediations",
	Long:  "A tool to aggregate configMaps with scan results to complianceRemediation types",
	Run:   aggregator,
}
View Source
var ApiResourceCollectorCmd = &cobra.Command{
	Use:   "api-resource-collector",
	Short: "Stages cluster resources for OpenSCAP scanning.",
	Long:  "Stages cluster resources for OpenSCAP scanning.",
	Run:   runAPIResourceCollector,
}
View Source
var ErrServiceMonitorNotPresent = fmt.Errorf("no ServiceMonitor registered with the API")
View Source
var OperatorCmd = &cobra.Command{
	Use:   "operator",
	Short: "The compliance-operator command",
	Long:  `An operator that issues compliance checks and their lifecycle.`,
	Run:   RunOperator,
}
View Source
var ProfileparserCmd = &cobra.Command{
	Use:   "profileparser",
	Short: "Runs the profile parser",
	Long:  `The profileparser reads a data stream file and generates profile objects from it.`,
	Run:   runProfileParser,
}
View Source
var RerunnerCmd = &cobra.Command{
	Use:   "suitererunner",
	Short: "Re-runs a ComplianceSuite",
	Long:  `makes sure that a ComplianceSuite's scans get re-run.`,
	Run:   RerunSuite,
}
View Source
var ResultServerCmd = &cobra.Command{
	Use:   "resultserver",
	Short: "A tool to receive raw SCAP scan results.",
	Long:  "A tool to receive raw SCAP scan results.",
	Run: func(cmd *cobra.Command, args []string) {
		server(parseResultServerConfig(cmd))
	},
}
View Source
var ResultcollectorCmd = &cobra.Command{
	Use:   "resultscollector",
	Short: "A tool to do an OpenSCAP scan from a pod.",
	Long:  "A tool to do an OpenSCAP scan from a pod.",
	Run:   resultCollectorMain,
}

Functions

func DBG

func DBG(format string, a ...interface{})

func FATAL

func FATAL(format string, a ...interface{})

func GenerateServiceMonitor

func GenerateServiceMonitor(s *corev1.Service) *monitoringv1.ServiceMonitor

GenerateServiceMonitor generates a prometheus-operator ServiceMonitor object based on the passed Service object.

func LOG

func LOG(format string, a ...interface{})

func RerunSuite

func RerunSuite(cmd *cobra.Command, args []string)

func ResourceExists

func ResourceExists(dc discovery.DiscoveryInterface, apiGroupVersion, kind string) (bool, error)

ResourceExists returns true if the given resource kind exists in the given api groupversion

func RunOperator

func RunOperator(cmd *cobra.Command, args []string)

Types

type PlatformType

type PlatformType string
const (
	PlatformOpenShift        PlatformType = "OpenShift"
	PlatformEKS              PlatformType = "EKS"
	PlatformROSA             PlatformType = "ROSA"
	PlatformGeneric          PlatformType = "Generic"
	PlatformHyperShift       PlatformType = "HyperShift"
	PlatformOpenShiftOnPower PlatformType = "OpenShiftOnPower"
	PlatformOpenShiftOnZ     PlatformType = "OpenShiftOnZ"
	PlatformUnknown          PlatformType = "Unknown"
)

type ResourceFetcher

type ResourceFetcher interface {
	// Load from a source path, including the decoding step.
	LoadSource(path string) error
	// Load from a tailoring path, including the decoding step.
	LoadTailoring(path string) error
	// Search the decoded data for the resources we need under a particular profile.
	FigureResources(profile string) error
	// Fetch the resources.
	FetchResources() ([]string, error)
	// Save warnings
	SaveWarningsIfAny([]string, string) error
	// Save the resources.
	SaveResources(to string) error
}

ResourceFetcher sources content for resource paths to gather, and then saves the path contents. This interface is provided primarily for code organization.

func NewDataStreamResourceFetcher

func NewDataStreamResourceFetcher(scheme *runtime.Scheme, client runtimeclient.Client, clientSet *kubernetes.Clientset) ResourceFetcher

type ServiceMonitorUpdater

type ServiceMonitorUpdater func(*monitoringv1.ServiceMonitor) error

Jump to

Keyboard shortcuts

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