Categorygithub.com/showcase-gig-platform/nora-resource-detector

# Packages

No description provided by the author

# README

nora-resource-detector

nora(野良) means stray in Japanese.

nora-resource-detector finds unmanaged resources in kubernetes cluster.

image

official

public.ecr.aws/q1m5p9s1/nora-resource-detector (amd64 linux only)

build

$ docker build -t <<your repository>>:<<tag>> .

methods

List of methods to determine if resources are managed.

ArgoCD

Whether the resource is managed by ArgoCD.

EKS Addon

Whether the resource is deployed by an EKS addon.

OwnerReference

Whether the resource is dependent on others.

VolumeClaimTemplate in STS

Whether the PVC was generated by volumeClaimTemplate in StatefulSet.

Static

If you want to specify other static.

flags

--config string
    Path to config file. (default "~/.nora/config.yaml")
--apiserver-url string
    URL for kubernetes api server.
--kubeconfig string
    Path to kubeconfig file.
--context string
    Kubeconfig context name to use.
--in-cluster
    Set true if used in kubernetes cluster.

RBAC

Allows the executing account to list target resources.

config

See also example/config.yaml

FieldDescription
targetResourcesList of resource type names that search for Nora resources.
resourceManagersConfigs of components that manage resources.
resourceManagers.argocdResources managed by ArgoCD are not detected as Nora.
resourceManagers.argocd.instanceLabelKeyLabel key to determine which resources managed by ArgoCD. (Default if empty, see also docs)
resourceManagers.eksAddonResources managed by EKS addon are not detected as Nora.
resourceManagers.ownerReferenceResources dependent on others are not detected as Nora.
resourceManagers.stsVolumeClaimTemplatePVC that created by volumeClaimTemplate of Statefulset are not detected as Nora.
resourceManagers.serviceAccountTokenSecrets created by serviceAccount are not detected as Nora.
resourceManagers.certificateSecretSecrets created by certificate (custom resource by cert-manager) are not detected as Nora. (effective when --enable-certificate-owner-ref is false)
resourceManagers.staticStatic settings to avoid detection as Nora other than the above.
resourceManagers.static.configsList of static settings.
resourceManagers.static.configs.resourceResource type name.
resourceManagers.static.configs.namespaceResource namespace.
resourceManagers.static.configs.namesResource name list.
notifiersConfigs for result notification.
notifiers.stdoutWhether to output to stdout.
notifiers.slackConfig to notify slack.
notifiers.slack.tokenBot token to connect slack. (Can also be set by environment variable SLACK_TOKEN)
notifiers.slack.channelSlack channel name to send result.
notifiers.slack.usernameUsername when sending result.
notifiers.slack.icon_emojiIcon emoji when sending result.
notifiers.slack.icon_urlIcon image url when sending result.

Output

Now, output format is fixed and cannot be customized.

stdout

{"Group":"apps","Resource":"deployments","Namespace":"kube-system","Name":"coredns"}

slack

slack output sample