restore

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCleanManifestsCommand

func BuildCleanManifestsCommand() *cobra.Command

rg --files-without-match 'ownerRefer|norman'

- ignore endpoints which have the same name as a service (no matter whether service is filtered or not) - ignore stuff with ownerReference - ignore stuff with "norman" creator - ignore default serviceaccount - for every serviceaccount, check global policy... - for every CRD, check whether CRD exists - for secret, ignore if that's a service account secret

func BuildMariadbCommand

func BuildMariadbCommand() *cobra.Command

func BuildPersistentVolumesCommand

func BuildPersistentVolumesCommand() *cobra.Command

func BuildPostgresCommand

func BuildPostgresCommand() *cobra.Command

Types

type KubeFile

type KubeFile struct {
	Parsed       ParsedKubernetesManifestParts
	Path         string
	FullKubeFile map[string]interface{}
	SkipReasons  []string
}

type ParsedKubernetesManifestParts

type ParsedKubernetesManifestParts struct {
	Kind       string `yaml:"kind"`
	ApiVersion string `yaml:"apiVersion"`
	Metadata   struct {
		Name            string            `yaml:"name"`
		Namespace       string            `yaml:"namespace"`
		Labels          map[string]string `yaml:"labels"`
		Annotations     map[string]string `yaml:"annotations"`
		OwnerReferences []struct {
			Kind       string `yaml:"kind"`
			ApiVersion string `yaml:"apiVersion"`
			Name       string `yaml:"name"`
		} `yaml:"ownerReferences"`
	} `yaml:"metadata"`

	// for Kind == Secret
	Secrets []struct {
		Name string `yaml:"name"`
	} `yaml:"secrets"`
	Type string `yaml:"type"`

	// for Kind == ClusterRoleBinding
	RoleRef struct {
		Kind     string `yaml:"kind"`
		ApiGroup string `yaml:"apiGroup"`
		Name     string `yaml:"name"`
	} `yaml:"roleRef"`
	Subjects []struct {
		Kind      string `yaml:"kind"`
		Name      string `yaml:"name"`
		Namespace string `yaml:"namespace"`
	} `yaml:"subjects"`
}

Jump to

Keyboard shortcuts

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