collector

package
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manifests

type Manifests struct {
	ClusterServiceVersions           []operatorsv1alpha1.ClusterServiceVersion
	Roles                            []rbacv1.Role
	ClusterRoles                     []rbacv1.ClusterRole
	RoleBindings                     []rbacv1.RoleBinding
	ClusterRoleBindings              []rbacv1.ClusterRoleBinding
	Deployments                      []appsv1.Deployment
	ServiceAccounts                  []corev1.ServiceAccount
	Services                         []corev1.Service
	V1CustomResourceDefinitions      []apiextv1.CustomResourceDefinition
	V1beta1CustomResourceDefinitions []apiextv1beta1.CustomResourceDefinition
	ValidatingWebhooks               []admissionregv1.ValidatingWebhook
	MutatingWebhooks                 []admissionregv1.MutatingWebhook
	CustomResources                  []unstructured.Unstructured
	ScorecardConfig                  scorecardv1alpha3.Configuration

	Others []unstructured.Unstructured
}

Manifests holds a collector of all manifests relevant to CSV updates.

func (*Manifests) SplitCSVPermissionsObjects added in v0.19.3

func (c *Manifests) SplitCSVPermissionsObjects(extraSAs []string) (inPerms, inCPerms, out []client.Object)

SplitCSVPermissionsObjects splits Roles and ClusterRoles bound to ServiceAccounts in Deployments and extraSA's. Roles and ClusterRoles bound to RoleBindings associated with ServiceAccounts are added to inPerms. ClusterRoles bound to ClusterRoleBindings associated with ServiceAccounts are added to inCPerms. All Roles and ClusterRoles not bound to a relevant ServiceAccount, and bindings without a relevant ServiceAccount, are added to out. Any bindings with some associations, but with non-associations, are added to out unmodified.

func (*Manifests) UpdateFromDir added in v1.5.0

func (c *Manifests) UpdateFromDir(dir string) error

UpdateFromDir adds all CSV-relevant manifests from dir to their respective fields in a Manifests, then filters and deduplicates them. All other objects are added to Manifests.Others.

func (*Manifests) UpdateFromDirs

func (c *Manifests) UpdateFromDirs(deployDir, crdsDir string) error

UpdateFromDirs adds CustomResourceDefinitions found in crdsDir, and all other CSV-relevant manifests from deployDir, to their respective fields in a Manifests, then filters and deduplicates them. All other objects are added to Manifests.Others.

func (*Manifests) UpdateFromReader

func (c *Manifests) UpdateFromReader(r io.Reader) error

UpdateFromReader adds Roles, ClusterRoles, Deployments, CustomResourceDefinitions, and Custom Resources found in r to their respective fields in a Manifests, then filters and deduplicates them. All other objects are added to Manifests.Others.

Jump to

Keyboard shortcuts

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