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) 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, NodeRole: "master", Service: "dns-default", Namespace: "openshift-dns", Pod: "dnf-default", Container: "dns", Optional: false, }, { Direction: "Ingress", Protocol: "UDP", Port: 53, NodeRole: "master", Service: "dns-default", Namespace: "openshift-dns", Pod: "dnf-default", Container: "dns", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 9444, NodeRole: "master", Service: "", Namespace: "openshift-kni-infra", Pod: "haproxy", Container: "haproxy", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 9445, NodeRole: "master", Service: "", Namespace: "openshift-kni-infra", Pod: "haproxy", Container: "haproxy", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 9454, NodeRole: "master", Service: "", Namespace: "openshift-kni-infra", Pod: "haproxy", Container: "haproxy", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 6385, NodeRole: "master", Service: "", Namespace: "openshift-machine-api", Pod: "ironic-proxy", Container: "ironic-proxy", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 18080, NodeRole: "master", Service: "", Namespace: "openshift-kni-infra", Pod: "coredns", Container: "coredns", Optional: false, }, }
View Source
var BaremetalStaticEntriesWorker = []ComDetails{ { Direction: "Ingress", Protocol: "TCP", Port: 53, NodeRole: "worker", Service: "dns-default", Namespace: "openshift-dns", Pod: "dnf-default", Container: "dns", Optional: false, }, { Direction: "Ingress", Protocol: "UDP", Port: 53, NodeRole: "worker", Service: "dns-default", Namespace: "openshift-dns", Pod: "dnf-default", Container: "dns", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 18080, NodeRole: "worker", Service: "", Namespace: "openshift-kni-infra", Pod: "coredns", Container: "coredns", Optional: false, }, }
View Source
var CloudStaticEntriesMaster = []ComDetails{ { Direction: "Ingress", Protocol: "TCP", Port: 10258, NodeRole: "master", Service: "cloud-controller", Namespace: "openshift-cloud-controller-manager-operator", Pod: "cloud-controller-manager", Container: "cloud-controller-manager", Optional: false, }, }
View Source
var GeneralStaticEntriesMaster = []ComDetails{ { Direction: "Ingress", Protocol: "TCP", Port: 8080, NodeRole: "master", Service: "", Namespace: "openshift-network-operator", Pod: "network-operator", Container: "network-operator", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 9637, NodeRole: "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, NodeRole: "master", Service: "ovnkube", Namespace: "openshift-ovn-kubernetes", Pod: "ovnkube", Container: "ovnkube-controller", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 10250, NodeRole: "master", Service: "kubelet", Namespace: "Host system service", Pod: "", Container: "", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 9107, NodeRole: "master", Service: "egressip-node-healthcheck", Namespace: "openshift-ovn-kubernetes", Pod: "ovnkube-node", Container: "ovnkube-controller", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 111, NodeRole: "master", Service: "rpcbind", Namespace: "Host system service", Pod: "", Container: "", Optional: true, }, { Direction: "Ingress", Protocol: "UDP", Port: 111, NodeRole: "master", Service: "rpcbind", Namespace: "Host system service", Pod: "", Container: "", Optional: true, }, { Direction: "Ingress", Protocol: "TCP", Port: 22, NodeRole: "master", Service: "sshd", Namespace: "Host system service", Pod: "", Container: "", Optional: true, }, { Direction: "Ingress", Protocol: "TCP", Port: 9258, NodeRole: "master", Service: "machine-approver", Namespace: "openshift-cloud-controller-manager-operator", Pod: "cluster-cloud-controller-manager", Container: "cluster-cloud-controller-manager", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 9980, NodeRole: "master", Service: "etcd", Namespace: "openshift-etcd", Pod: "etcd", Container: "etcd", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 9978, NodeRole: "master", Service: "etcd", Namespace: "openshift-etcd", Pod: "etcd", Container: "etcd-metrics", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 10357, NodeRole: "master", Service: "openshift-kube-apiserver-healthz", Namespace: "openshift-kube-apiserver", Pod: "kube-apiserver", Container: "kube-apiserver-check-endpoints", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 17697, NodeRole: "master", Service: "openshift-kube-apiserver-healthz", Namespace: "openshift-kube-apiserver", Pod: "kube-apiserver", Container: "kube-apiserver-check-endpoints", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 2380, NodeRole: "master", Service: "healthz", Namespace: "openshift-etcd", Pod: "etcd", Container: "etcd", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 6080, NodeRole: "master", Service: "", Namespace: "openshift-kube-apiserver", Pod: "kube-apiserver", Container: "kube-apiserver-insecure-readyz", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 22624, NodeRole: "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, NodeRole: "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, NodeRole: "worker", Service: "sshd", Namespace: "Host system service", Pod: "", Container: "", Optional: true, }, { Direction: "Ingress", Protocol: "TCP", Port: 9637, NodeRole: "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, NodeRole: "worker", Service: "kubelet", Namespace: "Host system service", Pod: "", Container: "", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 9107, NodeRole: "worker", Service: "egressip-node-healthcheck", Namespace: "openshift-ovn-kubernetes", Pod: "ovnkube-node", Container: "ovnkube-controller", Optional: false, }, { Direction: "Ingress", Protocol: "TCP", Port: 111, NodeRole: "worker", Service: "rpcbind", Namespace: "Host system service", Pod: "", Container: "", Optional: true, }, { Direction: "Ingress", Protocol: "UDP", Port: 111, NodeRole: "worker", Service: "rpcbind", Namespace: "Host system service", Pod: "", Container: "", Optional: true, }, { Direction: "Ingress", Protocol: "TCP", Port: 10256, NodeRole: "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, NodeRole: "worker", Service: "ovn-kubernetes geneve", Namespace: "openshift-ovn-kubernetes", Pod: "", Container: "", Optional: false, }, { Direction: "Ingress", Protocol: "UDP", Port: 6081, NodeRole: "master", Service: "ovn-kubernetes geneve", Namespace: "openshift-ovn-kubernetes", Pod: "", Container: "", Optional: false, }, }
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"`
NodeRole string `json:"nodeRole" yaml:"nodeRole" csv:"Node Role"`
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) 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.