Documentation
¶
Index ¶
- Constants
- Variables
- func GetComMatrixHeadersByFormat(format string) (string, error)
- func GetNodeRole(node *corev1.Node) (string, error)
- type ComDetails
- type ComMatrix
- func (m *ComMatrix) Contains(cd ComDetails) bool
- func (m *ComMatrix) SeparateMatrixByPool() map[string]ComMatrix
- func (m *ComMatrix) SeparateMatrixByRole() (ComMatrix, ComMatrix)
- func (m *ComMatrix) SortAndRemoveDuplicates()
- func (m *ComMatrix) String() string
- func (m *ComMatrix) ToCSV() ([]byte, error)
- func (m *ComMatrix) ToJSON() ([]byte, error)
- func (m *ComMatrix) ToNFTables() ([]byte, error)
- func (m *ComMatrix) ToYAML() ([]byte, error)
- func (m *ComMatrix) WriteMatrixToFileByType(utilsHelpers utils.UtilsInterface, fileNamePrefix, format string, ...) error
- type ContainerInfo
- type Deployment
Constants ¶
View Source
const ( FormatJSON = "json" FormatYAML = "yaml" FormatCSV = "csv" FormatNFT = "nft" )
Variables ¶
View Source
var BaremetalStaticEntriesMaster = []ComDetails{ { Direction: "Ingress", Protocol: "TCP", Port: 53, NodePool: "master", Service: "dns-default", Namespace: "openshift-dns", Pod: "dnf-default", Container: "dns", Optional: false, }, { Direction: "Ingress", Protocol: "UDP", Port: 53, NodePool: "master", Service: "dns-default", Namespace: "openshift-dns", Pod: "dnf-default", Container: "dns", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 9444, NodePool: "master", Service: "", Namespace: "openshift-kni-infra", Pod: "haproxy", Container: "haproxy", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 9445, NodePool: "master", Service: "", Namespace: "openshift-kni-infra", Pod: "haproxy", Container: "haproxy", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 9454, NodePool: "master", Service: "", Namespace: "openshift-kni-infra", Pod: "haproxy", Container: "haproxy", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 18080, NodePool: "master", Service: "", Namespace: "openshift-kni-infra", Pod: "coredns", Container: "coredns", Optional: false, }, }
View Source
var BaremetalStaticEntriesWorker = []ComDetails{ { Direction: "Ingress", Protocol: "TCP", Port: 53, NodePool: "worker", Service: "dns-default", Namespace: "openshift-dns", Pod: "dnf-default", Container: "dns", Optional: false, }, { Direction: "Ingress", Protocol: "UDP", Port: 53, NodePool: "worker", Service: "dns-default", Namespace: "openshift-dns", Pod: "dnf-default", Container: "dns", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 18080, NodePool: "worker", Service: "", Namespace: "openshift-kni-infra", Pod: "coredns", Container: "coredns", Optional: false, }, }
View Source
var GeneralIPv6StaticEntriesMaster = []ComDetails{ { Direction: "Ingress", Protocol: "UDP", Port: 546, NodePool: "master", Service: "NetworkManager", Namespace: "", Pod: "", Container: "", Optional: false, }, }
View Source
var GeneralIPv6StaticEntriesWorker = []ComDetails{ { Direction: "Ingress", Protocol: "UDP", Port: 546, NodePool: "worker", Service: "NetworkManager", Namespace: "", Pod: "", Container: "", Optional: false, }, }
General IPv6-only static entries that should be applied when the cluster supports IPv6.
View Source
var GeneralStaticEntriesMaster = []ComDetails{ { Direction: "Ingress", Protocol: "TCP", Port: 8080, NodePool: "master", Service: "", Namespace: "openshift-network-operator", Pod: "network-operator", Container: "network-operator", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 9637, NodePool: "master", Service: "kube-rbac-proxy-crio", Namespace: "openshift-machine-config-operator", Pod: "kube-rbac-proxy-crio", Container: "kube-rbac-proxy-crio", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 10256, NodePool: "master", Service: "ovnkube", Namespace: "openshift-ovn-kubernetes", Pod: "ovnkube", Container: "ovnkube-controller", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 10250, NodePool: "master", Service: "kubelet", Namespace: "Host system service", Pod: "", Container: "", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 9107, NodePool: "master", Service: "egressip-node-healthcheck", Namespace: "openshift-ovn-kubernetes", Pod: "ovnkube-node", Container: "ovnkube-controller", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 111, NodePool: "master", Service: "rpcbind", Namespace: "Host system service", Pod: "", Container: "", Optional: true, }, { Direction: "Ingress", Protocol: "UDP", Port: 111, NodePool: "master", Service: "rpcbind", Namespace: "Host system service", Pod: "", Container: "", Optional: true, }, { Direction: "Ingress", Protocol: "TCP", Port: 22, NodePool: "master", Service: "sshd", Namespace: "Host system service", Pod: "", Container: "", Optional: true, }, { Direction: "Ingress", Protocol: "TCP", Port: 22624, NodePool: "master", Service: "machine-config-server", Namespace: "openshift-machine-config-operator", Pod: "machine-config-server", Container: "machine-config-server", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 22623, NodePool: "master", Service: "machine-config-server", Namespace: "openshift-machine-config-operator", Pod: "machine-config-server", Container: "machine-config-server", Optional: false, }, }
View Source
var GeneralStaticEntriesWorker = []ComDetails{ { Direction: "Ingress", Protocol: "TCP", Port: 22, NodePool: "worker", Service: "sshd", Namespace: "Host system service", Pod: "", Container: "", Optional: true, }, { Direction: "Ingress", Protocol: "TCP", Port: 9637, NodePool: "worker", Service: "kube-rbac-proxy-crio", Namespace: "openshift-machine-config-operator", Pod: "kube-rbac-proxy-crio", Container: "kube-rbac-proxy-crio", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 10250, NodePool: "worker", Service: "kubelet", Namespace: "Host system service", Pod: "", Container: "", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 9107, NodePool: "worker", Service: "egressip-node-healthcheck", Namespace: "openshift-ovn-kubernetes", Pod: "ovnkube-node", Container: "ovnkube-controller", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 111, NodePool: "worker", Service: "rpcbind", Namespace: "Host system service", Pod: "", Container: "", Optional: true, }, { Direction: "Ingress", Protocol: "UDP", Port: 111, NodePool: "worker", Service: "rpcbind", Namespace: "Host system service", Pod: "", Container: "", Optional: true, }, { Direction: "Ingress", Protocol: "TCP", Port: 10256, NodePool: "worker", Service: "ovnkube", Namespace: "openshift-ovn-kubernetes", Pod: "ovnkube", Container: "ovnkube-controller", Optional: false, }, }
View Source
var StandardStaticEntries = []ComDetails{ { Direction: "Ingress", Protocol: "UDP", Port: 6081, NodePool: "worker", Service: "ovn-kubernetes geneve", Namespace: "openshift-ovn-kubernetes", Pod: "", Container: "", Optional: false, }, { Direction: "Ingress", Protocol: "UDP", Port: 6081, NodePool: "master", Service: "ovn-kubernetes geneve", Namespace: "openshift-ovn-kubernetes", Pod: "", Container: "", Optional: false, }, }
View Source
var SupportedPlatforms = []configv1.PlatformType{ configv1.AWSPlatformType, configv1.BareMetalPlatformType, configv1.NonePlatformType, }
Functions ¶
Types ¶
type ComDetails ¶
type ComDetails struct {
Direction string `json:"direction" yaml:"direction" csv:"Direction"`
Protocol string `json:"protocol" yaml:"protocol" csv:"Protocol"`
Port int `json:"port" yaml:"port" csv:"Port"`
Namespace string `json:"namespace" yaml:"namespace" csv:"Namespace"`
Service string `json:"service" yaml:"service" csv:"Service"`
Pod string `json:"pod" yaml:"pod" csv:"Pod"`
Container string `json:"container" yaml:"container" csv:"Container"`
NodePool string `json:"nodePool" yaml:"nodePool" csv:"NodePool"`
Optional bool `json:"optional" yaml:"optional" csv:"Optional"`
}
func ParseToComDetailsList ¶ added in v0.0.3
func ParseToComDetailsList(content []byte, format string) ([]ComDetails, error)
func (ComDetails) Equals ¶
func (cd ComDetails) Equals(other ComDetails) bool
func (ComDetails) String ¶
func (cd ComDetails) String() string
type ComMatrix ¶
type ComMatrix struct {
Matrix []ComDetails
}
func (*ComMatrix) Contains ¶
func (m *ComMatrix) Contains(cd ComDetails) bool
func (*ComMatrix) SeparateMatrixByPool ¶ added in v0.0.4
SeparateMatrixByPool groups matrix entries by their pool name (stored in NodePool).
func (*ComMatrix) SeparateMatrixByRole ¶
func (*ComMatrix) SortAndRemoveDuplicates ¶
func (m *ComMatrix) SortAndRemoveDuplicates()
SortAndRemoveDuplicates removes duplicates in the matrix and sort it.
func (*ComMatrix) ToNFTables ¶
func (*ComMatrix) WriteMatrixToFileByType ¶
func (m *ComMatrix) WriteMatrixToFileByType(utilsHelpers utils.UtilsInterface, fileNamePrefix, format string, deployment Deployment, destDir string) error
type ContainerInfo ¶
Click to show internal directories.
Click to hide internal directories.