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.
Index ¶
- Constants
- func AnyMcfgPoolLabelMatches(nodeSelector map[string]string, poolList *mcfgv1.MachineConfigPoolList) bool
- func ComplianceOperatorRootCA(certname string, expire int) ([]byte, []byte, error)
- func DNSLengthName(hashPrefix string, format string, a ...interface{}) string
- func DiffRemediationList(oldList, newList []*ParseResult) bool
- func GetComponentImage(component ComplianceComponent) string
- func GetFirstNodeRole(nodeSelector map[string]string) string
- func GetFirstNodeRoleLabel(nodeSelector map[string]string) string
- func GetNodeRoleSelector(role string) map[string]string
- func IsMachineConfig(obj *unstructured.Unstructured) bool
- func LengthName(maxLen int, hashPrefix string, format string, a ...interface{}) (string, error)
- func McfgPoolLabelMatches(nodeSelector map[string]string, pool *mcfgv1.MachineConfigPool) bool
- func NewClientCert(caCert, caKey []byte, certname string, expire int) ([]byte, []byte, error)
- func NewServerCert(caCert, caKey []byte, certname string, expire int) ([]byte, []byte, error)
- func ParseMachineConfig(rem *compv1alpha1.ComplianceRemediation, obj *unstructured.Unstructured) (*mcfgv1.MachineConfig, error)
- type ComplianceComponent
- type ParseResult
- type XMLDocument
Constants ¶
const ( LOG_COLLECTOR = iota OPENSCAP RESULT_SERVER AGGREGATOR API_RESOURCE_COLLECTOR OPERATOR )
Variables ¶
This section is empty.
Functions ¶
func AnyMcfgPoolLabelMatches ¶ added in v0.1.6
func AnyMcfgPoolLabelMatches(nodeSelector map[string]string, poolList *mcfgv1.MachineConfigPoolList) bool
AnyMcfgPoolLabelMatches verifies if the given nodeSelector matches the nodeSelector in any of the given MachineConfigPools
func DNSLengthName ¶ added in v0.1.9
func DiffRemediationList ¶ added in v0.1.6
func DiffRemediationList(oldList, newList []*ParseResult) bool
returns true if the lists are the same, false if they differ
func GetComponentImage ¶ added in v0.1.9
func GetComponentImage(component ComplianceComponent) string
GetComponentImage returns a full image pull spec for a given component based on the component type
func GetFirstNodeRole ¶
func GetFirstNodeRoleLabel ¶
func GetNodeRoleSelector ¶
func IsMachineConfig ¶ added in v0.1.9
func IsMachineConfig(obj *unstructured.Unstructured) bool
IsMachineConfig checks if the specified object is a MachineConfig object
func LengthName ¶ added in v0.1.9
LengthName creates a string of maximum defined length.
func McfgPoolLabelMatches ¶ added in v0.1.6
func McfgPoolLabelMatches(nodeSelector map[string]string, pool *mcfgv1.MachineConfigPool) bool
McfgPoolLabelMatches verifies if the given nodeSelector matches the given MachineConfigPool's nodeSelector
func NewClientCert ¶
func NewServerCert ¶
func ParseMachineConfig ¶ added in v0.1.9
func ParseMachineConfig(rem *compv1alpha1.ComplianceRemediation, obj *unstructured.Unstructured) (*mcfgv1.MachineConfig, error)
ParseMachineConfig parses a Machineconfig object from an unstructured object for a specific remediation.
Types ¶
type ComplianceComponent ¶ added in v0.1.9
type ComplianceComponent uint
type ParseResult ¶ added in v0.1.9
type ParseResult struct { CheckResult *compv1alpha1.ComplianceCheckResult Remediation *compv1alpha1.ComplianceRemediation }
func ParseResultsFromContentAndXccdf ¶ added in v0.1.9
func ParseResultsFromContentAndXccdf(scheme *runtime.Scheme, scanName string, namespace string, dsDom *XMLDocument, resultsReader io.Reader) ([]*ParseResult, error)
type XMLDocument ¶
type XMLDocument struct {
*xmldom.Document
}
XMLDocument is a wrapper that keeps the interface XML-parser-agnostic
func ParseContent ¶
func ParseContent(dsReader io.Reader) (*XMLDocument, error)
ParseContent parses the DataStream and returns the XML document