Documentation ¶
Index ¶
- func ParseObjectIntoType[A any](in interface{}) (*A, error)
- func RunYamlAnalysis(args *YamlAnalysisArgs)
- type Container
- type KeySetComparison
- type Model
- func (m *Model) AddPodWrapper(kind string, name string, spec *PodSpec)
- func (m *Model) AddSkippedResource(kind string, name string)
- func (m *Model) BuildTables() (string, string, string, string, map[string]string)
- func (m *Model) ConfigMapUsages(name string) []string
- func (m *Model) ConfigMapsTable() string
- func (m *Model) GetImageUsages() map[string][]string
- func (m *Model) GetUsedUnusedSecretsAndConfigMaps() (*KeySetComparison, *KeySetComparison)
- func (m *Model) Graph() *graph.Graph
- func (m *Model) ImagesTable() string
- func (m *Model) PodsTable(resources map[string]*PodSpec) string
- func (m *Model) SecretConfigMapsUsages() (map[string][]string, map[string][]string)
- func (m *Model) SecretUsages(name string) []string
- func (m *Model) SecretsTable() string
- func (m *Model) SkippedResourcesTable() string
- type PodSpec
- type YamlAnalysisArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseObjectIntoType ¶ added in v0.0.5
ParseObjectIntoType takes a weakly typed object -- such as an interface{}, a
map[string]interface{}, etc. -- marshals it into yaml, then unmarshals it back into a strongly typed object -- such as a batchv1.Job The goal is to convert a weakly typed object into a strongly typed one; the yaml intermediary is just a convenient implementation detail.
func RunYamlAnalysis ¶ added in v0.0.4
func RunYamlAnalysis(args *YamlAnalysisArgs)
Types ¶
type Container ¶
type Container struct { IsInit bool Name string ConfigMaps *set.Set[string] Secrets *set.Set[string] Image string }
func (*Container) ConfigMapsSlice ¶
func (*Container) SecretsSlice ¶
type KeySetComparison ¶
func CompareKeySets ¶
type Model ¶
type Model struct { Pods map[string]map[string]*PodSpec Secrets []string ConfigMaps []string Skipped map[string][]string }
func NewModelFromYaml ¶ added in v0.0.5
func (*Model) AddPodWrapper ¶
func (*Model) AddSkippedResource ¶
func (*Model) BuildTables ¶ added in v0.0.4
func (*Model) ConfigMapUsages ¶
func (*Model) ConfigMapsTable ¶
func (*Model) GetImageUsages ¶
func (*Model) GetUsedUnusedSecretsAndConfigMaps ¶
func (m *Model) GetUsedUnusedSecretsAndConfigMaps() (*KeySetComparison, *KeySetComparison)
func (*Model) ImagesTable ¶
func (*Model) SecretConfigMapsUsages ¶
func (*Model) SecretUsages ¶
func (*Model) SecretsTable ¶
func (*Model) SkippedResourcesTable ¶
type PodSpec ¶
func AnalyzeCronJob ¶
func AnalyzeDeployment ¶
func AnalyzeDeployment(dep *appsv1.Deployment) *PodSpec
func AnalyzeJob ¶
func AnalyzePodSpec ¶
func AnalyzeStatefulSet ¶
func AnalyzeStatefulSet(sset *appsv1.StatefulSet) *PodSpec
type YamlAnalysisArgs ¶ added in v0.0.4
Click to show internal directories.
Click to hide internal directories.