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 ¶
- func AnyMcfgPoolLabelMatches(nodeSelector map[string]string, poolList *mcfgv1.MachineConfigPoolList) bool
- func ComplianceOperatorRootCA(certname string, expire int) ([]byte, []byte, error)
- func DiffRemediationList(oldList, newList []*compv1alpha1.ComplianceRemediation) bool
- func GetFirstNodeRole(nodeSelector map[string]string) string
- func GetFirstNodeRoleLabel(nodeSelector map[string]string) string
- func GetNodeRoleSelector(role string) map[string]string
- 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 ParseRemediationFromContentAndResults(scheme *runtime.Scheme, scanName string, namespace string, dsDom *XMLDocument, ...) ([]*compv1alpha1.ComplianceRemediation, error)
- type XMLDocument
Constants ¶
This section is empty.
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 DiffRemediationList ¶ added in v0.1.6
func DiffRemediationList(oldList, newList []*compv1alpha1.ComplianceRemediation) bool
returns true if the lists are the same, false if they differ
func GetFirstNodeRole ¶
func GetFirstNodeRoleLabel ¶
func GetNodeRoleSelector ¶
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 ParseRemediationFromContentAndResults ¶
func ParseRemediationFromContentAndResults(scheme *runtime.Scheme, scanName string, namespace string, dsDom *XMLDocument, resultsReader io.Reader) ([]*compv1alpha1.ComplianceRemediation, error)
ParseRemediationFromContentAndResults parses the content DS and the results from the scan, and generates the necessary remediations
Types ¶
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